// changing output method to html
$xp = new domxpath($xsl);
$res = $xp->query("/xsl:stylesheet/xsl:output/@method");
-if (count($res) != 1) {
+if ($res->length != 1) {
print "No or more than one xsl:output/@method found";
exit;
}
-$res[0]->value = "html";
+$res->item(0)->value = "html";
$proc->importStylesheet($xsl);
print "\n";
print $proc->transformToXml($dom);
include("prepare.inc");
$xp = new domxpath($xsl);
$res = $xp->query("/xsl:stylesheet/xsl:output/@encoding");
-if (count($res) != 1) {
+if ($res->length != 1) {
print "No or more than one xsl:output/@encoding found";
exit;
}
-$res[0]->value = "utf-8";
+$res->item(0)->value = "utf-8";
$proc->importStylesheet($xsl);
print "\n";
print $proc->transformToXml($dom);
include("prepare.inc");
$xp = new domxpath($xsl);
$res = $xp->query("/xsl:stylesheet/xsl:output/@indent");
-if (count($res) != 1) {
+if ($res->length != 1) {
print "No or more than one xsl:output/@indent found";
exit;
}
-$res[0]->value = "yes";
+$res->item(0)->value = "yes";
$proc->importStylesheet($xsl);
print "\n";
print $proc->transformToXml($dom);
}
$xp = new domxpath($xsl);
$res = $xp->query("/xsl:stylesheet/xsl:include/@href");
-$res[0]->value = "compress.zlib://".dirname(__FILE__)."/xslt.xsl.gz";
+$res->item(0)->value = "compress.zlib://".dirname(__FILE__)."/xslt.xsl.gz";
$proc->importStylesheet($xsl);
print "\n";
print $proc->transformToXML($dom);