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] XML Schema : not empty simple type

[ Lists Home | Date Index | Thread Index ]

Possible option for your example is use of patterns ... You can use for
example \p{L} which will require all letters in the field ... This pattern
will not allow for empty spaces or nulls in the field. On top of that you
can specify the required length of the string  {1,10}.

<simpleType name='XXX'>
    <restriction base='string'>
        <pattern value='[\p{L}]{1,10}'/>



                    COLLARD Jean-Francois                                                                   
                    <Jean-Francois.Collard@        To:     "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>  
                    swift.com>                     cc:                                                      
                                                   Subject:     [xml-dev] XML Schema : not empty simple     
                    30/05/02 01:20                 type                                                     

Hi dear readers,

I'd like to specify the following with an xml schema :

- a simple type XXX with the constraint that its content cannot be empty.

It is possible to use a minLength facet :

<simpleType name='XXX'>
    <restriction base='string'>
        <minLength value='1'/>

But, does exist something like a "not null" specification for a simpleType

Moreover, in this case, is an element with all whitespace characters a
valid element ?

Thank you for your answer.


This e-mail is confidential.  If you are not the intended recipient, any use, disclosure or copying of this document is unauthorised and prohibited.  If you have received this document in error, please delete the email and notify me by return email or by phoning the NEMMCO Helpdesk on 1300 300 295.


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

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