Re: XHTML2 MIME type

On Monday, May 12, 2003, at 01:29 Europe/Helsinki, Ian Hickson wrote:

> On Sun, 11 May 2003, Henri Sivonen wrote:
>>
>> Mozilla a DTD catalog, but it cheats: The DTDs in Mozilla's catalog 
>> are
>> so heavily abridged that they only contain the character entity
>> declarations. The character entities work as if Mozilla was reading 
>> the
>> real DTD but other stuff like attribute defaulting and the #IDness of
>> attributes don't work.
>
> Actually, the #IDness is supported, we just don't use a DTD to specify 
> it.

Whoa. That has changed since I last looked. Previously an #ID 
declaration in the internal subset was needed in practice, IIRC.

The spec is changing to be less DTD-dependent as well.

DOM Level 2 said:
"Note: The DOM implementation must have information that says which 
attributes are of type ID. Attributes with the name "ID" are not of 
type ID unless so defined. Implementations that do not know whether 
attributes are of type ID or not are expected to return null."

DOM Level 3 WD says:
"The DOM implementation needs to have information that says which 
attributes are of type ID. This information can come from validating 
the document against a grammar or from the use of the setIdAttribute 
method and its siblings on Element. To query whether an attribute is of 
type ID see isId on Attr."

So DOM Level 3 explicitly allows the IDness to come from a source other 
than the DTD.

-- 
Henri Sivonen
hsivonen@iki.fi
http://www.iki.fi/hsivonen/

Received on Wednesday, 14 May 2003 15:08:57 UTC