#30622 [Opn->Sus]: xsltProcessor->setParameter() cannot set namespace URI
| From: | chregu@php.net | Date: | Sun, 31 Oct 2004 07:52:42 +0000 |
| Subject: | #30622 [Opn->Sus]: xsltProcessor->setParameter() cannot set namespace URI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-68516@lists.php.net to get a copy of this message | ||
ID: 30622
Updated by: chregu@php.net
Reported By: ishikawa at arielworks dot com
-Status: Open
+Status: Suspended
Bug Type: XSLT related
Operating System: Windows XP Pro SP1
PHP Version: 5.0.2
New Comment:
Yes, the namespace parameter is not implemented yet...
We know that, but noone found the time to implement it until know
Previous Comments:
------------------------------------------------------------------------
[2004-10-30 19:13:36] ishikawa at arielworks dot com
Description:
------------
xsltProcessor->setParameter() ignores its first parameter "namespace
URI" and set NULL to namespace.
Reproduce code:
---------------
$xmlStr = '<?xml version="1.0" encoding="UTF-8"?><root/>';
$xmlDom = new DomDocument();
$xmlDom->loadXML($xmlStr);
$xslDom = new DomDocument();
$xslDom->load("./testcase.xsl");
$proc = new xsltProcessor();
$proc->importStyleSheet($xslDom);
/* set a parameter WITH namespace */
$proc->setParameter("http://www.php.net/test", "foo",
"SET");
print $proc->transformToXML($xmlDom);
---- testcase.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:test="http://www.php.net/test">
<xsl:param name="foo" select="'EMPTY'"/>
<xsl:param name="test:foo" select="'EMPTY'"/>
<xsl:template match="/root">
<xsl:text>Namespace "NULL": </xsl:text>
<xsl:value-of select="$foo"/>
<xsl:text>, Namespace "http://www.php.net/test": </xsl:text>
<xsl:value-of select="$test:foo"/>
</xsl:template>
</xsl:stylesheet>
Expected result:
----------------
Namespace "NULL": EMPTY, Namespace "http://www.php.net/test": SET
Actual result:
--------------
Namespace "NULL": SET, Namespace "http://www.php.net/test": EMPTY
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30622&edit=1