The previous comment mentioned bellow was incorrect. There's nothing wrong with the Xerxes parser. On contrary, the XML cannot contain the xsi:type attribute as the union is composed of three anonymous simpleType which cannot be referenced in the xsi:type attribute.


Previous comment:
Acknowledged issue http://forge.etsi.org/mantis/view.php?id=6850

The generated XML file uses xsi:type hint 
<ns1:MyType xsi:type="xsd:float">1.0</ns1:MyType>

XmlDiff uses xerces-J parser. There is a bug in handling xsi:type hints for union types:
https://issues.apache.org/jira/browse/XERCESJ-1652

The reported issue will remain until xerces-J fixed.

SEVERE: DiffErrorHandler.java:47:Error while parsing generated XML document: cvc-elt.4.3: Type 'xsd:float' is not validly derived from the type definition, 'e21unnamed', of element 'ns:MyType'.
Document: 
<ns:MyType 
	xmlns:ns="schema:Pos_070503_derivation_by_union_002" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	
	xsi:type="xsd:float"
	
	>1.0</ns:MyType>
 