note 74857 added to function.xsl-xsltprocessor-set-parameter
| From: | OrionI at osu1 dot php dot net | Date: | Tue, 01 May 2007 03:46:49 +0000 |
| Subject: | note 74857 added to function.xsl-xsltprocessor-set-parameter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126003@lists.php.net to get a copy of this message | ||
I've been trying to pass in a DOMDocument object as a parameter so I can stuff a bunch of data
into XML nodes, but it appears that this function is not capable of it. I was hoping to get it to
work like it does in the .NET 2.0 framework. (See http://msdn2.microsoft.com/en-us/library/
system.xml.xsl.xsltargumentlist.addparam.aspx)
But after looking at the PHP 5.2.1 source code, /php-5.2.1/ext/xsl/xsltprocessor.c line 604-650, it
appears that it's not possible to do so in PHP even though it appears that libxslt supports it
(see http://xmlsoft.org/XSLT/html/libxslt-variables.html
#xsltParseGlobalParam)
In fact, if the parameters aren't exactly what's expected, you'll always get a
warning like this:
Wrong parameter count for XSLTProcessor::setParameter()
----
Server IP: 216.235.15.211
Probable Submitter: 64.114.134.120 (proxied: 1.1 ISASRV)
----
Manual Page -- http://www.php.net/manual/en/function.xsl-xsltprocessor-set-parameter.php
Edit -- https://master.php.net/note/edit/74857
Del: integrated -- https://master.php.net/note/delete/74857/integrated
Del: useless -- https://master.php.net/note/delete/74857/useless
Del: bad code -- https://master.php.net/note/delete/74857/bad+code
Del: spam -- https://master.php.net/note/delete/74857/spam
Del: non-english -- https://master.php.net/note/delete/74857/non-english
Del: in docs -- https://master.php.net/note/delete/74857/in+docs
Del: other reasons-- https://master.php.net/note/delete/74857
Reject -- https://master.php.net/note/reject/74857
Search -- https://master.php.net/manage/user-notes.php