OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Validation of missing elements in xml:

[ Lists Home | Date Index | Thread Index ]

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,}&#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>>"/>

could be considered better (or simpler) than:

<xs:simpleType name="mystring">
   <xs:restriction base="xs:token">
      <xs:minLength value="1"/>

If your regular expression was right, you could allow the same set of
text nodes but I don't really see the benefit...


GPG-PGP: 2A528005
Lisez-moi sur XMLfr.
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?=


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS