IXINSXML.pm 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # IXIN.pm: output tree as IXIN with SXML converter.
  2. #
  3. # Copyright 2013 Free Software Foundation, Inc.
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License,
  8. # or (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. #
  18. # Original author: Patrice Dumas <pertusus@free.fr>
  19. #
  20. # This module implements abstract functions that output the IXIN format
  21. # using lower level formatting funtions, here adapted to lisp like
  22. # output. For other output, the output specific functions should be
  23. # redefined. This module is not enough to output IXIN format, a module
  24. # inheriting both from a converter module and this module is required.
  25. package Texinfo::Convert::IXINSXML;
  26. use 5.00405;
  27. use strict;
  28. use Texinfo::Convert::TexinfoSXML;
  29. use Texinfo::Convert::IXIN;
  30. use Carp qw(cluck);
  31. require Exporter;
  32. use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
  33. @ISA = qw(Exporter Texinfo::Convert::TexinfoSXML Texinfo::Convert::IXIN);
  34. # Items to export into callers namespace by default. Note: do not export
  35. # names by default without a very good reason. Use EXPORT_OK instead.
  36. # Do not simply export all your public functions/methods/constants.
  37. # This allows declaration use Texinfo::Convert::IXIN ':all';
  38. # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
  39. # will save memory.
  40. %EXPORT_TAGS = ( 'all' => [ qw(
  41. output
  42. ) ] );
  43. @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
  44. @EXPORT = qw(
  45. );
  46. $VERSION = '6.3.90';
  47. my %defaults = (
  48. 'ENABLE_ENCODING' => 0,
  49. 'SHOW_MENU' => 1,
  50. 'EXTENSION' => 'ixin',
  51. #'output_perl_encoding' => 'utf8',
  52. 'OUTPUT_ENCODING_NAME' => 'utf-8',
  53. # useful?
  54. 'TEXINFO_DTD_VERSION' => '5.0',
  55. 'OUTFILE' => undef,
  56. 'SUBDIR' => undef,
  57. 'output_format' => 'ixinsxml',
  58. 'SPLIT' => 0,
  59. 'documentlanguage' => 'en',
  60. 'USE_NODES' => 1,
  61. 'GLOBAL_COMMANDS' => ['image'],
  62. );
  63. sub converter_defaults($$)
  64. {
  65. return %defaults;
  66. }
  67. sub output($)
  68. {
  69. my $self = shift;
  70. my $root = shift;
  71. return $self->output_ixin($root);
  72. }