Jump to content

XSL extension


bonekrusher

Recommended Posts

thanks - I read the link. I copied my php -.dll files to the windows system dir.

 

I get the same error:

 

Fatal error: Call to undefined function xslt_create()

 

Here is my code:

 

function xml2html($xmldata, $xsl)
{
    /* $xmldata -> your XML */
    /* $xsl -> XSLT file */

    $path = 'include';
    $arguments = array('/_xml' => $xmldata);
    $xsltproc = xslt_create();
    xslt_set_encoding($xsltproc, 'ISO-8859-1');
    $html =
        xslt_process($xsltproc, 'arg:/_xml', "$path/$xsl", NULL, $arguments);

    if (empty($html)) {
       die('XSLT processing error: '. xslt_error($xsltproc));
    }
    xslt_free($xsltproc);
    return $html;
}

 

Thanks for the help.

 

Link to comment
https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635898
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.