我想选择在 Addl_Information 部分出现 Plan 子节点的 Worker 节点
<xsl:mode streamable="yes"/>
<xsl:template match="Worker[Addl_Information/Plan]">
当我使用上面的代码时,我收到来自 Saxon-EE 9.6.0.5 处理器的错误说
XTSE3430: Template rule is declared streamable but it does not satisfy the streamability rules. * The match pattern is not motionless
我究竟做错了什么?
我在w3c 网站上看到了(类似的)静止模式的例子,但它对我不起作用,请指教。
更新:这是我的样式表。我试图只包括在他们的工人数据中记录了某个计划的人。请注意,下面的patth
变量是我试图评估的另一个角度 - 基本上在剩余代码周围有一个 IF 条件。那也行不通。
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:mode streamable="yes"/>
<xsl:template match="Worker_Sync">
<File>
<xsl:apply-templates select="Worker"/>
</File>
</xsl:template>
<xsl:template match="Worker">
<xsl:variable name="ThisPerson" select="copy-of()"/>
<xsl:variable name="patth" select="Additional_Information/ws:plan"/>
<xsl:if test="$ThisPerson/$patth">
<Row>
<A1_Account_Number><xsl:value-of select="$ThisPerson/Additional_Information/Account_Number"/></A1_Account_Number>
<A2_Employee_Number>...</A2_Employee_Number>
</Row>
</xsl:if>
</xsl:template>
</xsl:stylesheet>