I read w3cschools tutorials ( http://www.w3schools.com/schema/schema_complex.asp ), but they don't seem to mention how you could add restrictions on complex types.
Like, for example, I have this circuit.
<xs:element name="employee">
<xs:complexType>
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Now I want to make sure that the first name is no more than 10 characters. How to do it?
I tried to introduce a simple type for the first name, but it says that I cannot do this because I am using a complex type.
So, how can I put such restrictions in a file so that the people I give the scheme do not try to make the first name 100 characters.
source
share