[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


To: "'ietf-provreg@cafax.se'" <ietf-provreg@cafax.se>
From: "Hollenbeck, Scott" <shollenbeck@verisign.com>
Date: Mon, 19 Nov 2001 07:34:35 -0500
Sender: owner-ietf-provreg@cafax.se
Subject: Xerces-J regex Error

Just an FYI for anyone using the Xerces-J 1.4.* XML parsers:

I recently ran into a bug in the way Xerces-J handles max length limits
specified in regular expressions.  The error doesn't appear in the most
recent beta version of Xerces-J 2.0.0.

When working with types that include a pattern like the one below:

 <simpleType name="fooType">
   <restriction base="token">
     <pattern value="[a-zA-Z0-9]{4,24}"/>
   </restriction>
 </simpleType>

I've found that Xerces-J 1.4.* doesn't properly catch instances whose length
exceeds the specified maximum (24 in the example above).  It does catch
instances that don't meet the specified minimum (4 in the example above).
So, be aware of this bug if you're testing code and finding that the parser
is letting strings through that it shouldn't.

-Scott- 

Home | Date list | Subject list