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

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

From: Jonathan Robie <jonathan.robie@datadirect.com>
Date: Tue, 10 Feb 2004 16:50:25 -0500
Message-ID: <40295221.3090400@datadirect.com>
To: XML Query Comments <public-qt-comments@w3.org>

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 Tuesday, 10 February 2004 16:52:58 UTC

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