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

Hi Christian,

Many thanks for the feedback.
I'll go through them below.

I'll post the updated draft later today. It'll also include the changes
from my action items of last week, and some additional, added title in
examples, etc. As usual, the lastest darft is here:
http://www.w3.org/International/its/techniques/its-techniques.html



> Best Practice 1: Provide xml:lang to specify language content 
> 
> CL-RephraseProposal>Provide xml:lang to identify the natural 
> in which the content is written.
> The XML Spec. uses similar wording

Fine with me. (I assume 'language' should go after 'natural')
Change done.



> 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 (and even mention some of the intricacies of not setting a
> value).

Fine with me.
Change done.


 
> 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 may use them.

God point.
Change done.
 


> 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 
> following based on values for "xml:lang" ...
> CL-Rationale> I guess an example would be appreciated.

I'm not sure an example is needed. The point is underline the importance
of using xml:lang vs something else because of interoperability. Adding
an example of how xml:lang works with XPath be be putting too much info.
Or, alternatively we could have a parenthesis with something like:

...XML technologies such as XPath and XSL (eg. The lang() function).



> 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

I think the change would be fine.
Comments anyone?



> 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
ttributes> .
>
> CL-RephraseProposal> ... applies to both the attributes and the 
> content 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 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.

Ok. Done.



> 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.
> CL-RephraseProposal> Include link to
> <http://www.w3.org/TR/REC-xml/#sec-lang-tag> 

Actually I've re-done this example.
As for linking to xml:lang. I've just made all occurrence of xml:lang a
link to http://www.w3.org/TR/REC-xml/#sec-lang-tag



> http://www.w3.org/International/questions/qa-when-xmllang
>
> CL-RephraseProposal> Make the link work ;-)

It seems to be working for me.



Thanks,
-yves

Received on Monday, 5 March 2007 18:40:04 UTC