[prev in list] [next in list] [prev in thread] [next in thread]
List: xalan-dev
Subject: [jira] [Created] (XALANC-739) Unexpected output when using identity transformation
From: "Jeff Cohen (JIRA)" <jira () apache ! org>
Date: 2012-12-27 21:12:13
Message-ID: JIRA.12625362.1356642686634.56788.1356642733045 () arcas
[Download RAW message or body]
Jeff Cohen created XALANC-739:
---------------------------------
Summary: Unexpected output when using identity transformation
Key: XALANC-739
URL: https://issues.apache.org/jira/browse/XALANC-739
Project: XalanC
Issue Type: Bug
Components: XalanC
Affects Versions: 1.11
Environment: Linux
Reporter: Jeff Cohen
Assignee: Steven J. Hathaway
Input XSL
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
xmlns:exslt="http://exslt.org/common"> <xsl:output method="xml" indent="yes" />
<!-- ********************************************* -->
<xsl:template match="/body/div//a" mode="test-mode">
<xsl:copy>
<xsl:attribute name="new_attr">1</xsl:attribute>
<xsl:apply-templates select="@*|node()" mode="test-mode" />
</xsl:copy>
</xsl:template>
<xsl:template match="node()|@*" mode="test-mode">
<xsl:copy>
<xsl:apply-templates select="@*|node()" mode="test-mode" />
</xsl:copy>
</xsl:template>
<!-- ********************************************* -->
<xsl:template match="/">
<xsl:copy>
<xsl:apply-templates select="." mode="test-mode" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Input XML
<body>
<div>
<div>
<a href="abc.pdf" >Testing</a>
</div>
</div>
</body>
Expected Output:
<?xml version="1.0"?>
<body>
<div>
<div>
<a new_attr="1" href="abc.pdf">Testing</a>
</div>
</div>
</body>
Actual Output:
<?xml version="1.0" encoding="UTF-8"?>
<body>
<div>
<div>
<a href="abc.pdf">Testing</a>
</div>
</div>
</body>
I receive the expected results when I run this transformation through xsltproc on \
Linux.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic