#39377 [Opn->Fbk]: Transform element ( ) incorrectly

From: Date: Wed, 08 Nov 2006 14:13:33 +0000
Subject: #39377 [Opn->Fbk]: Transform element ( ) incorrectly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-104592@lists.php.net to get a copy of this message
 ID:               39377
 Updated by:       tony2001@php.net
 Reported By:      craig at skrabacz dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         XSLT related
 Operating System: Windows XP
 PHP Version:      4.4.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip




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

[2006-11-04 13:18:53] craig at skrabacz dot com

Description:
------------
call to xslt_process() transforms non-breaking space incorrectly.  

Reproduce code:
---------------
$xslt = xslt_create();
$xmlFile = "/../data/pictures.xml";
$xslFile = "picturePage.xsl";
xslt_set_encoding($xslt, 'UTF-8');
	$parameters = array (
	  'linkKey' => $_GET['page']
	);
$transformed =  xslt_process($xslt, $xmlFile, $xslFile, NULL ,NULL,
$parameters);
if ($transformed) {
	echo $transformed;
} else {
	echo "Error Transforming pictures.xml by applying picturePage.xslt
into employee.html";
	echo "<BR>Error description " . xslt_error($xslt);
		echo "<BR>Error code  " . xslt_errno($xslt);
	}
	xslt_free($xslt);
<--------->
XSL:
<xsl:template match="picture" mode="link">
	<xsl:element name="a">
		<xsl:attribute name="class">RegLink</xsl:attribute>
		<xsl:attribute name="href">picture.html?picture=<xsl:value-of
select="../@path"/>/<xsl:value-of
select="@file"/></xsl:attribute>
		<xsl:apply-templates select="." mode="thumb"/>
	</xsl:element>&#160;
</xsl:template>



Expected result:
----------------
formatted transformation with non-breaking space between images.

Actual result:
--------------
transformation with "Â" instead of non-breaking space.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39377&edit=1


Thread (2 messages)

« previous php.bugs (#104592) next »