NAME

XML::Sablotron::Situation::DOMHandlerDispatcher - Perl sample implementation of the Sablotron DOMHandler callback interface

SYNOPSIS

  use XML::Sablotron;
  use XML::Sablotron::Situation::DOMHandlerDispatcher;
  
  my $sit = new XML::Sablotron::Situation();
  $sit->regDOMHandler( new XML::Sablotron::Situation::DOMHandlerDispatcher() );
  my $sab = new XML::Sablotron( $sit );

DESCRIPTION

The class XML::Sablotron::Situation::DOMHandlerDispatcher is a sample implementation of the callback methods of the Sablotron SXP DOMHandler interface.

XML::Sablotron::Situation::DOMHandlerDispatcher

new

The constructor of the XML::Sablotron::Situation::DOMHandlerDispatcher object takes no arguments, so you can create new instance simply like this:

  $dhdisp = new XML::Sablotron::Situation::DOMHandlerDispatcher();

setRetrieveDocumentHandler

Set a handler function for the retrieveDocument callback.

  $dhdisp->setRetrieveDocumentHandler(&retrieveDocument);
&retrieveDocument

The handler function. It must look like this:

  sub retrieveDocument( $uri, $baseUri, $sit )

getRetrieveDocumentHandler

Get the handler function for the retrieveDocument callback.

  $handler = $dhdisp->getRetrieveDocumentHandler();

EXPORT

None at all.

AUTHOR

Anselm Kruis, <a.kruis@science-computing.de>

SEE ALSO

perl.