<!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.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm using jdom-b9 and the latest -b10 and get the
following exception:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>java.lang.IllegalStateException: Root element not
set<BR> at
org.jdom.Document.getRootElement(Document.java:216)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The exception doesn't occur if I'm using jdom-b8.
All works fine when generating HTML from the XML tree.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The following Java code in the <FONT
color=#000080>System.err.out</FONT> statement seems to cause the
exception:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>JFrame frame = new JFrame(); <BR>
StringBuffer sbuf = new StringBuffer(1000);<BR> try
{<BR> Transformer transformer =
TransformerFactory.newInstance()<BR>
.newTransformer(new StreamSource(new
File(html_stylesheetfile)));<BR>
<BR> JDOMResult out = new
JDOMResult();<BR> // Transform XML
LogBook into HTML using XSLT
stylesheet<BR>
transformer.transform(new JDOMSource(doc),
out);<BR>
<BR> if (debug == true)
{<BR> //
exception at out.getDocument() -> "no root element set" when using jdom-b9
and -10 !!<BR>
<FONT color=#000080>System.err.println("showHTML: out.getRootElement() == " +
out.getDocument().getRootElement().getName());</FONT><BR>
}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any idea whats going wrong here ? Didn't find any
hint in the archives.</FONT></DIV>
<DIV><FONT face=Arial size=2>But beside this problem, I like to use jdom very
much - its a fine work done!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Roland Hartinger</FONT></DIV>
<DIV><FONT face=Arial size=2>Email: <A
href="mailto:roland.hartinger@gmx.de">roland.hartinger@gmx.de</A></FONT></DIV></BODY></HTML>