Project

Profile

Help

Bug #2209

closed

Namespace Fixup doesn't work for default namespace when input is TinyTree and result is TinyBuilder and

Added by Mateusz Nowakowski over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2014-11-05
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

Copy.xsl (1.01 KB) Copy.xsl Mateusz Nowakowski, 2014-11-05 14:49
before.xml (1.06 KB) before.xml input xml Mateusz Nowakowski, 2014-11-05 14:49
test_output.txt (4.78 KB) test_output.txt test result Mateusz Nowakowski, 2014-11-05 14:49
CopyXSLTest.java (8.01 KB) CopyXSLTest.java test source code Mateusz Nowakowski, 2014-11-05 14:49
Actions #1

Updated by Michael Kay over 9 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.

Actions #2

Updated by Michael Kay over 9 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.

Actions #3

Updated by Michael Kay over 9 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).

Actions #4

Updated by O'Neil Delpratt over 9 years ago

  • Status changed from Resolved to Closed

Bug fix applied in the Saxon 9.6.0.2 maintenance release

Actions #5

Updated by O'Neil Delpratt about 9 years ago

  • Status changed from Closed to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by O'Neil Delpratt about 9 years ago

  • Fixed in version set to 9.6.0.2
Actions #7

Updated by O'Neil Delpratt about 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

Also available in: Atom PDF