Re: Amaya looks for attributes named "id"?
Irene Vatton <[email protected]>
| Newsgroups | gmane.comp.web.amaya.devel |
|---|---|
| Organization | INRIA |
| Message-ID | <[email protected]> |
Le Mercredi 20 Avril 2005 19:39, Norman Walsh a écrit :
> Given this CSS stylesheet, test.css:
>
> title { font-size: large;
> font-weight: bold;
> }
> #foo { color: red; }
>
> This document displays correctly in Amaya (i.e., the second paragraph
> is red):
Amaya doesn't parse the piece of DTD included in the DOCTYPE declaration.
This case works only because Amaya defines a default id attribute for XML
documents (a sort of xml:id attribute).
That explains why the second case with myid doesn't work.
> <?xml version='1.0'?>
> <!DOCTYPE doc [
> <!ATTLIST p id ID #IMPLIED>
> ]>
> <?xml-stylesheet href="test.css" type="text/css"?>
> <doc>
> <title>Some Title</title>
> <p>This is a paragraph.</p>
> <p id="foo">This is the foo paragraph.</p>
> <p>This is a paragraph.</p>
> </doc>
>
> But I was somewhat surprised that this one did not display correctly:
>
> <?xml version='1.0'?>
> <!DOCTYPE doc [
> <!ATTLIST p myid ID #IMPLIED>
> ]>
> <?xml-stylesheet href="test.css" type="text/css"?>
> <doc>
> <title>Some Title</title>
> <p>This is a paragraph.</p>
> <p myid="foo">This is the foo paragraph.</p>
> <p>This is a paragraph.</p>
> </doc>
>
> Furthermore, the second paragraph in this document was also red, which
> I think is an error:
>
> <?xml version='1.0'?>
> <?xml-stylesheet href="test.css" type="text/css"?>
> <doc>
> <title>Some Title</title>
> <p>This is a paragraph.</p>
> <p id="foo">This is the foo paragraph.</p>
> <p>This is a paragraph.</p>
> </doc>
>
> Are these known bugs (or features?)
>
> Be seeing you,
> norm
--
Irène.
-----
Irène Vatton INRIA Rhône-Alpes
INRIA ZIRST
e-mail: [email protected] 655 avenue de l'Europe
Tel.: +33 4 76 61 53 61 Montbonnot
Fax: +33 4 76 61 52 07 38334 Saint Ismier Cedex - France