View Single Post
Old 07-30-2009, 07:44 PM   PM User | #4
rizzo89
New Coder

 
Join Date: Nov 2008
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
rizzo89 is an unknown quantity at this point
Thanks for the tip, I think that put me on the right track. Still not working though. I have verified the variable is set to the correct value while processing.... But I get this error:

Quote:
Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: runtime error: file /home/xxxx/public_html/xxxx/stylesheets/suppliers.xsl line 39 element param in /home/xxxx/public_html/xxxx/index.php on line 534

Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: Unexpected XSLT element 'param'. in /home/xxxx/public_html/xxxx/index.php on line 534

Code:
<xsl:param name="selectedOption" />
Code:
<h3>
<xsl:value-of select="$selectedOption" />
</h3>
PHP Code:
$xslDoc = new DOMDocument();
$xslDoc->load($_SERVER['DOCUMENT_ROOT'] . '/stylesheets/' $xslStyle '.xsl');
$proc = new XSLTProcessor();
$proc->setParameter('''selectedOption'$productType);
$proc->importStylesheet($xslDoc);


if (
$newDoc == null)
{
    echo 
$proc->transformToXML($doc);

}
else
{
    echo 
$proc->transformToXML($newDoc);

rizzo89 is offline   Reply With Quote