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: Benoît Thiébault <thiebault AT artenum.com>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Retrieving the path from root of an Element
  • Date: Wed, 11 Jul 2012 15:10:44 +0200

Thanks for your quick answers!

Le 11/07/2012 15:10, Michael Kay a écrit :
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

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


--
Dr Benoît Thiébault
Project Manager

Artenum Toulouse - Science & Groupware
http://www.artenum.com

Bâtiment Calfocenter
10, rue Marguerite-Long
31320 Castanet-Tolosan
France
Phone: +33 (0)5 82 95 19 00





Archive powered by MHonArc 2.6.24.

Top of Page