[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Validation of missing elements in xml:
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,} *[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 ------------------------------------------------------------------------ Ceci est une partie de message=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
|
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
|