|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-16 21:08 UTC] tony2001@php.net
[2005-11-17 06:52 UTC] chregu@php.net
[2005-11-17 12:28 UTC] rrichards@php.net
[2005-11-17 16:26 UTC] chregu@php.net
[2005-11-18 22:39 UTC] junkmail at eighteyes dot com
[2005-11-18 22:51 UTC] junkmail at eighteyes dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 22 17:00:01 2025 UTC |
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