Shiva, I think the xalan redirect extension may not work within Cocoon. To conform to the Cocoon "best practice", you should use a separate pipeline stage to save the XML data to a file on the server. Use the SourceWritingTransformer for this purpose.
 
Cheers
 
Con
-----Original Message-----
From: shivakumar [mailto:[EMAIL PROTECTED]
Sent: Thursday, 13 November 2003 15:17
To: [EMAIL PROTECTED]
Subject: not generation xml file

Hi

 

Using the above code I am able to display the xml on the browser, but it is not generating the xml output file in my local server, what’s wrong in this code.  Any one help me.

 

Thanks

Shiva

 

 

This is my xls file.

 

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"

             xmlns:xsp="http://apache.org/xsp"

                 xmlns:lxslt="http://xml.apache.org/xslt"

                 xmlns:redirect="org.apache.xalan.lib.Redirect"

                 extension-element-prefixes="redirect">

 

 

<xsl:output method="xml" encoding="UTF-8"/>

  <xsl:template match="xsp:page">

<redirect:open file="../webapps/xls/result.xml"/>

      <redirect:write file="../webapps/xls/result.xml">

            <xsl:apply-templates select="/document/[EMAIL PROTECTED]'BodyPage']/table[1]/[EMAIL PROTECTED]'ResultSetHeaderRow']"/> 

            <xsl:apply-templates select="/document/[EMAIL PROTECTED]'BodyPage']/table[2]/[EMAIL PROTECTED]'ResultSetRow']"/>

            <xsl:apply-templates select="/document/[EMAIL PROTECTED]'BodyPage']/table[2]/[EMAIL PROTECTED]'ResultSetRow_Empty']"/>

      </redirect:write>

<redirect:close file="../webapps/xls/result.xml"/>

 

      <xsl:apply-templates select="/document/[EMAIL PROTECTED]'BodyPage']/table[1]/[EMAIL PROTECTED]'ResultSetHeaderRow']"/> 

      <xsl:apply-templates select="/document/[EMAIL PROTECTED]'BodyPage']/table[2]/[EMAIL PROTECTED]'ResultSetRow']"/>

      <xsl:apply-templates select="/document/[EMAIL PROTECTED]'BodyPage']/table[2]/[EMAIL PROTECTED]'ResultSetRow_Empty']"/>

 

 

</xsl:template>

 

 

  <!-- ***************** !DO NOT CHANGE! Standard Templates ***************** -->

 

  <xsl:template name="get-nested-content">

    <xsl:param name="content"/>

    <xsl:choose>

      <xsl:when test="$content/*">

        <xsl:apply-templates select="$content/*"/>

      </xsl:when>

      <xsl:otherwise>"<xsl:value-of select="$content"/>"</xsl:otherwise>

    </xsl:choose>

  </xsl:template>

 

  <xsl:template match="@*|*|text()|processing-instruction()">

    <xsl:copy>

      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>

    </xsl:copy>

  </xsl:template>

 

</xsl:stylesheet>

Reply via email to