Mathias Bauer wrote:
Emmanuel Begue wrote:
Hello,
In the case of an OOo filter (XSLT) that takes
a long time to run (big source document) is there
a way to provide some kind of feedback to the
end user?
When using the same transformation from a
command line, I use <xsl:message> instructions
to show the user what nodes are being processed
and what actions are being taken.
But, when run as a filter, xsl:message don't
show up anywhere (that I know of): can they
be displayed, and how? or is there another
way to provide feedback?
The xsl filter is embedded into a filter framework. This framework
itself implements our UNO API for filters that has such means (it's a
callback API to objects passed along with the load/save calls).
I don't know if it is possible to catch messages from the xsl
transformation and pass it to our API callbacks. If nobody else is
familiar with our xsl filter code, I'm afraid we have to wait until
Svante Schubert jumps in (who is on vacation right now).
I just made some experiments on how to call OpenOffice.org UNO API from
within an XSLT Filter via java-XSLT-Extension functions and the
XMultiServiceFactory parameter that OOo is giving to the Transformation
but didn´t succeed so far. Maybe this doesn´t work as designed *sigh*.
I did this in an attemt to find a solution for the other problem of
Emmanuel Begue (getting the source filename).
But for just providing feedback what about using simple
java-xslt-extension functions that use swing or awt Controls to output
messages to the user. OOo uses the saxon XSLT Engine and this allows you
to call eg. static Methods of java Klasses from within your Transformation.
In the transformation we could declare and use just something like
<xsl:template name="message">
<xsl:param name="msg"/>
<xsl:variable name="temp" select="msgCall:printMessage($msg)"
xmlns:msgCall="java:com.mycompany.xslthelpers.MsgCall"/>
</xsl:template>
And than implement a static method MsgCall on that
com.mycompany.xslthelpers.MsgCall Klasse to output a message via a java
swing control or similar.
Ciao,
Mathias
Ciao,
Bernd Eilers
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]