P
Paul Johnston
Hi
Working my way through "Learning XML" by Erik Ray and have a question
if someone can help me.
Using Oxygen 7.2
Doing the section on XML Schema
And have a problem with the section below which raise the error:
E s4s-elt-invalid-content.1: The content of '#AnonType_age' is
invalid. Element 'restriction' is invalid, misplaced, or occurs too
often.
<xs:element name="age">
<xs:complexType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="200"/>
</xs:restriction>
</xs:complexType>
</xs:element>
It parses if I use:
<xs:element name="age">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="200"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Am I allowed to place a restriction on a simpleType but not a
complexType as it seems ?
TIA Paul
Working my way through "Learning XML" by Erik Ray and have a question
if someone can help me.
Using Oxygen 7.2
Doing the section on XML Schema
And have a problem with the section below which raise the error:
E s4s-elt-invalid-content.1: The content of '#AnonType_age' is
invalid. Element 'restriction' is invalid, misplaced, or occurs too
often.
<xs:element name="age">
<xs:complexType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="200"/>
</xs:restriction>
</xs:complexType>
</xs:element>
It parses if I use:
<xs:element name="age">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="200"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Am I allowed to place a restriction on a simpleType but not a
complexType as it seems ?
TIA Paul