Re: XHTML attributes and namespace, clarification needed

* Daniel Glazman wrote:
>So, the following is valid XML too, right ?
>      <?xml version="1.0"?>
>      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>                     "">
>      <html xmlns="" xml:lang="en" lang="en"
>            xmlns:html="">

No, "valid XML" means that the document complies with the rules in the
document type definition; the DTD does not allow a xmlns:html attribute
on the html element, the document is thus not "valid", not namespace-
valid and not a strictly conforming XHTML 1.0 document; it is however
well-formed and namespace-well-formed.

>        <head>
>          <title>Junk title</title>
>          <style type="text/css">
>           .foo { color : green }
>           .bar { color : blue }
>          </style>
>        </head>
>        <body>
>          <p dir="rtl"   html:dir="ltr"
>             class="foo" html:class="bar"
>            this is a paragraph
>          </p>
>        </body>
>      </html>
>a) can someone tell me what is the direction of the paragraph above ?

That depends on whether the user agent recognizes the html:dir attribute
and XHTML 1.0 user agents are not required to. Whether a user agent may
recognize it is undefined in XHTML 1.0. Also note that the semantics of
the dir attribute are undefined in XHTML 1.0 as HTML 4.01 is not a nor-
mative reference of XHTML 1.0 (it does not have normative refernces...)
The latter at least has been informally acknowledged as an error in the
specification, but as you can see from

it has not yet been decided whether HTML 4.01 should be a normative
reference. One should not give much on informal acknowledgments about
errors in their deliverables as they tend to change their mind as in

so this question is indeed quite difficult to answer.

>b) XHTML 1.0 spec section C.13" [5] says "Within the XHTML namespace, user
>    agents are expected to recognize the "class" attribute". But in
>    <p class="foo">, [2] states that the class attribute has NO namespace...
>    So can someone tell me what is the class of the paragraph above ?

Same as above, except that, if you look at the XHTML M12N Working Draft
section 5.1,

the semantics are explicitly undefined. I've asked the HTML Working
Group to ask the TAG to review this section

and I've been told "Its our language and we can do that"... I'm still
waiting for their formal substantive response though. I don't think that
your html:* attributes should be recognized as indicated in my comments.
Björn Höhrmann · ·
Weinh. Str. 22 · Telefon: +49(0)621/4309674 ·
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · 

Received on Tuesday, 14 December 2004 11:37:01 UTC