dowdw44426 2012-12-10 23:44
浏览 47

PHP XSLTProcessor并将数据传递给PHP函数

I need to access some XSL data from registered PHP function in XSLTProcessor. I found how to pass current node into the function.

XSL:

<xsl:value-of select="php:function('foo', node())" />

PHP:

function foo($node)
{
    # Here we go, we got DOMNode array and as a consequence - DOMDocument
    var_dump($node);
}

OK, this part works fine. Problem is in the second part: I need to pass into PHP function all XSL variables that are visible at the call point. Or, I need to obtain XSL variable value by name from PHP function somehow. And here is the problem - I can't find how to do that. May be some special XPath request? Or some special function? Or some special trick? Or something else?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 c语言链表结构体数据插入
    • ¥40 使用MATLAB解答线性代数问题
    • ¥15 COCOS的问题COCOS的问题
    • ¥15 FPGA-SRIO初始化失败
    • ¥15 MapReduce实现倒排索引失败
    • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
    • ¥15 找一位技术过硬的游戏pj程序员
    • ¥15 matlab生成电测深三层曲线模型代码
    • ¥50 随机森林与房贷信用风险模型
    • ¥50 buildozer打包kivy app失败