Print

Print


This is making me rather jittery too.  Somebody please reassure me that 
it is OK to have text strings in a different language within <text 
xml:lang="xx"> so long as those strings themselves nest in some element 
with its own @xml:lang value to override the one on <text> (as in 
Godfried's example below).

John
John Young
The Casebooks Project
Cambridge University

On 08/04/2011 10:25, Croenen, Godfried wrote:
> I have been following this discussion from afare and am becoming increasingly nervous about the implications of the semantics of xml:lang.
>
> I had always thought we could use xml:lang to indicate that the whole text or parts of it are in an other language, like
>
> <TEI>
> <teiHeader>
> .....
> <langUsage>
> <language ident="fr">Middle French</language>
> <language ident="la">Latin</language>
> </langUsage>
> .....
> </teiHeader>
> <text xml:lang="fr">
> .....
>
> <div type="chapter">
>
> Ilz chantoient<quote xml:lang="la" type="scripture">Ave Maria</quote>  ...
>
> </div>
> </text>
> </TEI>
>
> but I now realise this is completely wrong, as the semantics of xml:lang imply that all the attribute values are also in the language indicated in xml:lang. This means that we should be translating (amongst others) the values for the type and rend attributes into Middle French and Latin, which does not seem the most practical thing to do. And I am not even mentioning Old English or Gothic here.
>
> I should be very grateful to know how one should therefore mark up the language of element contents WITHOUT implying that attribute contents is in the same language?
>
> Godfried
>
>
> -----Original Message-----
> From: TEI (Text Encoding Initiative) public discussion list [mailto:[log in to unmask]] On Behalf Of Piotr Banski
> Sent: 08 April 2011 07:48
> To: [log in to unmask]
> Subject: Re: Clarification about xml:lang (was Re: how to encode the language of a bibliographic reference)
>
> Hi Stuart,
>
> Half alive after a 15-hour transfer across the Puddle I can't resist
> mentioning that you've apparently just demonstrated some horrible
> short-sightedness on the part of the inventor(s) of xml:lang -- how can
> one force us to at the same time declare the language *unconditionally*
> for *both* element and attribute content?? Think of dictionaries.
>
> Some part of my brain has a memory of something like xml:lang pertaining
> to element content alone, and of attributes not being addressed by it.
> This memory is clearly wrong in the light of the recent quote from the
> XML Spec. But is another memory, of the controversy between switching
> from using @lang to @xml:lang, not related to that? Was @lang (of P3?)
> meant for element content alone perhaps? I do hope I am missing
> something here.
>
> Because if what you say is as true as it apparently is, it's not really
> a matter of Lou being right or wrong, it's a matter of what attribute
> values you are theoretically allowed to use on any element that contains
> a string in a language that you want to identify. Your example concerned
> @n, but isn't the same logic applicable to e.g. @type then? (etc. --
> even if one tries to wiggle out of my question by saying that @type is
> symbolic, it doesn't matter because xml:lang may also be about the
> script, not just the language).
>
> Goodnight,
>
>    P.
>
>> [Sorry if you have already received an email similar to this, I'm having
>> email issues at my end.]
>>
>> I have come to realise that Lou is right about this.
>>
>> Even in Piotr's minimal case, xml:lang already has a meaning and a
>> meaning that matters in the real world:
>>
>> <linkGrp xml:id="...">
>>    <ptr xml:id="..." target="..." type="..." xml:lang="pl" n="a"/>
>>    <ptr xml:id="..." target="..." type="..." xml:lang="sw" n="b"/>
>> </linkGrp>
>>
>> The language of the @n attributes 'a' and 'b' are determined by their
>> respective @xml:lang attributes. If systems potentially use @n
>> attributes for collation or display (as we do at the NZETC), then
>> language of the @n attributes matters.
>>
>> Thus, this is not a case where unspecified meaning in the standard can
>> be exploited to stash the language of the referent.
>>
>> cheers
>> stuart