[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] How to get XPath in a XSLT shylesheet
- From: David Carlisle <davidc@nag.co.uk>
- To: rjm@zenucom.com
- Date: Mon, 8 Jan 2007 11:07:32 GMT
> 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
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]