Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include xsd file not working

Status
Not open for further replies.

ccampbell

Programmer
Aug 16, 2001
201
US
I have an XSD file that includes another XSD file in a C# program. Here is the first XSD file

<?xml version=&quot;1.0&quot;?>
<schema xmlns=&quot;targetNamespace=&quot;xmlns:ts=&quot;elementFormDefault=&quot;qualified&quot;>

<!-- IRP Account Input Transaction, T0020, version 1 -->

<include schemaLocation=&quot;globalTypes.xsd&quot;/>
....

Here is the globalTypes.xsd file

<?xml version=&quot;1.0&quot;?>
<schema xmlns=&quot;version=&quot;1.0&quot; elementFormDefault=&quot;qualified&quot; xml:lang=&quot;EN&quot;>

<simpleType name=&quot;globalAddressTypeValues&quot;>
<restriction base=&quot;string&quot;>
<enumeration value=&quot;MA&quot;/>
<enumeration value=&quot;PH&quot;/>
</restriction>
</simpleType>

<simpleType name=&quot;globalNameTypeValues&quot;>
<restriction base=&quot;string&quot;>
<enumeration value=&quot;LG&quot;/>
<enumeration value=&quot;DB&quot;/>
</restriction>
</simpleType>
...(etc.)

Here is my error when I try to load the schema

Microsoft.Data.SqlXml.SqlXmlException: Schema: unable to load schema 'T0020V1.xsd'.

An error occurred (globaltypes.xsd#/schema[1]/simpleType[position() = 6 and @name = globalAddressTypeValues]/restriction[1]
Undeclared XSD type : '{ --->
System.Runtime.InteropServices.COMException (0x80004005):
Schema: unable to load schema 'T0020V1.xsd'.

An error occurred (globaltypes.xsd#/schema[1]/simpleType[position() = 6 and @name = globalAddressTypeValues]/restriction[1]
Undeclared XSD type : '{at Microsoft.Data.SqlXml.Common.ISQLXMLCommandManagedInterface.ExecuteToOutputStream()
at Microsoft.Data.SqlXml.SqlXmlCommand.innerExecute(Stream strm)
--- End of inner exception stack trace ---
at Microsoft.Data.SqlXml.SqlXmlCommand.ExecuteStream()

Any help on this would be greatly appreciated. I have been stuck on this problem too long
 
Oooops. See my answer in the C# forum.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top