Halle Anna,
 
With a stylesheet like that you can write files and having an output as well. If it is the best method?
 
<?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" indent="yes"/>
 <xsl:template match="/">
  <html>
   <head>
    <title/>
   </head>
   <body>
  <xsl:apply-templates/>
   </body>
  </html>
 
 </xsl:template>
 <xsl:template match="output">
  <redirect:open file="path-to-your-file"/>
  <redirect:write file="path-to-your-file">
    <xsl:copy-of select="*"/>
  </redirect:write>
  <redirect:close file="path-to-your-file"/>
 </xsl:template>
</xsl:stylesheet>
----- Original Message -----
Sent: Tuesday, December 17, 2002 2:19 PM
Subject: Writing output of pipeline to a file

Hello All!
I know that today I ask too many questions, but since cocoon is new to me,
sometimes I don't even know where to look for the information, so you are my only help.
Thanks for everyone who took time to answer my questions. Here is another one:
 
At the end of the pipeline the result file is output to the browser.
I need the result file also to be saved in the file on my hard drive.
How can I do this?
I read about the SourceWritingTransformer, but I understood that I can write <source:write> tag in xml only, not in xsl.
 
Or maybe I can use it to do what I need, and I just don't know how?
Please tell me.
 
Thank you very much for your help.
 
Anna

Reply via email to