Jump to content


Guest Berh

Recommended Posts

HiI use an existing norm xml-file. One of the elements defines as a complex type with an attribute which values are describe in a list as restriction, see example:

<xs:element name="Einheit">  <xs:complexType>    <xs:simpleContent>      <xs:extension base="xs:string">        <xs:attribute name="Code" use="optional">	<xs:simpleType>	  <xs:restriction base="xs:string">	    <xs:enumeration value="PCE"/>	    <xs:enumeration value="MTR"/>	  </xs:restriction>            </xs:simpleType>          </xs:attribute>        </xs:extension>       </xs:simpleContent>     </xs:complexType></xs:element>

The goal is to define the element field (Einheit) with a list of enumeration as restriction equal the definition to the attribute (Code). Is this possible at all?Please consider that the structure of the xml File can't be changed.Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...