W3C home > Mailing lists > Public > public-i18n-its@w3.org > October to December 2007

Use of its:langRule in author modifiable global rules

From: Richard Ishida <ishida@w3.org>
Date: Wed, 31 Oct 2007 16:59:07 -0000
To: <public-i18n-its@w3.org>
Message-ID: <00ee01c81bdf$59d11230$6501a8c0@rishida>

Having read the example Felix mentioned at http://lists.xml.org/archives/xml-dev/200710/msg00161.html ,  I agree that it is poor, since attributes shouldn't contain translatable text.  

I'm not convinced that the following is appropriate (adapted from Felix's response):

<its:langRule selector="//dictionary/term/@name" langPointer="//dictionary/@lang2"/>

Since the langRule global rule is, as I understand it, responsible only for equating markup such as @lang or @language etc with @xml:lang - not for assigning values to random elements in the document in this way.  The ITS spec expresses this with the words "The langRule element is intended only as a fall-back mechanism for documents where language is identified with another construct."

Am I correct?

However, I think I can see a very scenario where it may be useful for authors to set global rules to define language in a way that I don't think is covered by ITS at the moment.

If you had:

<dictionary xml:lang="en" lang1="en" lang2="fr">
		<lang2 xml:lang="fr">Ordinateur</lang2>
		<lang2 xml:lang="fr">Logiciel</lang2>
		<lang2 xml:lang="fr">Fichier</lang2>

It might make life easier for an author if they didn't have to specify the language for lang2 elements every time.  You could do this in two ways:

1. you could obtain the language for all lang2 elements (unless overridden locally by xml:lang) by pointing to the value of @lang2 on the <dictionary> tag using a global rule.

2. you could specify the value directly, in a global rule, as one does for translate.

An external ITS Rules documentation would be sufficient if this format was only ever used for one pair of languages, and in one direction.  If the format was used for a variety of language pairings, however, you would have to have an its:langRule in the <head>, so that the author could declare the default language of the lang2 (and lang1) elements based on how the document was being used.

Perhaps that's one for ITS v2?


PS: Since I don't think that the approaches above are feasible with current version of ITS, I think this rules out the need for its:langRule to be available in global rules inside the document at the moment.  Which means we don't need to change BP1.

Richard Ishida
Internationalization Lead
W3C (World Wide Web Consortium)

Received on Wednesday, 31 October 2007 16:56:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:43:09 UTC