【发布时间】:2012-09-06 20:30:48
【问题描述】:
我想知道 Saxon 在 XSLT 期间如何以及为什么在 XSL 元素之间使用空格。以下是可能受上述行为影响的示例:
Saxon 在 XSLT 期间如何以及为何在 XSL 元素之间使用空格?
<div style="display:none;">
<xsl:choose>
<xsl:when test="true">
<xsl:attribute name="id">
<xsl:choose>
<xsl:when>
etc ec
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</div>
为什么<div 和<xsl:choose> 之间的空格可能会导致以下错误:
XSLT attribute node (id) cannot be created after the children of the containing element
【问题讨论】:
-
您缺少第一个
<xsl:choose>的结束标记