[Home] [By Thread] [By Date] [Recent Entries]

  • To: "Eric van der Vlist" <vdv@d...>
  • Subject: Re: Validation of missing elements in xml:
  • From: "Mukul Gandhi" <gandhi.mukul@g...>
  • Date: Tue, 4 Apr 2006 15:55:16 +0530
  • Cc: xml-dev@l...
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SrVApUc9Q7HinbamQARby+DHcdfNchnEubE82KjM68p4VZ29JY13gY76YwhRK+UK30erQ4W9Y6XZhACQsGLvPzOTiHhgrEul3x4jcHSDmTVuZy/Op4X8+0W6AD8NkMTVNuMJ8lGDWiPQYvTxuiQvglc/OuK5Bua3UW9x0qqG1cM=
  • In-reply-to: <1144078760.19080.43.camel@l...>
  • References: <20060403153140.2F9F57F573F@g...> <1144078760.19080.43.camel@l...>

On 4/3/06, Eric van der Vlist <vdv@d...> wrote:
>
> Deriving from xs:string won't catch cases where you only have
> whitespaces such as;
>
> <Person>
>        <name>
>        </name>
>        <email>
>                aaa.bbb@x...
>        </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

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member