--TEST-- Request #30622 (XSLT: xsltProcessor->setParameter() cannot set namespace URI) --EXTENSIONS-- xsl --CREDITS-- Based on a test by --FILE-- loadXML(''); $xslDom = new DOMDocument(); $xslDom->loadXML(<<<'XML' Namespace "NULL": , Namespace "http://www.php.net/test": XML); $proc = new XSLTProcessor(); $proc->importStyleSheet($xslDom); echo "--- Set both empty and non-empty namespace ---\n"; $proc->setParameter("", "foo", "SET1"); $proc->setParameter("http://www.php.net/test", "foo", "SET2"); var_dump($proc->getParameter("", "foo")); var_dump($proc->getParameter("http://www.php.net/test", "foo")); print $proc->transformToXML($xmlDom); echo "--- Remove empty namespace entry ---\n"; var_dump($proc->removeParameter("", "foo")); var_dump($proc->getParameter("", "foo")); var_dump($proc->getParameter("http://www.php.net/test", "foo")); print $proc->transformToXML($xmlDom); echo "--- Remove non-empty namespace entry ---\n"; var_dump($proc->removeParameter("http://www.php.net/test", "foo")); var_dump($proc->getParameter("", "foo")); var_dump($proc->getParameter("http://www.php.net/test", "foo")); print $proc->transformToXML($xmlDom); echo "--- Set via array ---\n"; $proc->setParameter("", ["foo" => "SET1"]); $proc->setParameter("http://www.php.net/test", ["foo" => "SET2"]); print $proc->transformToXML($xmlDom); ?> --EXPECT-- --- Set both empty and non-empty namespace --- string(4) "SET1" string(4) "SET2" Namespace "NULL": SET1, Namespace "http://www.php.net/test": SET2 --- Remove empty namespace entry --- bool(true) bool(false) string(4) "SET2" Namespace "NULL": EMPTY, Namespace "http://www.php.net/test": SET2 --- Remove non-empty namespace entry --- bool(true) bool(false) bool(false) Namespace "NULL": EMPTY, Namespace "http://www.php.net/test": EMPTY --- Set via array --- Namespace "NULL": SET1, Namespace "http://www.php.net/test": SET2