Bug #3284
closedxsl:number throws "Bad parent pointer found in..." message
100%
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
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.
Updated by Jarno Elovirta over 7 years ago
- File Archive.zip Archive.zip added
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.
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.
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