- From: Pete Cordell <petexmldev@tech-know-ware.com>
- Date: Wed, 21 Mar 2007 10:06:12 -0000
- To: "Swayam Vemuri -X (swvemuri - WIPRO at Cisco)" <swvemuri@cisco.com>, <xmlschema-dev@w3.org>
You've possibly cut too much of your schema out, but I can't see where ConfigAttributeType is defined in your schemas. We would need to see what that is defined as in the schema with targetNamespace http://www.cisco.com/gmi/ei2d. I can't see where some of the other types are defined either. Thanks, Pete. -- ============================================= Pete Cordell Tech-Know-Ware Ltd for XML to C++ data binding visit http://www.tech-know-ware.com/lmx/ http://www.codalogic.com/lmx/ ============================================= ----- Original Message ----- From: "Swayam Vemuri -X (swvemuri - WIPRO at Cisco)" <swvemuri@cisco.com> To: <xmlschema-dev@w3.org> Sent: Wednesday, March 21, 2007 5:28 AM Subject: Validation of XML instance failing as reference to supported schema is not found. Hi All, I have three schemas(xsds) Java.xsd, database.xsd, base.xsd. Iam importing java.xsd and database.xsd into base.xsd. I created an XML instance using base.xsd, which looks like below Ei2d.xml (XML instance) ========== <?xml version="1.0" encoding="UTF-8"?> <ei2d:Ei2dLibType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ei2d="http://www.cisco.com/gmi/ei2d"> <ei2d:managedResourceDef> <ei2d:managedResource xmlns:ei2d="http://www.cisco.com/gmi/ei2d" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:database="http://www.cisco.com/gmi/ei2d/database" name="ThinkPositive"> <ei2d:reference database:checking="Swayam"/> <ei2d:configData> <ei2d:attribute xsi:type="ei2d:ConfigAttributeType" javaAccessType="public" name="itWorks" /> </ei2d:configData> </ei2d:managedResource> </ei2d:managedResourceDef> </ei2d:Ei2dLibType> Now when I try to validate it using XMLSpy, Iam seeing below error "Unable to locate a reference to a supported schema type(DTD, W3C Schema)within this document instance" It will be of great help if anyone can please help me out regarding how to solve this problem. The base.xsd, Java.xsd and database.xsd are as given at the end of this email Thanks, Swayam Base.xsd(a snippet) =============== <?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Prakash Bettadapur (private) --> <xs:schema xmlns="http://www.cisco.com/gmi/ei2d" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:java="http://www.cisco.com/gmi/ei2d/java" xmlns:database="http://www.cisco.com/gmi/ei2d/database" targetNamespace="http://www.cisco.com/gmi/ei2d" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:import namespace="http://www.cisco.com/gmi/ei2d/java" schemaLocation="Java_.xsd"/> <xs:import namespace="http://www.cisco.com/gmi/ei2d/database" schemaLocation="database.xsd"/> .................................. <xs:complexType name="referenceType"> <xs:attribute ref="database:checking" /> <xs:attribute name="javaAccessType" type="java:JavaAccessType"/> <xs:attribute name="name" type="xs:string" use="required"/> <xs:anyAttribute namespace="##other" processContents="lax" /> </xs:complexType> .................................. </xs:schema> Java.xsd(a snippet) ============== <?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Prakash Bettadapur (private) --> <java:schema xmlns="http://www.cisco.com/gmi/ei2d/java" xmlns:java="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.cisco.com/gmi/ei2d/java" elementFormDefault="qualified" attributeFormDefault="unqualified"> <java:simpleType name="JavaAccessType"> <java:restriction base="java:string"> <java:enumeration value=""/> <java:enumeration value="public"/> <java:enumeration value="protected"/> <java:enumeration value="private"/> </java:restriction> </java:simpleType> </java:schema> Database.xsd( a snippet) ================== <?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Prakash Bettadapur (private) --> <database:schema xmlns="http://www.cisco.com/gmi/ei2d/database" xmlns:database="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.cisco.com/gmi/ei2d/database" elementFormDefault="qualified" attributeFormDefault="unqualified"> ............... <database:attribute name="checking" type="database:string" /> .............. </database:schema>
Received on Wednesday, 21 March 2007 10:06:30 UTC