You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by sa...@ca.ibm.com on 2001/07/18 17:17:09 UTC
Re: Please, can someone help me? It´s Urgent!
Hi Neilson,
Sorry about the previous message. The way I suggested won't work. Point 2
of (http://www.w3.org/TR/xmlschema-1/#ct-props-correct) states that a
complexType can't restrict a simpleType.
And changing "simpleContent" to "complexContent" won't work either. Because
the content of "extension" can only be model groups and attributes.
I believe the right way is:
<xsd:simpleType name="base_type">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="derived_type">
<xsd:simpleContent>
<xsd:extension base="base_type">
<xsd:attribute name="pais" ...>
...
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
Cheers,
Sandy Gao
Software Developer, IBM Canada
(1-416) 448-3255
sandygao@ca.ibm.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org