|
next
|
Subject: XSD Validation failing Author: (Deleted User) Date: 21 Jul 2009 07:16 AM
|
Hi Uttam,
I think the problem is not related to Xerces (if I understand it correctly, you are referring to the fact that Xerces cannot validate a schema that imports the official schema for XMLSchema); the XML file you attach instead is not placing the elements in the correct namespace as defined by the specific XMLSchema you wrote.
For instance, the XMLSchema has a targetNamespace of http://www.yantra.com/documentation/YFS/getOrderDetails/output so the Order root element must be in that namespace.
Usually adding a xmlns="http://www.yantra.com/documentation/YFS/getOrderDetails/output" to Order would be enough, but in your case the XMLSchema has a elementFormDefault="unqualified" directive that causes local element definitions (like AllowedModifications inside the OrderXSDType complex type) to be in the empty namespace. So, if you bind the default namespace to a non-empty namespace, you will not be able to place any other element in the empty namespace.
I don't know if you really meant to use the "unqualified" directive, but if you have to, you will have to specify a namespace prefix for just the right element names, like I did in the attached XML.
Hope this helps,
Alberto
YFS_getOrderDetails_output(1).xml The fixed XML
|
|
|