[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Validation of missing elements in xml:

xs token minlength
Probably you are right. I think I was thinking on the right track,
because xs:token is derived from xs:string!


On 4/5/06, Eric van der Vlist <vdv@d...> wrote:
> Hi Mukul,
> Le mardi 04 avril 2006 à 16:04 +0530, Mukul Gandhi a écrit :
> > On 4/4/06, Mukul Gandhi <gandhi.mukul@g...> wrote:
> >
> > > <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>
> >
> > 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
> ------------------------------------------------------------------------


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.