Error when 'xml:base' attribute is present

May 8, 2012 at 11:56 PM

I'm having trouble converting a schema containing a reference to the xml:base attribute. Here's a sample schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:foobar">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
  <xs:element name="foo">
    <xs:complexType>
      <xs:attribute ref="xml:base"/>
    </xs:complexType>
  </xs:element>
</xs:schema>

When I run this through Xsd2Code, it complains:

Error: The 'http://www.w3.org/XML/1998/namespace:base' attribute is not declared

Maybe something is wrong with my import directive?  (Specifying a local xml.xsd file doesn't work either.)

This schema is properly converted by xsd.exe (with or without the import directive).

Thanks in advance for any help!

Aug 27, 2013 at 2:06 AM
I also ran into this problem. It happens with the Collada 1.4.1 XSD.