Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - restrict simpleType to word characters and spaces except digits >Thread Next - Re: restrict simpleType to word characters and spaces except digits Re: restrict simpleType to word characters and spaces except digitsTo: NULL Date: 4/4/2008 7:35:00 PM
Anil Mamede wrote:
> <xs:simpleType name="nomeType">
> <xs:restriction base="xs:string">
> <xs:maxLength value="255" />
> <xs:pattern value="[\w\s]+" />
> </xs:restriction>
> </xs:simpleType>
The specification <URL:> defines
\w
as
"[#x0000-#x10FFFF]-[\p{P}\p{Z}\p{C}] (all characters except the set
of "punctuation", "separator" and "other" characters)"
so that includes digits.
If you use
<xs:pattern value="\P{N}+"/>
then you allow anything that is not a "Number" character.
Or you need to list the characters you want to allow.
--
Martin Honnen
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
