|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
9 + 15 = ?
Subscribe to this entry?

 [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 03:01:23 2021 UTC