Details
Description
When using castor to generate automatically xml from an object, and defining a specific mapping for attribute, Castor generates the following XML :
<?xml version="1.0" encoding="UTF-8"?>
<root-node>
<amount xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="java:java.lang.String">100.000000000000</amount>
</root-node>
This XML is not validable as is because the namespace "java:" is not declared in the xml.
So castor should generate an xml with the "java:" namespace declared like this :
<?xml version="1.0" encoding="UTF-8"?>
<root-node xmlns:java="http://java.castor.org">
<amount xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="java:java.lang.String">100.000000000000</amount>
</root-node>
Issue Links
- is depended upon by
-
CASTOR-3203
Marshaller adds Java namespace regardless of one being passed via the setNamespaceMapping method
-
As a matter of fact, the code as procuced by Castor is .. well. invalid. Let us get back to you with ideas.