Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #35247 : setParameter not set if value contains single quote character ' on Windows
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 9th June 13:12
tony2001
External User
 
Posts: 1
Default #35247 : setParameter not set if value contains single quote character ' on Windows



ID: 35247
Updated by: tony2001@php.net
Reported By: junkmail at eighteyes dot com
-Status: Open
+Status: Feedback
Bug Type: XSLT related
Operating System: Windows 2000
PHP Version: 5.0.5
New Comment:

Please try using this CVS snapshot:

http://snaps.php.net/php5-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5-win32-latest.zip


Previous Comments:
------------------------------------------------------------------------

[2005-11-16 21:06:28] junkmail at eighteyes dot com

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 DOMDo***ent();
$xml->loadXML('<root></root>');

$xsl=new DOMDo***ent();
$xsl->loadXML('<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xslaram
name="parameter">ERROR</xslaram><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 this bug report at http://bugs.php.net/?id=35247&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666