You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- example complexType based on an entry from the XSD -->
<complexTypename="ElementInfoType"mixed="true">
<choicemaxOccurs="unbounded">
<elementref="Element0"/>
<elementref="Element1"/>
<elementref="Element2"/>
<anyprocessContents="lax"namespace="##other"/>
</choice>
<attributename="Id"type="ID"use="optional"/>
</complexType>
<!-- example jaxb xjb -->
<jaxb:bindingsxmlns:jaxb="http://java.sun.com/xml/ns/jaxb"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"xmlns:simplify="http://jaxb2-commons.dev.java.net/basic/simplify"jaxb:extensionBindingPrefixes="xjc simplify"jaxb:version="2.1">
<jaxb:bindingsschemaLocation="schema.xsd"node="/xs:schema">
<jaxb:bindingsnode="xs:complexType[@name='ElementInfoType']/xs:choice/xs:element[1]">
<simplify:as-element-property />
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>
I am getting an error:
[ERROR] Error while parsing schema(s).Location [ jaxb.xjb{21,38}].
com.sun.istack.SAXParseException2; systemId: jaxb.xjb; lineNumber: 21; columnNumber: 38; compiler was unable to honor this as-element-property customization. It is attached to a wrong place, or its inconsistent with other bindings.
I would like to know if there is any known issue with the attribute ref or if there is something I am missing. I have already tried placing it at different locations in the path.
A similar approach works for:
<!-- example complexType based on an entry from the XSD -->
<complexTypename="DataType">
<sequencemaxOccurs="unbounded">
<choice>
<elementname="Element0"type="string"/>
<elementname="Element1"type="base64Binary"/>
<elementname="Element2"type="string"/>
<anynamespace="##other"processContents="lax"/>
</choice>
</sequence>
</complexType>
Note: I cannot change the xsd file.
Thank you for your time.
Kind regards,
Francisco
The text was updated successfully, but these errors were encountered:
Hi,
Assuming the code that follows:
I am getting an error:
I would like to know if there is any known issue with the attribute ref or if there is something I am missing. I have already tried placing it at different locations in the path.
A similar approach works for:
Note: I cannot change the xsd file.
Thank you for your time.
Kind regards,
Francisco
The text was updated successfully, but these errors were encountered: