xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Clark <an...@apache.org>
Subject Re: [Xerces1.2.2][XMLSChema]
Date Tue, 05 Dec 2000 01:31:41 GMT
Sebastien Sahuc wrote:
> Just to let you know that I get a java.lang.OutOfMemoryError (it looks
> like it goes into an inifite loop before reaching it memory limit.)
> when I replace any <group> statement with a <all> statement.

Let me guess, you have 7 or more elements in your <all>...

This is an inherent problem with the <all> model because it's
a factorial problem. Consider: a & b & c (old SGML syntax). This 
is equivalent to the following: (a,b,c) | (a,c,b) | (b,a,c) |
(b,c,a) | (c,a,b) | (c,b,a). So it's really 3! == 6 sequences
of 3 elements. If you do the math for 7! (or higher) I think
you'll see the problem.

Our current content model code can only handle sequences and
choices, so the <all> gets expanded to all of its permutations.
You're more than welcome to come up with some code to fix this
problem that handles the <all> in a more efficient manner. But
at the moment, this is lower priority than other items.

Andy Clark * IBM, TRL - Japan * andyc@apache.org

View raw message