Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Proposed syntax for namespace binding in XPath

From: "Michael Kay" <mike@------------>
To:
Date: 4/2/2007 9:54:00 AM
> > Is it possible to just match on prefix, regardless of binding?  eg,
> > 
> > "foo:bar"
> > 
> > ...will match any bar node prefixed with foo - the calling 
> app doesn't 
> > care what "foo" is bound to in the XML, as long that's the prefix.
> > 
> > If that's possible, that would be a really useful option.
> 
> Useful maybe, but that one would definitely be a 
> non-conformance with the spec....

What you can already do of course in some APIs (including
saxon:evaluate-node()) is to take the namespace bindings for the XPath
expression from the in-scope namespaces of a given element node. That has
almost the same effect as matching on prefix, except when the source
document maps multiple prefixes to the same namespace (or the same prefix to
multiple namespaces). It's also open to abuse, but it works well in a
situation where the XPath expression is actually held within the document to
be searched.

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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent