on 5/7/2004 8:17 PM Daniel Veillard wrote:
On Fri, May 07, 2004 at 06:10:55PM +0200, Kasimier Buchcik wrote:

Is this xsd schema invalid? Any comments?

  It seems that at this spoint you have a better understanding of the
XSD spec than I do. Various approaches are possibles:
  - ask on the schemas list at W3C
  - try with other validators like xerces, MS or XSV
  - try to find examples in the existing XSD test suites covering this.

  Until we have a formal definition of the XSD structure spec, trying
to decypher it to get a definitive answer seems a bit doomed, at least
the other approaches may lead to interoperability with other schemas tools.

Surprisingly I stumbled over an example schema of the XML Schema primer 
(http://www.w3.org/TR/xmlschema-0/) with the name po1.xsd (!).
Here it is:

<schema xmlns="http://www.w3.org/2001/XMLSchema";

  <element name="purchaseOrder" type="po:PurchaseOrderType"/>
  <element name="comment"       type="string"/>

  <complexType name="PurchaseOrderType">
    <element name="shipTo"    type="po:USAddress"/>
    <element name="billTo"    type="po:USAddress"/>
    <element ref="po:comment" minOccurs="0"/>
    <!-- etc. -->
   <!-- etc. -->

  <complexType name="USAddress">
    <element name="name"   type="string"/>
    <element name="street" type="string"/>
    <!-- etc. -->

  <!-- etc. -->


The test file under /test/schemas seems to be just an extended version 
of this reference example. Hm, I wonder where it came from. I guess the 
unprefix reference to the "comment" element declaration is just a typo, 
since references to complex type definitions are properly prefixed in 
the test file.

So I hope this is enough evidence for the error in the po1.xsd test file.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]