OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] 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)

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

Michael Kay

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

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS