You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by jt...@oreillyauto.com on 2003/02/11 18:31:08 UTC
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Writing Request to File System
Posted by Mark H <ma...@markhorgan.com>.
>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: jthaemlitz@oreillyauto.com [mailto:jthaemlitz@oreillyauto.com]
Sent: 11 February 2003 05:31PM
To: cocoon-users@xml.apache.org
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>