OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   schema validation question

[ Lists Home | Date Index | Thread Index ]

I am trying to validate a schema instance doc against the following schema:
 
<schema xmlns="http://www.w3.org/2001/XMLSchema"
 xmlns:fac="http://localhost:8080/xmlp/xs"
        targetNamespace="http://localhost:8080/xmlp/xs">
 
 <annotation>
    <documentation>
    Developed by Joe Hallett at Colgate University.
    Defines fact data to be used by expert system processing.
    All rights reserved.
   </documentation>
 </annotation>
 
 <element name="Facts" type="fac:FactsType"/>
 <complexType name="FactsType">
  <sequence>
   <element name="Fact" type="fac:FactType" maxOccurs="unbounded"/>
  </sequence>
 </complexType>
 <complexType name="FactType">
  <sequence>
   <element name="Name" type="string"/>
   <element name="Value" type="fac:ValueUnion"/>
   <element name="Subfacts" type="fac:FactsType" minOccurs="0" maxOccurs="unbounded"/>
  </sequence>
 </complexType>
 <complexType name="ValueUnion">
  <sequence>
   <element name="String" type="string"/>
   <element name="Int" type="int" maxOccurs="unbounded"/>
   <element name="Float" type="float" maxOccurs="unbounded"/>
   <element name="Long" type="long" maxOccurs="unbounded"/>
   <element name="List" type="fac:ListType" maxOccurs="unbounded"/>
  </sequence>
 </complexType>
 <complexType name="ListType">
  <sequence>
   <element name="Type" type="fac:TypeEnum"/>
   <element name="Element" type="fac:ValueUnion" maxOccurs="unbounded"/>
  </sequence>
 </complexType>
 <simpleType name="TypeEnum">
  <restriction base="string">
   <enumeration value="string"/>
   <enumeration value="int"/>
   <enumeration value="float"/>
   <enumeration value="long"/>
   <enumeration value="list"/>
  </restriction>
 </simpleType>
</schema>
 
 
I am using Xerces 14.4 to parse the doc and have set the "http://apache.org/xml/properties/schema/external-schemaLocation" property to find the above schema.
 
The reason for the localhost:8080 URL is because I am running tomcat 4.0 to access the schema.
 
When I run the validator on the instance doc I receive errors that tell me all the element types, with the exception of the global element "Facts", must be declared.
 
Any idea??
 
Thanks for the help,
 
Joe
 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS