Re: W3C Selectors

Bjoern Hoehrmann wrote:
> 
> * Daniel Glazman wrote:
> >>>> Unless using an internal subset.
> >>>
> >>> Can you please explain you point ?
> >>
> >>      <?xml version="1.0" encoding="UTF-8" ?>
> >>      <!DOCTYPE greeting [
> >>        <!ATTLIST greeting id ID #IMPLIED>
> >>      ]>
> >>      <greeting id="id">Hello, world!</greeting>
> >
> >Euuuuhhh... this _is_ doc with a DTD, Björn....

Yes, but the point is that it is using an internal DTD subset, and thus all
XML processors are required to read it. Wheras using an external DTD subset
means that not all XML processors are required to read it.

> Yes, let me look why I complained about that...
> 
> "Note. In XML 1.0 [XML10], the information about which attribute
> contains an element's IDs is contained in a DTD. When parsing XML, UAs
>                                                                    ^^^
> do not always read the DTD, 

This is an incorrect statement and should be changed to "do not always read
the external DTD subset"

> and thus may not know what the ID of an
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
> element is. 

This is also not true. DOM for example permits applications to have
knowledge of what attributes are of type ID. XSchema provides an
alternative method of knowing what attributes are of type ID.

>If a style sheet designer knows or suspects that this will
> be the case, he should use normal attribute selectors instead:
> [name=p371] instead of #p371. 

Perhaps, but not necessarily.

> Of course, elements in XML 1.0 documents
> without a DTD do not have IDs at all."

This is completely incorrect.

> Hm, XML 1.0 requires even non-validating parsers to read and parse the
> internal subset of a DTD (see XML 1.0 SE section 5.1), so the marked
> statement is wrong.

Yes.

-- 
Chris

Received on Thursday, 1 March 2001 17:30:49 UTC