cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doody, John" <john.do...@attws.com>
Subject XSLProcessorException: Warning: can't output text before document element!
Date Wed, 20 Sep 2000 22:29:01 GMT
We've got a system that is producing an XML string via a cocoon producer.
We are using Cocoon 1.7.4.  It looks like the xml is created correctly (see
sample below), but the following exception displays in the browser.  We
tried a test by capturing the XML string and writing it to a file and
transforming it at the command line via xalan and it works fine.  Anyone
know what may be causing this?:

Exception:

      org.apache.xalan.xslt.XSLProcessorException: Warning: can't output
text before document element!  Ignoring...
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.(Compiled Code)
              at java.lang.Exception.(Compiled Code)
              at org.xml.sax.SAXException.(SAXException.java:45)
              at
org.apache.xalan.xpath.XPathException.(XPathException.java:92)
              at
org.apache.xalan.xslt.XSLProcessorException.(XSLProcessorException.java:90)
              at org.apache.xalan.xslt.XSLTEngineImpl.error(Compiled Code)
              at org.apache.xalan.xslt.XSLTEngineImpl.error(Compiled Code)
              at org.apache.xalan.xslt.XSLTEngineImpl.process(Compiled Code)
              at
org.apache.cocoon.transformer.XalanTransformer.transform(Compiled Code)
              at
org.apache.cocoon.processor.xslt.XSLTProcessor.process(Compiled Code)
              at org.apache.cocoon.Engine.handle(Compiled Code)
              at org.apache.cocoon.Cocoon.service(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at com.livesoftware.jrun.JRun.runServlet(Compiled Code)
              at com.livesoftware.jrun.JRunGeneric.handleConnection(Compiled
Code)
              at
com.livesoftware.jrun.JRunGeneric.handleProxyConnection(Compiled Code)
              at
com.livesoftware.jrun.service.proxy.JRunProxyServiceHandler.handleRequest(Co
mpiled Code)
              at
com.livesoftware.jrun.service.ThreadConfigHandler.run(Compiled Code)

XML string:

<?xml version="1.0" ?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="InvRemitHTML.xsl" type="text/xsl"?>
<report>
 <report_id>1</report_id>
 <outputformat>HTML</outputformat>
 <drillDownReportID>3</drillDownReportID>
 <order_date>04/18/2000</order_date>
 <resultset>
  <row0>
   <BillPeriodStartDate>03/19/2000  </BillPeriodStartDate>
   <BillPeriodEndDate>04/18/2000   </BillPeriodEndDate>
   <... other tags here removed due to proprietary restrictions> 
  </row0>
 </resultset>
</report>

XSL file: InvRemitHTML.xsl:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet
        version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="copyrights.xsl"/>
<xsl:include href="billstylestandard.xsl"/>
<xsl:template match="report_id">

</xsl:template>
<xsl:template match="//report//resultset//row0">
   
	HTML here removed.

</xsl:template>

</xsl:stylesheet>

Thanks,

John S. Doody
AT&T Wireless Services, Inc.
john.doody@attws.com

Mime
View raw message