Project

Profile

Help

Bug #5861

closed

xsl:copy-of copy-namespaces="no" fails with various tree models

Added by Michael Kay about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2023-01-27
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, 11, 12, trunk
Fix Committed on Branch:
10, 11, 12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

New unit test added to ObjectModelTests.java to test xsl:copy-of with assorted tree models.

The test with copy-namespaces="no" is crashing with the Linked Tree model. The test was prompted by bug #5859 (using the DOM model) and the failure will probably occur with any tree model that uses the generic Navigator.copy() method.

Failure symptoms in 12.0:

java.lang.IllegalStateException: Prefix p has not been declared
	at net.sf.saxon.event.RegularSequenceChecker.startElement(RegularSequenceChecker.java:361)
	at net.sf.saxon.event.ComplexContentOutputter.startElement(ComplexContentOutputter.java:535)

The problem is that Navigator.copy() (with copy-namespaces="no") invokes the 6-argument ComplexContentOutputter.startElement() method with an empty namespace map; this method does not do namespace fixup, so the namespaces that are actually used in the element and attribute names do not get declared.

Please register to edit this issue

Also available in: Atom PDF