Bug #4734
closedSaxonJS.transform nonInteractive option does not work
100%
Description
See original problem raised in Issue #4732.
When more than one SaxonJS.transform
call is used in an application, event listeners are registered again; and it seems that use of "nonInteractive": true
has no effect:
As explained on the mailing list, I am trying to replicate the behavior of Saxon-CE's
updateHTMLDocument()
with Saxon-JS 2. This code is invoked from a JSonsubmit
handler in order to replace the content of the submitted form:
SaxonJS.transform({
"stylesheetLocation":
"https://localhost:4443/static/com/atomgraph/linkeddatahub/xsl/client.xsl.sef.json",
"initialMode":
"Q{https://w3id.org/atomgraph/linkeddatahub/domain#}ConstructViolation",
"logLevel": 10,
"sourceNode": html, // HTML document node from a jqXHR response
"templateParams": {
"submitted-form": form // the onsubmit target
},
"destination": "raw",
"nonInteractive": true
}, "async");
<xsl:template match="html" mode="apl:ConstructViolation">
<xsl:param name="submitted-form" as="element()"/>
<xsl:variable name="violation-form" as="element()">
...
</xsl:variable>
<xsl:result-document href="#{$submitted-form/@id}" method="ixsl:replace-content">
<xsl:copy-of select="$violation-form/*"/>
</xsl:result-document>
</xsl:template>
However with each invocation it looks like the
ixsl:
event listeners are being registered again. [...] there's another "main"SaxonJS.transform()
that already has registered the listeners. I thought I could switch this off using "nonInteractive": true, but it does not seem to have the desired effect.
Please register to edit this issue
Also available in: Atom PDF Tracking page