[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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>
xml lang restrict

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

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.