Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Validating XML file using multiple Schema files. Validating XML file using multiple Schema files.To: NULL Date: 7/2/2004 12:57:00 PM Hello all,
My xml and schema file header are as follows.
1) cisGlobals.xsd.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.talgov.com/cisGlobals"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:cisGlobals="http://www.talgov.com/cisGlobals"
elementFormDefault="unqualified">
<!-- all content -->
</xsd:schema>
2) accountInformationUpdate.xsd
<xs:schema elementFormDefault="unqualified"
attributeFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:cisGlobals="http://www.talgov.com/cisGlobals">
<xs:import namespace="http://www.talgov.com/cisGlobals"
schemaLocation="cisGlobals.xsd"/>
<xs:element name="AccountUpdate">
<!-- all content -->
</xs:element>
</xs:schema>
There is no default namespace defined in this schema file, but this is
importing from a schema file which has a target namespace. what would
be the namespace of this schema file.
3) cis.xml
<AccountUpdate xmlns:cisGlobals="http://www.talgov.com/cisGlobals"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.talgov.com/cisGlobals
accountInformationUpdate.xsd">
<!-- all content -->
</AccountUpdate>
Here I am using the namespace of http://www.talgov.com/cisGlobals this
is the target namespace used in first schema file. How would the
AccountUpdate and rest of the tags would be referred as.
When I try to validate the above files using MSXML4 or .Net XML class
library they fail to validate. But XML SPY validates these files
without any errors. Any ideas?
Thank you for all your help.
murali.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
