小编use*_*977的帖子

覆盖每个xslt

我有一个xml文件,让我们说:  

<parent>
    <notimportant1>
    </notimportant1>.    
    <notimportant2>
    </notimportant2>.   
     ....
    <child>
        <grandchild>.   
         ....
        </grandchild>
        <grandchild>
         ....
        </grandchild>. 
         ....
        <notimportant3>
        </notimportant3>
    </child>
<parent>
 
Run Code Online (Sandbox Code Playgroud)

还有xsl文件:

<xsl:template match="parent">.   
      ...
      ...
     <xsl:for-each select="child">.    
         <xsl:for-each select="grandchild">
          ...
         </xsl:for-each>.    
     </xsl:for-each>
      ....
</xsl:template>
Run Code Online (Sandbox Code Playgroud)

现在,我必须创建新xsl文件,该文件只能导入/包含此文件xsl.

是否可以覆盖此for-each行为,以便我只能显示一些预定义的文本/链接?

我无法修改现有的xsl,我想使用模板中的其他所有内容 - 不能只定义具有更高优先级的新内容.

xml xslt

2
推荐指数
1
解决办法
192
查看次数

标签 统计

xml ×1

xslt ×1