W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

Re: Bug in XSV?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 26 Feb 2001 17:08:02 +0000
To: Robert Tiess <rjtiess@warwick.net>
Cc: xmlschema-dev@w3.org
Message-ID: <f5b7l2dnzil.fsf@cogsci.ed.ac.uk>
Robert Tiess <rjtiess@warwick.net> writes:

> "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:

No, it's a real bug, now fixed but not released.

>   <?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.

Sorry, just as bad (from XSV's perspective, not the spec's!).  Nothing 
in an XML Schema implementation should be order dependent, since
nothing in XML Schema itself is.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Monday, 26 February 2001 12:08:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC