Well it's simple:
File 1:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sauce="http://www.synop.com/sauce/1.0" elementFormDefault="qualified"
attributeFormDefault="qualified">
<xs:include schemaLocation="http://victor/sauce.xsd"/>
<xs:element name="topic">
<xs:annotation>
<xs:documentation>Defines a topic.</xs:documentation>
<xs:appinfo>
<sauce:name>Topic
</sauce:name>
</xs:appinfo>
</xs:annotation>
<xs:complexType mixed="false">
<xs:sequence>
<xs:element name="title"/>
<xs:element name="body"/>
</xs:sequence>
<xs:anyAttribute namespace="##any"/>
</xs:complexType>
</xs:element>
</xs:schema>
While the second file (sauce.xsd) is:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sauce="http://www.synop.com/sauce/1.0" elementFormDefault="qualified">
<xs:simpleType name="mediumString">
<xs:annotation>
<xs:documentation>A string</xs:documentation>
</xs:annotation>
<xs:restriction>
<xs:minLength value="1"/>
<xs:maxLength value="50"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
"Zafar Abbas [MSFT]" wrote:
Please post the two XSD files and the code you are using.
Thanks.
"Nathan Wallace" <sy***@nospam.nospam> wrote in message
news:28**********************************@microsof t.com... Hello,
I have 2 schema, for argument sake let's call them child.xsd and
parent.xsd. I define all my types in parent.xsd and the child.xsd include the
parent.xsd using the following tag:
<xs:include schemaLocation="http://localhost/xsds/parent.xsd"/>
Now when I create an XmlSchema object on the child.xsd I couldn't get the
type that I define in the parent.xsd. How do I get this? Do I need to
create an XmlSchema on the parent.xsd itself? Why doesn't the xs:include includes
the parent.xsd?
I tried to loop through the .Include property, I have 1 element there -
which is right - but then the SourceUri is empty ...
Thanks,
Nathan