[xsl] multiple outputs

Subject: [xsl] multiple outputs
From: "Shadab" <mohammad.shadab@xxxxxxxxxxx>
Date: Wed, 18 Feb 2004 10:12:43 +0530

I am having problem creating xsl which would render multiple outputs from a
single source file.


say source xml is:


and xsl is:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    <xsl:template match="/">
             <xsl:for-each select="Root/Record">

                <xsl:if test="one=1">
                    <xsl:value-of select="one"/>

                <xsl:if test="one=2">
                    <xsl:value-of select="one"/>
                <!--for both conditions the output has to be sent to
different stream and output should be from root downwards.-->


now based on the 'if' condition applied below the 'for' loop the output is
to be redirected to different output streams.

So one solution is to have a sequence of ifs to direct output using
different result fragments but this will only send a fragment of the output
to the stream and not the whole well formed xml starting from <Sheet>

so two outputs could be




Any ideas how to have the complete output in any number of streams based on
conditions which may not be at root level but further down.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread