Mini Shell

Direktori : /home/.cpanm/work/1731937184.9053/XML-SAX-1.02/t/
Upload File :
Current File : //home/.cpanm/work/1731937184.9053/XML-SAX-1.02/t/19pi.t

use Test;
BEGIN { plan tests => 2 }
use XML::SAX::PurePerl;
use XML::SAX::PurePerl::DebugHandler;

my $value = do { local $/ = undef; my $data = <DATA>; };

my $parser = XML::SAX::PurePerl->new(Handler =>  My::SAXFilter->new());
$parser->parse_string($value);

package My::SAXFilter;

use base qw(XML::SAX::Base);

sub processing_instruction {
    my $this = shift;
    my $data = shift;

    main::ok($data->{Target},"xml-stylesheet");
    main::ok($data->{Data},"type=\"text/xsl\" href=\"processorinxml/base.xsl\"");
}

__END__
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="processorinxml/base.xsl"?>
<body/>

Zerion Mini Shell 1.0