ID:               43299
 Updated by:       [EMAIL PROTECTED]
 Reported By:      maximchick at gmail dot com
 Status:           Bogus
 Bug Type:         XSLT related
 Operating System: Gentoo Linux
 PHP Version:      5.2.5
 New Comment:

There happens to be a libxslt bug occurring here under certain
circumstances, so this report still bogus and being handled there.


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

[2007-11-14 20:15:52] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

still bogus and you even explain and demonstrate why.
$xml (the data to be transformed) != $xsl (the stylesheet you ended up
modifying)

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

[2007-11-14 20:03:32] maximchick at gmail dot com

Description:
------------
Take a look on a bug: http://bugs.php.net/bug.php?id=43289
which was incorrectly marked as "bogus"

I'm talking exactly what i'm talking. Please double check what the
function document('') should do. 

take attention to the line:

$xpath->query('//xsl:stylesheet')->item(0)->appendChild($xpath->query('/
/xsl:template')->item(0)->cloneNode(true));

which clones xsl:template node, so we have two <xsl:template match="/">
nodes in result template, and you're right only one will match, BUT this
template parses ITSELF:

<xsl:for-each select="document('')//xsl:*">

You can comment line:
//$xml->load('/tmp/template.xsl');

to have a little understanding what i'm talking about.

So, it should find TWO <xsl:template match="/"/> nodes, and output
should be:

xsl:stylesheet
xsl:output
xsl:template
xsl:for-each
xsl:value-of
xsl:text
xsl:template
xsl:for-each
xsl:value-of
xsl:text

And i surprize you: when the template DOM initialized by
DOMDocument::loadXML() instead of DOMDocument::load() it gave the
expected output.



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


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

Reply via email to