Title: Issues with javax.xml.transform.Source object

HI all,

  I was attempting to reuse the same javax.xml.transform.Source object to perform transformation more than once. It always sussessfully transforms the Source object at the first time, and fails at the second transformation, even after I attain a new instance of the TransformerFactory and Transformer. The following is the exception I got. It appears to me that the Source object has been modified in the first transformation. Can anybody tell me what's actually going on here?


Simon Chen



-----------------------------------------------------------------------------------------------------------------------------

org.xml.sax.SAXParseException: The root element is required in a well-formed document.
        at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1273)
        at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:585)
        at weblogic.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.endOfInput(XMLDocumentScanner.java:805)

        at weblogic.apache.xerces.framework.XMLDocumentScanner.endOfInput(XMLDocumentScanner.java:433)
        at weblogic.apache.xerces.validators.common.XMLValidator.sendEndOfInputNotifications(XMLValidator.java:730)
        at weblogic.apache.xerces.readers.DefaultEntityHandler.changeReaders(DefaultEntityHandler.java:1045)
        at weblogic.apache.xerces.readers.XMLEntityReader.changeReaders(XMLEntityReader.java:168)
        at weblogic.apache.xerces.readers.AbstractCharReader.changeReaders(AbstractCharReader.java:150)
        at weblogic.apache.xerces.readers.AbstractCharReader.lookingAtChar(AbstractCharReader.java:217)
        at weblogic.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.dispatch(XMLDocumentScanner.java:701)
        at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:396)
        at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:1119)
        at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
        at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:133)
        at weblogic.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:435)
        at weblogic.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:641)
        at weblogic.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1099)
        at weblogic.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1077)
        at com.olf.adi.util.TransformerUtil.xsltTransform(TransformerUtil.java:289)
        at com.olf.adi.util.TransformerUtil.xsltTransform(TransformerUtil.java:216)
        at com.olf.adi.util.TransformerUtil.xsltTransform(TransformerUtil.java:179)



� 2002 OpenLink Financial

Copyright in this message and any attachments remains with us.  It is
confidential and may be legally privileged.   If this message is not
intended for you it must not be read, copied or used by you or
disclosed to anyone else.   Please advise the sender immediately if
you have received this message in error.

Although this message and any attachments are believed to be free of
any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the
recipient to ensure that it is virus free and no responsibility
is accepted by Open Link Financial, Inc. for any loss or damage in any
way arising from its use.


Reply via email to