[Bug 1824] Functions return xs:NCName, but xs:NCName is not support in XSLT 2.0 Basic

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1824





------- Additional Comments From colin@colina.demon.co.uk  2005-09-07 14:54 -------
After reading the last two comments from Michael and Frans, I thought about how
I'd go about implementing Michael's suggested solution for my own product.
Here, the XPath library is totally independent of the XSLT library (dependencies
are all the other way), but it does know if it is being called by a Basic-level
XSLT processor or not.
So I think I will simply return an xs:string in this case, and an xs:NCName in
all other cases. This seems to be a practical solution, as a use will not be
able to tell the difference between this and Michael's proposed solution of
knowing that xs:NCName is derived from xs:string.
I think Frans' point about the type annotation is interesting though - if the
output from a transformation in Basic XSLT mode is used as the input to another
transformation, without serialization, then the type annotation for a text
generated by such a function cannot be either xs:string or xs:NCName, as that
would violate the requirements for a Basic-level XSLT processor.
I'm just thinking off the top of my head now, so I'm not sure if my last
sentence is relevant to anything at all or not.

Received on Wednesday, 7 September 2005 14:54:35 UTC