Dear all,
I'm looking for a way to marshal one object to different "views" of
an xml schema, where each view only includes a subset of the data.
E.g.
,----
| class Something {
|
| String foo
| String bar;
| String baz;
|
| }
`----
Now, I'd like to have a binding with a complete mapping, e.g.:
,----
| <mapping class="Something" abstract="true">
| <value name="foo" field="foo" usage="optional"/>
| <value name="bar" field="bar" usage="optional"/>
| <value name="baz" field="baz" usage="optional"/>
| </mapping>
`----
And then bindings to marshal subset of the data, e.g.:
,----
| <mapping class="Something" abstract="true">
| <value name="foo" field="foo" usage="optional"/>
| <!-- no bar in here -->
| <value name="baz" field="baz" usage="optional"/>
| </mapping>
`----
As I have ten different views with large portions of the mappings
being the same but some being different, I'd like to use some way to
build the different bindings by inluding some basic binding.
jibx doesn't allow me to redefine mappings, but I could use the
type-name attribute to produce the different version of the
mappings. However, then I'd also have to change those mappings that
reference these abstract mappings for each view, effectively forcing
me to rewrite most of the binding for each view.
Is there a way to do it without type-name?
best regards,
Matthias
--
Demons have existed on the Discworld for at least as long as the gods,
who in many ways they closely resemble. The difference is basically the
same as that between terrorists and freedom fighters. -- Terry Pratchett, Eric
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users