Re: Something like xml:dir

On 2010/10/27 1:47, Tab Atkins Jr. wrote:
> On Mon, Oct 25, 2010 at 10:43 PM, "Martin J. Dürst"
> <duerst@it.aoyama.ac.jp>  wrote:

>> Another concern is that for bidi attributes in HTML, there is a default
>> stylesheet. So would we need a default stylesheet for XML to cover something
>> like xml:dir?
>
> No; bidi rendering *should* occur solely in the rendering engine, and
> shouldn't be exposed to CSS at all; this is not a styling issue any
> more than "should I interpret this text as unicode or ascii?" is.  The
> CSS support for the bidi attributes was solely so that XML languages
> could define their own bidi attributes and get them to respond
> correctly in a CSS-based processor.

Almost correct. But when this was designed, we also thought about use 
cases where it makes sense to change the CSS. Let's say I have some 
hebrew or arabic data, but apply a stylesheet that sets a font that has 
glyphs that look like Latin, which will give me a (at least crude) 
transliteration. To actually be able to read this, I'd better also 
change the bidirectionality properties. With the current CSS, I can do this.


> If XML supports directionality annotations natively, then the use-case
> for CSS directional properties disappears.  We of course can't get rid
> of the properties now,

Definitely not.

> but we can obsolete them,

That would require that all XML formats that currently have their own 
bidi attributes get obsoleted, too. It would also mean that any XML 
format that for one reason or another wants to take a different approach 
to bidirectionality than the newly introduced xml:... attributes can't 
do that (one can easily imagine a specialized DTD for Arabic poems with 
English commentary where both language and directionality can be derived 
from the element names).

Regards,    Martin.

> and avoid carrying
> them into future drafts (keeping them as just a CSS2.1 quirk) or
> expanding their functionality.

-- 
#-# Martin J. Dürst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:duerst@it.aoyama.ac.jp

Received on Wednesday, 27 October 2010 09:27:27 UTC