ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/Container.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/Container.pm (file contents):
Revision 1.1 by sashby, Thu Dec 15 16:38:10 2005 UTC vs.
Revision 1.2 by sashby, Fri Jan 13 18:48:29 2006 UTC

# Line 155 | Line 155 | sub text_()
155        {
156        push(@{$self->{textcontent}->{$self->currentenv_()}},@_);
157        }
158 +   else
159 +      {
160 +      $self->{textcontent}->{$self->currentenv_()} = [ @_ ];
161 +      }
162     }
163  
164   sub data_()
# Line 173 | Line 177 | sub textstorage_()
177        {
178        if (exists($self->{leveldata_}->{$self->{activelevel}-1}->{$self->parentenv_()}->{$current}->{'content'}))
179           {
180 +         # For all nested tags with "content" as a key, the first value for content will
181 +         # be the destination of the text (i.e. STDOUT or file:x). Store this destination
182 +         # as a key "dest":
183 +         $self->{leveldata_}->{$self->{activelevel}-1}->{$self->parentenv_()}->{$current}->{'dest'} =
184 +            $self->{leveldata_}->{$self->{activelevel}-1}->{$self->parentenv_()}->{$current}->{'content'},"\n";
185 +         # Now just overwrite previsou value with the text:
186           $self->{leveldata_}->{$self->{activelevel}-1}->{$self->parentenv_()}->{$current}->{'content'} =
187              $self->{textcontent}->{$current};
188           }
189        elsif ($self->{content}->{$current}->{'content'})
190           {
191 +         $self->{content}->{$current}->{'dest'} = $self->{content}->{$current}->{'content'};
192           $self->{content}->{$current}->{'content'} = $self->{textcontent}->{$current};
193           }
194        
# Line 188 | Line 199 | sub textstorage_()
199   sub AUTOLOAD()
200     {
201     my $self=shift;
202 <   my ($attributes)=@_;
192 <  
202 >   my ($attributes)=@_;  
203     return if $AUTOLOAD =~ /::DESTROY$/;
204     my $name=$AUTOLOAD;
205     $name =~ s/.*://;
206 <  
206 >   $self->store_($name, $attributes);  
207 >   }
208 >
209 > sub store_()
210 >   {
211 >   my $self=shift;
212 >   my ($name,$attributes)=@_;
213 >
214     if (exists($self->{leveldata_}->{$self->{activelevel}}))
215        {
216        $self->{leveldata_}->{$self->{activelevel}}->{$name} = $attributes;
# Line 201 | Line 218 | sub AUTOLOAD()
218     else
219        {
220        $self->{leveldata_}->{$self->{activelevel}} = { $name => $attributes };
221 <      }
221 >      }  
222     }
223  
224   sub DESTROY()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines