Click to See Complete Forum and Search --> : Error when opening XSD file in XML spy


SmartLearner
June 23rd, 2011, 05:19 AM
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.sm"

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

how do I resolve this? .

Thanks
SL

tackyjan
June 25th, 2011, 12:17 AM
do you also have the targetNamespace attribute defined in your schemas?

tackyjan
June 25th, 2011, 12:18 AM
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.sm"

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

how do I resolve this? .

Thanks
SL

CodeCntr.xsd defines the "default namespace" this is not the same as target namespace.