#!/usr/bin/perl # Po4a::Docbook.pm # # extract and translate translatable strings from Docbook XML documents. # # This code extracts plain text from tags and attributes on Docbook XML # documents. # # Copyright (c) 2004 by Jordi Vilalta # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ######################################################################## =head1 NAME Locale::Po4a::Docbook - Convert Docbook XML documents from/to PO files =head1 SEE ALSO L, L, L. =head1 AUTHORS Jordi Vilalta =head1 COPYRIGHT AND LICENSE Copyright (c) 2004 by Jordi Vilalta This program is free software; you may redistribute it and/or modify it under the terms of GPL (see COPYING file). =cut package Locale::Po4a::Docbook; use 5.006; use strict; use warnings; use Locale::Po4a::Xml; use vars qw(@ISA); @ISA = qw(Locale::Po4a::Xml); sub initialize { my $self = shift; my %options = @_; $self->SUPER::initialize(%options); $self->{options}{'strip'}=1; $self->{options}{'tagsonly'}=1; $self->{options}{'doctype'}=$self->{options}{'doctype'} || 'docbook xml'; $self->{options}{'tags'}.='