10g XPath 2.0 support?
312365Aug 26 2004 — edited Aug 31 2004Hi,
I've trawled through the documentation and not found any references to which XPath version Oracle 10g supports. Some simple tests have indicated that the database does not support XPath 2.0 expressions, in particular, it doesn't support the comparison operators on XML schema types such as date and dateTime.
At issue is the ability of Oracle 10g to evaluate an XPath expression such as "/Account[Opened > '2004-01-01']" where the 'Opened' element is an XMLSchema date type.
The Oracle 10g application developer manual (http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10790/xdb01int.htm#sthref54) indicates that XPath expressions may be rewritten depending on the storage method (structured v. unstructured). Excellent. Determining the storage method is very easy when looking at a table, but there is no indication in the manual as to which method Oracle uses when querying the Repository, e.g. performing existsNode(..) queries on the resource_view. Not so excellent.
I assume that this determination is made on a resource-by-resource basis, therefore if an xml resource is missing the schemaLocation attribute, Oracle correctly assumes that the document is not schema-based and therefore doesn't perform an query re-writing. If the resource has a schemaLocation and that URL matches one of the registered schemas, then query re-writing may be possible.
The manual goes on to state "In certain cases query-rewrite is not possible ... In this situation Oracle XML DB performs a functional evaluation of the XPath expressions." What does this mean? Does this mean that Oracle uses an XPath query engine to evaluates the XPath expressions? If so, does this XPath engine support XPath 2.0?
Any help and/or insight into this issue would be deeply appreciated.