EDN Admin
Well-known member
Hi,
I am trying to include an xsd in another xsd.
here are my xsds:
try1.xsd:
<pre class="prettyprint <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema
<xs:element name="Message
<xs:element name="StartDate" type="xs:date" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="StartUnit" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="UnitPrice" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
</xs:element>
</xs:schema>[/code]
<br/>
try2.xsd:
<pre class="prettyprint <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xbm="http://www.xxx.com/xbm" elementFormDefault="qualified" attributeFormDefault="unqualified
<xs:include schemaLocation="file:///C:/try1.xsd"/>
<xs:element name="abcMessage
<xs:complexType>
<xs:sequence>
<xs:element name="Header
<xs:complexType>
<xs:sequence>
<xs:element name="version" type="xs:string </xs:element>
<xs:element name="ID" type="xs:string </xs:element>
</xs:sequence>
<xs:element name="Message" type="xbm:Message"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>[/code]
for some reason, the try2.xsd throws error:
File C:try2.xsd is not valid.<br/>
xbm:Message must refer to an existing simple or complex type.<br/>
Error location: xs:schema / xs:element / xs:complexType / xs:sequence / xs:element / @type<br/>
Details<br/>
src-resolve.4.2: Cannot resolve declaration or definition xbm:Message.
Any help will be greatly appreciated!
View the full article
I am trying to include an xsd in another xsd.
here are my xsds:
try1.xsd:
<pre class="prettyprint <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema
<xs:element name="Message
<xs:element name="StartDate" type="xs:date" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="StartUnit" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="UnitPrice" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
</xs:element>
</xs:schema>[/code]
<br/>
try2.xsd:
<pre class="prettyprint <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xbm="http://www.xxx.com/xbm" elementFormDefault="qualified" attributeFormDefault="unqualified
<xs:include schemaLocation="file:///C:/try1.xsd"/>
<xs:element name="abcMessage
<xs:complexType>
<xs:sequence>
<xs:element name="Header
<xs:complexType>
<xs:sequence>
<xs:element name="version" type="xs:string </xs:element>
<xs:element name="ID" type="xs:string </xs:element>
</xs:sequence>
<xs:element name="Message" type="xbm:Message"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>[/code]
for some reason, the try2.xsd throws error:
File C:try2.xsd is not valid.<br/>
xbm:Message must refer to an existing simple or complex type.<br/>
Error location: xs:schema / xs:element / xs:complexType / xs:sequence / xs:element / @type<br/>
Details<br/>
src-resolve.4.2: Cannot resolve declaration or definition xbm:Message.
Any help will be greatly appreciated!
View the full article