小编Dav*_*866的帖子

如何加快XSLT处理时间

我目前正在使用XSLT文件将XML文件(许多标记语言)传输到另一个XML文件(纯文本).处理时间太长.

我想这是因为我正在使用像这样的for-each内部for-each: 元素和属性

<xsl:for-each select="/data/row">
  <xsl:variable name="ROW_">
    <xsl:value-of select="count(./preceding-sibling::*) + 1"/>
  </xsl:variable>
  <xsl:for-each select='/Header/*[starts-with (text(), 'Car')] '>
    <xsl:variable name="COLUMN_">
      <xsl:value-of select="count(./preceding-sibling::*) + 1"/>
    </xsl:variable>
    <xsl:value-of select="/data/row[position()=$ROW_]/@*[position()=$COLUMN_]"/>
    <xsl:value-of select ="$Delimiter"/>
  </xsl:for-each>
</xsl:for-each>
Run Code Online (Sandbox Code Playgroud)

那么我该怎么做才能缩短处理时间呢?

xml xslt

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

标签 统计

xml ×1

xslt ×1