Re: language property


Subject: Re: language property
From: Paul Rohr (paul@abisource.com)
Date: Wed Mar 07 2001 - 11:18:13 CST


At 09:58 AM 3/7/01 -0600, Sam TH wrote:
>On Wed, Mar 07, 2001 at 02:17:38PM -0000, Tomas Frydrych wrote:
>> > Cool! You mean "lang", right?
>>
>> I called it "language", but that it's no problem to rename it to "lang";
>> do you want me to do that?
>
>XML has a reserved property called xml:lang. Check out hte XML
>Reccomendation for more info (or I'll send some more later).

To be clear. We need to express the lang concept at two places in our file
format.

  - at document scope (the default language for all content)
  - for specific character spans

At document scope, this should definitely be an attribute in one of the
following forms:

  1. As the standard XML attribute ... <abiword xml:lang="en-US">
  2. As our own XML attribute ... <abiword lang="en-US">

The only advantage of #2 over #1 is that it's more compact, which doesn't
count for much, since it only appears once. Other than that, it makes no
difference to us, so we might as well be friendly and do it the usual way.
However, to go with #1 we do need to make sure we have just enough namespace
awareness to ignore that xml: prefix internally.

  As a side issue -- AFAIK, we still haven't implemented other document
  properties, such as page count, author name, last modified date, etc.
  The content model for all those will work better if they're *not* done
  as attributes of the abiword tag, but rather as their own block of tags
  (kind of like we do with styles now). Thus, an argument could
  conceivably be made that lang information should go there, too. In this
  case, I don't buy it. If anyone's interested in discussing this
  alternative, please start a separate thread.

The more important question is how we express the lang of localized content
(say, Sioux) inside a document which defaults to some other locale (for
example, English). My assertion is that we should use a *different*
mechanism for this:

  3. As a CSS-like property ... <c props="lang:sio-US">
  4. True-blue XML ... <c xml:lang="sio-US">

In this case, choosing #4 over #3 feels like a mistake. We'd lose more than
we gain. Note that by choosing #3, we can expose and inherit language
tagging via our existing styles mechanism. Since we're now in the CSS-like
namespace, adding the xml: qualifier here would add nothing but bloat.

Paul,
WYSIWYG advocate & XML minimalist

PS: Yes, I know that this is *not* how CSS handles this, but that's one of
the many reasons why we always call our properties CSS-like. We don't use
the CSS selector mechanisms, and that's where they stick the lang concept
(as a pseudo-class).



This archive was generated by hypermail 2b25 : Wed Mar 07 2001 - 11:28:58 CST