W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Re: A sixth space needed for xs:NOTATION?

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Thu, 25 Oct 2001 10:52:43 +0200
Message-ID: <3BD7D2DB.6070505@dyomedea.com>
To: xmlschema-dev@w3.org
Henry S. Thompson wrote:

> Eric van der Vlist <vdv@dyomedea.com> writes:
> 
> 
>>
>>Doesn't it mean that the lexical space in the instance document is different
>>(NCName defined as notation) than the lexical space used in the facets in the
>>schema (QName) and that we need to differentiate these two spaces?
>>
> 
> I _think_ you're confused here.  


That's the least I would say :=) !

> For better or worse, W3C XML Schema
> NOTATION is not a complete reconstruction of XML 1.0 DTD NOTATION.  In 
> particular, being declared as a NOTATION in a DTD does _not_ make
> something a legal value for a item declared to be of
> (constrained base) type NOTATION in a schema.  So NCNames don't enter
> in to the matter at all.  


Arg! OTH, it doesn't seem completely compatible with it either since 
using a prefixed QName in an instance document as a NOTATION attribute 
value isn't allowed... and I thing you could add to:

"For compatibility (see Terminology (§1.4)) NOTATION should be used only 
on attributes."

a clause saying that for compatibilty, qualified QNames should not be 
used in the lexical space.

> 
>>Since the lexical space is "the set of all names of notations declared in the
>>current schema" and XML Namespaces forbids colons in notation names, the
>>lexical space is unqualified.
>>
> 
> Again, DTD NOTATIONs are covered by that constraint, but XML Schema
> NOTATIONs are not.
> 
> 
>><picture xmlns="http://example.org/pictures" pictype="jpeg">...
>>
>>with pictype having a type xs:NOTATION, what's the value of pictype?
>>
>>Is-it {NULL, "jpeg"} or {"http://example.org/pictures", "jpeg"} ?
>>
> 
> The latter.


I *think* I begin to understand...

<pic:picture xmlns:pic="http://example.org/pictures" pictype="jpeg">

would match {NULL, "jpeg"} (assuming no default namespaces have been 
defined in the ancestors of pic:picture).

and

<pic:picture xmlns:pic="http://example.org/pictures" pictype="pic:jpeg">

would be also allowed and match {"http://example.org/pictures", "jpeg"}

If I may suggest an editiorial revision, in

"[Definition:]NOTATION represents the NOTATION attribute type from [XML 
1.0 (Second Edition)]. The ·value space· of NOTATION is the set QNames. 
The ·lexical space· of NOTATION is the set of all names of notations 
declared in the current schema."

it would be clearer to say that "The ·lexical space· of NOTATION is the 
set of all QNames of notations declared in the current schema."

It makes me feel very uneasy about the compatibility clause I mentioned 
above for prefixed QNames.

Per Namespaces in XML and per the definition of QNames in W3C XML 
Schema, the two forms below are stricly equivalent and there is no way 
to constrain the use of one of them only:

<picture xmlns="http://example.org/pictures" pictype="jpeg">
<pic:picture xmlns:pic="http://example.org/pictures" pictype="pic:jpeg">

However, only the first is compatible with a DTD (even if the DTD is 
"namespace aware") and I find this to be quite nasty.

Thanks

Eric--
Rendez-vous à Paris pour le Forum XML.
                    http://www.technoforum.fr/Pages/forumXML01/index.html
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------
Received on Thursday, 25 October 2001 04:52:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT