W3C home > Mailing lists > Public > www-international@w3.org > October to December 2005

Re: New article published: xml:lang in XML document schemas

From: Felix Sasaki <fsasaki@w3.org>
Date: Tue, 29 Nov 2005 10:26:51 +0900
To: "Martin Duerst" <duerst@it.aoyama.ac.jp>, "Sebastian Rahtz" <sebastian.rahtz@oucs.ox.ac.uk>
Cc: "Richard Ishida" <ishida@w3.org>, www-international@w3.org
Message-ID: <op.s0zaa1r2x1753t@ibm-60d333fc0ec.globalsuite.net>

On Mon, 28 Nov 2005 17:35:31 +0900, Martin Duerst <duerst@it.aoyama.ac.jp>  
wrote:

> At 14:45 05/11/25, Felix Sasaki wrote:
>
>  >This discussion is getting more and more a non i18n issue, so now just  
> one
>  >more argument which makes it possibly i18n relevant again. xml:lang is
>  >defined in terms of RFC 3066, which encompasses two language subtags:  
> for
>  >language and for country codes. Suppose you want to put additional
>  >constraints on the value of xml:lang, so that it allows only for a  
> subset
>  >of rfc 3066 values (e. g. only language codes, but not country codes).
>  >With XML Schema it is no problem, but would you  be able to do that  
> with
>  >RELAX NG? It would not be possibly with DTDs.
>
> I'm not sure what the last sentence means. If it means
> "It would not be possible with DTDs.", then that's wrong.
> The XML spec itself contains an example
> (http://www.w3.org/TR/REC-xml/#sec-lang-tag)
>
>  >>>>>>>>
> A simple declaration for xml:lang might take the form
>      xml:lang CDATA #IMPLIED
> but specific default values MAY also be given, if appropriate.
> In a collection of French poems for English students, with
> glosses and notes in English, the xml:lang attribute might
> be declared this way:
>      <!ATTLIST poem   xml:lang CDATA 'fr'>
>      <!ATTLIST gloss  xml:lang CDATA 'en'>
>      <!ATTLIST note   xml:lang CDATA 'en'>
>  >>>>>>>>

I meant not default values but restrictions on values like  
"[A-Za-z][A-Za-z]" (this was provided by John in an earliere mail).

>
> The benefit of this and other restrictions should be
> obvious, in particular for checking documents against
> consistency criteria above and beyond what e.g. a particular
> spec might require. In a perfect Schema/RelaxNG world,
> the XML namespace schema would be predefined, but
> restrictions would be allowed.

Yes, that would be perfect.
Regards, Felix.
Received on Tuesday, 29 November 2005 01:27:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:17:06 GMT