[xsd-users] problem with xsd and parse xml
Boris Kolpackov
boris at codesynthesis.com
Wed Jan 19 09:34:34 EST 2011
Hi Giuseppe,
giuseppe ferrari <giuseppe500 at yahoo.it> writes:
> But i see that there is a problem on namespaces , indeed if i change the xml
> namespace in the code :
>
> <uos id="uos_1" description="" configuration="i-ifc2x3" edo=""
> xmlns="urn:iso.org:standard:10303:part(28):version(2):xmlschema:common"
> xmlns:ex="urn:iso.org:standard:10303:part(28):version(2):xmlschema:common"
> xsi:schemaLocation="http://www.iai-tech.org/ifcXML/IFC2x3/FINAL IFC2X3.xsd">
That's not a correct fix. The correct fix is to add a declaration for the
'ifc' prefix:
<uos id="uos_1" description="" configuration="i-ifc2x3" edo=""
xmlns="http://www.iai-tech.org/ifcXML/IFC2x3/FINAL"
xmlns:ifc="http://www.iai-tech.org/ifcXML/IFC2x3/FINAL"
xmlns:ex="urn:iso.org:standard:10303:part(28):version(2):xmlschema:common"
xsi:schemaLocation="http://www.iai-tech.org/ifcXML/IFC2x3/FINAL IFC2X3.xsd">
This prefix is used in a fixed attribute value (of QName type) in IFC2X3.xsd,
IfcUnitAssignment type, inside the Units element, attribute name 'ex:itemType'.
With the above change the XML file validates without any errors.
Boris
More information about the xsd-users
mailing list