Bric::Dist::Action::DTDValidate - Validates XML against a DTD
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);
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.
See Bric::Dist::Action.
The following class method is in addition to those provided by Bric::Dist::Action, and overrides the same method in that class.
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).
$action = $action->do_it($job, $server_type);
Validates the resources (files) against a DTD for a given job and server type.
Thows:
David Wheeler <david@kineticode.com>
Base class from which Bric::Dist::Action::DTDValidate inherits much of its interface.
Defines the types of actions that the Bricolage distribution supports, including validating resources.
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.
Manages distribution jobs, including processing all the actions required for each destination for which resources are to be distributed.
Copyright (c) 2003 Kineticode, Inc. See Bric::License for complete license terms and conditions.