Re: Something like xml:dir

On Wed, Oct 27, 2010 at 2:26 AM, "Martin J. Dürst"
<duerst@it.aoyama.ac.jp> wrote:
> 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.

That feels like quite a minority use-case.  Has anyone done this, ever?


>> 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.

Ideally, yes, but that's not really necessary.  The properties will
still exist, they just won't be required for conformance in any level
above CSS2.1.


> 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).

I don't know much about DTDs, but isn't it possible to define default
values for attributes per element?  I mean, you even point out that
any problem such a case would have with xml:dir would also apply to
xml:lang.

~TJ

Received on Wednesday, 27 October 2010 15:19:35 UTC