|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Validation of missing elements in xml:
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,} *[A-Za-z]{1,}"/>
</xs:restriction>
</xs:simpleType>
Regards,
Mukul
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








