Hello all,
Is it possible to define castor mapping so that castor, when
unmarshalling XML, takes into account element namespace? E.g. if there
are two elements both with same element name but belonging to different
namespace a different OXM mapping should be used; similarly for all
nested elements. Example XML snippet follows:
<database>
<table xmlns:ns1="table1">
<description/>
<row />
<row />
</table>
<table xmlns:ns1="table2">
<description/>
<row />
<row />
</table>
</database>
Database class has collection of Table<?> classes, while table element
with table1 namespace (and all it's nested elements) should be mapped in
one way, e.g to a Table1 class (extends Table<Row1>) while table element
with table2 namespace should be mapped to Table2 class (extends
Table<Row2>).
I've thought that if I map tables property of Database class to Table
class binding it to table XML element without mentioning namespace, and
then define mapping for each Table specialization binding each of them
to table XML element and their specific ns-prefix and ns-uri, it would
work, but it doesn't.
Regards,
Stevo.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email