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

RE: the Canonical path of a node

  • From: "Michael Kay" <mike@s...>
  • To: "'Philippe Poulard'" <Philippe.Poulard@s...>,"'David Carlisle'" <davidc@n...>
  • Date: Mon, 8 Jan 2007 13:08:17 -0000

RE:  the Canonical path of a node
> http://lists.xml.org/archives/xml-dev/200403/msg00045.html
> I retained "*the canonical path*" for the name of such a 
> path, and the predicates must be present for child nodes even 
> if it is [1] : being also an XPath pattern, they are easier 
> to apply to a SAX stream :)

Of course different users have different requirements. One disadvantage of
this "canonical path" is that it depends on the bindings of namespace
prefixes. It's a shame that XPath doesn't define a mechanism for binding
prefixes within the expression itself. I think it would be a good idea if we
could establish a conventional notation for an "augmented XPath expression":
a string containing a set of namespace bindings and an XPath expression, and
we could then encourage people to implement APIs that accept an "augmented
XPath expression". One candidate is the XPointer syntax:

xmlns(p1=http://p1.uri/) xmlns(p2=http://p2.uri/) xmlns(p=http://p.uri)
xpath2(/p1:a[1]/p2:b[1]/p:c[1])

This has a few drawbacks like not allowing the default namespace to be
declared, and requiring ")" and "^" to be escaped as "^)" and "^^"; but at
least it's defined in an existing standard.
> 
> but I'm not sure if the mappings are fixed as well by Saxon 
> (perhaps M. 
> Kay could confirm ?) ; they are in RefleX
> 
saxon:path uses the prefixes as they appear in the original source. This
means that the path is useful for diagnostics and documentation, but it's
not ideal for use cases where you want to use the path to re-select the
node. 

Michael Kay
http://www.saxonica.com/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.