#44971 [NEW]: XSLT does does convert "<" into "<" without disable-output-escaping
From: webermax2004 at yahoo dot fr
Operating system: Windows XP Pro
PHP version: 5.2CVS-2008-05-12 (CVS)
PHP Bug Type: XSLT related
Bug description: XSLT does does convert "<" into "<" without
disable-output-escaping
Description:
------------
Here is a little XML file :
<?xml version="1.0" encoding="iso-8859-1"?>
<input><</input>
and here is a little XSL stylesheet :
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="input">
<output>
<xsl:value-of select="." />
</output>
</xsl:template>
</xsl:stylesheet>
and here is a little PHP code which transforms the XML document using the
XSL stylesheet and displays the nodeValue of the documentElement :
<html>
<body>
<?php
$xmlDocument = new DOMDocument ();
$xmlDocument->load ("test.xml");
$xmlStylesheet = new DOMDocument ();
$xmlStylesheet->load ("test.xsl");
$xslTransfom = new XSLTProcessor ();
$xslTransfom->importStylesheet ($xmlStylesheet);
$xmlDocument = $xslTransfom->transformToDoc ($xmlDocument);
echo ($xmlDocument->documentElement->firstChild->nodeValue);
?>
</body>
</html>
My surprise : the output is "<" instead of "<", which means that the
entity has been converted. This should not have happened unless I had
specified the disable-output-escaping attribute in the <xsl:value-of>,
right ? By the way, if I display the contents of the document after the
transformation :
echo ($xmlDocument->saveXML ());
then the "<" is not converted :
<output><</output>
Doesn't it sound like a problem ?
--
Edit bug report at http://bugs.php.net/?id=44971&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44971&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44971&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44971&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44971&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44971&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44971&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44971&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44971&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44971&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44971&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44971&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44971&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44971&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44971&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44971&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44971&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44971&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44971&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44971&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44971&r=mysqlcfg
Thread (2 messages)
- webermax2004 at yahoo dot fr