Hi
I am reading the tutorials on w3cschools ( 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 instance I have this schema.
<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 the firstname is no more then 10 characters long. How do I do this?
I tried to put in the simple type for the firstname but it says I can't do that since I am using a complex type.
So how do I put restrictions like that on the file so the people who I give the schema to don't try to make the firstname 100 characters.