You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Jeff Cohen (JIRA)" <ji...@apache.org> on 2012/12/27 22:16:13 UTC
[jira] [Updated] (XALANC-739) Unexpected output when using identity
transformation
[ https://issues.apache.org/jira/browse/XALANC-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeff Cohen updated XALANC-739:
------------------------------
Attachment: test.xsl
test.html
test.cpp
These demonstrate the issue. The test app accepts 1 parame: test.xsl
> 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
> Labels: xslt
> Attachments: test.cpp, test.html, test.xsl
>
>
> 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