#43804 [Opn->Bgs]: XSLTProcessor fails to recognise dynamically created <xsl:> tags

From: Date: Thu, 10 Jan 2008 09:20:57 +0000
Subject: #43804 [Opn->Bgs]: XSLTProcessor fails to recognise dynamically created <xsl:> tags
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121171@lists.php.net to get a copy of this message
ID: 43804 Updated by: chregu@php.net Reported By: shangxiao@php.net -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: Linux PHP Version: 5.2.5 New Comment: You have to use createElementNS instead of createElement for adding namespaced Elements via DOM Previous Comments: ------------------------------------------------------------------------ [2008-01-10 08:52:10] shangxiao@php.net Description: ------------ I've got a piece of code where I needed to dynamically create some xsl commands in my xsl stylesheet using the DOM api, but when I pass the DOMDocument to XSLTProcessor, it fails to recognise these commands. However, if the DOMDocument is exported to a string and then www.dictioloaded into a different DOMDocument, the result is correct. The function normalizeDocument() does not seem to have any effect. The test files may be located at: http://www.assessments.com.au/xsl_bug/ Reproduce code: --------------- http://www.assessments.com.au/xsl_bug/test.phps Expected result: ---------------- <html xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-27T05:06:00"><body>This text should appear!<body></html> Actual result: -------------- <html xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-27T05:06:00"><body><xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="my:test"></xsl:value-of></body></html> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43804&edit=1

« previous php.bugs (#121171) next »