W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

NMTOKEN elements?

From: DuCharme, Robert <Robert.DuCharme@moodys.com>
Date: Fri, 23 Jun 2000 10:16:05 -0400
Message-ID: <01BA10F0CD20D3119B2400805FD40F9F0249D9A3@MDYNYCMSX1>
To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
I was thinking about how XML schemas allow the specification of types for
both elements and attributes, and how the old attribute types are retained
for backward compatibility, and I realized that this allowed for the
possibility of NMTOKEN elements (not to mention NMTOKENS elements). 

The bottom of the first table in 2.3 of the schema primer
(http://www.w3.org/TR/xmlschema-0/#CreatDt) tells us that "to retain
compatibility between XML Schema and XML 1.0 DTDs, the simple types ID,
used in attributes." The normative spec doesn't mention this; in fact, an
example there actually uses it: in section 4.3.3 of Part 1 of the spec, the
definition of a complexType called "length2" includes a subelement ("unit")
declared as being of type NMTOKEN.

Section 3.3.3 of the XML spec (http://www.w3.org/TR/REC-xml#AVNormalize)
describes specific responsibilities of an XML parser for, among other
things, normalizing the space included with a non-CDATA attribute value.
Without this normalization, there's not much point in using NMTOKEN. Have a
parser's responsibilities regarding NMTOKEN  element types been addressed

Bob DuCharme          www.snee.com/bob           <bob@  
snee.com>  "The elements be kind to thee, and make thy
spirits all of comfort!" Anthony and Cleopatra, III ii
Received on Friday, 23 June 2000 10:15:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:47 UTC