Re: W3C Selectors

* 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, 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, and thus may not know what the ID of an 
^^^^^^^^^^^^^^^^^^^^^^^^^^
element is. 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. Of course, elements in XML 1.0 documents
without a DTD do not have IDs at all."

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.

Further, the second part of the sentence is very misleading, "... and
thus may not know what attribute defines the ID of an element" or
something alike would be better, IMO.
-- 
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981028 ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote [!]e
          ~~ Sei Nicht Traurigen Herzens - Liebe Dein Leben ~~          

Received on Thursday, 15 February 2001 17:25:28 UTC