I'm also getting StackOverflow exceptions for this issue. I'm using Xerces 2.6.2, Java 1.3.1_06
Here's my element definition, where large values cause stack problems:
<!-- Test digit tokens w/o beginning, trailing, or adjacent spaces -->
<xsd:pattern value="([0-9] ?)*[0-9]" />
With 10,000 digits for <foo> above, I get a StackOverflow:
Exception in thread "main" java.lang.StackOverflowError
at org.apache.xerces.impl.xpath.regex.Op$UnionOp.elementAt(Unknown Sourc
. . . . . .
My attachment has a simple instance (10,000 digits for <foo> above) and its schema.
A variable size causes exceptions.
Note that another very popular GUI XML tool has problems here too. In their case, they seem to limit the data to 1000 chars. (for <foo> above). Maybe they're avoiding stack issues with such a static value?
In another XML parser though, I get no stack overflow exceptions, nor am I limited in size (at least I haven't seen a problem with it yet).
Sounds like this is still an issue.