[xsd-users] cxx-tree failing generated xml file

Boris Kolpackov boris at codesynthesis.com
Wed Jun 13 13:12:58 EDT 2007


Hi Michael,

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


Michael Kesler <mkesler at datawolf.cc> writes:

> Thank you for your quick reply.  Where can I put the schema so that it
> can find it?  I'd like to keep everything validating, if possible.  I've
> tried placing the schema in the execution directory, and that didn't work.
>
> Does it need to be in the same directory as the XML file?

There are two common ways of doing it. The first is to add the
xsi:schemaLocation (or xsi:noNamespaceSchemaLocation) attribute
to your XML instance. The path in this attribute is treated as
relative to the XML document unless it is an absolute URL (i.e.,
starts with http:// or file:///).

The second option is to provide the schema location programmatically
using the properties argument to the parsing function. For more
information on that option please see FAQ entry 2.4:

http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/faq/#2.4


hth,
-boris




More information about the xsd-users mailing list