The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::Schema::Scheduler - schedule actions around an XML Schema

SYNOPSIS

    package XML::Schema::Attribute;
    use base qw( XML::Schema::Scheduler );

    package main;
    my $attr = XML::Schema::Attribute->new({
        name => $name,      # object params
        type => $type,
        ...etc...
        before => $action,  # schedule params
        after  => [ $action, $action, ... ],
    };

    $attr->before();
    $attr->after();

DESCRIPTION

The XML::Schema::Scheduler module implements a base class (similar to a "mixin") from which other XML Schema modules can be derived. This module implements the action scheduling functionality that allows events to be schedule before and/or after a schema validation event.

METHODS

init()

Initialiser method called automatically by the XML::Schema::Base new() method or explicitly by the init() method of a derived object class. This method examines the configuration hash for 'before' and/or 'after' parameters which are stored internally as the initial sets of schedule actions.

schedule_before($action)

Add the specified $action to the 'before' schedule.

schedule_after($action)

Add the specified $action to the 'after' schedule.

before()

Run the scheduled 'before' events. Returns a hash reference representing the infoset generated and/or modified by the scheduled actions. An initial hash reference may be otherwise provided.

    $attr->before(\%infoset);

after()

Run the scheduled 'after' events. Returns a hash reference representing the infoset generated and/or modified by the scheduled actions. An initial hash reference may be otherwise provided.

    $attr->before(\%infoset);

AUTHOR

Andy Wardley <abw@kfs.org>

VERSION

This is version $Revision: 1.1.1.1 $ of the XML::Schema::Scheduler module, distributed with version 0.1 of the XML::Schema module set.

COPYRIGHT

Copyright (C) 2001 Canon Research Centre Europe Ltd. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

See also XML::Schema.