[xsd-users] xsd and collada

Boris Kolpackov boris at codesynthesis.com
Mon Dec 31 07:13:28 EST 2007


Hi Guillaume,

In the future please keep your replies CC'ed to the xsd-users mailing
list. This way other developers who may have experienced a similar
problem can provide you with a solution. Plus questions and answers
will be archived and available to others with similar problems.

guillaume <guinux7 at gmail.com> writes:

> hi boris,
> thank you for the very fast answer. i'm sorry i didn't take enough time to
> look at the faq. i see things better now, however, i don't understand well
> how all these xml schema validations are handled

Please see Section 5.1, "XML Schema Validation and Searching" in the
C++/Tree Mapping Getting Started Guide:

http://codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#5.1


> (are they downloaded from the urls?).

If you have Xerces-C++ built with network support then, yes, schemas
that are specified as URLs will be downloaded. There are also other
methods of specifying schemas to be used for validation, as described
in the document mentioned above.


> if i understand well, i need to copy all of them from <xs:schema
> ... > to <COLLADA ... >.

No, that's not how you do it. Please read Section 5.1 mentioned above
as well as the "XML Schema Part 0: Primer Second Edition", particularly
Section 5.6:

http://www.w3.org/TR/xmlschema-0/


> at the same time, i saw one can disable this checking, so is the xml
> still read and the c++ classes usable ?

Yes, the generated classes are perfectly usable if you know that the
XML documents you are planning to parse are valid. From Section 5:

"Even when XML Schema validation is disabled, the generated code still
 performs a number of checks to prevent construction of an inconsistent
 object model (for example, an object model with missing required
 attributes or elements)."

Boris




More information about the xsd-users mailing list