80. In a database system, a method for executing an XPath built-in function included in an XPath-based query requesting data from an XML document organized hierarchically into nodes, the method comprising: generating an execution plan for obtaining data requested by the XPath-based query from an XML document, the execution plan including an operator for performing the XPath built-in function included in the XPath-based query, said XPath built-in function operating within a particular context of the XML document during execution of the XPath-based query; inserting an operator for obtaining values corresponding to nodes of the XML document into the execution plan; during execution of the XPath-based query: identifying nodes of the XML document satisfying the XPath-based query based on the execution plan, deriving values from identified nodes of the XML document using the operator for obtaining values, and invoking the operator for performing the XPath built-in function with the values derived from the identified nodes of the XML document.
86. The method of claim 80 , wherein said invoking step includes invoking the operator for performing the XPath-based function with user supplied literal values and the values derived from identified nodes of the XML document.