home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / perl5 / XML / PatAct / PatternTempl.pm < prev    next >
Encoding:
Perl POD Document  |  2003-10-21  |  1.5 KB  |  83 lines

  1. # This template file is in the Public Domain.
  2. # You may do anything you want with this file.
  3. #
  4. # $Id: PatternTempl.pm,v 1.2 1999/08/16 16:04:03 kmacleod Exp $
  5. #
  6.  
  7. # replace all occurrences of PATTERN with the name of your module!
  8.  
  9. use strict;
  10.  
  11. package XML::PatAct::PATTERN;
  12.  
  13. sub new {
  14.     my $type = shift;
  15.     my $self = ($#_ == 0) ? { %{ (shift) } } : { @_ };
  16.  
  17.     # perform any one-time initializations
  18.  
  19.     return bless $self, $type;
  20. }
  21.  
  22. sub initialize {
  23.     my ($self, $driver) = @_;
  24.     $self->{Driver} = $driver;
  25.  
  26.     # perform initializations for each XML instance
  27. }
  28.  
  29. sub finalize {
  30.     my $self = shift;
  31.  
  32.     # clean up any state information
  33.  
  34.     $self->{Driver} = undef;
  35. }
  36.  
  37. sub match {
  38.     my ($self, $element, $names, $nodes) = @_;
  39.  
  40.     # Use the Patterns list to match a pattern
  41.  
  42.     return undef;
  43. }
  44.  
  45. 1;
  46.  
  47. __END__
  48.  
  49. =head1 NAME
  50.  
  51. XML::PatAct::PATTERN - A pattern module for 
  52.  
  53. =head1 SYNOPSIS
  54.  
  55.  use XML::PatAct::PATTERN;
  56.  
  57.  my $patterns = [ PATTERN => ACTION,
  58.                   ... ]
  59.  
  60.  my $matcher = XML::PatAct::PATTERN->new( Patterns => $patterns );
  61.  
  62. =head1 DESCRIPTION
  63.  
  64. XML::PatAct::PATTERN is a pattern module for use with PatAct action
  65. modules for applying pattern-action lists to XML parses or trees.
  66. XML::PatAct::PATTERN ...
  67.  
  68. Parameters can be passed as a list of key, value pairs or a hash.
  69.  
  70. DESCRIBE THE FORMAT OR LANGUAGE OF YOUR PATTERNS HERE
  71.  
  72. =head1 AUTHOR
  73.  
  74. This template file was written by Ken MacLeod, ken@bitsko.slc.ut.us
  75.  
  76. =head1 SEE ALSO
  77.  
  78. perl(1)
  79.  
  80. ``Using PatAct Modules'' and ``Creating PatAct Modules'' in libxml-perl.
  81.  
  82. =cut
  83.