[xsd-users] Reusing schema components
Joel Stein
jstein at fiveringscapital.com
Thu Jan 14 15:03:24 EST 2010
Hi,
I have a situation where I have 2 schemas that have overlapping components. Example:
<foo>
<a>1</a>
<b>2</b>
<c>3</c>
</foo>
<bar>
<b>2</b>
<c>3</c>
<d>4</d>
</bar>
I would love to take a bar and make a new foo and do foo.setB(bar.getB()) and foo.setC(bar.getC()). There seems to be 2 problems:
1) (a small problem) the types don't match up in C++, even though they do in the schemas.
2) In VC++9.0 (though it seems not in g++), I get a TON of linker errors (LNK2005 already defined) complaining about duplicate definitions of the shared components.
I'm using xsd-tree to generate code for a whole bunch of xsds in the same namespace that have overlapping names in their elements. There must be a common solution to this.
Thanks!
Joel
More information about the xsd-users
mailing list