I have an externally supplied XSD which has many elements all which are identical and represent a price with optional currency attribute.
<xs:complexType name="someType">
<xs:sequence>
<xs:element name="rrp" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:decimal">
<xs:attribute name="currency" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="whs" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:decimal">
<xs:attribute name="currency" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
I'd like this to be transformed into a common class instead of lots of static classes, is this possible with an XJB mapping document?