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

Subject: Re: [xsl] Should "//ename[n]" mean "/descendant::ename"?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 19 Dec 2001 01:08:00 GMT
I'm frankly shocked and concerned that the WG should even consider such
a strange idea as to so radically change the semantics of such a core
Xpath feature, keeping the syntax legal but changing its meaning.
If compatibility is of such low concern it does not bode well for XSLT 2. 

In this case the proposed definition seems far less useful than the
current definition, but even if it was conceptually an improvement it
would be years too late to change. If you need to add a new feature then
please use a new syntax, don't abuse existing syntax.

Already in your mail you have to special case attributes and 
for elements you say //ename expands to /descendant::ename
but what of //following-sibling:* the current definition ends with a /
for good reason giving a single consistent definition for all axes
why on earth would you want to change this to some list of ad hoc rules
for each axis?

>1. Is the proposed definition more intuitive?
No, it is a) under specified and b) likely to be less intuitive and more
complicated once it is fully specified.

>2. How many stylesheets would break under this definition?
Thousands, also because the syntax would still be legal they would
break in the worst possible way, silently giving the wrong results.
A compatibility flag for xsl:stylesheet version="1.0" would not be
enough to protect this, stylesheets get updated, as do stylesheet
writing tools and if someone ups the version number to use a 2.0 feature
they won't be expecting breakage on this scale. Also what of Xpointer
and other uses of Xpath where // is used with no indication of
versioning.

Please do not do this.

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