Re: Bug in XSV?

"Roger L. Costello" <costello@mitre.org> writes:
> > <?xml version="1.0"?>
> > <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
> >         elementFormDefault="qualified">
> >     <xsd:complexType name="CardCatalogueEntry">
> >         <xsd:sequence>
> >             <xsd:element name="Title" type="xsd:string"/>
> >             <xsd:element name="Author" type="xsd:string"/>
> >             <xsd:element name="Date" type="xsd:string"/>
> >             <xsd:element name="ISBN" type="xsd:string"/>
> >             <xsd:element name="Publisher" type="xsd:string" />
> >         </xsd:sequence>
> >     </xsd:complexType>
> >     <xsd:element name="Book" type="CardCatalogueEntry"/>
> > </xsd:schema>
> > <!-- snip -->
> > When I ran this example in XSV I got this error message:
> >
> > Undefined type {None}:CardCatalogueEntry referenced as type definition
> > of Book

Reviewing Roger's example above, it seems XSV may
be looking for <xsd:element...> first.  For example:

  <?xml version="1.0"?>
  <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
          elementFormDefault="qualified">

      <xsd:element name="Book" type="CardCatalogueEntry"/>

      <xsd:complexType name="CardCatalogueEntry">
          <xsd:sequence>
              <xsd:element name="Title" type="xsd:string"/>
              <xsd:element name="Author" type="xsd:string"/>
              <xsd:element name="Date" type="xsd:string"/>
              <xsd:element name="ISBN" type="xsd:string"/>
              <xsd:element name="Publisher" type="xsd:string"/>
          </xsd:sequence>
      </xsd:complexType>
  </xsd:schema>

This should validate.  Perhaps XSV considers
CardCatalogueEntry undefined because the parser
first expects a global/root element definition 
pointing to a complexType structure following
further in the schema.

Robert Tiess

rjtiess@warwick.net
http://rtiess.tripod.com

Received on Sunday, 25 February 2001 19:19:13 UTC