2

我在 jboss/wildfly 10 中收到以下错误,

ERROR:  'The input document is not a stylesheet (the XSL namespace is not declared in the root element).'
FATAL ERROR:  'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:832)
    at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:618)

我的 XSL 是:

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/REC-html40">
    <xsl:output method="html" indent="no" />

    <xsl:template match="/">
      <!-- html content here -->

    </xsl:template>
    <xsl:template match="/st/*">
    <!-- html content here -->
    </xsl:template>
    <xsl:template match="/mv/*">
    <!-- html content here -->
    </xsl:template>
</xsl:stylesheet>

你能帮忙解决这个错误吗?

4

0 回答 0