XSV1.2 and Chameleon schemas

I am having difficulty validating
an instance of a schema that employs
chameleon sub-schema. I'm using
XSV1.2 for NT.

The instance is as follows

<?xml version="1.0"?>
<ns:NMI xmlns:ns="test" xmlns:xsi
     xsi:schemaLocation="test schema1.xsd">1234567890</ns:NMI>

Schema1 defines the target and default namespaces as "test" and
includes a second schema. Schema1 is as follows

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     targetNamespace="test" xmlns="test">
     <xsd:include schemaLocation="schema2.xsd"/>

Schema 2 defines a few types and an element for the
document root as follows

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >

     <xsd:simpleType name="NMIBase">
          <xsd:restriction base="xsd:string">
               <xsd:length value="10"/>

     <xsd:simpleType name="NMIChecksum">
          <xsd:restriction base="xsd:integer">
               <xsd:minInclusive value="0"/>
               <xsd:maxInclusive value="9"/>

     <xsd:complexType name="NMI">
               <xsd:extension base="NMIBase">
                    <xsd:attribute name="checksum" type="NMIChecksum" use

     <xsd:element name="NMI" type="NMI"/>

When validating the instance, I get the error

Undefined type {None}:NMIBase referenced as base type of [anonymous].

If I understand chameleon schemas correctly, NMIBase should be
assumed to be in the "test" namespace due to the combination of the
default namespace ("test") and the targetNamespace on the enclosing
schema ("test").

This looks like a bug to me.

If I include a copy of the targetNamespace and default namespace attributes
from schema1 into schema2, no errors are reported.

Anyone see anything obvious I've overlooked?

Henry, do I get a mintie?


(See attached file: NMI.out)(See attached file: NMI.xml)(See attached file:
schema1.xsd)(See attached file: schema2.xsd)

Received on Wednesday, 13 June 2001 07:45:49 UTC