[ESW Wiki] Update of "geoFAQxmllang" by RichardIshida

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "ESW Wiki" for change notification.

The following page has been changed by RichardIshida:
http://esw.w3.org/topic/geoFAQxmllang


------------------------------------------------------------------------------
  
  == Answer ==
  
- XML 1.0 defines a common attribute ''xml:lang'' which indicates the natural language of the content of an element (or attribute). That is, the best application of xml:lang should be to identify the language of text contained by the element (including any sub-elements) as well as any attribute values associated with the element and its descendant elements (though using natural language in attributes is '''not''' best practice).
+ XML 1.0 defines a common attribute ''xml:lang'' which indicates the natural language of the content of an element (or attribute)'''[['''RI I'd remove the stuff in parens - the attribute is the content of the element, but it sounds like you can specify for just an attribute when expressed this way''']]'''. That is, the best application of xml:lang should be to identify the language of text '''[['''RI not just text - could be an embedded object, like a speech file''']]''' contained by the element (including any sub-elements) as well as any attribute values associated with the element and its descendant elements (though using natural language in attributes is '''not''' best practice).
  
- Sometimes you need to convey a language as an information item of its own. If you want to have an element or attribute whose ''value'' is a language, then you should use RFC 3066 (or its successor) to form the value, but you should define an element or attribute of your own with a different name and not use the xml:lang attribute.
+ Sometimes you need to convey a language as an information item of its own. '''[['''RI would be good to have an example here''']]''' If '''[['''RI suggest s/If you/In this case you/ and modify following text to suit''']]''' you want to have an element or attribute whose ''value'' is a language, then you should use RFC 3066 (or its successor) to form the value, but you should define an element or attribute of your own with a different name and not use the xml:lang attribute.
  
  For example, in XHTML, there is an hreflang attribute in the <a> element and also an xml:lang (or lang attribute, in the case of HTML) for the content of the <a> element:
  
@@ -29, +29 @@

  For example, your XML might look like:
  
  {{{<item>
-   <title xml:lang="en">Casablanca</title> <!-- indicates the language of 'Casablanca' -->
+   <title xml:lang="en">Casablanca</title> <!-- indicates the language of '''[['''RI s/of/of the text''']]''' 'Casablanca' -->
    <runningTime value="137" /> <!-- not language affected -->
-   <dialogue language="zh-min" />
+   <dialogue language="zh-min" /> '''[['''RI i'd add a comment here ''']]'''
    <subtitles track="1" language="zh-Hant" />
    <subtitles track="2" language="zh-Hans" /> 
  </item>}}}

Received on Tuesday, 28 June 2005 17:41:35 UTC