cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark H" <mailingli...@markhorgan.com>
Subject RE: Writing Request to File System
Date Tue, 11 Feb 2003 19:58:41 GMT
>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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message