[xsd-users] xsd and collada

guillaume guinux7 at gmail.com
Fri Dec 28 15:20:16 EST 2007


hi,
i have been trying to read a .dae file with xsd, however there's a problem i
can't fix at runtime. dae is the extension of the collada 3d file format in
xml. so i took the latest schema for collada 1.4, and generated the
corresponding hxx and cxx with

xsd cxx-tree --generate-polymorphic --root-element COLLADA COLLADASchema.xsd

then the main file :

#include <iostream>
#include "COLLADASchema.hxx"

using namespace std;
using namespace COLLADASchema;

int main(int argc, char **argv) {
    try {
        auto_ptr< COLLADA > c (COLLADA_ (argv[1]));
    }
    catch (const xml_schema::exception& e) {
        cerr << e << endl;
        return 1;
    }
    return 0;
}

compiled this way :

g++ -c COLLADASchema.cxx main.cpp
g++ -o test COLLADASchema.o main.o -lxerces-c

so i tried on a collada file exported from blender, and the output is :

/home/guillaume/Desktop/test/a.dae:2:79 error: Unknown element 'COLLADA'
/home/guillaume/Desktop/test/a.dae:2:79 error: Attribute 'version' is not
declared for element 'COLLADA'
/home/guillaume/Desktop/test/a.dae:2:79 error: Attribute 'xmlns' is not
declared for element 'COLLADA'
/home/guillaume/Desktop/test/a.dae:3:9 error: Unknown element 'asset'
/home/guillaume/Desktop/test/a.dae:4:16 error: Unknown element 'contributor'
/home/guillaume/Desktop/test/a.dae:5:12 error: Unknown element 'author'
/home/guillaume/Desktop/test/a.dae:6:20 error: Unknown element
'authoring_tool'
/home/guillaume/Desktop/test/a.dae:7:14 error: Unknown element 'comments'
/home/guillaume/Desktop/test/a.dae:8:15 error: Unknown element 'copyright'
/home/guillaume/Desktop/test/a.dae:9:17 error: Unknown element 'source_data'
/home/guillaume/Desktop/test/a.dae:11:12 error: Unknown element 'created'
/home/guillaume/Desktop/test/a.dae:12:13 error: Unknown element 'modified'

and so on... seems like it doesn't recognize the format at all. does anyone
have an idea ? what part do i miss ?

happy hollidays

guillaume



More information about the xsd-users mailing list