[oXygen-user] XQuery (or XPath) console?

Sorin Ristache
Tue Oct 28 10:33:12 CDT 2008


Hello,

Yes, the XPath 2.0 queries are executed with Saxon 9 in the XPath 
toolbar and in the XPath Builder view. As you already know starting with 
Oxygen version 10 the queries are schema aware. There is an example in 
the section about XPath queries in the User Manual of using the Saxon 
implementation of the XPath 2.0 collection() function with Saxon 
specific parameters like recurse=yes, select=*.xml and 
parser=ro.sync.xml.parser.CatalogEnabledXMLReader:

http://www.oxygenxml.com/doc/ug-oxygen/querying-documents.html#figure-xpath-console-content-completion

About the XPath toolbar and the XPath Builder view:

http://www.oxygenxml.com/doc/ug-oxygen/querying-documents.html#xpath-console

http://www.oxygenxml.com/doc/ug-oxygen/querying-documents.html#xpath-builder-view

If you need to set a custom URI resolver for Saxon 9 go to Options ->
Preferences -> XML -> XSLT-FO-XQuery -> XSLT -> Saxon -> Saxon-B/SA ->
Advanced:

http://www.oxygenxml.com/doc/ug-oxygen/preferences-xslt-fo-xquery.html#preferences-advanced-xslt-saxon8


Regards,
Sorin


Florent Georges wrote:
>   Hi,
> 
>   I should have missed something, but I can't find a tool in oXygen to
> evaluate XQuery (or at least XPath) expressions.
> 
>   For instance, I have a set of XML files in a directory, and I'd like
> to know which has the most 'elem' elements.  So I'd like to evaluate a
> query (without creating a new file, if possible selecting the default
> collection with a file dialog, and if possible recording the query as
> part of the project) something like:
> 
>     for $d in collection() order by count(//elem)
>       return document-uri(.)
> 
>   Does something similar exist in oXygen?
> 
>   Regards,
> 





More information about the oXygen-user mailing list