[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Compact XPath syntax

Subject: Compact XPath syntax
From: "Ramkumar Menon" <ramkumar.menon@xxxxxxxxx>
Date: Wed, 19 Dec 2007 15:44:26 -0800
 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.