Hi,

I think you can use Xalan extention, (Redirect) somethink like :

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0"
    xmlns:lxslt="http://xml.apache.org/xslt"
    xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
    extension-element-prefixes="redirect">
...
...
...
<redirect:write select="Your_file">
...
...
...
</redirect:write>
</xsl:stylesheet>
 

Robert McKinnon wrote:

Hello,

I am trying to dynamically build table rows from an xml file.  The solution
that I came across indicated that I would need to use <xsl:text
disable-output-escaping="yes">.  When I tried to apply this solution I
discovered that Cocoon does not support disable-output-escaping.  What would
be an alternative solution?  The following are example snippets:

[XML]
<parent>
        <child>
                <name>child1</name>
        </child>
        <child>
                <name>child2</name>
        </child>
        <child>
                <name>child3</name>
        </child>
        <child>
                <name>child4</name>
        </child>
        <child>
                <name>child5</name>
        </child>
        <child>
                <name>child6</name>
        </child>
</parent>

[OUTPUT DESIRED]
<tr>
        <td>child1</td>
        <td>child2</td>
</tr>
<tr>
        <td>child3</td>
        <td>child4</td>
</tr>
<tr>
        <td>child5</td>
        <td>child6</td>
</tr>

[RECOMMENDED XSL SOLUTION NOT SUPPORTED BY COCOON]
<tr>
<xsl:for-each select="parent/child">
        <td><xsl:value-of select="name"/></td>
        <xsl:if test="position() mod 2 = 0">
                <xsl:text disable-output-escaping="yes">
                        <![CDATA[</tr><tr>]]>
                </xsl:text>
        </xsl:if>
</xsl:for-each>
</tr>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to