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