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:documentation>In due course, we should install the relevant ISO 2- 
and 3-letter
         codes as the enumerated possible values . . .</xs:documentation>

Define "In due course".

Cheers Jack

Protect your PC - get McAfee.com VirusScan Online  
Received on Thursday, 18 December 2003 18:12:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:17 UTC