Name

Bric::Dist::Action::DTDValidate - Validates XML against a DTD

Synopsis

use Bric::Dist::Action::DTDValidate;

my $id = 5; # Assume that this is an validate against DTD action.
# This line will automatically instantiate the correct subclass.
my $action = Bric::Dist::Action->lookup({ id => $id });

# Perform the action on a list of resources.
$action = $action->do_it($resources_href);

# Undo is a no-op.
$action = $action->undo_it($resources_href);

Description

This subclass of Bric::Dist::Action can be used to validate XML or XHTML against a DTD. Note that it requires XML::LibXML, and since it downloads the DTD over via the Internet for every resource, it can be quite slow. Set your DOCTYPE tag to point to a a copy of the DTD on your LAN to make things faster.

Class Interface

Constructors

See Bric::Dist::Action.

Class Methods

The following class method is in addition to those provided by Bric::Dist::Action, and overrides the same method in that class.

has_more

if (Bric::Dist::Action::DTDValidate->has_more) {
    print "It has more attributes than Bric::Dist::Action\n";
}

Returns true to indicate that this action has more properties than does the base class (Bric::Dist::Action).

Instance Interface

Other Instance Methods

do_it

$action = $action->do_it($job, $server_type);

Validates the resources (files) against a DTD for a given job and server type.

Thows:

Exception::DP

Author

David Wheeler <david@kineticode.com>

See Also

Bric::Dist::Action

Base class from which Bric::Dist::Action::DTDValidate inherits much of its interface.

Bric::Dist::ActionType

Defines the types of actions that the Bricolage distribution supports, including validating resources.

Bric::Dist::ServerType

Defines the interface for Bricolage distribution destinations, including a list of actions to be performed before distributing to a given destination, as well as a list of servers for that destination.

Bric::Util::Job::Dist

Manages distribution jobs, including processing all the actions required for each destination for which resources are to be distributed.

Copyright and License

Copyright (c) 2003 Kineticode, Inc. See Bric::License for complete license terms and conditions.