What is the meaning of <jxb:bindings version=?
Question
What are allowed values of version attribute in jxb:bindings
?
<jxb:bindings version="2.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
I tried to use different values with xjc "2.2.3-hudson-jaxb-ri-2.2-70-"
<jxb:bindings version="2.2" ... xjc outputs ERROR, only "1.0" is allowed
<jxb:bindings version="2.1" ... xjc compiled successfully
<jxb:bindings version="2.0" ... xjc compiled successfully
<jxb:bindings version="1.0" ... xjc compiled successfully
Solution
The version attribute is used in case there is a change in the bindings between versions of the JAXB specification. This is necessary to ensure backwards compatibility when using newer implementations of JAXB. For more information see section 7.1.4 of the JAXB 2.1 specification.
The error message received when specifying version 2.2 I believe is an XJC bug:
<jxb:bindings version="2.2" ... xjc outputs ERROR, only "1.0" is allowed
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow