xml-axkit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: xml-axkit/lib/Apache/AxKit/Language/XSP TaglibHelper.pm
Date Mon, 25 Mar 2002 07:28:17 GMT
matts       02/03/24 23:28:17

  Modified:    lib/Apache/AxKit/Language XSP.pm
               lib/Apache/AxKit/Language/XSP TaglibHelper.pm
  Log:
  Removed the need for TLH taglibs to have to specify the parse_* subs
  
  Revision  Changes    Path
  1.9       +8 -1      xml-axkit/lib/Apache/AxKit/Language/XSP.pm
  
  Index: XSP.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Language/XSP.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSP.pm	10 Mar 2002 16:16:59 -0000	1.8
  +++ XSP.pm	25 Mar 2002 07:28:17 -0000	1.9
  @@ -1,4 +1,4 @@
  -# $Id: XSP.pm,v 1.8 2002/03/10 16:16:59 matts Exp $
  +# $Id: XSP.pm,v 1.9 2002/03/25 07:28:17 matts Exp $
   
   package Apache::AxKit::Language::XSP;
   
  @@ -308,6 +308,7 @@
       foreach my $ns (keys %Apache::AxKit::Language::XSP::tag_lib) {
           my $pkg = $Apache::AxKit::Language::XSP::tag_lib{$ns};
           my $sub;
  +        local $AxKit::XSP::TaglibPkg = $pkg;
           if (($sub = $pkg->can("start_document")) && ($sub != \&start_document))
{
               $e->{XSP_Script} .= $sub->($e);
           }
  @@ -323,6 +324,7 @@
       foreach my $ns (keys %Apache::AxKit::Language::XSP::tag_lib) {
           my $pkg = $Apache::AxKit::Language::XSP::tag_lib{$ns};
           my $sub;
  +        local $AxKit::XSP::TaglibPkg = $pkg;
           if (($sub = $pkg->can("end_document")) && ($sub != \&end_document))
{
               $e->{XSP_Script} .= $sub->($e);
           }
  @@ -389,6 +391,7 @@
           $e->manage_text(1); # set default for xsp tags
           my $pkg = $Apache::AxKit::Language::XSP::tag_lib{ $ns };
           my $sub;
  +        local $AxKit::XSP::TaglibPkg = $pkg;
           if (($sub = $pkg->can("start_element")) && ($sub != \&start_element))
{
               $e->{XSP_Script} .= $sub->($e, $element);
           }
  @@ -417,6 +420,7 @@
           my $tag = $element->{Name};
           my $pkg = $Apache::AxKit::Language::XSP::tag_lib{ $ns };
           my $sub;
  +        local $AxKit::XSP::TaglibPkg = $pkg;
           if (($sub = $pkg->can("end_element")) && ($sub != \&end_element))
{
               $e->{XSP_Script} .= $sub->($e, $element);
           }
  @@ -444,6 +448,7 @@
       else {
           my $pkg = $Apache::AxKit::Language::XSP::tag_lib{ $ns };
           my $sub;
  +        local $AxKit::XSP::TaglibPkg = $pkg;
           if (($sub = $pkg->can("characters")) && ($sub != \&characters))
{
               $e->{XSP_Script} .= $sub->($e, $text);
           }
  @@ -468,6 +473,7 @@
   #        local $^W;
           my $pkg = $Apache::AxKit::Language::XSP::tag_lib{ $ns };
           my $sub;
  +        local $AxKit::XSP::TaglibPkg = $pkg;
           if (($sub = $pkg->can("comment")) && ($sub != \&comment)) {
               $e->{XSP_Script} .= $sub->($e, $comment);
           }
  @@ -492,6 +498,7 @@
   #        local $^W;
           my $pkg = $Apache::AxKit::Language::XSP::tag_lib{ $ns };
           my $sub;
  +        local $AxKit::XSP::TaglibPkg = $pkg;
           if (($sub = $pkg->can("processing_instruction")) && ($sub != \&processing_instruction))
{
               $e->{XSP_Script} .= $sub->($e, $pi);
           }
  
  
  
  1.2       +3 -3      xml-axkit/lib/Apache/AxKit/Language/XSP/TaglibHelper.pm
  
  Index: TaglibHelper.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Language/XSP/TaglibHelper.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TaglibHelper.pm	13 Jan 2002 20:45:12 -0000	1.1
  +++ TaglibHelper.pm	25 Mar 2002 07:28:17 -0000	1.2
  @@ -1,4 +1,4 @@
  -# $Id: TaglibHelper.pm,v 1.1 2002/01/13 20:45:12 matts Exp $
  +# $Id: TaglibHelper.pm,v 1.2 2002/03/25 07:28:17 matts Exp $
   
   package Apache::AxKit::Language::XSP::TaglibHelper;
   @ISA = qw(Apache::AxKit::Language::XSP);
  @@ -279,7 +279,7 @@
       # arbitrarily here.
       $tag =~ s/-/_/g;
   
  -    my $pkg = caller;
  +    my $pkg = $AxKit::XSP::TaglibPkg;
   
       # horrible hack: if the caller is the SAX library directly,
       # then we'll just have to assume that we're testing TaglibHelper
  @@ -396,7 +396,7 @@
       my $origtag = $tag;
       $tag =~ s/-/_/g;
   
  -    my $pkg = caller;
  +    my $pkg = $AxKit::XSP::TaglibPkg;
       $pkg = "Apache::AxKit::Language::XSP::TaglibHelper" if $pkg eq "AxKit::XSP::SAXHandler";
       my $funspec = is_function($pkg, $tag);
   
  
  
  

Mime
View raw message