javaee / jaxb-v2

Other
211 stars 101 forks source link

Implement JAXB / XJC support for XML Schema version 1.1 (XSD) #1176

Open LanceAndersen opened 6 years ago

LanceAndersen commented 6 years ago

This issue was previously reported via https://bugs.openjdk.java.net/browse/JDK-8197490

A DESCRIPTION OF THE REQUEST : This enhancement request is to improve Java code generation for XML Bindings in order to support version 1.1 of XML schemas.

JUSTIFICATION : XSD 1.1 was published in 2012 and we still have no way to support it with JAXB.

Reference: https://www.w3.org/TR/xmlschema11-1/

An example of limitation this brings to Java is when trying to implement RFCs which use XSD 1.1 features. Ex: RFC 7852 "provided-by.xsd"

provided-by.xsd; lineNumber: 43; columnNumber: 55; cos-nonambig: "urn:ietf:params:xml:ns:EmergencyCallData:ProviderInfo":EmergencyCallData.ProviderInfo and WC[##other:"urn:ietf:params:xml:ns:EmergencyCallData"] (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.

This is acceptable with XSD 1.1.

CUSTOMER SUBMITTED WORKAROUND : I could not find any workaround. One would need to give up xml bindings and start using Xerces to be able to validate against XSD 1.1.

PiotrKlimczak commented 6 years ago

+1

svaningelgem commented 6 years ago

+1

martindbrown commented 6 years ago

+1

ghost commented 6 years ago

+1

easmith commented 6 years ago

+1