cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cindy Ballreich <ci...@ballreich.net>
Subject more text/plain output
Date Mon, 12 Mar 2001 22:08:03 GMT

A couple of days ago Jonathan Fuerth suggested using XSP to change the
Content-Disposition header so that MSIE will accept text/plain output from
an XML source. I wrote an XSP file that does this and it appears to work -
at least with small amounts of XML. Using the XSP with my full XML file
(which isn't really all *that* big) gives the following error...

java.lang.ClassFormatError: Code of a method longer than 65535 bytes

I expect that I'm going about this all wrong. All I really want to do is
call response.setHeader and then copy the XML with new PIs pointing it to
the proper  XSL file. This is the XSP that I've written...

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <xsl:processing-instruction
name="cocoon-process">type="xsp"</xsl:processing-instruction>
    <xsl:processing-instruction
name="cocoon-process">type="xslt"</xsl:processing-instruction>
    <xsl:processing-instruction
name="xml-stylesheet">href="catalog-text.xsl"
type="text/xsl"</xsl:processing-instruction>
    <xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core">
      <page>
        <xsp:logic> 
          response.setHeader("Content-Disposition", "inline;
filename=kluge.txt");
        </xsp:logic>
        <xsl:apply-templates/>
      </page>
    </xsp:page>
  </xsl:template>
  <xsl:template match="@*|*|text">
    <xsl:copy-of select="."/>
  </xsl:template>
</xsl:stylesheet>

I'd really appreciate any pointers that would get me heading in the right
direction.

Cindy



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message