The case you raise, at least, does not give further headaches since, as Piotr mentioned, the type attribute is to be considered as a symbol and not as a language production.
Remember that xml:lang is there to indicate the language of a given content so that processors who need it can apply the appropriate settings. Think for instance of spell-checkers, hypheners, etc. This rarely apply to attributes (and the TEI has made its best so that we have less and less attributes that should actually be seen as language productions; cf. the evolution from @sic to <sic>)
Le 8 avr. 2011 à 11:25, Croenen, Godfried a écrit :
> 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
> <language ident="fr">Middle French</language>
> <language ident="la">Latin</language>
> <text xml:lang="fr">
> <div type="chapter">
> Ilz chantoient <quote xml:lang="la" type="scripture">Ave Maria</quote> ...
> 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?
> -----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).
>> [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"/>
>> 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.
INRIA & HUB-IDSL
[log in to unmask]