Re: [Saxon-JS 2] Types of events Saxon-JS cannot handle?
Debbie Lockett <debbie-JkSD5nQpfvpWk0Htik3J/[email protected]> Thu, 10 Sep 2020 10:12:13 +0100
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <[email protected]> |
TBH I am not that familiar with the Saxon-CE API. But basically it looks to me like SaxonJS.transform() replaces Saxon-CE's XSLT20Processor transform methods updateHTMLDocument(), transformToDocument() and transformToFragment(). That updateHTMLDocument documentation page says: updateHTMLDocument() is most commonly used with|xsl:result-document|to update parts of the document identified by the|href|attribute. The principal XSLT output (if any) is inserted at the end of the HTML|body|element. In a Saxon-JS transform you can certainly use xsl:result-document to insert fragments of HTML into the HTML page, in the same way the updateHTMLDocument did. See https://www.saxonica.com/saxon-js/documentation/index.html#!browser/result-documents. If you additionally want the principal XSLT output (principal result tree) to be added at the end of the HTML body, then in Saxon-JS you need to specify the `destination: "appendToBody"` option for SaxonJS.transform(). (See "Result delivery" at https://www.saxonica.com/saxon-js/documentation/index.html#!api/transform). On 09/09/2020 21:05, Martynas Jusevičius wrote: > Thanks, Debbie. > > On a related topic, what would be an alternative of Saxon-CE > updateHTMLDocument() in Saxon-JS 2? > https://www.saxonica.com/ce/user-doc/1.1/index.html#!api/xslt20processor/updateHTMLDocument > -- Debbie Lockett Saxonica _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help