xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ankit Pasricha <ank...@ca.ibm.com>
Subject Re: Schema Pattern Question
Date Mon, 09 Aug 2004 20:14:39 GMT




In order to match dot(.) or comma (,) the expression [\.,] is enough. There
is no reason to escape the comma itself or to put comma as an indicator of
OR
in the regex. The valid escapes are given in [1].

[1] http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#nt-SingleCharEsc

Thanks

Ankit Pasricha
XML Parser Development
IBM Toronto Lab
8200 Warden Avenue, Ontario L6G 1C7
Phone: (905) 413 4941


                                                                           
             "David Morris"                                                
             <David.Morris@plu                                             
             mcreek.com>                                                To 
                                       <xerces-j-user@xml.apache.org>      
             08/09/2004 03:28                                           cc 
             PM                                                            
                                                                   Subject 
                                       Schema Pattern Question             
             Please respond to                                             
               xerces-j-user                                               
                                                                           
                                                                           
                                                                           
                                                                           




I have found when entering a regular expression pattern that I have to
escape back slashes when using Xerces-j. For example <xsd:pattern
value="[\\.,\\,]"/> to match dot (.) or comma (,). I would have thought
that "[\.,\,]" would work. I can understand why I would have to do this
in a java.lang.String but it seems like the implementation should not
show through here. Am I doing something wrong? The error says "this
expression is not supported in the current option setting" -- should I
change some option setting?

Thanks,

David Morris

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Mime
View raw message