Jump to content

Schema


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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...