Jukka K. Korpela wrote: > Doug Ewell wrote: > > >> A language tag denotes one language. >> > > For suitable values for "one" and "language", yes. > > >> A protocol may define ways to >> combine multiple language tags into one field, as HTTP has done with >> Accept-Language by separating the tags with semicolons. But that is >> defined by and specific to the protocol. >> > > In the XML context, which is what the discussion is about, there is > normally no need to consider the possibility of referring to several > languages in one xml:lang attribute. The reason is that for > mixed-language content, XML lets (and even encourages, so to say) you to > use nested markup so that you can say exactly, for example, which parts > of the text are in English and which are in French. This may require > additional markup elements for the sole purpose of attaching xml:lang to > some piece of text, but that's nothing odd. For a truly bilingual > element (with almost equal amounts of text in two languages), you just > need to select one language for it and override the language information > in nested elements. > > However, XML has no way to specify different languages for different > _attributes_ of an element. If an element's attribute is in language > other than than its content, you can use the workaround of an inner > element, just for specifying the language of content, but this won't > work for attributes in different languages. The problem is real because > nowadays people often put textual data in attributes, as opposite to > (what I see as) the original idea in generalized markup where attributes > seldom contain text in a human language. > The ITS "Language data category" provides a solutions for this. see http://www.w3.org/TR/xml-i18n-bp/#EX-devlang-1 for an example of its usage. The problem you are mentioned could be solved like this: <!-- Document is in English, @info is in German --> <doc xml:lang="en" info="Information fuer den Uebersetzer"> ... <its:langRule selector="/doc/@info" langPointer="'de'"/> </doc> (note that this usage is not 100% the intention of its:langRule, which is meant to point to existing values which are represented not via xml:lang, and pointing to them via langPointer . However, using the XPath expression 'de' as the value of langPointer will do the job for you. Felix _______________________________________________ Ltru mailing list Ltru at ietf.org https://www.ietf.org/mailman/listinfo/ltru
Note Well: Messages sent to this mailing list are the opinions of the senders and do not imply endorsement by the IETF.