Feedback on "Best Practice 1: Provide xml:lang to specify language content"

Hi Yves, all,
 
Since I wasn't able to attend the call, here are some observations ...
Hopefully, the level of granularity is alright.

Cheers,
Christian
===
Best Practice 1: Provide xml:lang to specify language content 
 
CL-RephraseProposal>Provide xml:lang to identify the natural in which 
CL-RephraseProposal>the
content is written
CL-Rationale>The XML Spec. uses similar wording
 
Include xml:lang in your schema to allow to specify the language of the
content.
 
Make sure the xml:lang attribute is available for the root element of
your document, and for any element that could mark a change of language
in the text content.
 
CL-RephraseProposal>... and for any element where a change of language may
occur.
CL-Remark> I wonder if we also need to talk about the values for xml:lang
CL-Remark> (and even mention some of the intricacies of not setting a
value).
 
It is not recommended to use your own attribute to specify the language
content. 
 
CL-RephraseProposal>It is not recommended to use your own attribute or
element to specify the language content.
CL-Rationale> If we don't have the caveat for elements as well, people 
CL-Rationale> may
use them.
 
The xml:lang attribute is supported by various XML technologies such as
XPath and XSL. 
 
CL-RephraseProposal> ... XPath for example allows you to do the 
CL-RephraseProposal> following
based on values for "xml:lang" ...
CL-Rationale> I guess an example would be appreciated.
 
Using something different would diminish the interoperability of your
documents and reduce your capability to take advantage of some XML
applications.
 
CL-RephraseProposal> ... applications which process XML
CL-Rationale> "XML aplications" is used differently further down in the
document

Note: The scope of the xml:lang attribute applies to both the attributes
and the content of the element where it appears, therefore one cannot
specify different languages for an attribute and the element content.
ITS does not provide remedy for this. Instead, it is recommended to not
use attributes for translatable text
<http://www.w3.org/International/its/techniques/its-techniques.html#DevA
ttri
butes> .

CL-RephraseProposal> ... applies to both the attributes and the content 
CL-RephraseProposal> of
the element where it appears (link to
<http://www.w3.org/TR/REC-xml/#sec-lang-tag> )
CL-Rationale> The XML specification is the basis ;-)

Note: If not the language of the content, but a natural language value
as data or meta-data about something external to the document has to be
specified, an attribute different from xml:lang should be used as shown
below.

CL-RephraseProposal> Note: If not the language of the content, but a 
CL-RephraseProposal> natural
language value as data or meta-data about something external to the
document has to be specified, an attribute different from xml:lang
should be used.
The  hreflang attribute in XHTML for example provides user agents with
information about the language of a resource at the end of a link.

For details on how to add an attribute such as xml:lang to a DTD, an XSD
schema, or a RELAX-NG schema, please see Section 4.2: Adding an
Attribute to an Existing Schema
<http://www.w3.org/International/its/techniques/its-techniques.html#gene
ric_
insertatt> .
 
CL-RephraseProposal> Include link to
<http://www.w3.org/TR/REC-xml/#sec-lang-tag> 
 
Legacy Data

If you are working with a legacy XML document type where the language
declaration is not implemented using the xml:lang attribute (but use the
same values as xml:lang), you should provide an ITS rules document where
you use the its:langRule <http://www.w3.org/TR/its/#langRule>  element
to specify what attribute or element is used instead of xml:lang.

http://www.w3.org/International/questions/qa-when-xmllang

CL-RephraseProposal> Make the link work ;-)

Christian Lieske
MultiLingual Technology Solutions (MLT)
SAP Language Services (SLS)
SAP Globalization Services
SAP AG
Dietmar-Hopp-Allee 16
D-69190 Walldorf
Germany
T   +49 (62 27) 7 - 6 13 03
F   +49 (62 27) 7 – 2 54 18
christian.lieske@sap.com
http://www.sap.com  

Sitz der Gesellschaft/Registered Office: Walldorf, Germany Vorstand/SAP
Executive Board: Henning Kagermann (Sprecher/CEO), Shai Agassi, Léo
Apotheker, Werner Brandt, Claus Heinrich, Gerhard Oswald, Peter Zencke
Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board:
Hasso Plattner
Registergericht/Commercial Register Mannheim No HRB 350269

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige
vertrauliche Informationen enthalten. Sollten Sie diese E-Mail
irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts,
eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
Vielen Dank.

This e-mail may contain trade secrets or privileged, undisclosed, or
otherwise confidential information. If you have received this e-mail in
error, you are hereby notified that any review, copying, or distribution
of it is strictly prohibited. Please inform us immediately and destroy
the original transmittal. Thank you for your cooperation. 

Received on Monday, 5 March 2007 17:01:23 UTC