Subject: Re: [xsl] Should "//ename[n]" mean "/descendant::e name"?] From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 20 Dec 2001 18:10:11 GMT |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Should "//ename[n]" mean , Jonathan Robie | Thread | [xsl] is ID definition in DTD neces, Steve Renshaw |
Re: [xsl] RTF and XSLT, Michael . Clark | Date | Re: [xsl] is ID definition in DTD n, Steve Renshaw |
Month |