From:             info at intelligentstreaming dot com
Operating system: Linux
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  libxslt minimum version requirement on XSL documentation page

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.


-- 
Edit bug report at http://bugs.php.net/?id=35589&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35589&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35589&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35589&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35589&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35589&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35589&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35589&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35589&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35589&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35589&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35589&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35589&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35589&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35589&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35589&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35589&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35589&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35589&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35589&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35589&r=mysqlcfg

Reply via email to