You can either add that restriction in you myPatternType like the following
===========
<xsd:simpleType name="myPatternType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
<xsd:pattern value="[A-Z]{2}" />
</xsd:restriction>
</xsd:simpleType>
========
or
you have to declare another type which restricts myPatternType to the
maxLength value and the use that type to extend to include the attribute.
Cheers.
"Matthet" <ma*****@polbox.com> wrote in message
news:bk**********@foka1.acn.pl...
Hi,
I'm defining an element that
is based on simpleType named "myPatternType"
<xsd:element name="MyElement">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="myPatternType">
<xsd:attribute name="myAttr" type="myAttrType"
use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
I need to add
<xsd:maxLength value="10"> to MyElement
and I can't find a way to do it.
Thx for any help
MAciek