Project

Profile

Help

Bug #5597

closed

ixsl:schedule-action fails without xsl:call-template

Added by Martynas Jusevicius over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
2022-07-09
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2, Trunk
Fix Committed on JS Branch:
2, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

The documentation suggests xsl:call-template? is optional in ixsl:schedule-action.

However without it I get an error:

{
  "message": "Internal error: No binding slot or component Id for component",
  "stack": "I@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:178:51\na@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:181:82\nz@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:739:221\nifCall/Nd@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:779:442\nb/Nd/x/Nd<@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:729:225\nWa@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:10:299\nXa/this.next@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:11:91\nuc.prototype.next@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:316:288\nb/Nd/x/Nd<@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:729:258\nWa@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:10:299\nXa/this.next@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:11:91\nuc.prototype.next@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:316:288\nb/Nd/x/Nd<@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:729:258\nWa@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:10:299\nXa/this.next@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:11:91\nuc.prototype.next@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:316:288\nba.forEachItem@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:305:380\nba.expand@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:306:191\nsa@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:779:131\nifCall/Nd/za<@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:780:174\nmakeHttpRequest/u.onload@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:829:286\nEventHandlerNonNull*makeHttpRequest@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:827:387\nEj@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:174:403\nifCall/Nd@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:780:108\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:235\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\nforEach/Ke/<@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:512:514\nba.forEachItem@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:305:390\nforEach/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:512:484\nB/Ke/<@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:491:528\nB/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:491:501\nlet/Ke@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:518:266\npush@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:521:388\nZe@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:1125:330\nKb/<@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:1123:192\nba.forEachItem@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:305:390\nKb@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:1123:159\nZ@https://localhost:4443/static/com/atomgraph/linkeddatahub/js/saxon-js/SaxonJS2.rt.js:1152:248\n",
  "name": "XError",
  "code": "SXJS0004"
}
Actions #1

Updated by Norm Tovey-Walsh about 2 years ago

Did you want to use it without a template, or was this just discovered accidentally? If the former, what was the result you hoped for?

My first impression is that it should be required, not optional.

Actions #2

Updated by Martynas Jusevicius about 2 years ago

I wanted to execute an HTTP request (<ixsl:schedule-action http-request="...">) without handling the response.

Actions #3

Updated by Norm Tovey-Walsh about 2 years ago

  • Sprint/Milestone set to SaxonJS 2.5
Actions #4

Updated by Norm Tovey-Walsh about 2 years ago

  • Status changed from New to Resolved
  • Applies to JS Branch Trunk added
  • Fix Committed on JS Branch 2, Trunk added

Runtime was failing to detect that there was no template to call. Fixed.

Actions #5

Updated by Norm Tovey-Walsh about 2 years ago

  • Status changed from Resolved to In Progress

Debbie asked if I'd tested this with the XJ compiler. "No," I said.

Turns out... :-(

Actions #6

Updated by Norm Tovey-Walsh about 2 years ago

  • Status changed from In Progress to Resolved

Previous fix was incomplete. Now checked against XX and XJ compilers. Also changed the test to use document. This means you can verify that the request actually occurred by watching the output of the ./gradlew server process.

Actions #7

Updated by Norm Tovey-Walsh about 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to SaxonJS 2.5

Fixed in SaxonJS 2.5.

Actions #8

Updated by Martynas Jusevicius about 2 years ago

This still persists in my tests :/

Actions #9

Updated by Martynas Jusevicius about 2 years ago

    <xsl:template name="ldh:ClearNamespace">
        <xsl:param name="ontology-uri" select="resolve-uri('ns#', ldt:base())" as="xs:anyURI"/>
        <xsl:variable name="form-data" select="ldh:new('URLSearchParams', [ ldh:new('FormData', []) ])"/>
        <xsl:sequence select="ixsl:call($form-data, 'append', [ 'uri', $ontology-uri ])[current-date() lt xs:date('2000-01-01')]"/>

        <ixsl:schedule-action http-request="map{ 'method': 'POST', 'href': resolve-uri('admin/clear', ldt:base()), 'media-type': 'application/x-www-form-urlencoded', 'body': $form-data, 'headers': map{ 'Accept': 'application/rdf+xml' } }"/>
    </xsl:template>

Still gives the same error.

Actions #10

Updated by Norm Tovey-Walsh about 2 years ago

  • Status changed from Closed to In Progress
  • Assignee set to Norm Tovey-Walsh
  • Sprint/Milestone changed from SaxonJS 2.5 to SaxonJS 3.0

Yes, you appear to be correct. The unit test "passes" but that's because unit tests have no way of interrogating the error console. There is no called template, so there's nothing to test. It worked correctly on the day I fixed it, but apparently I made it "un work" at some point and was mislead by the apparently passing test.

Bah, humbug.

At least the workaround is straightforward. Sorry about that.

Actions #11

Updated by Norm Tovey-Walsh about 2 years ago

  • Status changed from In Progress to Resolved

Fixed again. And the automation test framework extended to catch it if it fails.

Actions #12

Updated by Debbie Lockett about 1 year ago

  • Sprint/Milestone deleted (SaxonJS 3.0)
  • Fixed in JS Release deleted (SaxonJS 2.5)
Actions #13

Updated by Debbie Lockett about 1 year ago

  • Status changed from Resolved to Closed
  • Fixed in JS Release set to SaxonJS 2.6

Bug fix applied in the SaxonJS 2.6 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page