W3C home > Mailing lists > Public > public-i18n-its@w3.org > April to June 2007

RE: Input to BP1 http://www.w3.org/International/its/techniques/its-techniques.html#Dev Lang

From: Felix Sasaki <fsasaki@w3.org>
Date: Tue, 5 Jun 2007 09:29:45 +0900 (JST)
Message-ID: <1184.218.110.62.241.1181003385.squirrel@webmail.w3.mag.keio.ac.jp>
To: "Yves Savourel" <ysavourel@translate.com>
Cc: public-i18n-its@w3.org

Hi Yves, all again,

>
> Hi Yves,
>
>> Hi Felix,
>>
>> I would agree with a warning note.
>>
>>> "Note: Make sure that the definition of the xml:lang attribute
>>> allows for empty values. That is, you must not use e.g. NMTOKEN
>>> as the data type. The XML Schema built in data type 'language'
>>> does not allow for empty values. Hence it must be used with care
>>> or avoid.
>>
>>
>> A) should be "avoided" rather than "avoid".
>
> thanks, sure.
>
>>
>> B) The statements: "Make sure...allows for empty values" and
>> "...'language' does not allow for empty values. Hence it must be used
>> with care or avoided" seem a bit contradictory: 'language' cannot be
>> used
>> if you need to 'make sure'.
>
> agree. How about:
> " ... You must not use the NMTOKEN data type. Note that the XML Schema
> built in data type 'language' does not allow for empty values and hence
> must be used with care or avoided"
>
>>
>> C) We say what not to use, but do not provide an example of what to use.
>> If we cannot use NMTOKEN nor 'language' what should the
>> developer use?
>
> in DTDs CDATA. I'll check for XML Schema and come back to this issue.

We should point people to the XML Schema document for the XML namespace, see
http://www.w3.org/2001/xml.xsd . It defines for xml:lang a union type of
the language data type and an empty value:

 <xs:simpleType>
   <xs:union memberTypes="xs:language">
    <xs:simpleType>
     <xs:restriction base="xs:string">
      <xs:enumeration value=""/>
     </xs:restriction>
    </xs:simpleType>
   </xs:union>
  </xs:simpleType>

I would recommend that people use that definition for XML Schema or RELAX NG.

Felix

>
> Cheers,
>
> Felix
>
>>
>>
>> Cheers,
>> -ys
>>
>>
>>
>
>
>
>
Received on Tuesday, 5 June 2007 00:30:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:12:49 GMT