我有以下 XSLT
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output method="html" omit-xml-declaration="yes" />
<xsl:strip-space elements="*"/>
<xsl:template match="@* | node()">
<xsl:copy>
<html>
<body>
<xsl:for-each select="AdvReqIMailMsg">
<a><xsl:attribute name="href">
http://<xsl:value-of select="BackSideUrl"/>/customerlogin.asp?P=<xsl:value-of select="DynaCalPath"/></xsl:attribute >
Login to View History of This Request
</a>
<br/>
</xsl:for-each>
</body>
</html>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
结果如下:
<a href="
 http://dotnet.dynacal.com/customerlogin.asp?P=DEMO8">
Login to View History of This Request
</a>
为什么
和所有空格都在那里?我是 XSLT 的新手,我的谷歌搜索没有发现任何我理解的东西。
谢谢,
肖恩
最佳答案
A;
是编码的换行符。
它和空格保留在 XSLT 中的换行符和空格中。
关于xml - XSLT 为什么是 出现在我的 hrefs 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3970963/