#44489 [NEW]: libxslt 1.1.22 fails to compile XSL
| From: | daniel dot oconnor at gmail dot com | Date: | Thu, 20 Mar 2008 13:23:41 +0000 |
| Subject: | #44489 [NEW]: libxslt 1.1.22 fails to compile XSL | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-123505@lists.php.net to get a copy of this message | ||
From: daniel dot oconnor at gmail dot com
Operating system: Windows
PHP version: 5.3CVS-2008-03-20 (snap)
PHP Bug Type: XSLT related
Bug description: libxslt 1.1.22 fails to compile XSL
Description:
------------
I'm pretty sure this is an upstream libxsl bug itself, rather than a PHP
bug; but...
xsl
XSL => enabled
libxslt Version => 1.1.22
libxslt compiled against libxml Version => 2.6.31
EXSLT => enabled
libexslt Version => 0.8.13
Transforming
http://www.w3.org/2001/sw/grddl-wg/td/hl7-sample
with
http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt
fails to compile
"PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file
http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt
line 179 element
type in G:\work\xml_grddl\tests\bug-h17.php on line 13"
This does function correctly with xsltproc from the command line;
Using libxml 20630, libxslt 10122 and libexslt 813
Reproduce code:
---------------
<?php
/*
phpinfo();
xsl
XSL => enabled
libxslt Version => 1.1.22
libxslt compiled against libxml Version => 2.6.31
EXSLT => enabled
libexslt Version => 0.8.13
*/
$xsl = new DOMDocument();
$xsl->load('http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt');
$xml = new DOMDocument();
$xml->load('http://www.w3.org/2001/sw/grddl-wg/td/hl7-sample.xml');
$proc = new XSLTProcessor();
$proc->importStyleSheet($xsl);
$result = $proc->transformToXML($xml);
var_dump($result);
/*
---------- PHP ----------
phpinfo()
PHP Version => 5.2.6-dev
bool(false)
PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file
http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt
line 179 element
type in G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): Attribute 'resource': The
content is expected to be a single text node when compiling an AVT. in
G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file
http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt
line 200 element
type in G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): Attribute 'resource': The
content is expected to be a single text node when compiling an AVT. in
G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file
http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt
line 208 element
type in G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): Attribute 'resource': The
content is expected to be a single text node when compiling an AVT. in
G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::transformToXml(): No stylesheet associated to
this object in G:\work\xml_grddl\tests\bug-h17.php on line 15
*/
/*
Works with...
G:\libxml2-2.6.30+.win32\bin>xsltproc.exe
http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt
http://www.w3.org/2001/sw/grddl-wg/td/hl7-sample.
xml
xsltproc --version
Using libxml 20630, libxslt 10122 and libexslt 813
xsltproc was compiled against libxml 20630, libxslt 10122 and libexslt
813
libxslt 10122 was compiled against libxml 20630
libexslt 813 was compiled against libxml 20630
*/
/*
G:\work\xml_grddl\scripts>php -v
PHP 5.2.6RC3-dev (cli) (built: Mar 20 2008 08:04:52)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
G:\work\xml_grddl\scripts>
*/
Expected result:
----------------
XML transformation
Actual result:
--------------
bool(false)
PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file
http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt
line 179 element
type in G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): Attribute 'resource': The
content is expected to be a single text node when compiling an AVT. in
G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file
http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt
line 200 element
type in G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): Attribute 'resource': The
content is expected to be a single text node when compiling an AVT. in
G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): compilation error: file
http://www.w3.org/2001/sw/grddl-wg/td/hl7-rim-to-pomr.xslt
line 208 element
type in G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::importStylesheet(): Attribute 'resource': The
content is expected to be a single text node when compiling an AVT. in
G:\work\xml_grddl\tests\bug-h17.php on line 13
PHP Warning: XSLTProcessor::transformToXml(): No stylesheet associated to
this object in G:\work\xml_grddl\tests\bug-h17.php on line 15
--
Edit bug report at http://bugs.php.net/?id=44489&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44489&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44489&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44489&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44489&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44489&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44489&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44489&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44489&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44489&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44489&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44489&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44489&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44489&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44489&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44489&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44489&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44489&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44489&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44489&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44489&r=mysqlcfg