[xsl] How can I redirect XSL output back to the default output ?

Subject: [xsl] How can I redirect XSL output back to the default output ?
From: Otmar Klaser <klaser2@xxxxxx>
Date: Wed, 27 Jul 2005 19:18:46 +0200
Xalan supports the redirection of output via extension xslt:write but how can I redirect output back to the default output file ?

The following example illustrates my problem.

<xsl:template match="/">
  <x>
    <redirect:write file="foo.xml">
       this line is redirected to foo.xml

       the line in the middle
	
    </redirect:write>
  </x>
</xsl:template>

The line in the middle shall belong to the content of element x, i.e., it shall be redirected to the original output file.

I look for a statement like <redirect:write file=">out">.

To move the line in the middle out of the enclosing redirect-statement is not desireable because the line stands for output that is created after a number of calls of xsl:apply-templates.

Can anyone help me ?

o.k

Current Thread