Project

Profile

Help

Bug #3284

closed

xsl:number throws "Bad parent pointer found in..." message

Added by Jarno Elovirta over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2017-06-14
Due date:
% Done:

100%

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

Description

Saxon-HE 9.8.0-1 throws

*** Bad parent pointer found in element()[fn:contains(...)] at 848 ***

messages. These seem to come from XSLT where xsl:number is used inside xsl:variable, e.g.

<xsl:variable name="uicontrolcount"><xsl:number count="*[contains(@class,' ui-d/uicontrol ')]"/></xsl:variable>

or

<xsl:variable name="itemgroupcount"><xsl:number count="*[contains(@class, ' topic/itemgroup ')]"/></xsl:variable>

Files

Archive.zip (89.1 KB) Archive.zip Test case and stylesheets Jarno Elovirta, 2017-06-15 17:58
Actions #1

Updated by Michael Kay over 7 years ago

  • Status changed from New to AwaitingInfo

Thanks Jarno. Unfortunately I can't reproduce it from this snippet alone - can you supply a complete stylesheet? These things are often highly contextual because they depend on the detailed sequence of optimization steps carried out.

Actions #2

Updated by Jarno Elovirta over 7 years ago

Attached a stylesheet and input file to reproduce with.

  • source: a1.dita

  • stylesheet: dita2html5.xsl

Sorry for the number of files, I did't have time to create the smallest possible set that would still throw the message.

Actions #3

Updated by Michael Kay over 7 years ago

  • Category set to Internals
  • Status changed from AwaitingInfo to Resolved
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal
  • Applies to branch 9.8 added
  • Fix Committed on Branch 9.8 added

Thanks.

Changed NumberInstruction.copy() to make copies of the "count" and "from" patterns, if present. (If operands are not copied, they end up being shared between two parents, which means the parent pointers can't be properly maintained.)

Patch to NumberInstruction.

Actions #4

Updated by O'Neil Delpratt over 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.8.0.2 added

Patch applied in the Saxon 9.8.0.2 maintenance release

Please register to edit this issue

Also available in: Atom PDF