[xsl] problem calling servlet

Subject: [xsl] problem calling servlet
From: Leona Slepetis <lrs@xxxxxxxxxxxx>
Date: Mon, 18 Mar 2002 13:12:03 -0600 (CST)


This file is being called as a form action. I am trying to call a servlet
which parses the XML in the file variable, but I get the following
exception.

org.xml.sax.SAXParseException: The markup in the document preceding
the root element must be well-formed

The servlet is only getting the "<![CDATA[<?xml" part of the
file variable.
I've tried URLEncoder and removing the CDATA markup, but nothing has
worked. Does anyone know what I'm doing wrong?

Thanks,
 Leona Slepetis
                
source of adddetail.xml:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="gs.xsl" type="text/xsl"?>
<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core";
 xmlns:util="http://www.apache.org/1999/XSP/Util";>

  <xsp:structure>
    <xsp:include>java.lang.*</xsp:include>
    <xsp:include>java.util.*</xsp:include>
    <xsp:include>java.io.*</xsp:include>
    <xsp:include>java.net.URLEncoder</xsp:include>
  </xsp:structure>
  <page>
  <xsp:logic>
     String strAction;

     strAction = request.getParameter("action");

     strTransaction = "<![CDATA[<?xml version=\"1.0\"?><KGTransactions>"
      + "<KGTransaction action=\"" + strAction
    + </KGTransaction></KGTransactions>]]>";
   String x =
"http://localhost:8080/kong/servlet/Replicate?file="+strTransaction;

     </xsp:logic>

    <util:include-uri>
   <util:href>
      <xsp:expr>x</xsp:expr>
   </util:href>
  </util:include-uri>

 </page>
</xsp:page>





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread