W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2003

RE: MS-FO-LC1-037: String functions should treat () as "" (as in XPath 1.0)

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Tue, 1 Jul 2003 19:50:42 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DCF8F@daemsg02.software-ag.de>
To: Michael Rys <mrys@microsoft.com>, public-qt-comments@w3.org

> -----Original Message-----
> From: Michael Rys [mailto:mrys@microsoft.com] 
> Sent: 01 July 2003 02:42
> To: public-qt-comments@w3.org
> Subject: MS-FO-LC1-037: String functions should treat () as 
> "" (as in XPath 1.0)
> 
> 
> 
> Class: Technical
> 				
> start-with and most other string functions have an XPath 1.0
> incompatibilty: () maps to "" in XPath 1.0 string functions. 
> No good reason to be incompatible. Treat () as zero-length 
> string and return xs:boolean instead of xs:boolean?.
> 
> Add this change to all other string functions as well.
> 

We came to this same conclusion in XSL WG's review of the backwards
compatibility appendix. We felt that all the functions that accept strings
should treat () as "", but that this should be a property of the function
itself rather than a feature of the function call mechanism - in other
words, user functions don't have to follow this example.

An example that particularly concerned us was [string-length(@a)=0], which
when @a is absent returns true in XPath 1.0, and in 2.0 in backwards
compatibility mode, but returns false in 2.0 in non-BC mode.

Michael Kay
Received on Tuesday, 1 July 2003 13:50:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:13 UTC