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

casting NOTATION to string

From: David Carlisle <davidc@nag.co.uk>
Date: Fri, 19 Mar 2004 12:07:13 GMT
Message-Id: <200403191207.MAA32352@penguin.nag.co.uk>
To: public-qt-comments@w3.org

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:

Schema Component: Notation Declaration 
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:


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


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:
Received on Friday, 19 March 2004 07:07:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:19 UTC