Re: Use of its:langRule in author modifiable global rules

Richard Ishida wrote:
> 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.  
>
> [1]
> 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?
>
>
> [2]
> 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">
>  <term>
>   <lang1>Computer</lang1>
>   <lang2 xml:lang="fr">Ordinateur</lang2>
>   </term>
>  <term>
>   <lang1>Software</lang1>
>   <lang2 xml:lang="fr">Logiciel</lang2>
>   </term>
>  <term>
>   <lang1>File</lang1>
>   <lang2 xml:lang="fr">Fichier</lang2>
>   </term>
>  </dictionary>
>
> 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.
>   

I had some offline discussion with Yves about this, and I think (that we 
think?) the problem is that this might break xml:lang : an xml:lang 
processor does not know about its:langRule , lang1 and lang2. Not 
specifying xml:lang="fr" at lang2 elements will leave this processor 
"blind".

But yes, you are right, this is probably a "v.next" discussion ...

Felix

> 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?
>
> RI
>
>
> 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)
>  
> http://www.w3.org/International/
> http://rishida.net/blog/
> http://rishida.net/
>
>  
>
>
>   

Received on Wednesday, 31 October 2007 17:03:31 UTC