ID:               39377
 Updated by:       [EMAIL PROTECTED]
 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

Reply via email to