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

XSV's handling of <any>

From: Roger L. Costello <costello@mitre.org>
Date: Tue, 16 Jan 2001 06:24:22 -0500
Message-ID: <3A642F66.E95A1F02@mitre.org>
To: xmlschema-dev@w3.org, costello@mitre.org
I am having difficulty with getting xsv to validate an instance document
that conforms to a schema with an <any> element.

For example, here is a snippet of my schema:

  <element name="Book">
           <element name="Title" type="string"/>
           <element name="Author" type="string"/>
           <element name="Date" type="string"/>
           <element name="ISBN" type="string"/>
           <element name="Publisher" type="string"/>
           <any namespace="##any"/>

As you can see, I am allowing for <Book> elements to be extended with
any well-formed XML element, which can come from any namespace.

Also, in this schema I defined a Reviewer element:

  <element name="Reviewer" type="string"/>

I created an instance document, where one of the <Book> elements was
extended with the Reviewer element:

             <Title>My Life and Times</Title>
             <Author>Paul McCartney</Author>
             <Publisher>McMillin Publishing</Publisher>
             <Reviewer>Roger Costello</Reviewer>

(The default namespace is the schema's targetNamespace.)  Both the
desktop version of xsv, as well as the online Web version of xsv blew up
at this <Book> element.  The error messages from the desktop version of
xsv essentially stated that <Reviewer> was not allowed.  The online, Web
version was less descriptive (see below).  

I believe that I am using the <any> element correctly.  Perhaps not. 
So, is it me that's in error, or is it xsv?  /Roger

Low-level XML well-formedness and/or validity processing output

Warning: Undeclared attribute xsi:schemaLocation for element schema
 in unnamed entity at line 6 char 27 of
document element of http://www.book.org/ is not in namespace

Schema resources involved

Attempt to import a schema document from
http://www.xfront.com/BookCatalogue345.xsd for http://www.book.org,

Attempt to import a schema document from http://www.book.org/ for
http://www.book.org, failed
Received on Tuesday, 16 January 2001 06:26:25 UTC

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