Class LocationCopier

java.lang.Object
net.sf.saxon.event.LocationCopier
All Implemented Interfaces:
CopyInformee

public class LocationCopier extends Object implements CopyInformee
A Receiver that can be inserted into an event pipeline to copy location information. The class is used when it is necessary to copy a subtree along with its location information; for example, when copying an inline schema within a stylesheet to a separate schema document.

Note: prior to 9.2, the LocationCopier was a ProxyReceiver that passed all events on the pipeline unchanged. It no longer does this, instead it is found as the LocationProvider on a pipeline, but does not itself see the pipeline events.

  • Constructor Details

    • LocationCopier

      public LocationCopier(boolean wholeDocument, String systemId)
  • Method Details

    • notifyElementNode

      public Location notifyElementNode(NodeInfo element)
      Provide information about the node being copied. This method is called immediately before the startElement call for the element node in question.
      Specified by:
      notifyElementNode in interface CopyInformee
      Parameters:
      element - the node being copied, which must be an element node
      Returns:
      information about this node
    • getSystemId

      public String getSystemId()