<!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><SPAN class=945412421-16102002><FONT face=Arial color=#0000ff size=2>Have 
you tried another XML parser than the one packaged in the 1.4 
JRE?</FONT></SPAN></DIV>
<DIV><SPAN class=945412421-16102002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=945412421-16102002><FONT face=Arial color=#0000ff size=2>Here's 
something I plucked off the web somewhere on how to do that (replace Xalan with 
Xerces, same applies):</FONT></SPAN></DIV>
<DIV><SPAN class=945412421-16102002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=945412421-16102002>
<P>Annoyingly, the Xalan-J classes included in Java 1.4 are zipped into the 
<FONT face="Courier New" size=2>rt.jar</FONT> archive so it&#8217;s hard to replace 
them with a less-buggy release version of Xalan. It can be done, but you have to 
put the xalan.jar file in your <FONT face="Courier New" 
size=2>$JAVA_HOME/lib/endorsed</FONT> directory rather than in the normal <FONT 
face="Courier New" size=2>jre/lib/ext</FONT> directory. The exact location of 
$JAVA_HOME varies from system to system, but it&#8217;s probably something like <FONT 
face="Courier New" size=2>C:\j2sdk1.4.0</FONT> on Windows. None of this is an 
issue with Java 1.3 and earlier, which don&#8217;t bundle these classes. On these 
systems you just need to install whatever jar files your XSLT engine vendor 
provides in the usual locations, the same as you would any other third party 
library. </P>
<P>&nbsp;</P>
<P><SPAN class=945412421-16102002><FONT face=Arial color=#0000ff 
size=2>Frank</FONT></SPAN></P></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Dan Temple 
  [mailto:Dan.Temple@wcom.com]<BR><B>Sent:</B> Wednesday, October 16, 2002 5:14 
  PM<BR><B>To:</B> jdom-interest@jdom.org<BR><B>Subject:</B> [jdom-interest] SAX 
  Parser/DTD Validation EXTREMELY slow<BR><BR></FONT></DIV>
  <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>&nbsp;</DIV>
  <DIV><FONT face="Courier New" size=2><FONT size=2>By playing with the XML 
  &amp; 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>&nbsp;</DIV>
  <DIV><FONT face="Courier New" size=2>Entries Millis<BR>======= 
  ======<BR>&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  711<BR>&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 641<BR>&nbsp; 
  10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 621<BR>&nbsp; 
  15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 631<BR>&nbsp; 
  20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 811<BR>&nbsp; 
  21&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1031<BR>&nbsp; 
  22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1422<BR>&nbsp; 
  23&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2163<BR>&nbsp; 
  24&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3685<BR>&nbsp; 
  25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6709<BR>&nbsp; 26&nbsp;&nbsp;&nbsp;&nbsp; 
  12769<BR>&nbsp; 27&nbsp;&nbsp;&nbsp;&nbsp; 24796<BR>&nbsp; 
  28&nbsp;&nbsp;&nbsp;&nbsp; 48830<BR>&nbsp; 29&nbsp;&nbsp;&nbsp; 
  102367<BR>&nbsp; 30&nbsp;&nbsp;&nbsp; 206056<BR>&nbsp; 31&nbsp;&nbsp;&nbsp; 
  405963<BR></FONT></DIV>
  <DIV><FONT face="Courier New" size=2>My largest actual test was 35 entries 
  &amp; 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&nbsp;parser 
  validation.</DIV></FONT>
  <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</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 &amp; Solaris 8.</FONT></DIV>
  <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face="Courier New" size=2>Attached is XMLTest.java, test.xml, &amp; 
  test.dtd. Just compile &amp; 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>&nbsp;</DIV>
  <DIV><FONT face="Courier New" size=2>Thanks,</FONT></DIV>
  <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face="Courier New" size=2>Dan Temple</FONT></DIV>
  <DIV><FONT face="Courier New" 
size=2></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>