<!-- schema --> <xsd:element name="myString"> <xsd:simpleType> <xsd:restriction base="xsd:normalizedString"> <xsd:maxLength value="50"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <!-- instance document --> <myString>Heres one. </myString>