Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Cocoon outputing files

From: "Ripper" <net@---.-->
To: 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>




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent