<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=640471920-22062005><FONT face=Arial
color=#0000ff size=2>I knew I should have waited to send this out. It appears
that my retreiving of the sourceXSLT further up in the code is at fault, i.e.
I'm not getting the entire file. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640471920-22062005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=640471920-22062005><FONT face=Arial
color=#0000ff size=2>Sorry for the bother. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640471920-22062005></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> jdom-interest-bounces@jdom.org
[mailto:jdom-interest-bounces@jdom.org] <B>On Behalf Of </B>Kevin L.
Cobb<BR><B>Sent:</B> Wednesday, June 22, 2005 3:50 PM<BR><B>To:</B>
jdom-interest@jdom.org<BR><B>Subject:</B> [jdom-interest] Wierd SAX Error . . .
<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><SPAN class=791333619-22062005>I have a couple of
pretty large XSLT files that error at the SAX parser with the following
error:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=791333619-22062005>
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: XML
document structures must start and end within the same
entity.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=791333619-22062005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=791333619-22062005>If I weed out all of
the comments in one of them, the error goes away. This leads me to believe that
it is a buffer size issue somewhere. I've included </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=791333619-22062005>a code snippet
below. Anyone else come across this problem?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=791333619-22062005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=791333619-22062005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=791333619-22062005></SPAN></FONT><FONT
face=Arial size=2><SPAN class=791333619-22062005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=791333619-22062005> //Code Snippet
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=791333619-22062005> InputStream xsltIn = new
ByteArrayInputStream(sourceXSLT.getBytes());
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=791333619-22062005> try
{<BR> TransformerFactory tf =
TransformerFactory.newInstance();<BR>
tf.setURIResolver(new
BasicURIResolver());<BR>
Templates template = tf.newTemplates((new
StreamSource(xsltIn))); //This is
where the error is thrown<BR>
Transformer trans = template.newTransformer();<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=791333619-22062005> more
code ... </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=791333619-22062005> </DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<P style="MARGIN-BOTTOM: 0in"></P>
<P style="MARGIN-BOTTOM: 0in" align=left><FONT size=2><FONT
face=Arial>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR><STRONG><FONT color=#ff0000>Kevin L
Cobb, MT(ASCP), SCJP2<BR></FONT></STRONG>Senior Software Engineer<BR>Emergint,
Inc.<BR>2724 River Green Circle<BR>Louisville, KY 40206<BR></FONT></FONT><A
href="mailto:Kevin.Cobb@emergint.com"><FONT size=2><FONT
face=Arial>Kevin.Cobb@emergint.com</FONT></FONT></A><BR><FONT size=2><FONT
face=Arial>502.896.6210 ext 255<BR>502.896.6170 fax</FONT></FONT></P>
<P style="MARGIN-BOTTOM: 0in"> </P>
<P style="MARGIN-BOTTOM: 0in"><FONT face=Arial><FONT size=2>The preceding e-mail
message and attachments, if any, contains information that is confidential and
qualifies as such under the Definition of Confidential Information in the
Non-Disclosure Agreement, and may constitute non-public information and trade
secrets. It is intended to be conveyed only to the designated recipient(s). If
you are not an intended recipient of this message, please notify the sender at
502.896.6210. </FONT></FONT></P>
<DIV> </DIV></BODY></HTML>