php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #35589 libxslt minimum version requirement on XSL documentation page
Submitted: 2005-12-07 19:12 UTC Modified: 2006-09-08 16:41 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: info at intelligentstreaming dot com Assigned: bjori (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
 [2005-12-07 19:12 UTC] info at intelligentstreaming dot com
Description:
------------
http://www.php.net/xsl states that the minimum version of libxslt required for the XSL extension is 1.0.18. When using libxslt 1.0.23 and "php:function" in an XPath expression in an XSL document to call a function which returns a nodeset (DOMDocument), any attempt to use <xsl:apply-templates select="$returnednodeset" /> to parse the returned nodeset causes the XSL transformation to fail (XSLTProcessor::transformToXML() returns false). Other forms of use of the returned nodeset such as setting an <xsl:variable>, passing it to another template with <xsl:call-template> or outputting some of its contents with <xsl:value-of> work correctly.

Upgrading to libxslt 1.0.33 solves the problem and <xsl:apply-templates> works as expected with the returned nodeset.

Suggest noting in the documentation that libxslt < 1.0.33 does not provide complete functionality.

Reproduce code:
---------------
XML: http://www.intelligentstreaming.com/EscapedXML.xml
XSL: http://www.intelligentstreaming.com/EscapedXML.xsl

PHP function 'xmldecode':

function xmldecode($string)
{
    return DOMDocument::loadXML($string);
}


Expected result:
----------------
<?xml version="1.0"?>
<html><head><title>Embedded XML test</title></head><body>
    
        NORMAL TEXT: This is some normal text<br/>
    
        TITLE: News article title<br/>
        TOPIC: The topic<br/>
        ARTICLE: This is the text of the news article.<br/>
    
        NORMAL TEXT: This is some more normal text<br/>
</body></html>


Actual result:
--------------
libxslt-1.0.23:

No output.

libxslt-1.0.33:

Expected result as shown above.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-08 16:41 UTC] bjori@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Nov 22 04:00:01 2025 UTC