php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39377 Transform element ( ) incorrectly
Submitted: 2006-11-04 13:18 UTC Modified: 2006-11-16 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: craig at skrabacz dot com Assigned:
Status: No Feedback Package: XSLT related
PHP Version: 4.4.4 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: craig at skrabacz dot com
New email:
PHP Version: OS:

 

 [2006-11-04 13:18 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-08 14:13 UTC] tony2001@php.net
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


 [2006-11-16 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 01:01:28 2024 UTC