diff options
-rw-r--r-- | Master/tlpkg/TeXLive/TeXCatalogue.pm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TeXCatalogue.pm b/Master/tlpkg/TeXLive/TeXCatalogue.pm index 2500cdf990e..7bf937b536a 100644 --- a/Master/tlpkg/TeXLive/TeXCatalogue.pm +++ b/Master/tlpkg/TeXLive/TeXCatalogue.pm @@ -45,6 +45,8 @@ sub new { texlive => $params{'texlive'}, miktex => $params{'miktex'}, version => $params{'version'}, + also => defined($params{'also'}) ? $params{'also'} : [], + topic => defined($params{'topic'}) ? $params{'topic'} : [], }; bless $self, $class; if (defined($self->{'ioref'})) { @@ -89,6 +91,20 @@ sub initialize { if ($details) { $self->{'docs'}{$docfile}{'details'} = "$details"; } if ($language) { $self->{'docs'}{$docfile}{'language'} = "$language"; } } + # parse the also entries + foreach my $node ($parser->find('/entry/also')->get_nodelist) { + my $alsoid = $parser->find('./@refid',$node); + push @{$self->{'also'}}, "$alsoid"; + } + # parse the keyval/topic entries + foreach my $node ($parser->find('/entry/keyval')->get_nodelist) { + my $k = $parser->find('./@key',$node); + my $v = $parser->find('./@value',$node); + # for now we only support evaluating the 'topic' key + if ("$k" eq 'topic') { + push @{$self->{'topic'}}, "$v"; + } + } } sub beautify { @@ -154,6 +170,18 @@ sub entry { if (@_) { $self->{'entry'} = \%newentry } return $self->{'entry'}; } +sub also { + my $self = shift; + my @newalso = @_; + if (@_) { $self->{'also'} = \@newalso } + return $self->{'also'}; +} +sub topics { + my $self = shift; + my @newtopics = @_; + if (@_) { $self->{'topic'} = \@newtopics } + return $self->{'topic'}; +} ################################################################ |