Schemas/GML

From Code Synthesis Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 12:58, 17 February 2008
Boris (Talk | contribs)
(Add a note about the file-per-type compilation mode)
← Previous diff
Revision as of 16:12, 18 April 2009
Boris (Talk | contribs)
(Add a link to a relevant mailing list thread)
Next diff →
Line 17: Line 17:
--generate-polymorphic --root-element Array --root-element Bag --generate-polymorphic --root-element Array --root-element Bag
 +
 +For ideas on how to handle very large GML documents using the C++/Tree mapping, see the [http://www.codesynthesis.com/pipermail/xsd-users/2009-April/002299.html CityGML 1.0.0 and C++/Parser interface] thread on the xsd-users mailing list.
 +
== See also == == See also ==
* [[Talk:Schemas/GML|Discussion page for GML]] * [[Talk:Schemas/GML|Discussion page for GML]]

Revision as of 16:12, 18 April 2009

For the release of XSD 2.3.0 we've fixed the part of the Xerces-C++ bug 1281 that prevented Xerces-C++ schema validator from accepting the GML 3.1.1 schemas. All precompiled binaries of XSD from version 2.3.0 are shipped with this fix. Note that you don't need to patch the version of Xerces-C++ that you are linking to your applications since the bug only affects the validation of schemas (as opposed to the validation of instances against schemas) which is normally disabled. Note also that this bug has been fixed in Xerces-C++ 2.8.0.

While with this patch XSD is able to parse GML 3.1.1 successfully, it is still unable to generate compilable C++ code in the default, file-per-schema mode due to a pathological circular dependency between smil20.xsd and smil20-language.xsd. There are two ways to resolve this issue.

The first approach requires the use of the file-per-type compilation mode which was introduced in XSD 3.1.0. For more information about the file-per-type mode see this blog post.

The second approach involves splitting smil20.xsd into two files. The resulting schemas are semantically equivalent to the original.

The following two packages contain the official GML 3.1.1 schemas placed into a single directory with the smil20.xsd schema split into smil20.xsd and smil20-base.xsd:

We used the following C++/Tree options to compile GML 3.1.1:

--generate-polymorphic --root-element Array --root-element Bag

For ideas on how to handle very large GML documents using the C++/Tree mapping, see the CityGML 1.0.0 and C++/Parser interface thread on the xsd-users mailing list.


See also

Personal tools