- From: Martin Duerst <duerst@w3.org>
- Date: Mon, 25 Aug 2003 10:01:59 -0400
- To: "Steven Pemberton" <steven.pemberton@cwi.nl>, "Richard Ishida" <ishida@w3.org>
- Cc: <public-i18n-geo@w3.org>
Hello Steven, Some comments/questions/proposals below. At 15:41 03/08/22 +0200, Steven Pemberton wrote: >From: "Richard Ishida" <ishida@w3.org> > > Following our discussion last Friday I proposed to amend the Q&A at > > http://www.w3.org/International/questions/qa-bidi-css-markup.html by > > inserting a second para in the section Answer -> XHTML/HTML that reads > > as follows: > > > > ====================== > > (There is an exception to this rule. If the XHTML is served as > > <code>application/xhtml+xml</code>, rather than <code>text/html</code> > > it is treated by the user agent as XML rather than HTML, and so needs > > CSS to map the markup to the appropriate display behaviour, as described > > in '<a href="#xml">General XML-based markup languages</a>' above.) > > > > ====================== > > > > Some questions were raised about its validity in our GEO telecon. Would > > you mind casting an eye over this para and letting us know whether it > > looks correct / adequate to you? > >(Sorry about the delay in replying) > >I think there is a confusion here about what determines whether a document >is HTML or XHTML. > >Let me try and explain: if I serve up an HTML document as text/plain, it >becomes a text document, not an HTML document, and the rules for text/plain >apply to it, not the rules for text/html. (IE does this wrong by the way). > >If I serve up an XHTML document as text/html, it becomes an HTML document, >not XHTML, and so the rules for HTML apply (including the ones in CSS). > >If I serve an XHTML document as application/xhtml+xml (or text/xml), only >then is it really XHTML, and the HTML rules no longer apply. > >So there is nothing wrong with the new paragraph, it is the paragraph that >it applies to that is wrong in bundling HTML and XHTML together. They are >different beasts, and should have different sections. > >So this paragraph is wrong: > ><<< >XHTML/HTML > >Use markup only. The CSS2 recommendation recommends the use of markup for >bidi text in HTML. In fact it goes as far as to say that conforming HTML >user agents may ignore CSS bidi properties. This is because the HTML >specification clearly defines the expected behaviour of user agents with >respect to the bidi markup. > >>> > >Replace it with something like: > ><<< >HTML > >Use markup only. The CSS2 recommendation recommends the use of markup for >bidi text in HTML. In fact it goes as far as to say that conforming HTML >user agents may ignore CSS bidi properties. This is because the HTML >specification clearly defines the expected behaviour of user agents with >respect to the bidi markup. > >XHTML > >XHTML (served as text/xml, application/xml or application/xhtml+xml) is XML >and so needs CSS to map the markup to the appropriate display behaviour, as >described in '<a href="#xml">General XML-based markup languages</a>' above. >Note that an XHTML document served as text/html is treated as an HTML >document, not an XHTML one, and so the HTML rules apply, not the XHTML ones. > >>> I think this is correct, but not complete. The idea with generic XML, bidi attributes/elements, and CSS, is that the semantics of the bidi attributes/elements is defined by the document type, and that CSS is used on a *per document type* base to map from the document-specific bidi markup to the styling properties that the rendering engine will handle. So for XHTML (as well as for every other document type with bidi markup), this means: - When defining the document type, provide a default bidi stylesheet. - When using the document type, include this default bidi stylesheet. Never ever change it, except for very very special cases (e.g. transliterating Yiddish to Latin by using a Hebrew font with Latin glyphs; might better do that with XSLT anyway). So I think there are two things needed: - Make sure that we provide the bidi part of the (X)HTML default stylesheet in a way that is easy to include in a CSS stylesheet. In comments in that stylesheet, clearly say what it is and that it isn't supposed to be changed. My understanding is that currently, the default stylesheet rules are available somewhere in the CSS spec, but not in their own file. I think we should take this back to the HTML and CSS WGs. - Tell people to include that stylesheet (be it with @include, with a separate <link>, or by actual copy,...), and NOT to ever touch it. This is something that we should do in the FAQ, and can do now (and add better pointers later). Regards, Martin.
Received on Monday, 25 August 2003 12:18:51 UTC