casting NOTATION to string

The comment is based on the entry in the Xquery document


> err:XQ0052 
> 
>   It is a dynamic error if the content of an element or attribute
>   constructor includes an atomic value that cannot be cast into a string,
>   such as a value of type xs:QName or xs:NOTATION. 

But it presumably applies to XPath and so XSLT as well, so I have not
prefixed the subject line with [Xquery]

I can see that there are problems with casting QNames due to prefix
bindings but NOTATION (and also ID, etc)  do not have this problem as
they are NCNames and don't have a prefix (or take part in namespace
processing) so the URI part of the QName should always be "".
as such there should be a trivial casting to string, namely taking the
name() = local-name().


schema part 1 says:
http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#cNotation_Declarations

Schema Component: Notation Declaration 
{name} 
An NCName as defined by [XML-Namespaces]. 
   ^^

XML namespaces 1.0 was famously vague on this point but the wording is
clarified in 1.1:

http://www.w3.org/TR/2004/REC-xml-names11-20040204/#Conformance

    No attributes with a declared type of ID, IDREF(S), ENTITY(IES), or
    NOTATION contain any colons.


David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Received on Friday, 19 March 2004 07:07:54 UTC