<?xml version="1.0"?> 

<!--
	description:
	
		"Implemented core functions"

	library: "Gobo Eiffel XPath Library"
	copyright: "Copyright (c) 2004, Colin Adams and others"
	license: "Eiffel Forum License v2 (see forum.txt)"
	date: "$Date: 2005/01/14 17:15:50 $"
	revision: "$Revision: 1.21 $"
-->

<chapter xmlns="http://www.gobosoft.com/eiffel/gobo/documentation" id="xpath_implemented_functions">
  <chapterinfo>
    <copyright>
      <year>2004</year>
      <holder>Colin Adams and others</holder>
    </copyright>
    <author>
      <firstname>Colin</firstname>
      <surname>Adams</surname>
    </author>
    <email>colin@colina.demon.co.uk</email>
    <date>Tuesday, April 13th, 2004</date>
  </chapterinfo>
  <title>Core functions - implementation status</title>
  <para>This chapter lists all the core functions (functions provided by host lanages such as XSLT are not listed here)
   along with their implementation status.
  </para> 
  <para>The first column of the table gives the function's name, from <ulink url="http://www.w3.org/TR/xpath-functions/">XQuery 1.0 and XPath 2.0 Functions and Operators</ulink>.
   The fn prefix represents the namespace uri http://www.w3.org/2004/10/xpath-functions.</para>
  <para>To translate the function name into it's implementation class (which can be found in $GOBO/library/xml/xpath/functions/), remove
   the leading fn:, uppercase the remaining part of the name, and translate any hyphens into underscores. Then prefix it with XM_XPATH_.
   For example, the function fn:normalize-space, is implemented by <classname>XM_XPATH_NORMALIZE_SPACE</classname>.
  </para>
  <para>All such classes are descendants of <classname>XM_XPATH_SYSTEM_FUNCTION</classname>. They also each have an entry in 
   <classname>XM_XPATH_SYSTEM_FUNCTION_FACTORY</classname>.
  </para>
  <para>The second column says whether or not the function has been implemented yet. The third column indicates
   whether there is a testing class set up for the function. If so, it will be in $GOBO/test/xml/xpath/, and will be named xm_xpath_test_&lt;function-name&gt;.e .
  </para>
  <para>The final column gives a link to the W3C draft or recommendation against which the tests have been checked, or &quot;None&quot;, if this has not been done. </para>
  
  <section>
      <title>Implemented XPath 2.0 core Functions</title>
    <table>
      <title>Table of functions</title>
      <tgroup cols="4">
	<thead>
	 <row>
	   <entry>Name</entry>
	   <entry>Implemented?</entry>
	   <entry>Tested?</entry>
	   <entry>Checked</entry>
	 </row>
	</thead>
	<tbody>
	  <row>
	    <entry>fn:error</entry>
	    <entry>Yes</entry>
	    <entry>No</entry>
	    <entry>No</entry>
	  </row>
	  <row>
	    <entry>fn:trace</entry>
	    <entry>No</entry>
	    <entry>No</entry>
	    <entry>No</entry>
	  </row>

	  <row>
	    <entry>fn:node-name</entry>
	    <entry>No</entry>
	    <entry>No</entry>
	    <entry>No</entry>
	  </row>
	 <row>
	   <entry>fn:string</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:data</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:base-uri</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:document-uri</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:error</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:trace</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:abs</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:ceiling</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:floor</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:round</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:round-half-to-even</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:codepoints-to-string</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:string-to-codepoints</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:compare</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:concat</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:string-join</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:string-length</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:substring</entry>
	   <entry>Yes</entry>
	   <entry>Incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:normalize-space</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:normalize-unicode</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:upper-case</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:lower-case</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:translate</entry>
	   <entry>Yes</entry>
	   <entry>Incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:escape-uri</entry>
	   <entry>Yes</entry>
	   <entry>Ues</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:contains</entry>
	   <entry>Yes</entry>
	   <entry>Incidentallly</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:starts-with</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:ends-with</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:substring-before</entry>
	   <entry>Yes</entry>
	   <entry>Incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:substring-after</entry>
	   <entry>Yes</entry>
	   <entry>Incidentally</entry>
	   <entry>No</entry>
	 </row>	
       <row>
	   <entry>fn:matches</entry>
	   <entry>Yes (but unicode case stuff not implemented yet)</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:replace (but unicode case stuff not implemented yet)</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:tokenize</entry>
	   <entry>Yes (but unicode case stuff not implemented yet)</entry>
	   <entry>Partly</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:true</entry>
	   <entry>Yes</entry>
	   <entry>Only incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:false</entry>
	   <entry>Yes</entry>
	   <entry>Only incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:not</entry>
	   <entry>Yes</entry>
	   <entry>Only incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:years-from-yearMonthDuration</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:months-from-yearMonthDuration</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:days-from-dayTimeDuration</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:hours-from-dayTimeDuration</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:minutes-from-dayTimeDuration</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:seconds-from-dayTimeDuration</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:year-from-dateTime</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:month-from-dateTime</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:day-from-dateTime</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:hours-from-dateTime</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:minutes-from-dateTime</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:seconds-from-dateTime</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:timezone-from-dateTime</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:adjust-dateTime-to-timezone</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:adjust-date-to-timezone</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:adjust-time-to-timezone</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:subtract-dateTimes-yielding-yearMonthDuration</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:subtract-dateTimes-yielding-dayTimeDuration</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:resolve-QName</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:expanded-QName</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:local-name-from-QName</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:namespace-uri-from-QName</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:namespace-uri-for-prefix</entry>
	   <entry>Yes</entry>
	   <entry>Incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:in-scope-prefixes</entry>
	   <entry>Yes</entry>
	   <entry>Incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:resolve-uri</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:name</entry>
	   <entry>Yes</entry>
	   <entry>Only incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:local-name</entry>
	   <entry>Yes</entry>
	   <entry>Incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:namespace-uri</entry>
	   <entry>Yes</entry>
	   <entry>Incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:number</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:lang</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:root</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:zero-or-one</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:one-or-more</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:exactly-one</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:boolean</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:index-of</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:empty</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:exists</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:distinct-values</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:insert-before</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:remove</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:reverse</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:subsequence</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:unordered</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:deep-equal</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:count</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:avg</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:max</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:min</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:sum</entry>
	   <entry>Partially</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:id</entry>
	   <entry>Partially</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:idref</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:doc</entry>
	   <entry>Yes</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:collection</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:position</entry>
	   <entry>Yes</entry>
	   <entry>Only incidentally</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:last</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:current-dateTime</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:current-date</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:current-time</entry>
	   <entry>Yes</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:default-collation</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>	
	 <row>
	   <entry>fn:implicit-timezone</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	   <entry>No</entry>
	 </row>
	</tbody>
      </tgroup>
    </table>
  </section>
</chapter>
