From:             phpsurf at ifrance dot com
Operating system: Win2K
PHP version:      5CVS-2004-04-13 (dev)
PHP Bug Type:     XSLT related
Bug description:  xsl:copy-of

Description:
------------
The <xsl:copy-of> transformation on elements called '<link>'.

This is extremely anoying for transforming RSS for example.

Reproduce code:
---------------
Here is the xml file :



<rss version="0.92">

  <channel>

    <item>

      <timestamp>1057489449</timestamp>

      <title>aaa</title>

      <link>bbb</link>

    </item>

  </channel>

</rss>



and the xslt file :



<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:output    method="html"    indent="yes"    encoding="utf-8"/>

<xsl:template match="/">

  <xsl:copy-of select="*"/>

</xsl:template>

</xsl:stylesheet>



Expected result:
----------------
<rss version="0.92">

  <channel>

    <item>

      <timestamp>1057489449</timestamp>

      <title>aaa</title>

      <link>bbb</link>

    </item>

  </channel>

</rss>

Actual result:
--------------
<rss version="0.92">

  <channel>

    <item>

      <timestamp>1057489449</timestamp>

      <title>aaa</title>

      <link>

    </item>

  </channel>

</rss>



Look at the <link> element ! it doesn't close anymore.

-- 
Edit bug report at http://bugs.php.net/?id=27981&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27981&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27981&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27981&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27981&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27981&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27981&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27981&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27981&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27981&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27981&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27981&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27981&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27981&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27981&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27981&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27981&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27981&r=float

Reply via email to