How to validate XML against XSD which import another XSD

280 views Asked by At

I have 2 XSD files. DCL.xsd imports common.xsd. I have DCL.xml. Now, I want to validate DCL.xml with DCL.xsd. How can I achieve this?

1

There are 1 answers

0
kjhughes On BEST ANSWER

As long as common.xsd is properly incorporated into DCL.xsd using xsd:include or xsd:import, there is nothing extraordinary you have to do to validate DCL.xml against DCL.xsd. Simply associate DCL.xml with DCL.xsd using the usual methods such as schemaLocation or nonamespaceSchemaLocation.