60. In a database system, a method for executing an XPath built-in function in an XPath-based query requesting data from an Extensible Markup Language (XML) document, the method comprising: receiving the XPath-based query requesting data from an XML document, the XPath-based query including an XPath built-in function to be executed on data from an XML document which includes a plurality of hierarchically arranged elements, said XPath built-in function operating within a particular context of the XML document during execution of the XPath-based query; during execution of the XPath-based query: determining elements of the XML document satisfying the XPath- based query, obtaining values of said elements of the XML document, associating said values with elements of the XML document, and executing the XPath built-in function with said values and associated elements.
60. In a database system, a method for executing an XPath built-in function in an XPath-based query requesting data from an Extensible Markup Language (XML) document, the method comprising: receiving the XPath-based query requesting data from an XML document, the XPath-based query including an XPath built-in function to be executed on data from an XML document which includes a plurality of hierarchically arranged elements, said XPath built-in function operating within a particular context of the XML document during execution of the XPath-based query; during execution of the XPath-based query: determining elements of the XML document satisfying the XPath- based query, obtaining values of said elements of the XML document, associating said values with elements of the XML document, and executing the XPath built-in function with said values and associated elements. 63. The method of claim 60 , wherein said obtaining step includes aggregating values of a plurality of elements satisfying a portion of the query.