Lists Home |
Date Index |
"G. Ken Holman" <gkholman@CraneSoftwrights.com> writes:
> At 2005-02-23 14:51 +0000, Henry S. Thompson wrote:
>>Sorry not to be clearer -- in both this and your next message, the
>>things you're expressing surprise/concern about are attempts to
>>understand my messages as if they were about NOTATIONs and their
>>declaration and use in XML 1.0/1.1 DTDs and DTD-based validation of
>>But my message was about the simple type definition of the same name
>>in W3C XML Schema, which reconstructs but does _not_ interact with the
>>DTD-declared attribute type.
> My apologies, Henry, thanks for this clarification.
> So, I now see when using NOTATION declarations in W3C Schema, part 1
> section 3.12.1 makes reference to a target namespace.
> But W3C Schema part 2 section 3.2.19 states that notation represents
> the notation attribute type from XML 1.0 ...
No wonder you're confused. That's a bug that should have been fixed
ages ago, sorry!
> So, I have an XML document:
> <!DOCTYPE doc [
> <!ELEMENT doc ( thing+ )>
> <!ELEMENT thing ( #PCDATA )>
> <!ATTLIST thing n NOTATION ( abc | def ) #REQUIRED>
> <!NOTATION abc SYSTEM "abc-stuff">
> <!NOTATION def SYSTEM "def-stuff">
> <thing n="abc">abc here</thing>
> <thing n="def">def here</thing>
> When abandoning the DTD and writing a W3C Schema expression for this
> instance, I gather from your comment that the notation names are
> QNames, just like the element names are QNames. But while interpreting
> the elements as QNames is consistent with the XML Information set
> section 2.2, section 2.3 Attribute Information Items makes reference
> to attributes of type NOTATION as naming the NOTATION information
> item, which doesn't have a namespace component.
But attributes with [attribute type] NOTATION in the infoset may or
may not be of [schema type definition] xs:NOTATION. W3C XML Schema
validation is _only_ concerned with the latter. True, if an attribute
is _both_ then the 'for compatibility' Note and Richard Tobin's
preceding message apply, and you'd better use no namespace in your
schema or use the default namespace for it in your instance.
> So, I wasn't expecting W3C Schema to change the game for components of
> XML in this fashion, because W3C Schema Part 1, section 1.2 states it
> depends on the XML Infoset. Though I do note that Annex D does not
> require support for notation information items.
W3C XML Schema doesn't change anything in the infoset, not here or
elsewhere, with the marginal exception of defaulted attrs and elts.
To re-iterate, to be a DTD-valid NOTATION, no colon is allowed. W3C
XML Schema cannot change that, and does not try.
To be a schema-valid xs:NOTATION, you must name a schema-declared
Notation. Notations are named in schemas with qualified names.
So, to be both a DTD-valid NOTATION and a schema-valid xs:NOTATION,
an attribute value must be an NCName and either
1) there is a no default namespace declaration in scope and a
schema available with no target namespace and a Notation with the
2) there _is_ a default namespace declaration in scope and a schema
available with the default namespace as its target namespace and
a Notation with the given name.
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: email@example.com
[mail really from me _always_ has this .sig -- mail without it is forged spam]