NAME
XML::STX - an STX processor
SYNOPSIS
use XML::STX;
use SAX2Parser; # XML::SAX::Expat, XML::SAX::PurePerl
use SAX2Handler; # XML::SAX::Writer, XML::Handler::YAWriter
use either the common SAX API:
$comp = XML::STX::Compiler->new();
$parser_t = SAX2Parser->new(Handler => $comp);
$stylesheet = $parser_t->parse_uri($templ_uri);
$writer = XML::SAX::Writer->new();
$stx = XML::STX->new(Handler => $writer, Sheet => $stylesheet );
$parser = SAX2Parser->new(Handler => $stx);
$parser->parse_uri($data_uri);
or a pseudo-pull API:
$stx = XML::STX->new();
$parser_t = SAX2Parser->new();
$stylesheet = $stx->get_stylesheet($parser_t, $templ_uri);
$parser = SAX2Parser->new();
$handler = SAX2Handler->new();
$stx->transform($stylesheet, $parser, $data_uri, $handler);
DESCRIPTION
XML::STX is a pure Perl implementation of STX processor. Streaming Transformations for XML (STX) is a one-pass transformation language for XML documents that builds on the Simple API for XML (SAX). See http://stx.sourceforge.net/ for more details.
XML::STX makes a use of XML::SAX, XML::NamespaceSupport and Clone as its prerequisites. Any SAX2 parser can be used to parse an STX stylesheet. XML::SAX::Expat and XML::SAX::PurePerl have been tested successfully. Whatever SAX2 driver or handler can be used as a data source or an output handler, respectively.
The current version is an alpha version and it doesn't cover the complete STX specification yet.
AUTHOR
Petr Cimprich (Ginger Alliance), petr@gingerall.cz
SEE ALSO
XML::SAX, XML::NamespaceSupport, perl(1).