Jump to content
Sign in to follow this  
Guest Berh


Recommended Posts

Guest Berh

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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...