|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Schema Regular Expression which subtracts characters
Problem: create an XML Schema regular expression which produces strings
with the characters a-z, A-Z minus the two characters o ("oh") and l
("el").
Examples.
The regular expression should accept these strings:
quick, hum, trade
It should reject these strings:
john, family (john contains "o", and
family contains "l")
Below is my regular expression. It uses the "character class
substraction" capability from the XML Datatype's spec to subtract-out
the two undesired characters. Here is the regular expression:
([a-zA-Z]+)-[ol]
"All the characters a-z and A-Z, one or more times, minus the two
characters o, and l."
Is this correct? I tried it out with xerces 1.4.1 and also with XML Spy
1.4b and both bombed. Here's an error message from xerces:
[Error] test.xml:6:26: Datatype error: Value 'quick' does not match
regular expression facet '([a-xA-Z]+)-[ol]'
Perhaps I am using the "character class substraction" capability
incorrectly? Can someone tell me where I err? /Roger
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








