cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert McKinnon" <rmckin...@alabanza.com>
Subject work around for <xsl:text disable-output-escaping="yes">?
Date Wed, 27 Jun 2001 12:22:34 GMT
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message