[xsd-users] ifc xml

Boris Kolpackov boris at codesynthesis.com
Wed Feb 2 11:26:19 EST 2011


Hi Giuseppe,

giuseppe ferrari <giuseppe500 at yahoo.it> writes:

> 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">
> 
> 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">
> 
> i must replace xmlns to "http://www.iai-tech.org/ifcXML/IFC2x3/FINAL" 

Yes, this is actually something that makes your original XML simply
invalid according to the schema. There is no way to fix this with
parseWithContext() unfortunately. The best way to resolve this would
to get whomever produced the invalid documents to correct them.

The only way to work around this issue that I can think of is to parse
the document into DOM with validation disabled and then change the DOM
document representation (rename element
{urn:iso.org:standard:10303:part(28):version(2):xmlschema:common,uos}
to {http://www.iai-tech.org/ifcXML/IFC2x3/FINAL,uos}) before passing
it to the generated code.

> and add
> xmlns:ifc="http://www.iai-tech.org/ifcXML/IFC2x3/FINAL" 

This should be possible to accomplish with parseWithContext().

Boris



More information about the xsd-users mailing list