Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Retrieving the path from root of an Element

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Michael Kay <mike AT saxonica.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Retrieving the path from root of an Element
  • Date: Wed, 11 Jul 2012 14:10:00 +0100


See here:

http://www.saxonica.com/documentation/xpath-api/s9api-xpath.xml

To use a XOM source document, just change step 2, to call DocumentBuilder.wrap(xomdoc) where xomdoc is the XOM document node.

Note that Saxon-PE and Saxon-EE support XOM "out of the box", but to use XOM with Saxon-HE you will have to compile the Saxon/XOM interface source code yourself.

Michael Kay
Saxonica


On 11/07/2012 14:02, Benoît Thiébault wrote:
Ok, thanks.
How do you use Saxon as your XPath engine?


Le 11/07/2012 13:51, Michael Kay a écrit :
On 11/07/2012 12:34, Benoît Thiébault wrote:
I would have prefered that function to be included in XOM... Isn't there
another way?

Yes, there is another way. Use the XPath 2.0 expression

string-join(ancestor-or-self::*/name(), '/')

(You can run XPath 2.0 against XOM by using Saxon as your XPath engine).

Michael Kay
Saxonica
_______________________________________________
XOM-interest mailing list
XOM-interest AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest







Archive powered by MHonArc 2.6.24.

Top of Page