php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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="http://www.w3.org/1999/XSL/Transform">
		<xsl:attribute name="version">1.0</xsl:attribute>
</xsl:element>

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

Thanks !

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-28 07:03 UTC] chregu@php.net
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="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />
<xsl:template match="/">
	<xsl:element name="xsl:stylesheet" namespace="http://www.w3.org/1999/XSL/Transform">
		<xsl:attribute name="version">1.0</xsl:attribute>
	</xsl:element>
</xsl:template>
</xsl:stylesheet>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC