| 1 | # $Id: XSLTHandler.pm,v 1.5 2008/06/05 06:17:51 cmungall Exp $ | ||
| 2 | # | ||
| 3 | # This GO module is maintained by Chris Mungall <cjm@fruitfly.org> | ||
| 4 | # | ||
| 5 | # see also - http://www.geneontology.org | ||
| 6 | # - http://www.godatabase.org/dev | ||
| 7 | # | ||
| 8 | # You may distribute this module under the same terms as perl itself | ||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | Data::Stag::XSLTHandler - XSLT Handler | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | |||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | =head1 DESCRIPTION | ||
| 21 | |||
| 22 | =head1 PUBLIC METHODS - | ||
| 23 | |||
| 24 | =cut | ||
| 25 | |||
| 26 | # makes objects from parser events | ||
| 27 | |||
| 28 | package Data::Stag::XSLTHandler; | ||
| 29 | use base qw(Data::Stag::BaseHandler); | ||
| 30 | use Data::Stag; | ||
| 31 | |||
| 32 | use strict; | ||
| 33 | |||
| 34 | sub end_stag { | ||
| 35 | my $self = shift; | ||
| 36 | my $stag = shift; | ||
| 37 | #$self->SUPER::end_stag($stag); | ||
| 38 | my $results = $stag->xslt($self->xslt_file); | ||
| 39 | @$stag = @$results; | ||
| 40 | return; | ||
| 41 | } | ||
| 42 | |||
| 43 | sub xslt_file { | ||
| 44 | my $self = shift; | ||
| 45 | $self->{_xslt_file} = shift if @_; | ||
| 46 | return $self->{_xslt_file} || die "You must subclass XSLTHandler and provide xslt_file"; | ||
| 47 | } | ||
| 48 | |||
| 49 | 1; |