W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2003

Constraining xml:lang - Catch 22

From: Jack Lindsey <tuquenukem@hotmail.com>
Date: Thu, 18 Dec 2003 18:07:51 -0500
To: xmlschema-dev@w3.org
Message-ID: <Law15-F64SRtvzrSqqq0004ff44@hotmail.com>

I have been asked why I don't validate xml:lang in my schemas to restrict 
its values to something like en-GB, en-US, en-Ca, fr-CA, es-MX.  But if I 
roll my own or derive something by restriction in my namespace, it may be 
my:lang but it is no longer xml:lang.  But for so many 
internationalization/localization reasons everyone wants the instant 
recognition and standardization of xml:lang.  Apart from using Schematron or 
depending on application program logic, are there any other useful 
strategies in this area?

I love this, from "http://www.w3.org/2001/xml.xsd"

<xs:attribute name="lang" type="xs:language">
  <xs:annotation>
   <xs:documentation>In due course, we should install the relevant ISO 2- 
and 3-letter
         codes as the enumerated possible values . . .</xs:documentation>
  </xs:annotation>
</xs:attribute>

Define "In due course".

Cheers Jack

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
Received on Thursday, 18 December 2003 18:12:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:40 GMT