Class PrincipalOutputGatekeeper

All Implemented Interfaces:
Result, Receiver

public class PrincipalOutputGatekeeper extends ProxyReceiver
This class is added to the output pipeline for the principal result destination for a transformation if the transformation uses xsl:result-document instructions. It is there to deal with the possibility that an xsl:result-document instruction will use the same output URI (or no output URI) in which case it is defined to write to the principal output destination, but potentially with different serialization parameters.

If actual output is produced to the principal result destination, then this PrincipalOutputGatekeeper will be marked as being "used by primary", which will cause any attempt to open a secondary result destination on the same URI (either explicitly, or by omitting the href attribute, or by setting href to a zero length string) as an error. Apart from this marker, the PrincipalOutputGatekeeper acts as a pass-through filter for the output events.

If a secondary result destination is opened using the principal output URI (either explicitly or implicitly), then the PrincipalOutputGatekeeper is marked as being "used by secondary", which will cause any attempts to write events to the PrincipalOutputGatekeeper to fail. Secondary result output is not actually directed through the gatekeeper; the gatekeeper is merely notified of its existence.

  • Constructor Details

  • Method Details