Issue Details (XML | Word | Printable)

Key: XALANJ-2305
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Critical Critical
Assignee: Unassigned
Reporter: Mukul Gandhi
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
XalanJ2

problem with xsl:copy-of while copying namespace nodes

Created: 08/Jul/06 08:48 PM   Updated: 14/Aug/06 01:24 PM
Return to search
Component/s: Xalan
Affects Version/s: 2.7
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Xalan-J 2.7.0, JDK 1.5.0_04, Win XP Prof
Issue Links:
Duplicate
 

Resolution Date: 14/Aug/06 01:24 PM


 Description  « Hide
There seems to be some problem with xsl:copy-of while copying namespace nodes..

Please consider this example.

Source XML:

<?xml version="1.0" ?>
<!-- this is a comment -->
<?pqr x="do-something" ?>
<author xmlns:a="xyz" xmlns:b="pqr">
 <person a:age="30"> by <FirstName>Jane</FirstName>
 <LastName>Doe</LastName>,
 </person>
</author>

XSLT Stylesheet:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" indent="yes" />
  
<xsl:template match="/author">
 <test>
   <xsl:copy-of select="namespace::*" />
 </test>
</xsl:template>
   
</xsl:stylesheet>

The right output of transformation should be:

<?xml version="1.0" encoding="UTF-8"?>
<test xmlns:a="xyz" xmlns:b="pqr"/>

But Xalan-J 2.7.0 produces output..

<?xml version="1.0" encoding="UTF-8"?>
<test/>

I think that this is a non-conformance according to XSLT 1.0 spec.

The relevant section of the spec is:
Erratum E25 at
http://www.w3.org/1999/11/REC-xslt-19991116-errata/.

Regards,
Mukul

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Henry Zongaro made changes - 14/Aug/06 01:24 PM
Field Original Value New Value
Resolution Duplicate [ 3 ]
Status Open [ 1 ] Resolved [ 5 ]
Henry Zongaro made changes - 14/Aug/06 01:24 PM
Link This issue duplicates XALANJ-1959 [ XALANJ-1959 ]