[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Michael Kay" <mike@s...>
  • To: "'Chris Burdess'" <dog@b...>
  • Date: Fri, 29 Feb 2008 16:46:27 -0000

> If you change the core semantics of a function, the function 
> should really be renamed. If it's not renamed, you need to 
> include clear warnings about incompatibility between 
> versions. I think that XPath 2.0 did a very good job in this regard.
> 
> However, in the incompatibility notes for XPath 2.0 it 
> doesn't say anything about a change to the semantics of 
> text(). Also, I can't find anything in the XPath 1.0 
> specification that says that text() should only match the 
> first text node. In fact, it says:
> 
>   "The node test text() is true for any text node. For example,
>   child::text() will select the text node children of the 
> context node."
> 
> This is true of XPath 2.0 as well. So does this horrible 
> backwards incompatibility even actually exist?

As I explained earlier in this thread, the result of the path expression
hasn't changed. It's the <xsl:value-of> instruction that has changed. This
is clearly documented in list item 1 of

http://www.w3.org/TR/xslt20/#backwards-compatibility-behavior

Note that the incompatibility only arises if you change the version
attribute of xsl:stylesheet to "2.0" - 1.0 stylesheets if unchanged behave
as they did before.

Michael Kay
http://www.saxonica.com/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member