Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: restrict simpleType to word characters and spaces except digits [Thread Next] Re: restrict simpleType to word characters and spaces except digitsTo: NULL Date: 4/6/2008 9:40:00 AM On 4 Abr, 18:35, Martin Honnen <mahotr...@yahoo.de> wrote:
> 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/
Martin Honnen thanks a lot. I'll try that.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
