[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: "uriref()" XPath function?

Subject: Re: "uriref()" XPath function?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Tue, 15 Jun 2010 22:59:34 +0100
Re:  "uriref()" XPath function?
I notice there's an "idref()" XPath function which returns nodes which
reference a specified id

Actually, it's id() that does that - idref() does the inverse.

- however the document I'm processing
references ids with URIs, e.g.<a href="#foo"/>  references id "foo"

Theoretically, the document() function will do this. However, processing of fragment identifiers is a little fragile - technically it depends on the media type of the document being known, since the semantics of fragment identifiers depend on the media type. You might be better off using id(substring(@href, 2)).

Michael Kay

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.