[xsd-users] xsd:include

Al Niessner Al.Niessner at jpl.nasa.gov
Fri Jun 12 12:16:32 EDT 2009


On Fri, 2009-06-12 at 01:51 -0700, Boris Kolpackov wrote:
> Hi Al,
> 
> Al Niessner <Al.Niessner at jpl.nasa.gov> writes:
> 
> > Is it possible through the long list of XSD options that I thumbed
> > through tom make XSD actually include all of hte xsd:includes into a
> > larger more complete schema and map that new thing to C++?
> 
> No there is no such option. Normally, when people split their schemas
> into several files it is to make them more manageable and facilitate
> reuse. It makes sense to preserve the same properties when generating
> the corresponding C++ code. For cases like yours, where included
> schemas are invalid by themselves, there is the file-per-type mode.

Unfortunate, but I can deal with it. It is interesting that you point
out reuse as a reason for the include. I am reusing a.xsd in the sense
that b.xsd builds a more complex type that uses what is defined in
a.xsd. In some sense, b.xsd inherits a.xsd. Not really and nor does it
extend a.xsd but it certainly requires it. Hence, I am making my schema
more manageable and reusing it to its fullest.

I just find it surprising that your first statement implies that people
make a bunch of atomic types and then include those in one final schema
rather than layering it and adding complexity slowly. Ah well, it does
not really matter in the end. The tool is what it is and I want to use
it to its fullest as built rather than wish that it did something else.

-- 
Al Niessner
818.354.0859

--------
|  dS  | >= 0
--------




More information about the xsd-users mailing list