Mega Code Archive

 
Categories / XML Tutorial / XML Schema
 

Restricting a type derived from the built-in string type to have a one-character length

<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"   targetNamespace="http://www.rntsoft.com"    xmlns="http://www.rntsoft.com"   elementFormDefault="qualified">   <xs:simpleType name="Char">     <xs:restriction base="xs:string">       <xs:length value="1" />     </xs:restriction>   </xs:simpleType>    </xs:schema>