|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Compact XPath syntax
Gurus,
As we all know, absolute Path Expressions are written up as a set of
node-tests separated by "/".
I was wondering why XPath did not introduce the notion of compact path
expressions where the expression will only have a unambiguous
node-test instead of the entire path.
The compact XPath expression could then be actually compiled into the
complete xpath expression at compilation time.
For instance, consider the following XML.
<a>
<b>
<c>
</b>
</a>
I could refer to the node "c" as just "c" or maybe "!c", with some
syntax sugar [without the quotes of course], as long as "c" can be
compiled into the actual path exprssion.[/a/b/c]
Consider another XML.
<a>
<b>
<c>
</b>
<f>
<c>
</f>
</a>
I could refer to the node "c" as "!c", which matches all "c" nodes at
all levels. I specify something on the lines of !c[parent::b] or
!c[parent::f] to address the respective "c" nodes.
I think I've made it clear.
I am curious to know your thoughts on this.
Ram
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








