[xsd-users] Namespaces
Boris Kolpackov
boris at codesynthesis.com
Mon Jun 18 10:47:37 EDT 2012
Hi Daniel,
Daniel Berglund <daniel.berglund at scilifelab.se> writes:
> The error when ruining driver on the xml file is: error: no declaration
> found for element 'hello'
You see these errors because the parser cannot locate the schema. This
is actually FAQ #2.1:
http://wiki.codesynthesis.com/Tree/FAQ
If, for example, I add the following two attributes to your XML's root
element, then everything works fine:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="hello.xsd"
For other ways to specify this information (including without modifying
your XML), see Section 5.1, "XML Schema Validation and Searching" in the
C++/Tree Mapping Getting Started Guide:
http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#5.1
Boris
More information about the xsd-users
mailing list