You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Meena Kamath <me...@openmarket.com> on 2001/05/24 23:48:44 UTC
Reader gets overwritten, bug?
I ran into this problem while using getAssociatedStylesheet() to work with
an embedded stylesheet. To explain this problem better, I've attached the
UseStylesheetPI example that I modified.
If you notice the transform() and getAssociatedStylesheet() use the same
StreamSource. The StreamSource has been constructed using a Reader. On
execution I get this exception
"javax.xml.transform.TransformerException: The root element is required in a
well
-formed document.
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java, Compiled Code)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1174)
at UseStylesheetPI.main(UseStylesheetPI.java:87)....."
On debugging I found that the getAssociatedStylesheet() actually sets the
reader to null. I tried it with FileReader as well as StringReader and get
the same results. Is this a bug?
Thanks
Meena
<<UseStylesheetPI.java>>