Bug #2941
closedCrash when there is no context item
100%
Description
Given a stylesheet with
<xsl:template match="/" name="main">
<xsl:result-document href="#target" method="ixsl:replace-content">
<ul>
<xsl:for-each select="//*:test-set">
<li><a href="testSet.html?src={@file}">{@name}</a></li>
</xsl:for-each>
</ul>
</xsl:result-document>
</xsl:template>
and running it with initialTemplate:main (and no source document), it crashes with
TypeError: null is not an object (evaluating 'context.focus.current')
rather than failing with XPDY0002 as it should.
Updated by Debbie Lockett about 8 years ago
- Status changed from New to In Progress
- Found in version set to 0.9
Fixed in transform.js, so that context.focus is set appropriately (to be a tracker over an empty iterator) when there is no source document.
Still to do: create a unit testing mechanism to test the Saxon-JS API, and in particular a test for this case.
Updated by Debbie Lockett about 8 years ago
- Status changed from In Progress to Resolved
Now marking as resolved as unit testing for Saxon-JS is in development; including a test for this bug.
Updated by Debbie Lockett almost 8 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 0.9.1
Bug fix applied in the Saxon-JS 0.9.1 beta release.
Updated by Community Admin over 7 years ago
- Fixed in JS Release set to Saxon-JS 0.9.1
- Applies to JS Branch 0.9 added
- Fix Committed on JS Branch 0.9 added
Please register to edit this issue
Also available in: Atom PDF Tracking page