5 |
use neb::Tree::Container; |
use neb::Tree::Container; |
6 |
|
|
7 |
our @ISA = ('neb::Tree::Node'); |
our @ISA = ('neb::Tree::Node'); |
8 |
|
our $DEBUG; |
9 |
|
|
10 |
sub init |
sub init |
11 |
{ |
{ |
14 |
$self->{ATTRS} = {}; |
$self->{ATTRS} = {}; |
15 |
$self->{CONTAINER} = new neb::Tree::Container; |
$self->{CONTAINER} = new neb::Tree::Container; |
16 |
$self->{CONTAINER}->parent($self); |
$self->{CONTAINER}->parent($self); |
17 |
|
|
18 |
|
$DEBUG = $main::DEBUG; |
19 |
} |
} |
20 |
|
|
21 |
sub name |
sub name |
93 |
sub canonical_end |
sub canonical_end |
94 |
{ |
{ |
95 |
my $self = shift; |
my $self = shift; |
96 |
return '</' . $self->name . '>'; |
return '</' . $self->name . ($self->attribute('name') ? " " . $self->attribute('name') : '' ) . '>'; |
97 |
} |
} |
98 |
|
|
99 |
|
|
101 |
{ |
{ |
102 |
my $self = shift; |
my $self = shift; |
103 |
my %h = $self->attributes; |
my %h = $self->attributes; |
104 |
my $code = '$OUTPUT .= "<' . $self->name; |
my $code = ''; |
105 |
|
|
106 |
|
$code .= "# Tag::code_start:\n\t" if ($DEBUG); |
107 |
|
$code .= '$OUTPUT .= "<' . $self->name; |
108 |
|
|
109 |
foreach (keys %h) |
foreach (keys %h) |
110 |
{ |
{ |
127 |
{ |
{ |
128 |
my $self = shift; |
my $self = shift; |
129 |
|
|
130 |
return sprintf ("\$OUTPUT .= \"%s\";\n", |
my $code = ''; |
131 |
$self->canonical_end); |
|
132 |
|
$code .= "# Tag::code_end:\n\t" if ($DEBUG); |
133 |
|
|
134 |
|
$code .= sprintf ("\$OUTPUT .= \"%s\";\n", $self->canonical_end); |
135 |
|
|
136 |
|
return $code; |
137 |
} |
} |
138 |
|
|
139 |
sub code |
sub code |