Hi Rob,

> 1. How can I manipulate files using cocoon, I have some xml data I want to
be able to change without storing it in a database.

You can store your xml generated data in a stylesheet :

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
 extension-element-prefixes="redirect">
<xsl:output method="xml" encoding="ISO-8859-1"/>
 <xsl:template match="/">
 <redirect:open file="webapps/cocoon/samples/srvimp/content/xml/doc8.xml"/>
 <redirect:write file="webapps/cocoon/samples/srvimp/content/xml/doc8.xml">
  <xsl:copy-of select="*"/>
 </redirect:write>
 <redirect:close file="webapps/cocoon/samples/srvimp/content/xml/doc8.xml"/>
 </xsl:template >
</xsl:stylesheet>

I think there are better solutions, but i didn't find it when i have this
need.

Ludovic


----- Original Message -----
From: "Rob Hoopman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 7:16 AM
Subject: Output to file/ replace file


> Hi,
> I realise this is a question that probably has come up before on the list
but I can't seem to find it in the archives or on google.
>
> I have two questions:
> 1. How can I manipulate files using cocoon, I have some xml data I want to
be able to change without storing it in a database.
>
> 2. The same question but for binary data, I can upload binary files just
fine, but haven't found an obvious way to pick it up from the
'upload-directory' and store it in it's final location.
>
> Pointers to information or past threads apreciated.
>
> Rob
>
> ---------------------------------------------------------------------
> 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]>
>
>
>


---------------------------------------------------------------------
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