[
Lists Home |
Date Index |
Thread Index
]
Probably you are right. I think I was thinking on the right track,
because xs:token is derived from xs:string!
Regards,
Mukul
On 4/5/06, Eric van der Vlist <vdv@dyomedea.com> wrote:
> Hi Mukul,
>
> Le mardi 04 avril 2006 à 16:04 +0530, Mukul Gandhi a écrit :
> > On 4/4/06, Mukul Gandhi <gandhi.mukul@gmail.com> wrote:
> >
> > > <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>
> >
> > Sorry, there is no need of <xs:minLength value="1"/>
>
> I am not convinced that
>
> <xs:simpleType name="mystring">
> <xs:restriction base="xs:string">
> <xs:pattern value="<<magic regular expression here>>"/>
> </xs:restriction>
> </xs:simpleType>
>
> could be considered better (or simpler) than:
>
> <xs:simpleType name="mystring">
> <xs:restriction base="xs:token">
> <xs:minLength value="1"/>
> </xs:restriction>
> </xs:simpleType>
>
> If your regular expression was right, you could allow the same set of
> text nodes but I don't really see the benefit...
>
> Eric
>
> --
> GPG-PGP: 2A528005
> Lisez-moi sur XMLfr.
> http://xmlfr.org/index/person/eric+van+der+vlist/
> ------------------------------------------------------------------------
> Eric van der Vlist http://xmlfr.org http://dyomedea.com
> (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
> (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
> ------------------------------------------------------------------------
|