[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Java Extension Optimization

Subject: [xsl] Java Extension Optimization
From: Craig Sampson <Craig.Sampson@xxxxxxx>
Date: Fri, 18 Oct 2013 20:04:57 +0000

  I have several java extensions that I use to pass data to other processes
from my transforms. I've been using xml:message's to write unnecessary values
to my log file to prevent Saxon from discarding my variables, since it doesn't
see them used/referenced in my transform.

  Here's an example:

            <xsl:variable name="keepGraphic"
            <xsl:if test="$keepGraphic=true()">
              <xsl:message>xislog~debug::keepGraphic arrow_summary_path.gif
<xsl:value-of select="$keepGraphic"/></xsl:message>

  In this case I am letting the extension know that I want a particular
graphic included with the deliverable that I am creating. This extension
prevents unused graphics from finding their way into EPUB deliverables where
they cause problems.

  Is there a better way to prevent Saxon from discarding my extension that
doesn't require me to write something to an output stream?


Current Thread