Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Cocoon outputing files Cocoon outputing filesTo: NULL Date: 8/5/2005 9:40:00 PM Hi!
I've got an XML file which I want to output to several real text (.rt) files
in order to include them in my SMIL application. I've created an XSL which
perfectly works (outputs 3 files to disk) in XMLspy processor, but fails to
output the files when used as a transformer in Apache Cocoon server.
I'm using a windows machine with the latest cocoon.
I've included both the XSL and the sitemap.xmap below if anybody is
interested in helping me..
What is the proper way to do this in Apache Cocoon?
Thanks in advance!
----------------------------------------------------------------------------
----------
/cut/
<map:pipeline>
<map:match pattern="">
<map:generate src="content/split.xml"/>
<map:transform src="transform/split.xsl">
<map:parameter name="use-request-parameters" value="true" />
</map:transform>
<map:serialize type="text"/>
</map:match>
</map:pipeline>
----------------------------------------------------------------------------
---------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:output method="text"/>
<xsl:output method="html" indent="yes" name="html"/>
<xsl:template match="/">
<xsl:for-each select="//testrun">
<xsl:variable name="filename"
select="concat('output1/',@run,'.rt')" />
<xsl:value-of select="$filename" /> <!-- Creating -->
<xsl:result-document href="{$filename}" format="html">
<html>
<body>
<xsl:value-of select="@run"/>
</body>
</html>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
