On 19 Feb, 21:48, "Dmitry Kulinich" <d...@isd.dp.ua> wrote:
> For example we have 3 <TH> tags - only text and 1 attribute.
> Then we need <restriction>-<enumeration> to set all <th>'s text values, but
> also <extension> to add 1 attribute
In XSD schema you have to do it in two stages. Define the body type
of the TH element (as a simple type), and then extend it to add the
attribute. e.g.:
<xsd:simpleType name="THType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Process ID"/>
<xsd:enumeration value="Activity ID"/>
<xsd:enumeration value="Instance ID"/>
<xsd:enumeration value="Process Description"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="TH" >
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="THType">
<xsd:attribute name="style" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
HTH,
Pete.
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx
(or
http://www.xml2cpp.com)
=============================================