- From: Bert Bos <bert@w3.org>
- Date: Tue, 28 Aug 2007 17:58:46 +0200
- To: 'WWW International' <www-international@w3.org>
- Cc: fantasai <fantasai.lists@inkedblade.net>, 'Richard Ishida' <ishida@w3.org>
On Tuesday 28 August 2007 16:22, fantasai wrote: > I was looking at > http://www.w3.org/International/questions/qa-bidi-css-markup > yesterday and noticed that there's still a major error in this > section: > http://www.w3.org/International/questions/qa-bidi-css-markup#xhtml > > Specifically, because namespacing allows XHTML to be recognized as > XHTML even in compound documents, XHTML 'dir' attributes should work > in browsers even when the document is served as XML. That's not so clear. I think you should distinguish known document types from generic XML. The meaning of every bit of mark-up depends on the context in which it is used, starting from the MIME type of the document as a whole. E.g., the fact that <h:li>The second item.</h:li> is displayed as 2. The second item. is not because the meaning of h:li elements is to display "2.", but because it happens to be the second element in another element that happens to be a list in the context of this document. Namespaces are no different from attributes in that respect. They are more difficult to understand and handle because they are inherited and abbreviated, but otherwise they are just mark-up, i.e., syntax, without any inherent, context-independent meaning. E.g., a namespace in an XSLT document has a very different function from one in an RDF document, which is again different from a WICD. It is, of course, bad practice to use namespaces in unexpected ways in different documents, just as it is bad practice to use the "wrong" names for elements (you don't call a list item <red-cow>, even though the computer doesn't care), but sometimes it's unavoidable. Which means, in brief, that seeing an h:dir attribute outside of XHTML (where h is the namespace of XHTML, which I don't know by heart), *suggests* that the enclosing element is to be rendered with a certain writing direction, but you can't be sure, unless you start with the MIME type and that MIME type's RFC and work your way through the document with the specification in hand. A text/xml or application/xml document has, by definition, no meaning other than what the style sheet PI (if any) provides. XHTML (application/xhtml+xml), however, *does* have meaning. The XHTML specification says pretty much that the meaning of the mark-up is the same as that of similar HTML mark-up. So I agree that the quoted FAQ is incorrect for XHTML ("dir" works without any style rules), but I believe it is correct for generic XML ("dir" needs style rules to work). Bert -- Bert Bos ( W 3 C ) http://www.w3.org/ http://www.w3.org/people/bos W3C/ERCIM bert@w3.org 2004 Rt des Lucioles / BP 93 +33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Tuesday, 28 August 2007 15:58:57 UTC