RE: Memory usage

> Norm..  just wondering does p:sink call that saxon:discard-document()
> function in calabash?

I don't think that it does... or even that it can: p:sink just tells the
XProc processor that the result of an XProc step is not used in a
certain place in the pipeline, but it may be used elsewhere:

<p:xslt name="transform">...</p:xslt>
<p:sink/>
<p:identity>
  <p:input port="source">
    <p:pipe step="transform" port="result">
  </p:input>
</p:identity>

The above is a perfectly correct pipeline that first "sinks" the result
of p:xslt and then processes it using p:identity. In XProc, p:sink is
just a tool for providing a simple "do nothing" connection to output
ports of steps. In most cases, it does not discard anything; it only
interrupts the default data flow in the pipeline.

The necessary condition for releasing data produced by a step from
memory should be that *nothing* is connected to the output port of the
step; just p:sink'ing the output port may not be sufficient.

Regards,
Vojtech

--
Vojtech Toman
Principal Software Engineer
EMC Corporation
toman_vojtech@emc.com
http://developer.emc.com/xmltech

Received on Monday, 10 May 2010 08:39:47 UTC