If I have a class MyClass like so..

class MyClass {
  String property1 = "GO";
}

Is there a way using castor to map MyClass to 2 different XML schema
definitions?

For example..

if MyClass.property1 == "GO" then
   marshall XML as "RequestOne"
else if MyClass.property1 == "STOP" then
   marshall XML as "RequestTwo"
end If

Example XML:
<RequestOne>
   <property>GO</property>
</RequestOne>

<RequestTwo>
   <property>STOP</property>
</RequestTwo>

The reason I need to do this is to support legacy classes that can't
change without breaking backward compatibility?  Any ideas on how to
do this using castor short of having 2 completely separate mapping.xml
files?


Thanks,
Brent

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to