Project

Profile

Help

Bug #4071

closed

Copying of line numbers

Added by Michael Kay over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
2018-12-14
Due date:
% Done:

100%

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

Description

By default, if source documents have line numbers maintained, then the xsl:copy-of instruction copies the line number information across to the target document. This operation is expensive, and it seems it is often done when not required.

In some cases it involves copying the base URI of nodes in the source document, and this is particularly expensive because it involves looking for xml:base attributes.

The internal logic supporting CopyOf is used in many cases other than an explicit xsl:copy-of instruction in XSLT. It's used, for example, for the implicit copying done in XQuery.

Its difficult now to recall the use cases that led to this being done, and there's a risk that changing it may break something. However, I think there are some changes we should make:

(a) If CopyOf.setCopyLineNumbers() is not called, then (despite what the Javadoc says) the default is COPY: even if line numbering isn't switched on for the configuration or for the particular source document. I think the code should change to match the documentation. There may then be paths where we need to set the value to maintain current behaviour.

(b) For a copy controlled explicitly using xsl:copy-of, I think the default should be NO-COPY; perhaps we need an extension attribute to change this, but I'm not convinced.

Actions #1

Updated by Michael Kay over 5 years ago

  • Status changed from New to In Progress
  • Applies to branch 9.9 added
  • Fix Committed on Branch 9.9 added

Changed the default for CopyOf to not copy line numbers; changed the xsl:copy-of instruction to not copy line numbers just because this is the default for the configuration.

Actions #2

Updated by Michael Kay over 5 years ago

  • Category set to Saxon extensions
  • Status changed from In Progress to Resolved
  • Priority changed from Low to Normal

Marking as resolved.

Actions #3

Updated by O'Neil Delpratt over 5 years ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.9.1.1 added

Bug fix applied to the Saxon 9.9.1.1 maintenance release.

Actions #4

Updated by O'Neil Delpratt over 5 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF