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($testQ uery);
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?
<?php
$artId = $_GET['artId'];
$testQuery= '{
for $a in document("news.xml")//NEWS
where $a/@ID='.$artId.'
return {$a}
}';
$query=stripslashes($testQ
include_once("class_xquery
$xq=new XqueryLite();
$xml=$xq->evaluate_xqueryl
//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
The error occurs when I call the xslt_process() function in the script. Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.