Saxon-Forms
Saxon-Forms copied to clipboard
Data Mutation: Prepend Element Copy Fails
In testing XForms 1.1 spec, example B.1, Saxon-Forms fails with the following error:
Uncaught
Object { message: "'href' must be specified in HTTP request", stack: "I@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4102:51\nmakeHttpRequest/<@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4753:103\nmakeHttpRequest@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4755:381\nBj@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4098:409\nifCall/Od@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4707:466\nC@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4416:306\nD/Le/<@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4416:528\nD/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4416:501\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nchoose/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4435:41\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nlet/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4443:353\nD/Le/<@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4416:528\nD/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4416:501\nD/Le/<@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4416:528\nD/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4416:501\ncallT/Le@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4434:374\npush@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4446:401\nbf@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5054:330\nLb/<@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5052:192\nca.forEachItem@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:4229:390\nLb@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5052:159\nY@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5082:31\nEventListener.handleEvent*E@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5082:308\nh/<@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5082:465\nh@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5082:417\nZ@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5068:116\ng@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5071:294\nm@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5074:212\ntransform@http://localhost:9080/Saxon-JS-2.0/SaxonJS2.js:5094:341\nwindow.onload@http://localhost:9080/demos/demo-repro.html:12:17\nEventHandlerNonNull*@http://localhost:9080/demos/demo-repro.html:11:7\n", name: "XError", code: "SXJS0006", xsltLineNr: "1093", xsltModule: "file:/C:/Users/John/Documents/GitHub/Saxon-Forms/src/saxon-xforms.xsl" }
SaxonJS2.js:4446:461
<xforms:xform xmlns:rest="http://exquery.org/ns/restxq" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:demo="urn:saxon-xforms:demo">
<xforms:model id="m-recipes">
<xforms:instance>
<data xmlns="">
<people>
<person>
<name>Jane Doe</name>
</person>
</people>
</data>
</xforms:instance>
<xforms:instance id="prototypes">
<prototypes xmlns="">
<person>
<name/>
</person>
</prototypes>
</xforms:instance>
<xforms:submission id="test" ref="." instance="hello"/>
</xforms:model>
<div id="content">
<xforms:trigger>
<xforms:label>Test it</xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:insert context="people" origin="instance('prototypes')/person"/>
</xforms:action>
</xforms:trigger>
<xforms:submit submission="test">
<xforms:label>Export Subset</xforms:label>
</xforms:submit>
</div>
</xforms:xform>
Note that I am not using the SEF included with the repo; however, I am using a newly compiled version from an unmodified saxon-xforms.xsl
using Oxygen's Compile XSL stylesheet for Saxon (Oxygen 25.0, 2022101006) and running using SaxonJS-2.5 on Firefox 108.0 (Windows)
I am not surprised that the tests are failing. As Saxon-Forms is just a partial implementation. But good to have a reference point on what needs implementing. Hopefully we can look into this over the holiday season and next year. I also welcome input from the community