Re: Error in strict DTD?

XMLGuy wrote:
> 
> The DTD "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" seems to be in
> error:
> 
> Line#
> 315    xml:space   (preserve)     #FIXED 'preserve'
> 
> According to the XML 1.0 rec "http://www.w3.org/TR/REC-xml" (3.3.1 & 3.3.2),
> shouldn't this instead be:
> 
> xml:space (default|preserve) 'preserve'
> 
> (because an enumeration attribute value must match one of the Nmtoken
> tokens, an attribute default declaration is not specified)

This would allow an author to set xml:space to 'default', not what
we wanted.

From the XML 1.0 Recommendation, section 2.10:
:   When declared, it must be given as an enumerated type whose only 
:   possible values are "default" and "preserve". For example:
:
:     <!ATTLIST poem   xml:space (default|preserve) 'preserve'>

The specification states that the values of xml:space must be
either "default" or "preserve". It then provides an *example*. This
has been misinterpreted in many parsers as the canonical way to 
declare xml:space. If this were so, it wouldn't be shown as an 
example. 

What XHTML does is this:

    <!ATTLIST pre   xml:space (preserve)  #FIXED 'preserve'>

We are declaring xml:space as an enumerated type with one of the
allowed values. This sets the value of xml:space to 'preserve' and
doesn't allow any other value. 

If your parser is producing an error I would suggest filing a bug. 

Murray

...........................................................................
Murray Altheim, SGML Grease Monkey         <mailto:altheim&#64;eng.sun.com>
Member of Technical Staff, Tools Development & Support
Sun Microsystems, 901 San Antonio Rd., UMPK17-102, Palo Alto, CA 94303-4900

   the honey bee is sad and cross and wicked as a weasel
   and when she perches on you boss she leaves a little measle -- archy

Received on Monday, 31 January 2000 14:59:25 UTC