<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>I have a DTD ELEMENT sequence that has 47
children. When I turn on SAX validation (SAXBuilder(true)) it <FONT size=2>takes
forever to build (saxBuilder.build(File)). OK, not actually forever, but 26
hours! It takes so long that at first I thought that it was in an infinite loop
- CPU was at 100%.</FONT></FONT></DIV>
<DIV><FONT face="Courier New" size=2><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><FONT size=2>By playing with the XML &
DTD, I was able to narrow down the problem to just the number of entries in the
DTD ELEMENT sequence. It's falling down at about 20 entries and goes up
exponentially from there. For every additional child entry, the time it takes to
validate DOUBLES (almost exactly).</FONT></FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Entries Millis<BR>=======
======<BR> 1 711<BR>
5 641<BR>
10 621<BR>
15 631<BR>
20 811<BR>
21 1031<BR> 22
1422<BR> 23 2163<BR>
24 3685<BR> 25
6709<BR> 26 12769<BR>
27 24796<BR> 28
48830<BR> 29 102367<BR> 30
206056<BR> 31 405963<BR></FONT></DIV>
<DIV><FONT face="Courier New" size=2>My largest actual test was 35 entries &
sure enough - over 1 1/2 hours. </FONT><FONT face="Courier New" size=2>By my
calculations, to process my 47 entries will take over 26 hours. The only
solution for me is to turn off SAX parser validation.</DIV></FONT>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>I am using the latest code from CVS - Beta8
(tag: jdom_1_0_b8). I am using Java 1.4.0_02. The problem occurs on both Windows
2000 & Solaris 8.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Attached is XMLTest.java, test.xml, &
test.dtd. Just compile & run the XMLTest class, it's hard coded to use the
test.xml file which references the test.dtd file.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Thanks,</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Dan Temple</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV></BODY></HTML>