Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Templates 未应用XSL模板_Templates_Xslt - Fatal编程技术网

Templates 未应用XSL模板

Templates 未应用XSL模板,templates,xslt,Templates,Xslt,下面是我正在编辑的一些XSL。我不得不添加代码来解释html表格,无法理解为什么要应用[引文]下的模板,但[tables]下的模板却没有。在我开始之前,[引文]的代码就已经存在并正在运行。我从应用程序的另一部分窃取了[表]的代码,在那里它可以正常工作。这里有什么值得注意的吗?提前谢谢 <!-- Common template for procedure sub-sections. --> <xsl:template match="th:section" priority="1"

下面是我正在编辑的一些XSL。我不得不添加代码来解释html表格,无法理解为什么要应用[引文]下的模板,但[tables]下的模板却没有。在我开始之前,[引文]的代码就已经存在并正在运行。我从应用程序的另一部分窃取了[表]的代码,在那里它可以正常工作。这里有什么值得注意的吗?提前谢谢

<!-- Common template for procedure sub-sections. -->
<xsl:template match="th:section" priority="1" mode="procedures">
    <div id="tab{position()}">
        <xsl:if test="count(*//th:figure) gt 0">
            <hr/>
            <div class="carrousel floatbox">

            <!-- LOTS OF CODE HERE. -->

            </div>
            <hr/>
        </xsl:if>
        <xsl:next-match/>
    </div>
</xsl:template>

<!-- [TABLES] Table templates not being applied. -->
<xsl:template match="th:table" mode="procedures">
<table border="1">
  <xsl:apply-templates/>
</table>
</xsl:template>

<xsl:template match="th:thead">
<thead>
  <xsl:apply-templates/>
</thead>
</xsl:template>
<!-- [More table templates follow here to handle table body and footer. None are being applied.] -->

<!-- [CITATIONS] These templates are being applied. -->
<xsl:template match="th:section[@type = 'literature']" mode="procedures">
    <ol class="litrefs">
        <xsl:apply-templates mode="refs"/>
    </ol>
</xsl:template>

<xsl:template match="th:litref" mode="refs">
    <li>
        <xsl:apply-templates mode="refs"/>
    </li>
</xsl:template>
<!-- [More templates follow here to handle citations. No problems here.] -->




  • 是否有其他模板可能与相同的节点匹配?我会尝试通过跟踪来运行它(例如,对命令行Saxon 9处理器使用
    -T
    选项),以准确地查看何时触发哪些模板。我不这么认为。我在两个相关的.xsl文件(这一个和一个导入文件)中搜索了“table”,但是没有其他用于th:table的模板。我确实在驱动器上找到了saxon,但可能还有另一个类在执行转换。我试图从命令行运行转换,但net.sf.saxon.transform.ARGH出现NoClassDefFoundError异常。最后,我修正了所有路径以运行该命令,在一个导入文件中,我还有一堆其他路径要修复,但我可能有点问题。谢谢。好的,这就是我得到的错误,我假设这意味着XML中的一个坏字符:error com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:1字节UTF-8序列的无效字节1。转换失败:报告了运行时错误