Bug #3284
closed
xsl:number throws "Bad parent pointer found in..." message
Fix Committed on Branch:
9.8
Fixed in Maintenance Release:
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
- 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.
Attached a stylesheet and input file to reproduce with.
Sorry for the number of files, I did't have time to create the smallest possible set that would still throw the message.
- 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.
- 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