That's right. I did that before, even generating a .bat file. This means I
had cocoon writing a program for me :)
The sitemap looks like this:
<map:match pattern="Resultaten.bat">
<map:generate src="somwhere/resultaat1.html" type="html"/>
<map:transform src="transforms/resultaten_bat.xsl"/>
<map:serialize mime-type="text/txt" type="text"/>
</map:match>
Where it takes an html file as input, transforms it to a "restultaten.bat"
file (PLAIN TEXT!) and sends it back to the user (or rather to the "curl"
program requesting it and dumping it in some directory to be called later
on)
The resulataten_bat.xsl looks kinda like this:
<xsl:stylesheet>
<xsl:template match="tr">
<xsl:text>
type config.txt > myconfig.txt
type formvalues.txt >> myconfig.txt
type referer.txt >> myconfig.txt
type resultaaturl.txt >> myconfig.txt
call doecurl.bat - resultaat-</xsl:text><xsl:value-of
select="td[1]"/>
</xsl:template>
</xsl:stylesheet>
Good luck,
Jelle
-----Oorspronkelijk bericht-----
Van: Joerg Heinicke [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 28 oktober 2003 18:19
Aan: [EMAIL PROTECTED]
Onderwerp: Re: Writing plain text files?
On 28.10.2003 15:44, Jorg Heymans wrote:
> why not write your own transformer ?
At the end it's only a simple stylesheet.
Joerg
> Stephanie Zohner wrote:
>
>> Hi,
>>
>> I want to write plain text files with Cocoon, What's the best way to do
>> this?
>>
>> The task sounds simple, but for me, it turned out to be quite tricky.
>>
>> So far I have tried with the SourceWriteTransformer. However, it still
>> requires at least a root tag for its output.
>> Another problem ist, that I need line breaks in my output text file and I
>> don't know, how to tell the XSLT Processor to do this.
>>
>> To make myself a bit clearer:
>> I would like to turn an XML-fragment like this,
>>
>> <page>
>> <line> bla bla bla bla bla bla </line>
>> <line> murmel murmel murmel </line>
>> </page>
>>
>> into:
>>
>> #-----Beginning of text file--------
>>
>> bla bla bla bla bla bla murmel murmel murmel
>> #-----End of text file---------------
>>
>> Does anybody have an idea?
>>
>> Thanks,
>>
>> Stephanie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]