Re: [xml] xml:lang attribute with xmllint



On Wed, Jun 02, 2004 at 03:13:48PM +0200, Verachten Bruno wrote:
Hi,

I've just generated a schema with elements like this one :
<xs:element name="origin">
 <xs:complexType>
  <xs:simpleContent>
   <xs:extension base="xs:string">
    <xs:attribute ref="xml:lang" use="required"/>
   </xs:extension>
  </xs:simpleContent>
 </xs:complexType>
</xs:element>

As you can see, there is an attribute-ref to the xml:lang attribute.
This attribute is not defined in the schema, and the IBM SchemaQualityChecker
doesn't see any error in the schema.

I'm trying to validate an XML document with this schema, and I get an error with xmllint :
$ xmllint --schema ../doc/translation.xsd --noout example12.xml
../doc/translation.xsd:22: element attribute: Schemas parser error : Schemas: attribute anonattr 9 
reference lang not found
../doc/translation.xsd:40: element attribute: Schemas parser error : Schemas: attribute anonattr 17 
reference lang not found
../doc/translation.xsd:30: element attribute: Schemas parser error : Schemas: attribute anonattr 13 
reference lang not found
WXS schema ../doc/translation.xsd failed to compile

Is there a problem with xmllint and the xml:lang attribute, or did I miss something?
$ xmllint --version
xmllint: using libxml version 20609
   compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer XInclude Iconv Unicode Regexps 
Automata Schemas

  try with 2.6.10 first, and then double check the shemas specification,
I'm not sure you can actually use QNames to specify attributes names, you
may have to use the namespace explicitely, not the prefix.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]