2 |
use strict; |
use strict; |
3 |
use XML::Twig; |
use XML::Twig; |
4 |
use Xot::Table; |
use Xot::Table; |
5 |
use Xot::Style::Defs; |
use Xot::Style::Def; |
6 |
use base qw(Xot::Accessors); |
use base qw(Xot::Accessors); |
7 |
|
|
8 |
Xot->plain(qw(file)); |
Xot->plain(qw(file)); |
9 |
Xot->multi('table' => 'Xot::Table', |
Xot->multi('table' => 'Xot::Table', |
10 |
|
'style_definition' => 'Xot::Style::Def', |
11 |
); |
); |
12 |
|
|
13 |
sub init |
sub init |
17 |
|
|
18 |
$self->twig(XML::Twig->new( |
$self->twig(XML::Twig->new( |
19 |
twig_handlers => { 'table' => sub { $self->add_table($_) }, |
twig_handlers => { 'table' => sub { $self->add_table($_) }, |
20 |
'style_definitions' => sub { $self->style_defs($_) }, |
'style_definition' => sub { $self->add_style_definition($_) }, |
21 |
}, |
}, |
22 |
pretty_print => 'indented' |
pretty_print => 'indented' |
23 |
)); |
)); |
30 |
} |
} |
31 |
} |
} |
32 |
|
|
33 |
|
|
34 |
1; |
1; |