Link to home
Start Free TrialLog in
Avatar of mcnally72
mcnally72

asked on

PHP XQueryLite problem

I'm having a problem with a PHP script that utilizes the XQueryLite object.  Here's the script source:

<?php

$artId = $_GET['artId'];

$testQuery= '{
     for $a in document("news.xml")//NEWS/ARTICLE
     where $a/@ID='.$artId.'
     return {$a}
}';

$query=stripslashes($testQuery);
include_once("class_xquery_lite.php");
$xq=new XqueryLite();
$xml=$xq->evaluate_xqueryl($query);
//print($result);
//$xml = get_xml_from_datasource();

$arguments = array(
  '/_xml' => $xml
);

$xp = xslt_create();
$result = xslt_process($xp, 'arg:/_xml', 'article.xsl',
                       NULL, $arguments);
echo $result;
xslt_free($xp);
?>


And here's the error XQueryLite is returning:

Warning: dump_node(): Object has to be a DomDocument Node in /u/web/wwwedc/class_xquery_lite.php on line 187

The error occurs when I call the xslt_process() function in the script.  Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of hunterkillerdog
hunterkillerdog

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial