且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

没有在我的XSLT中添加新行

更新时间:2023-12-05 14:26:16

XSLT的默认行为是忽略样式表中完全为空格的任何文本节点(即使某些空格被编码为类似于),但保留<xsl:text>中的文本.

XSLT's default behavior is to ignore any text nodes in the stylesheet that are entirely whitespace (this is true even if some of the whitespace is encoded as entities like &#10;), except for text inside <xsl:text>, which is preserved.

我建议替换这些行:

<xsl:value-of select="ApplicationID"/>,<xsl:value-of select="USERID"/>
&#10;

与此:

<xsl:value-of select="concat(ApplicationID, ',', USERID, '&#10;')"/>

这样,应确保换行符包含在输出中.

That way the newline should be ensured to be included in the output.