From:             junkmail at eighteyes dot com
Operating system: Windows 2000
PHP version:      5.0.5
PHP Bug Type:     XSLT related
Bug description:  setParameter not set if value contains single quote character 
' on Windows

Description:
------------
This error ocurs when the value of the parameter set with setParameter
contains:
- an xml/html tag with an attribute
- a single quote character in the tag's value

The parameter value will not be set. The function doesn't return FALSE
either, making you think the value was successfully set. This only happens
on my Windows setup, not in Linux.

If the tag doesn't contain an attribute, or the tag's value doesn't
contain a single quote, the error does not occur.

Reproduce code:
---------------
$xml = new DOMDocument();
$xml->loadXML('<root></root>');

$xsl=new DOMDocument();
$xsl->loadXML('<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";><xsl:param
name="parameter">ERROR</xsl:param><xsl:template match="/"><xsl:value-of
select="$parameter" /></xsl:template></xsl:stylesheet>');

$list = <<<END
<p id="34">/CONCEPTS/God/Krishna's Incarnations/</p>
END;

$xslt = new XSLTProcessor();
$xslt->setParameter('', 'parameter', $list);
$xslt->importStyleSheet($xsl);
print $xslt->transformToXML($xml);

Expected result:
----------------
<p id="34">parameter's value</p>


Actual result:
--------------
ERROR

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

Reply via email to