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

Sebastian Rahtz scripsit:

> It seems to me that you can't have it both ways. Either xml:lang is a 
> universal
> attribute which is tied to RFC 3066 (or its sucessors), or its not. What 
> if your schema
> defined xml:lang to accept only integers? How do you manage the 
> contradiction?

The XML Recommendation gives the purpose of xml:lang, but does not make it
normative.  Applications of XML are free to make use of xml:lang in any
way desired; interoperability is served by not allowing the value to be
other than an RFC 3066 identifier or the empty string, but there is nothing
in the XML Recommendation to prevent values from being more tightly constrained.

This could be achieved in XML Schema by importing the XML namespace using an
xs:redefine element and narrowing the definition of xml:lang.

> And what about xml:id? are we allowed to redefine the datatype of that??

Not in a DTD, at least.  The published schema for the xml: namespace also
forces xml:id to be of type xs:ID.  Authors of RELAX NG schemas may do what
they please, but are urged not to.

-- 
John Cowan  jcowan@reutershealth.com  www.ccil.org/~cowan  www.reutershealth.com
If I have not seen as far as others, it is because giants were standing
on my shoulders.
        --Hal Abelson

Received on Friday, 25 November 2005 10:09:13 UTC