Bug #2209
closedNamespace Fixup doesn't work for default namespace when input is TinyTree and result is TinyBuilder and
100%
Description
Namespace Fixup for xsl:copy-of doesn't work for children with no namespace prefix
when input is TinyTree DocumentInfo and output is TinyBuilder.
It works when either input is W3C DOM or output is DomResult.
See provided CopyXSLTest and test_output.txt
PS.
CopyXSLTest contains plenty of code needed to convert from TinyTree to/from other source types.
Is there easier way to do iy? or is it possible to include these util methods to Saxon itself?
Files
Updated by Michael Kay about 10 years ago
- Assignee set to Michael Kay
- Priority changed from High to Normal
I confirm that there does appear to be a problem here.
The code for TinyElementImpl.copy() (copying an element node in the TinyTree) sets the flag ReceiverOptions.NAMESPACE_OK for all elements except the outermost one in the tree being copied; this option is an assertion that a namespace node for the element has been sent down the pipeline, and therefore it is not necessary for namespace fixup to generate one. This assumption is incorrect when copy-namespaces="no" has been specified.
Updated by Michael Kay about 10 years ago
- Status changed from New to In Progress
A patch has been devised and tested on the 9.6 branch (affects method TinyElementImpl.copy()). Further work needed to apply this on the 9.5 and 9.7 branches and to create a regression test.
Updated by Michael Kay about 10 years ago
- Status changed from In Progress to Resolved
- Found in version changed from Saxon-HE 9.5.1-6 to 9.5
I have applied the patch to the 9.5, 9.6, and 9.7 branches.
I added the test case to the W3C test suite as test copy-4901, though in fact this has limited value in regression testing given that the way the Saxon test driver is running the tests, the bug does not manifest itself. (It shows up, however, when running from the command line).
Updated by O'Neil Delpratt about 10 years ago
- Status changed from Resolved to Closed
Bug fix applied in the Saxon 9.6.0.2 maintenance release
Updated by O'Neil Delpratt over 9 years ago
- Status changed from Closed to Resolved
- % Done changed from 0 to 100
Updated by O'Neil Delpratt over 9 years ago
- Status changed from Resolved to Closed
- Fixed in version changed from 9.6.0.2 to 9.5.1.10 9.6.0.2
Bug fix applied in the Saxon 9.5.1.10 maintenance release
Please register to edit this issue