xsl中的html_entity_decode()没有解码任何东西

时间:2011-05-04 16:13:43

标签: php xml xslt

我正在尝试执行以下操作

<div class="floatLeft">
    <xsl:attribute name="class"
                  >mainQuestionTextNoteBellowAsterisk floatLeft</xsl:attribute>
    <xsl:copy-of 
         select="php:functionString(
                    'html_entity_decode',
                    questionbody/child::node()
                 )"/>
    <xsl:text> </xsl:text>
</div>

我已将'html_entity_decode'替换为其他字符串修饰符,并按预期工作甚至编码,但当我尝试解码字符串时,我得到完全相同的字符串。有什么我想念的吗?下面是我用来处理xml的电话

$XSLTProc = new XSLTProcessor();
$XSLTProc->registerPHPFunctions();
$XSLTProc->importStyleSheet($xslDoc);

欢迎任何帮助!

由于

1 个答案:

答案 0 :(得分:0)

我无法解决这个问题,我在处理之前如何解码xml文件。