[xml/sgml-pkgs] xmllint validation disliking iso_639 three letter codes in xs:language

stuart yeates stuart.yeates at vuw.ac.nz
Tue Jan 13 20:24:51 UTC 2009


I'm trying to use xmllint to validate XML containing xs:language-typed 
attributes, and while attributes of the form "en", "de" and 
"i-something" work just fine, attributes of the form "mao" and "rap" 
result in errors such as:

TeRSirG.xml.p5.formatted:84: element language: Schemas validity error : 
Element '{http://www.tei-c.org/ns/1.0}language', attribute 'ident': 
'mao' is not a valid value of the atomic type 'xs:language'.

Bid001Kahu.xml.p5.formatted:107: element language: Schemas validity 
error : Element '{http://www.tei-c.org/ns/1.0}language', attribute 
'ident': 'rap' is not a valid value of the atomic type 'xs:language'.

Bid001Kahu.xml.p5.formatted:972: element foreign: Schemas validity error 
: Element '{http://www.tei-c.org/ns/1.0}foreign', attribute 
'{http://www.w3.org/XML/1998/namespace}lang': 'rap' is not a valid value 
of the atomic type 'xs:language'.

Both 'moa' and 'rap' are present in
/usr/share/xml/iso-codes/iso_639_3.xml and
/usr/share/xml/iso-codes/iso_639.xml.

I understand that 'moa' is deprecated in favour of 'mi' by recent RFC's 
but I believe it's still valid for older XML files. 'rap' does not have 
a two-letter language code.

xs:Name and locally defined schema types seem to be working as expected.

This seems like a bug, or am I doing something wrong.

cheers
stuart

-- 
Stuart Yeates
http://www.nzetc.org/       New Zealand Electronic Text Centre
http://researcharchive.vuw.ac.nz/     Institutional Repository



More information about the debian-xml-sgml-pkgs mailing list