xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Etienne Roy" <e...@us.ibm.com>
Subject regexp validation with XercesJ
Date Thu, 26 Apr 2001 21:40:54 GMT
Hi all,

I've got a problem validating against a regexp pattern for an attribute.
Simplifying my regexp I found a weird behaviour of the validator:

(([0-9]*[.][0-9]+)|([0-9]+))    matches  '1' and '1.23' but
(([0-9]+)|([0-9]*[.][0-9]+))    matches '1' but NOT '1.23'

Is there a problem with my regexp ? Or did anyone encountered something
similar ??
Thanks for any help


More details:

I use xerces-J 1.3.1
java version "1.3.0"
I validate with sax.SAXCount -v (and I tried dom.DOMCount -v)

snippet of my schema:
   <simpleType name="TestRegExp">
     <restriction base="string">
               <pattern  value='(([0-9]+)|([0-9]*[.][0-9]+))'/>

I had the same behaviour with '*' instead of '+', with or without
parenthesis, with [.] or \.

In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message