Click here to Skip to main content
15,897,360 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hi,

I have an XSD file and tried to open that MasterFile.xsd using XML spy and it throws error that the

Included/imported schema file "c:\dir1\CodeCntr.xsd" has a different target namespace.

Expected "http://www.coderEx1.com/schemas/2011/07.sm"
Found "http://www.coderEx1.com/schemas/2004/06.sm"


In my MasterFile.xsd, I have a namespace declared
xmlns:grpz = "http://www.coderEx1.com/schemas/2011/07"

and in the CodeCntr.xsd I have
xmlns="http://www.coderEx1.com/schemas/2004/06"


how can I resolve this?

Thanks
AB
Posted

1 solution

Do you really need schema documents with different namespaces? It is possible though.

You need to reference a namespace-enabled schema properly, see, for example:
http://www.w3schools.com/Schema/el_import.asp[^],
http://docstore.mik.ua/orelly/xml/xmlnut/ch16_03.htm[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900