Thanks for the fast reply :)

Then how would you advise to implement such a system?
I really need to get some input during the transformation.

Adrian.

On 6/30/2010 7:52 PM, kesh...@us.ibm.com wrote:
  XSLT is a functiional language. The order and frequency of execution,
including execution of extensions, is not guaranteed by XSLT, or by
Xalan, and depends on the details of code optimization and execution.

You can constrain order by creating data dependencies. If each extension
call is passed data from a previous extension call, that will force them
to be executed in that sequence.

You really can't constrain frequency. You are strongly advised not to
write stateful extensions. Keep state in data.


______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
-- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (
http://www.ovff.org/pegasus/songs/threes-rev-11.html
<http://www.ovff.org/pegasus/songs/threes-rev-11.html> )


From:   Adrian Herscu <adrian.her...@gmail.com>
To:     xalan-j-users@xml.apache.org
Date:   06/30/2010 12:20 PM
Subject:        xsl/xalan problem





Hi all,

Consider the following scenario:

+-----------+ +----------------+ +------------+
| Input XML |-->| XSLT Processor |-->| Output XML |
+-----------+ +----------------+ +------------+
^ ^
| |
+----------------+ +-----------------+
| Input XSL | | Runtime Input |
+----------------+ +-----------------+

The Output XML depends on three sources:
1. Input XML
2. Input XSL
3. ...and on the Runtime Input

Currently, I am getting the Runtime Input using a specially designed
extension function. The problem with this approach is that the XSLT
Processor sometimes calls my extension function too many times. I have
been told that this may happen if the XSLT Processor decides to optimize
some of the XSL templates and that I cannot control this behavior. Is
there a better approach?

Thanks for your help,
Adrian.



Reply via email to