> Hi, all.
>
> I'm using the sablotron 0.44 extension from PHP 4.0.4,
> I'm having a problem when using <xsl:include>, I have
> an url say:
>
> http://somesite/xslt/foo.xsl
>
> With a xslt file (I can see it with my browser) and
> I have a xslt file where I use:
>
> <xsl:include href="http://somesite/xslt/foo.xsl" />
>
> I use xslt_process after getting an xml file and
> xslt file in strings, I get the error:
>
> Fatal error: msgtype: error in classes/class_xslt.php
> on line XX
>

If your using the basic (non-resource oriented api) try adding the following
debug code to your php file:

<?php

function xsl_error($code, $level, $errors) {
    echo "Code: $code\n<br>\n";
    echo "Level: $code\n<br>\n";
    echo "Errors: \n<br>\n";
    var_dump($errors);
}

xslt_set_error_handler("xsl_error");

// .. PHP code here

?>

If your using the advanced "resource-oriented" api, add the following:

<?php

function xsl_error($parser, $code, $level, $errors) {
    echo "Parser: $parser\n<br>\n";
    echo "Code: $code\n<br>\n";
    echo "Level: $code\n<br>\n";
    echo "Errors: \n<br>\n";
    var_dump($errors);
}

xslt_set_error_handler($parser, "xsl_error");

// .. PHP code here

?>

Let me know what the results are!

Thanks,

Sterling

Reply via email to