[xsl] Re: Saxon-CE -- Passing Data to a JS Function

Subject: [xsl] Re: Saxon-CE -- Passing Data to a JS Function
From: "Chris Despopoulos despopoulos_chriss@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Jul 2016 12:55:59 -0000
I wanted to provide an update on my experience with Saxon-CE.B  The bottom
line is, I'm getting transforms as strings out of the processor -- it looks
like I can use it to integrate DITA content into a product GUI.B  This is
truly awesome -- Many thanks to Dr. Kay.
I get a new processor with an XSLT file set to it, and then callvar result =
proc.transformToDocument(myXml).
The XSLT starts like so:
<xsl:template match="topic">
    <xsl:copy>
        <xsl:apply-templates/>
    </xsl:copy>
</xsl:template>
and then calls whatever other templates I need.B  The COPY passes the result
out through the processor.
Chances are, people who know XSLT better than I would say I'm doing this in a
bone-headed way. It works -- I definitely need a string result, either as
JSON, or I need HTML that I can then process further...B  Say execute an API
call to stitch real-time data into the content.B  So this is something that
works for what I need.
I need to learn more about caching and life cycle for the processor.B  I'm
wondering if I should create a singleton for the processor and then set
properties as needed for each invocation.B  Also, I wonder if the browser
caches XSLT files that I get via Saxon.requestXML.B  If not, I need to do my
own caching.B  Anyway, I still have homework to do, but Saxon-CE is looking
very nice!
CheersB B B B B B B B B B  cud

Current Thread