07/12/01 19:11:18
>>673
やってやれないことはないがあまりオススメしない。
HTMLにするならpreじゃいけないのか?
<xsl:param name="line.delimiter" xml:space="preserve">
</xsl:param>
<xsl:template match="foo:bar">
<xhtml:div>
<xsl:call-template name="substitute">
<xsl:with-param name="str" select="text()" />
</xsl:call-template>
</xhtml:div>
</xsl:template>
<xsl:template name="substitute">
<xsl:param name="str" />
<xsl:choose>
<xsl:when test="contains($str, $line.delimiter)">
<xsl:value-of select="substring-before($str, $line.delimiter)" />
<xsl:text disable-output-escaping="yes"><br /></xsl:text>
<xsl:value-of select="$line.delimiter" />
<xsl:call-template name="substitute">
<xsl:with-param name="str" select="substring-after($str, $line.delimiter)" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$str" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>