0

XHTML を QTI 形式 (qti.xml) の XML に変換しています。私のXSLTコードはこのようなものです

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"
    xmlns:x="http://www.w3.org/1999/xhtml" exclude-result-prefixes="x" >

<xsl:template match="x:div[@id='item']">

        <itemBody>

            <p class="direction"><xsl:apply-templates select="x:div[@id='directions']" /></p>
            <p class="supplemental-elements"> <xsl:apply-templates select="x:div[@id='supplemental-elements']" /></p>
            <xsl:apply-templates select="x:div[@id='options']" />

        </itemBody>
    </xsl:template>

実行後 、exclude-result-prefixes="x" も使用しています<itemBody xmlns="http://www.w3.org/1999/xhtml"><itembody>.しかし、それは役に立ちません。助けていただけませんか。

アンバダス・モア

4

1 に答える 1

1

xmlns="http://www.w3.org/1999/xhtml"要素から削除するxsl:stylesheetと、問題は解決するはずです。なぜあなたはそれを持っていますか?XHTML 名前空間にいくつかの要素を作成する必要がありますか?

于 2012-04-20T11:47:44.410 に答える