You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/10/22 20:52:21 UTC
DO NOT REPLY [Bug 4344] New: -
transformation with deleting document-element
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4344>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4344
transformation with deleting document-element
Summary: transformation with deleting document-element
Product: XalanJ2
Version: 2.2.x
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: Xalan
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: joerg.heinicke@gmx.de
I found a bug in Xalan, when doing a transformation, which only deletes the
document element.
test-XML:
<?xml version="1.0" encoding="UTF-8"?>
<test test="test">
<test2 test2="test2">
<test3 test3="test3"/>
</test2>
</test>
test-XSL:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output indent="yes"/>
<xsl:template match="test">
<xsl:copy-of select="*|@*"/>
</xsl:template>
</xsl:stylesheet>
test-output:
<?xml version="1.0" encoding="UTF-8"?>
<test2 xmlns:xml="http://www.w3.org/XML/1998/namespace" test="test"
test2="test2">
<test3 test3="test3"/>
</test2>
The stylesheet should cause an error or ignore the attribute 'test' silently,
but not add it to the new document-element 'test2'. Also the namespace-node
xmlns:xml="..." is not needed.
I used Xalan 2.2.D11 for the test. Changing in the stylesheet from copy-of
select="*|@*" to select="*" works fine of course. Sorry, I don't know the
correct component.
Joerg