Hello,
I am trying to use HL7 V3 Xml Schemas with JAXB and am running into
issues. I have attached a NetBeans project which uses a simpler xsd to
try and expose the issue. The schemas had many Elements, which are of
ComplexType, with ComplexContent and mixed is set to true. There are
also extension to base type elements. My issue is that, in the
following schema, the 'Element3' element does not get any JAXB classes
generated for it, so that I am unable to set any values to Element3.
Are there any suggestions or workarounds - am I mistaken with how to
implement this?
NetBeans 6.1
JAXB 2.1
Thanks.
Simplified Schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="
http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="testRootElement" type="testComplexType">
<xs:annotation>
<xs:documentation>Comment describing your root
element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="testComplexType" mixed="true">
<xs:sequence>
<xs:element name="firstName" type="xs:string"/>
<xs:element name="lastName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MyBaseType" mixed="true">
<xs:sequence>
<xs:element name="element1" type="xs:string" />
<xs:element name="element2" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="MyExtendedType" mixed="true">
<xs:complexContent mixed="true">
<xs:extension base="MyBaseType">
<xs:sequence>
<xs:element name="element3" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="MyExtended" type="MyExtendedType" />
</xs:schema>