W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2004

RE: Should fn:string() and xs:string() be synonyms?

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Wed, 10 Mar 2004 05:51:13 -0800
Message-ID: <EDB607C8AC991F40BE646533A1A673E8017A5E89@RED-MSG-42.redmond.corp.microsoft.com>
To: "Jonathan Robie" <jonathan.robie@datadirect.com>, "XML Query Comments" <public-qt-comments@w3.org>

Hi Jonathan:
Thank you for your comment.  The WGs discussed this at last week's joint
meeting and decided that no change was needed.

All the best, Ashok

-----Original Message-----
From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Jonathan Robie
Sent: Tuesday, February 10, 2004 1:50 PM
To: XML Query Comments
Subject: Should fn:string() and xs:string() be synonyms?


We currently have a function called fn:string() and a
constructor called xs:string(), which both create strings. There  
is some justification for having both. xs:string is a constructor  
for a built-in type, and all built-in types have associated
constructors. fn:string() is a widely used function in XPath 1.0,
so it is difficult to remove it at this point.

But they are defined differently. fn:string() uses the
string value, whereas xs:string() atomizes the node and casts the
result to a string. These two definitions give subtly different
results. Could one be made a synonym for the other, to avoid
confusion?

Jonathan
Received on Wednesday, 10 March 2004 08:51:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:13:56 UTC