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

Re: Should "//ename[n]" mean "/descendant::e name"?]

Subject: Re: Should "//ename[n]" mean "/descendant::e name"?]
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 20 Dec 2001 18:10:11 GMT
what does yor name mean
> I would love to come up with a definition 
> that would allow //para[1] to mean the first paragraph in the document, but 
> my proposed definition does not do that cleanly.

I accept yor later points that there are some aspects of xpath 1.0 that
are rather contrived and it may be acceptable to break things a bit,
but // is such core functionality you can't change this and call it
Xpath. You can't re-phrase your definition to make it cleaner as the
basic aim is, I fear, a non starter.

A Qname in Xpath, if it isn't being a function name or prefixed with an
axis or variable $ token, is always shorthand for the child axis. Your
definition (or any similar one) would break that. 

In XSLT patterns, a // at the front of the expression never does anything
useful. This is a FAQ answer that your definittion would make incorrect.

Any stylesheet that currently uses // and [] together would silently
produce the wrong result, so detecting how many stylesheets you'd broken
would be difficult.


However I've just printed off a few hundred pages of xpath/xslt/xquery
documents, so something to read over Christmas, more comments later I
expect:-)

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.