>Then write it to a file on my TomCat server (I NEED THIS)

http://xml.apache.org/cocoon/userdocs/transformers/sourcewriting-transformer
.html

sitemap:

...
<map:transform src="writeSource.xsl">
        <map:parameter name="filename" value="someFilename.xml"/>
</map:transform>
<map:transform type="write-source"/>
<map:serialize type="xml"/>

writeSource.xsl:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:source="http://apache.org/cocoon/source/1.0";>
        <xsl:param name="filename"/>
        <xsl:template match="/">
                <source:write create="true">
                        <source:source>
                                <xsl:value-of select="$filename"/>
                        </source:source>
                        <source:fragment>
                                <xsl:copy>
                                        <xsl:copy-of select="@*"/>
                                        <xsl:apply-templates/>
                                </xsl:copy>
                        </source:fragment>
                </source:write>
        </xsl:template>
        <xsl:template match="*">
                <xsl:copy>
                        <xsl:copy-of select="@*"/>
                        <xsl:apply-templates/>
                </xsl:copy>
        </xsl:template>
        <xsl:template match="text()">
                <xsl:value-of select="."/>
        </xsl:template>
</xsl:stylesheet>

Mark

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 11 February 2003 05:31PM
To: [EMAIL PROTECTED]
Subject: Writing Request to File System


I'm a newbie.  I have Cocoon running.  I have a stylesheet that can submit
and recieve values from the RequestGenerator.

What I want to do is
Get http RequestGenerator XML (I have that)
Run it though a stylesheet (I have that)
Then write it to a file on my TomCat server (I NEED THIS)
Then redirect the request to an index page (This would be nice)

Right now I can send the output I want to go to the file as a response to
the web client.

Thanks,

JohnPT



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

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to