Home   |   Contact Us   |   Site Map

 

 

 

  Amsterdam.pm Perldoc

 


NAME

XML::PatAct::Amsterdam - An action module for simplistic style-sheets


SYNOPSIS

use XML::PatAct::Amsterdam;

my $patterns = [ PATTERN => { Before => 'before', After => 'after' }, ... ];

my $matcher = XML::PatAct::Amsterdam->new( I<OPTIONS> );


DESCRIPTION

XML::PatAct::Amsterdam is a PerlSAX handler for applying pattern-action lists to XML parses or trees. XML::PatAct::Amsterdam applies a very simple style sheet to an instance and outputs the result. Amsterdam gets it's name from the Amsterdam SGML Parser (ASP) which inspired this module.

CAUTION: Amsterdam is a very simple style module, you will run into it's limitations quickly with even moderately complex XML instances, be aware of and prepared to switch to more complete style modules.

New XML::PatAct::Amsterdam instances are creating by calling `new()'. Parameters can be passed as a list of key, value pairs or a hash. A Patterns and Matcher options are required. The following OPTIONS are supported:

Patterns
The pattern-action list to apply. The list is an anonymous array of pattern, action pairs. Each action in the list contains either or both a Before and an After string to copy to the output before and after processing an XML element. The Before and After strings may contain attribute names enclosed in square brackets (`[' NAME `]'), these are replaced with the value of the attribute with that name. The special NAME `_element' will be replaced with the element's name.

Matcher
An instance of the pattern or query matching module.

Output
An IO::Handle or one of it's subclasses (such as IO::File), if this parameter is not present and the AsString option is not used, the module will write to standard output.

AsString
Return the generated output as a string from the `parse()' method of the PerlSAX event generator.


AUTHOR

Ken MacLeod, ken@bitsko.slc.ut.us


SEE ALSO

perl(1)

``Using PatAct Modules'' and ``Creating PatAct Modules'' in libxml-perl.



 

Browse our Perldoc FAQs:

Perldoc Home

Perldoc Site Map


Previous Topics

XMLWriter.pm Perldoc

XPointer.pm Perldoc

XQL.pm Perldoc

Xref.pm Perldoc

XSLoader.pm Perldoc

Yapp.pm Perldoc

Abbrev.pm Perldoc

ActionTempl.pm Perldoc


Next Topics

ANSIColor.pm Perldoc

AnyDBM_File.pm Perldoc

Apache.pm Perldoc

A.pm Perldoc

Applet.pm Perldoc

Array.pm Perldoc

AsCanonXML.pm Perldoc

Asmdata.pm Perldoc


Website Spotlight

Domain Hosting with the Leader in Innovative and Comprehensive Web Hosting Solutions, Globalnet GNP.

Reliable Domain Hosting

 

Click here to increase your web traffic insantly!


 Copyright © 1999-2005 Globalnet Promotions, LLC.   |   TheServerRoom.org Home    |   Sitemap    |   RSS News Feeds