collada dom 1.5 can't load 1.4

Hi,

I built collada dom 1.5 and try to load a file exported with 3ds max 2010.
Max export file as 1.4 version and collada dom break the load process @ daeIOPluginCommon line 170 :

	if (parentElement == NULL) {
		// This is the root element. Check the COLLADA version.
		daeURI *xmlns = (daeURI*)(element->getMeta()->getMetaAttribute( "xmlns" )->getWritableMemory( element ));
		if ( strcmp( xmlns->getURI(), COLLADA_NAMESPACE ) != 0 ) {
			// Invalid COLLADA version
			daeErrorHandler::get()->handleError("Trying to load an invalid COLLADA version for this DOM build!");
			return NULL;
		}
	}

the dae file :

<?xml version=“1.0” encoding=“utf-8”?>
<COLLADA xmlns=“COLLADA 1.4 Schema” version=“1.4.0”>
<asset>
<contributor>
<author></author>
<authoring_tool>FBX COLLADA exporter</authoring_tool>
<comments></comments>
</contributor>
<created>2011-03-20T13:46:22Z</created>
<modified>2011-03-20T13:46:22Z</modified>
<revision></revision>
<title></title>
<subject></subject>
<keywords></keywords>
<unit meter=“1.000000”/>
<up_axis>Y_UP</up_axis>
</asset>
<library_geometries>
<geometry id=“Box01-lib” name=“Box01Mesh”>
<mesh>
<source id=“Box01-lib-Position”>
<float_array id=“Box01-lib-Position-array” count=“24”>
-71.734482 -46.252678 0.000000
71.734482 -46.252678 0.000000
-71.734482 46.252678 0.000000
71.734482 46.252678 0.000000
-71.734482 -46.252678 45.396145
71.734482 -46.252678 45.396145
-71.734482 46.252678 45.396145
71.734482 46.252678 45.396145
</float_array>
<technique_common>
<accessor source=“#Box01-lib-Position-array” count=“8” stride=“3”>
<param name=“X” type=“float”/>
<param name=“Y” type=“float”/>
<param name=“Z” type=“float”/>
</accessor>
</technique_common>
</source>
<source id=“Box01-lib-Normal0”>
<float_array id=“Box01-lib-Normal0-array” count=“108”>
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
</float_array>
<technique_common>
<accessor source=“#Box01-lib-Normal0-array” count=“36” stride=“3”>
<param name=“X” type=“float”/>
<param name=“Y” type=“float”/>
<param name=“Z” type=“float”/>
</accessor>
</technique_common>
</source>
<source id=“Box01-lib-UV0”>
<float_array id=“Box01-lib-UV0-array” count=“24”>
0.000000 0.000000
1.000000 0.000000
0.000000 1.000000
1.000000 1.000000
0.000000 0.000000
1.000000 0.000000
0.000000 1.000000
1.000000 1.000000
0.000000 0.000000
1.000000 0.000000
0.000000 1.000000
1.000000 1.000000
</float_array>
<technique_common>
<accessor source=“#Box01-lib-UV0-array” count=“12” stride=“2”>
<param name=“S” type=“float”/>
<param name=“T” type=“float”/>
</accessor>
</technique_common>
</source>
<vertices id=“Box01-lib-Vertex”>
<input semantic=“POSITION” source=“#Box01-lib-Position”/>
</vertices>
<polygons count=“12”>
<input semantic=“VERTEX” offset=“0” source=“#Box01-lib-Vertex”/>
<input semantic=“NORMAL” offset=“1” source=“#Box01-lib-Normal0”/>
<input semantic=“TEXCOORD” offset=“2” set=“0” source=“#Box01-lib-UV0”/>

0 0 9 2 1 11 3 2 10</p>

3 3 10 1 4 8 0 5 9</p>

4 6 8 5 7 9 7 8 11</p>

7 9 11 6 10 10 4 11 8</p>

0 12 4 1 13 5 5 14 7</p>

5 15 7 4 16 6 0 17 4</p>

1 18 0 3 19 1 7 20 3</p>

7 21 3 5 22 2 1 23 0</p>

3 24 4 2 25 5 6 26 7</p>

6 27 7 7 28 6 3 29 4</p>

2 30 0 0 31 1 4 32 3</p>

4 33 3 6 34 2 2 35 0</p>
</polygons>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id=“RootNode” name=“RootNode”>
<node id=“Box01” name=“Box01”>
<matrix sid=“matrix”>1.000000 0.000000 0.000000 5.139187 0.000000 0.000000 1.000000 0.000000 0.000000 -1.000000 0.000000 -2.997858 0.000000 0.000000 0.000000 1.000000</matrix>
<instance_geometry url=“#Box01-lib”/>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url=“#RootNode”/>
</scene>
</COLLADA>

That’s correct behavior. The COLLADA 1.4 and 1.5 schema define separate XML namespaces. They are different database schema and that software can only handle one schema that it’s generated and built against. For your use case, you should build the COLLADA DOM for use with the 1.4 schema.

So people who use the latest or an older version of max can’t load their meshes in my app.
And if max, blender, lightwave and other softwares don’t use the same collada version welcome in chaos.

If you are developing a COLLADA 1.5 application and you want to import 1.4 documents then you need to translate them from 1.4 to 1.5 using an XSLT or similar transformation tool. The translation can be reversed for export back to 1.4 as well, as long as the source content does not include 1.5 only features like B-rep, kinematics, geolocation, and OpenGL ES 2.0 effects.

Nearly all software today outside of the CAD and GIS markets has been implementing 1.4 and now most everyone is downloading the COLLADA 1.4 conformance test suite to make their implications compliant with the specification.