What's the actual relationship between those type defs in your XML
schema ? Extension ?
Regards
Werner
On 02.09.2010 21:31, Andriy Kharchuk wrote:
Second one was resolved with marshaller.setSuppressXSIType(true);
Still wondering why for some elements of the same kind as arena xsi:type was
not used by marshaller.
On Thu, Sep 2, 2010 at 10:08 PM, Andriy Kharchuk
<[email protected]>wrote:
I resolved the first problem by invoking
marshaller.setNamespaceMapping("fifa", "http://www.fifa.com/2014");
Second problem is still there....
On Thu, Sep 2, 2010 at 5:40 PM, Andriy Kharchuk<[email protected]
wrote:
Dear group,
I used xsd schema to generate java classes/descriptors. Then I created a
java object tree using these classes and marshalled it to the xml file.
XML file generated by Castor 1.1.2 is similar to one below:
-------------
<game>
<ns0:arena xmlns:ns0="http://www.fifa.com/2014" id="1421"
xsi:type="ns0:arena"/>
<ns1:team xmlns:ns1="http://www.fifa.com/2014" country="Brazil"
code="BR"/>
</game>
<game>
<ns2:team xmlns:ns2="http://www.fifa.com/2014" country="Iran"
code="IR"/>
</game>
...
<game>
<ns128:team xmlns:ns128="http://www.fifa.com/2014" country="Mongolia"
code="MG"/>
</game>
-------------
1. Is there a way to move namespace definition to the root element so that
my xml file doesn't have zillions of namespace prefixes for the same schema
(ns*)?
2. Validation in XML Spy fails with the message 'No type definition found
for the type referenced by the attribute 'xsi:type'='ns0:arena' of element
<ns0:arena>. Can anything to be done about this?
Thank you,
Andriy
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email