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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--