Re: [xml-dev] Validation of missing elements in xml:

From
Mukul Gandhi <>
To
Eric van der Vlist <>
Date
2006-04-04T10:25:16Z
ID
<>
Thread
Re: [xml-dev] Validation of missing elements in xml:
On 4/3/06, Eric van der Vlist <> wrote:
>
> Deriving from xs:string won't catch cases where you only have
> whitespaces such as;
>
> <Person>
>        <name>
>        </name>
>        <email>
>                
>        </email>
> </Person>
>
> If this should be considered invalid (which happens to be consistent
> with the behavior of other datatypes), you should derive form xs:token
> instead of xs:string...
>
or maybe as
	
<xs:simpleType name="mystring">
   <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:pattern value="[A-Za-z]{1,}&#x20;*[A-Za-z]{1,}"/>
   </xs:restriction>
</xs:simpleType>

Regards,
Mukul