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] How to use Pattern to restrict data

[ Lists Home | Date Index | Thread Index ]

See also the Unicode TR on regexps at
http://www.unicode.org/unicode/reports/tr18/ -Mike

-----Original Message-----
From: Sean Zhang [mailto:Sean.Zhang@ins.gte.com]
Sent: Monday, April 01, 2002 11:02 AM
To: xml-dev@lists.xml.org
Subject: [xml-dev] How to use Pattern to restrict data


I'm developing an XML schema and I'm using "pattern" to restrict the valid
values for certain attributes.

One specific case is the phone number, I want to exclude telephone number
starting with 800, 888, 866, etc.  How should I do this?

I was using <pattern value="[0-9]{10}"/> so that only 10 digits will be
acceptable. But I cannot find a way to exclude those numbers.
I looked on the web and cannot find a complete reference as how to use
"pattern" and what are the possible symbols can be used in the "value"
And what does each symbol mean.  (for example, I found some schema with "?"
in value which means optional, also there are schemas specify "*", "|", etc
in value but there are no explanation as what does each mean)

Can someone point me to a good reference with full explanation?



The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>


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

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