Re: New article for REVIEW: xml:lang in XML document schemas

Hi Addison, hi Richard,

I found the FAQ very useful. Just a comment on the question:

"When should I use xml:lang and when should I define my own element or  
attribute for passing language values in an XML document schema (DTD)?"

The 3 schema languages XML Schema, XML DTDs and RELAX NG differ with  
respect to the question whether a user has to define xml:lang or not.  
Maybe you should add a note somewhere about this.

XML SCHEMA

See
http://www.xml.com/pub/a/2000/11/29/schemas/part1.html?page=8

xml namespace has to be declared and imported, to be able to use xml:lang:

<xs:import namespace="http://www.w3.org/XML/1998/namespace"  
schemaLocation="myxml.xsd"/>


RELAX NG

you can use xml:lang without any declarations, see
http://relaxng.org/compact-tutorial-20030326.html

"The prefix xml is predeclared as in XML: no namespace declaration is  
required for the xml prefix."


XML DTDs, see http://www.w3.org/TR/REC-xml/#sec-lang-tag:

"In valid documents, this attribute, like any other, MUST be declared if  
it is used."


Regards, Felix.

On Thu, 18 Aug 2005 01:40:51 +0900, Richard Ishida <ishida@w3.org> wrote:

>
>
>
> Title: xml:lang in XML document schemas
> http://www.w3.org/International/questions/qa-when-xmllang.html
>
> Comments are being sought on this article prior to final release. Please  
> send any comments to www-international@w3.org. We expect to publish a  
> final version in one to two weeks.
>
> The article aims to answer the question: "When should I use xml:lang and  
> when should I define my own element or attribute for passing language  
> values in an XML document schema (DTD)?"
>
>
> ============
> Richard Ishida
> W3C
>
> contact info:
> http://www.w3.org/People/Ishida/
>
> W3C Internationalization:
> http://www.w3.org/International/
>
> Publication blog:
> http://people.w3.org/rishida/blog/
>
>

Received on Thursday, 18 August 2005 06:02:48 UTC