#49820 [Opn]: XSLTProcessor returns Error at xsl:variable with comment inside

From: Date: Sat, 10 Oct 2009 11:54:47 +0000
Subject: #49820 [Opn]: XSLTProcessor returns Error at xsl:variable with comment inside
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-143438@lists.php.net to get a copy of this message
ID: 49820 Updated by: Sjoerd@php.net Reported By: felixsigl at gmail dot com Status: Open Bug Type: XSLT related Operating System: Windows PHP Version: 5.3.0 New Comment: Thank you for your bug report. Can you also reproduce it if you remove the whitespace between the variable tags? In your example, the variable element would have a text child node with some whitespace in it. Technically, this is not allowed since the variable tag should have no content at all. Previous Comments: ------------------------------------------------------------------------ [2009-10-09 13:03:40] felixsigl at gmail dot com Description: ------------ I have a lot of XSL files which i want to process with the libxml XSLTProcessor. But the XSLTProcessor returns Error at xsl:variable with a comment inside. I don´t know exactly if this is a bug but i think so. I know that i should use either a select attribute or child nodes in the variable to define the variable. but shouldn´t comments be ignored in that way? Reproduce code: --------------- the variable in the xsl file: doesnt work!: <xsl:variable select="1" name="var" > <!-- comment --> </xsl:variable> works: <xsl:variable select="1" name="var" /> works too: <xsl:variable name="var" > <!-- comment --> </xsl:variable> Expected result: ---------------- transformed XML Actual result: -------------- Error 1: compilation error: file file:///C:/Programme/xampp/test01.xsl line 4 element variable Line: 0 Column: 0 Error 1: XSLT-variable: The must be no child nodes, since the attribute 'select' was specified. Line: 0 Column: 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49820&edit=1

« previous php.bugs (#143438) next »