I wanted to provide an update on my experience with Saxon-CE. 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. 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. 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... Say execute an API call to
stitch real-time data into the content. So this is something that works for
what I need.
I need to learn more about caching and life cycle for the processor. I'm
wondering if I should create a singleton for the processor and then set
properties as needed for each invocation. Also, I wonder if the browser caches
XSLT files that I get via Saxon.requestXML. If not, I need to do my own
caching. Anyway, I still have homework to do, but Saxon-CE is looking very
nice!
Cheers cud
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--