数据库里有一个text 类型的值,<xsl:value-of select="MyTextField"/> 出来后没有换行 比

---------------------------------------------------------------

 1<xsl:template name="processText">
 2<xsl:param name="text"></xsl:param>
 3<xsl:choose>
 4<xsl:when test="contains($text,'
 5')">
 6<xsl:value-of select="substring-before($text,'
 7')"></xsl:value-of><br/>
 8<xsl:call-template name="processText">
 9<xsl:with-param name="text" select="substring-after($text,'
10')"></xsl:with-param>
11</xsl:call-template>
12</xsl:when>
13<xsl:otherwise>
14<xsl:value-of select="$text"></xsl:value-of>
15</xsl:otherwise>
16</xsl:choose>
17</xsl:template>
1<xsl:call-template name="processText">
2<xsl:with-param name="text" select="MyTextField"></xsl:with-param>
3</xsl:call-template>
Published At
Categories with Web编程
comments powered by Disqus