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

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