|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20675 namespace attribute for element stylesheet
Submitted: 2002-11-27 09:13 UTC Modified: 2002-11-28 07:03 UTC
From: erwan at barzhoneg dot com Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 4.3.0RC1 OS: win2k/Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: erwan at barzhoneg dot com
New email:
PHP Version: OS:


 [2002-11-27 09:13 UTC] erwan at barzhoneg dot com
When I generate a stylesheet from a xsl transformation (xml+xsl => xsl), I am willing to apply the namespace attribute.

in xsl, this writes :
	<xsl:element name="xsl:stylesheet" namespace="">
		<xsl:attribute name="version">1.0</xsl:attribute>

but PHP xslt transformer applies the version number all right, and forgets the namespace attribute.

Thanks !


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-28 07:03 UTC]
Not a PHP Bug.

Either you wrote your xslt-stylesheet in the wrong way (be sure to set output="xml" otherwise namespaces are discarded) or your xslt-processor (Sablotron? libxslt?) has a bug

The following works just fine with Sablotron 0.96 and libxslt 1.0.21

<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:output method="xml" />
<xsl:template match="/">
	<xsl:element name="xsl:stylesheet" namespace="">
		<xsl:attribute name="version">1.0</xsl:attribute>
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jun 19 00:01:23 2021 UTC