xsltprocessor: identity transformation produces not-an-identity but a malformed xslt

RESOLVED DUPLICATE of bug 94270

Status

()

Core
XSLT
--
major
RESOLVED DUPLICATE of bug 94270
9 years ago
9 years ago

People

(Reporter: Grzegorz Dymarek, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; de-de) AppleWebKit/530.18 (KHTML, like Gecko) Version/4.0.1 Safari/530.18
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5

Identity transformation: http://kiwi.gostudyuk.pl/xmltest/identity.xsl:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="@*|node()">
	<xsl:copy>			
		<xsl:apply-templates select="@*|node()"/>
	</xsl:copy>			
</xsl:template>

</xsl:stylesheet>


Source XML file: http://kiwi.gostudyuk.pl/xmltest/file.xml
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:fx="factonomy.com/schema/fx8/base" 
	xmlns:sd="factonomy.com/schema/fx8/simpledoc"
	xmlns="http://www.w3.org/1999/xhtml"
	version="1.0">

    <xsl:template match="sd:article">
        ABC
    </xsl:template>

</xsl:stylesheet>

Result file:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">  <xsl:template match="sd:article">  ABC </xsl:template> </xsl:stylesheet>

Which is malformed xml file.

Reproducible: Always

Steps to Reproduce:
1. Take the given xml file (valid file!)
2. Transform it using identity transformation
3. Validate the result - it is not valid anymore!
Actual Results:  
The resulting XML is malformed! (missing namespace declaration)

Expected Results:  
The resulting XML contains all namespace declarations.
Not malformed XML, but XSLT.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: xsltprocessor: identity transformation produces not-an-identity but a malformed xml → xsltprocessor: identity transformation produces not-an-identity but a malformed xslt
Component: General → XSLT
Product: Firefox → Core
QA Contact: general → xslt
(Reporter)

Comment 2

9 years ago
Created attachment 387472 [details]
identity transformation

use it as a transformation file (xslt)
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 94270
(Reporter)

Comment 4

9 years ago
Created attachment 387473 [details]
xml file to transform with the identity transformation

please not the namespace declarations
You need to log in before you can comment on or make changes to this bug.