1

我正在使用 xsltproc 修复已使用 tidy 转换为格式良好的 XML 的 HTML 文件,但运行时间非常糟糕,每个文件超过一分钟。我想知道 tidy 的 XML 输出是否有问题,或者我的 xsl 很愚蠢,尽管它非常简单:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:h="http://www.w3.org/1999/xhtml">
    <xsl:output method="html" indent="yes" omit-xml-declaration="yes"/>
    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="processing-instruction('php')"></xsl:template>
</xsl:stylesheet>
4

0 回答 0