From: [EMAIL PROTECTED]
Operating system: Linux, 2.4.18, ALTLinux (Mandrak
PHP version: 4.0CVS-2002-05-25
PHP Bug Type: DOM XML related
Bug description: domxml_xslt_process - Warning = Fatal Error
I try using domxml extension's XSLT processor. But I don't succeed in it. I
get a warning like this:
domxml_xslt_process(): underlying object missing in
/home/mk/www/tests/xslt/xslt_test2.php on line 6
I would like to note, that this transformation goes fine with xsltproc
--novalid routine.
phpinfo() says:
===============
DOM/XML enabled
DOM/XML API Version 20020516
libxml Version 2.4.21
HTML Support enabled
XPath Support enabled
XPointer Support enabled
DOM/XSLT enabled
libxslt Version 1.0.17
DOM/EXSLT enabled
libexslt Version 1.0.17
XML file
<?xml version="1.0"?>
<expense-report>
<total month="Jan">20 000, 41</total>
<total month="Feb">22 020, 00</total>
<total month="Mar">30 200, 44</total>
<total month="Apr">29 000, 44</total>
<total month="May">22 200, 44</total>
</expense-report>
XSLT file
-----
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="utf-8" version="1.0"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="DTD/xhtml1-strict.dtd" omit-xml-declaration="no"
indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Expense report - TEST</title>
</head>
<body>
<p><h3>Expenses 01/2002 - 05/2002, in USD</h3></p>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="total">
<p><h5><xsl:value-of select="@month"/> of 2002: <u><xsl:value-of
select="."/></u></h5></p>
</xsl:template>
</xsl:stylesheet>
PHP script
----------
<?php
$xslt =
domxml_xslt_stylesheet_file("/home/mk/www/tests/xslt/test-2.3-1a.xsl");
$doc =
domxml_open_file("/home/mk/www/tests/xslt/test-2.3-1.xml");
$newDoc = domxml_xslt_process($xslt, $doc);
print($newDoc->dump_mem());
?>
--
Edit bug report at http://bugs.php.net/?id=17425&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17425&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17425&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17425&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17425&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17425&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17425&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17425&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17425&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17425&r=globals