Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] How to get XPath in a XSLT shylesheet

From: David Carlisle <davidc@---.--.-->
To: rjm@-------.---
Date: 1/8/2007 11:08:00 AM
> yes but as pointed out to me (and this is just a simple extension of 
> using name() ) it does not include the - hmmm.... arity? .... of the
> node

answer 4 on that page does include the element counts.


> so i think this is an even better question now because clearly XPath 
> knows otherwise it couldn't answer the question, but can it make the 
> statement?

There are any number of xpath expressions that might select a node,

/descendant::*[27]
/*[2]/*[5]/*[1]
/a/b[2]/c[1]
id('foo')
...

An XPath engine in general won't "know" any of them. Given an Xpath
statement it will execute it and return some nodes, but it doesn't in
general know which statements would have results that include a given
node.  Just as an arithmetic evaluation engine doesn't in general know
all (or any) of the possible arithemtic expressions that evaluate to 42,
just because it can evaluate 40+2.

Some systems have extension elements that may be a bit more efficient
than the xslt/xpath solutions, eg saxon:path().

David


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