XML TO PDF (XSL Exception):
Exception:
SystemId Unknown; Line #0; Column #0; java.lang.IllegalStateException: endElement() called for fo:root where there is no current element.
The above exception occurs while the xml is transformed and reason is "xml not constructed properly.
Explanation :
In this case, this exception happened, as the <li>data</li> list items are constructed with out a parent <ul></ul> tag element.
After all the list items are placed in a parent <ul></ul> unordered list tag, this exception got fixed.
Solution :
The xml that has to be transformed into PDF or other formats should be constructed properly.
Detailed exception :
2012-07-21 09:04:31,440 ERROR
[org.apache.fop.fo.FOTreeBuilder] (http-127.0.0.1-8080-2)
javax.xml.transform.TransformerException: java.lang.IllegalStateException:
endElement() called for fo:root where there is no current element.
2012-07-21 09:04:31,441 ERROR [STDERR]
(http-127.0.0.1-8080-2) SystemId Unknown; Line #0; Column #0;
java.lang.IllegalStateException: endElement() called for fo:root where there is
no current element.