How to validate against multiple schemas
Posted: Thu Mar 11, 2010 7:01 pm
I have a problem:
configuration.xsd
other.xsd
configuration.xml
configuration.xml validates normally in VisualStudio but i can not validate it in Oxygen.
How can i validate it?
configuration.xsd
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns="http://schemas.com/configuration"
targetNamespace="http://schemas.com/configuration">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="param"/>
<xs:any namespace="##other" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns="http://schemas.com/other" targetNamespace="http://schemas.com/other">
<xs:element name="other">
<xs:complexType>
<xs:attribute name="name"/>
</xs:complexType>
</xs:element>
</xs:schema>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="http://schemas.com/configuration">
<param>sample</param>
<other xmlns="http://schemas.com/other" name="other_value"/>
</root>
How can i validate it?