[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo tp/MANIFEST ChangeLog TODO util/Makefil...
From: |
Patrice Dumas |
Subject: |
texinfo tp/MANIFEST ChangeLog TODO util/Makefil... |
Date: |
Sun, 09 Sep 2012 22:46:00 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 12/09/09 22:46:00
Modified files:
tp : MANIFEST
. : ChangeLog TODO
util : Makefile.am
Added files:
util : txixml2texi.pl
Log message:
* util/Makefile.am, util/txixml2texi.pl, TODO: add a new script,
txixml2texi that convert Texinfo XML to Texinfo code.
TODO, MANIFEST: other updates.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/MANIFEST?cvsroot=texinfo&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/texinfo/ChangeLog?cvsroot=texinfo&r1=1.1411&r2=1.1412
http://cvs.savannah.gnu.org/viewcvs/texinfo/TODO?cvsroot=texinfo&r1=1.66&r2=1.67
http://cvs.savannah.gnu.org/viewcvs/texinfo/util/Makefile.am?cvsroot=texinfo&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/texinfo/util/txixml2texi.pl?cvsroot=texinfo&rev=1.1
Patches:
Index: tp/MANIFEST
===================================================================
RCS file: /sources/texinfo/texinfo/tp/MANIFEST,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- tp/MANIFEST 22 Aug 2012 21:45:10 -0000 1.45
+++ tp/MANIFEST 9 Sep 2012 22:46:00 -0000 1.46
@@ -155,6 +155,7 @@
t/accents.t
t/automatic_menus.t
t/automatic_nodes.t
+t/collect_spaces.t
t/converters_tests.t
t/do_master_menu.t
t/docbook_tests.t
@@ -344,6 +345,7 @@
t/results/converters_tests/at_commands_in_refs_utf8/res_html/someone_0040somewher-no_005fexplain_0040there.html
t/results/converters_tests/at_commands_in_refs_utf8/res_info/at_commands_in_refs_utf8.info
t/results/converters_tests/char_latin1_latin1_in_refs.pl
+t/results/converters_tests/char_latin1_latin1_in_refs/res_docbook/char_latin1_utf8_in_refs.xml
t/results/converters_tests/char_latin1_latin1_in_refs/res_html/a-e-i-o-u-A-E-I-O-U.html
t/results/converters_tests/char_latin1_latin1_in_refs/res_html/a-e-i-o-u-y-A-E-I-O-U.html
t/results/converters_tests/char_latin1_latin1_in_refs/res_html/a-e-u.html
@@ -351,6 +353,7 @@
t/results/converters_tests/char_latin1_latin1_in_refs/res_html/e.html
t/results/converters_tests/char_latin1_latin1_in_refs/res_html/index.html
t/results/converters_tests/char_latin1_latin1_in_refs/res_info/char_latin1_utf8_in_refs.info
+t/results/converters_tests/char_latin1_latin1_in_refs/res_xml/char_latin1_utf8_in_refs.xml
t/results/converters_tests/char_latin1_utf8_in_refs.pl
t/results/converters_tests/char_latin1_utf8_in_refs/res_html/a-e-i-o-u-A-E-I-O-U.html
t/results/converters_tests/char_latin1_utf8_in_refs/res_html/a-e-i-o-u-y-A-E-I-O-U.html
@@ -378,6 +381,7 @@
t/results/converters_tests/japanese_shift_jis/res_html/Preface.html
t/results/converters_tests/japanese_shift_jis/res_html/index.html
t/results/converters_tests/japanese_shift_jis/res_info/japanese_shift_jis.info
+t/results/converters_tests/line_breaks.pl
t/results/converters_tests/no_documentencoding_and_insertions.pl
t/results/converters_tests/normal_font_in_monospace.pl
t/results/converters_tests/raw_block_commands.pl
@@ -940,6 +944,7 @@
t/results/misc_commands/test_allowcodebreaks.pl
t/results/misc_commands/text_before_and_after_bye.pl
t/results/misc_commands/text_before_line_command.pl
+t/results/misc_commands/vskip.pl
t/results/multitable/empty_item_tab.pl
t/results/multitable/empty_multitable_with_cells.pl
t/results/multitable/inter_item_commands_in_multitable.pl
@@ -951,6 +956,7 @@
t/results/multitable/multitable_one_column_too_much_cells.pl
t/results/multitable/multitable_two_columns_too_much_cells.pl
t/results/multitable/multitable_with_empty_item_tab.pl
+t/results/multitable/not_letters_in_prototype.pl
t/results/multitable/paragraph_in_cells.pl
t/results/multitable/prototype_brace_no_brace.pl
t/results/multitable/prototype_brace_no_brace_comment.pl
@@ -1207,6 +1213,7 @@
t/results/sectioning/top_no_argument_and_node.pl
t/results/sectioning/top_no_argument_and_top_node.pl
t/results/sectioning/top_node_no_menu_direction.pl
+t/results/sectioning/top_node_part_top.pl
t/results/sectioning/top_node_up_url.pl
t/results/sectioning/top_part_chapter.pl
t/results/sectioning/top_without_node_nodes.pl
@@ -1254,11 +1261,19 @@
t/results/verb/verb_at_end_of_line_not_closed.pl
t/results/verb/verb_not_closed.pl
t/results/verb/verb_not_closed_with_char.pl
+t/results/xml_tests/brace_commands_spaces_end_of_lines.pl
+t/results/xml_tests/commands_and_spaces.pl
+t/results/xml_tests/comments_end_lines.pl
t/results/xml_tests/comments_on_block_command_lines.pl
+t/results/xml_tests/comments_on_misc_command_line.pl
t/results/xml_tests/image_inline_or_not.pl
+t/results/xml_tests/lone_bye.pl
t/results/xml_tests/macro_and_args.pl
+t/results/xml_tests/node_and_bye.pl
t/results/xml_tests/node_no_section.pl
t/results/xml_tests/raw.pl
+t/results/xml_tests/raw_and_comments.pl
+t/results/xml_tests/spaces_info_lost.pl
t/results/xtable/accent_on_table_line.pl
t/results/xtable/block_commands_in_table.pl
t/results/xtable/comment_and_itemx_before_item.pl
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.1411
retrieving revision 1.1412
diff -u -b -r1.1411 -r1.1412
--- ChangeLog 9 Sep 2012 19:16:49 -0000 1.1411
+++ ChangeLog 9 Sep 2012 22:46:00 -0000 1.1412
@@ -1,3 +1,8 @@
+2012-09-10 Patrice Dumas <address@hidden>
+
+ * util/Makefile.am, util/txixml2texi.pl, TODO: add a new script,
+ txixml2texi that convert Texinfo XML to Texinfo code.
+
2012-09-09 Karl Berry <address@hidden>
* doc/texinfo.txi (acronym): mention likely desirability
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/TODO,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- TODO 22 Jul 2012 22:32:43 -0000 1.66
+++ TODO 9 Sep 2012 22:46:00 -0000 1.67
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.66 2012/07/22 22:32:43 pertusus Exp $
+$Id: TODO,v 1.67 2012/09/09 22:46:00 pertusus Exp $
This is the todo list for GNU Texinfo.
If you are interested in working on any of these, email address@hidden
@@ -41,7 +41,6 @@
- Or even multibyte languages like Japanese, see msg:
http://lists.gnu.org/archive/html/bug-texinfo/2005-03/msg00000.html
- Support general reference card creation.
- - Add a program that turns Texinfo XML back to Texinfo code.
* Language:
- Allow : in node names for info files, for names like
@@ -50,6 +49,7 @@
solution, although this is an incompatible change to Info format.
- @else for the @if... conditionals.
- @xindexterm [def] primary [,secondary [,tertiary]] or some such?
+ - Add a @sortkey command for indices like @findex @sortkey{command} @@command
- Allow subitems and `see' and `see also' in indices.
- generalize @vtable/@htable to any defined index.
- generalize @deffn/etc. with variants that don't make index entries.
@@ -107,10 +107,14 @@
- location of text before the information required to understand them:
* 2 Using Texinfo Mode: before the Texinfo language description
* 4.1 Printing Indices and Menus: before @node, @unnumbered and indices
- - htmlxref.cnf is still not taken into account at the beginning of
- HTML Xref nodes
- The Cross References node is very long and maybe should
start with the most general uses and proceed to special cases.
+ - Strange sentence in @node key:
+ As a convention in GNU manuals, @code{@@key} should not be used in
+ index entries.
+ - codequoteundirected/codequotebacktick. Is the following correct?
+ These settings affect @code, @example, @samp, verb, and @verbatim;
+ they do not affect @kbd.
- new section on doing dedication pages. See gawk.texi
for an example of doing it in both the tex and info versions.
- use an improved pod2texi to generate documentation of the perl modules
Index: util/Makefile.am
===================================================================
RCS file: /sources/texinfo/texinfo/util/Makefile.am,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- util/Makefile.am 11 Jun 2012 17:54:28 -0000 1.45
+++ util/Makefile.am 9 Sep 2012 22:46:00 -0000 1.46
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.45 2012/06/11 17:54:28 karl Exp $
+# $Id: Makefile.am,v 1.46 2012/09/09 22:46:00 pertusus Exp $
# Makefile.am for texinfo/util.
# Run automake in .. to produce Makefile.in from this.
#
@@ -15,11 +15,17 @@
bin_PROGRAMS = texindex
bin_SCRIPTS = texi2dvi texi2pdf pdftexi2dvi
+nodist_noinst_SCRIPTS = txixml2texi
# for auctex.
pdftexi2dvi: texi2pdf
cp -f $(srcdir)/texi2pdf $@
+txixml2texi: txixml2texi.pl Makefile
+ sed -e 's,address@hidden@],$(datadir),g' \
+ -e 's,address@hidden@],$(PACKAGE),g' $(srcdir)/$< >$@
+ chmod a+x $@
+
localedir = $(datadir)/locale
AM_CPPFLAGS = \
-I$(top_srcdir) \
@@ -43,8 +49,9 @@
install-info-html outline.gawk pdftexi2dvi \
prepinfo.awk tex3patch texi-docstring-magic.el texi2dvi texi2pdf txitextest \
$(dist_pkgdata_DATA) texinfo-cat.in texi-elements-by-size \
- texi2html
+ texi2html txixml2texi.pl
+DISTCLEANFILES = txixml2texi
# We must not stress people's TeX installations.
# In Automake 1.11, we'll have a switchable maintainer mode.
Index: util/txixml2texi.pl
===================================================================
RCS file: util/txixml2texi.pl
diff -N util/txixml2texi.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ util/txixml2texi.pl 9 Sep 2012 22:46:00 -0000 1.1
@@ -0,0 +1,408 @@
+#! /usr/bin/env perl
+#
+# texixml2texi -- convert Texinfo XML to Texinfo code
+#
+# Copyright 2012 Free Software Foundation, Inc.
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+# Original author: Patrice Dumas <address@hidden>
+
+use strict;
+use Getopt::Long qw(GetOptions);
+# for dirname.
+use File::Basename;
+
+Getopt::Long::Configure("gnu_getopt");
+
+BEGIN {
+ my $dir;
+ if ('@datadir@' ne '@' . 'datadir@') {
+ my $pkgdatadir = eval '"@datadir@/@PACKAGE@"';
+ my $datadir = eval '"@datadir@"';
+ $dir = $pkgdatadir;
+ } elsif (($0 =~ /\.pl$/ and !(defined($ENV{'TEXINFO_DEV_SOURCE'})
+ and $ENV{'TEXINFO_DEV_SOURCE'} eq 0)) or $ENV{'TEXINFO_DEV_SOURCE'}) {
+ my $srcdir = defined $ENV{'srcdir'} ? $ENV{'srcdir'} : dirname $0;
+ my $tpdir = "$srcdir/../tp";
+ $dir = "$tpdir/maintain";
+ unshift @INC, $tpdir;
+ }
+ if (defined($dir)) {
+ unshift @INC, (
+ "$dir/lib/libintl-perl/lib",
+ "$dir/lib/Unicode-EastAsianWidth/lib",
+ "$dir/lib/Text-Unidecode/lib");
+ }
+}
+
+use XML::LibXML::Reader;
+
+# gather information on Texinfo XML elements
+use Texinfo::Common;
+use Texinfo::Convert::XML;
+
+my $debug = 0;
+my $result_options = Getopt::Long::GetOptions (
+ 'debug|d' => \$debug,
+);
+
+sub command_with_braces($)
+{
+ my $command = shift;
+ if ($command =~ /^[a-z]/i) {
+ return "\@".$command.'{}';
+ } else {
+ return "\@".$command;
+ }
+}
+
+my %ignored_elements = (
+ 'prepend' => 1,
+ 'formalarg' => 1,
+ # not ignored everytime
+ 'indexterm' => 1,
+);
+
+my %elements_end_attributes = (
+ 'accent' => 1,
+ 'menunode' => 1,
+ 'menutitle' => 1,
+);
+
+my %element_at_commands;
+my %entity_texts = (
+ 'textldquo' => '``',
+ 'textrdquo' => "''",
+ 'textmdash' => '---',
+ 'textndash' => '--',
+ 'textrsquo' => "'",
+ 'textlsquo' => '`',
+);
+
+foreach my $command (keys(%Texinfo::Convert::XML::xml_commands_formatting)) {
+ my $xml_output = $Texinfo::Convert::XML::xml_commands_formatting{$command};
+ if ($xml_output =~ /^&(\w+);$/) {
+ my $entity = $1;
+ $entity_texts{$entity} = command_with_braces($command);
+ #print STDERR "$xml_output $command $1\n";
+ } elsif ($xml_output =~ /^<(\w+)/) {
+ my $element = $1;
+ if ($element eq 'spacecmd') {
+ if ($xml_output =~ /^<(\w+) type="(\w+)"/) {
+ $element_at_commands{$element}->{"type"}->{$2}
+ = command_with_braces($command);
+ }
+ } else {
+ $element_at_commands{$element} = command_with_braces($command);
+ }
+ }
+}
+$element_at_commands{'accent'} = 0;
+
+my %arg_elements;
+foreach my $command (keys(%Texinfo::Convert::XML::commands_args_elements)) {
+ my $arg_index = 0;
+ foreach my $element_argument
(@{$Texinfo::Convert::XML::commands_args_elements{$command}}) {
+ $arg_elements{$element_argument} = [$arg_index, $command];
+ $arg_index++;
+ }
+}
+
+my %accent_type_command;
+foreach my $accent_command (keys(%Texinfo::Convert::XML::xml_accent_types)) {
+
$accent_type_command{$Texinfo::Convert::XML::xml_accent_types{$accent_command}}
+ = $accent_command;
+}
+
+my %eat_space_elements;
+foreach my $element ('texinfo', 'filename') {
+ $eat_space_elements{$element} = 1;
+}
+
+my $infile = shift @ARGV;
+
+if (!defined($infile) or $infile !~ /\S/) {
+ die "Missing file\n";
+}
+
+my $reader = XML::LibXML::Reader->new('location' => $infile,
+ 'expand_entities' => 0,
+ )
+ or die "cannot read $infile\n";
+
+#(my $mydir = $0) =~ s,/[^/]*$,,; # dir we are in
+#my $txi_dtd_libdir = "$mydir"; # find tp relative to $0
+
+sub skip_until_end($$)
+{
+ my $reader = shift;
+ my $name = shift;
+ while ($reader->read) {
+ if ($reader->nodeType() eq XML_READER_TYPE_END_ELEMENT
+ and $reader->name eq $name) {
+ return;
+ }
+ }
+}
+
+my $eat_space = 0;
+my @commands_with_args_stack;
+
+while ($reader->read) {
+
+ # ============================================================ begin debug
+ if ($debug) {
+ printf STDERR "(args: @commands_with_args_stack) (eat_space $eat_space) %d
%d %s %d", ($reader->depth,
+ $reader->nodeType,
+ $reader->name,
+ $reader->isEmptyElement);
+ my $value = '';
+ if ($reader->hasValue()) {
+ $value = $reader->value();
+ $value =~ s/\n/\\n/g;
+ print STDERR " |$value|";
+ }
+ if ($reader->nodeType() eq XML_READER_TYPE_ELEMENT
+ and $reader->hasAttributes()
+ and defined($reader->getAttribute('spaces'))) {
+ my $spaces = $reader->getAttribute('spaces');
+ print STDERR " spaces:$spaces|";
+ }
+ print STDERR "\n";
+ }
+ # ============================================================ end debug
+
+ if ($reader->nodeType() eq XML_READER_TYPE_SIGNIFICANT_WHITESPACE
+ and $eat_space) {
+ $eat_space = 0;
+ next;
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_TEXT
+ or $reader->nodeType() eq XML_READER_TYPE_WHITESPACE
+ or $reader->nodeType() eq XML_READER_TYPE_SIGNIFICANT_WHITESPACE
+ ) {
+ if ($reader->hasValue()) {
+ print $reader->value();
+ }
+ }
+ my $name = $reader->name;
+ if ($reader->nodeType() eq XML_READER_TYPE_ELEMENT) {
+ if (($name eq 'entry' or $name eq 'indexcommand')
+ and $reader->hasAttributes()
+ and defined($reader->getAttribute('command'))) {
+ $name = $reader->getAttribute('command');
+ } elsif ($name eq 'listitem') {
+ $name = 'item';
+ }
+ if ($Texinfo::Convert::XML::commands_args_elements{$name}) {
+ push @commands_with_args_stack, 0;
+ }
+ if (exists $element_at_commands{$name}) {
+ if ($name eq 'accent') {
+ if ($reader->hasAttributes()) {
+ if (defined($reader->getAttribute('type'))) {
+ my $command = $accent_type_command{$reader->getAttribute('type')};
+ print "address@hidden"
+ if (defined($command));
+ }
+ if (!defined($reader->getAttribute('spaces'))
+ and !(defined($reader->getAttribute('bracketed'))
+ and $reader->getAttribute('bracketed') eq 'off')) {
+ print '{';
+ }
+ } else {
+ print '{';
+ }
+ } elsif (!ref($element_at_commands{$name})) {
+ print $element_at_commands{$name};
+ } else {
+ my ($attribute) = keys(%{$element_at_commands{$name}});
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute($attribute))) {
+ print
+
$element_at_commands{$name}->{$attribute}->{$reader->getAttribute($attribute)};
+ }
+ }
+ } elsif (exists($Texinfo::Common::brace_commands{$name})) {
+ print "address@hidden";
+ if ($name eq 'verb' and $reader->hasAttributes()
+ and defined($reader->getAttribute('delimiter'))) {
+ print $reader->getAttribute('delimiter');
+ }
+ } elsif (exists($Texinfo::Common::block_commands{$name})) {
+ print "address@hidden";
+ if ($name eq 'macro') {
+ if ($reader->hasAttributes() and
defined($reader->getAttribute('line'))) {
+ print $reader->getAttribute('line');
+ }
+ print "\n";
+ }
+ } elsif (defined($Texinfo::Common::misc_commands{$name})) {
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('originalcommand'))) {
+ $name = $reader->getAttribute('originalcommand');
+ }
+ if ($name eq 'documentencoding' and $reader->hasAttributes()
+ and defined($reader->getAttribute('encoding'))) {
+ my ($texinfo_encoding, $perl_encoding, $output_encoding)
+ =
Texinfo::Encoding::encoding_alias($reader->getAttribute('encoding'));
+
+ if (defined($perl_encoding)) {
+ if ($debug) {
+ print STDERR "Using encoding $perl_encoding\n";
+ }
+ binmode(STDOUT, ":encoding($perl_encoding)");
+ }
+ }
+ print "address@hidden";
+ if ($reader->hasAttributes() and defined($reader->getAttribute('line')))
{
+ print $reader->getAttribute('line');
+ }
+ if ($name eq 'set' or $name eq 'clickstyle') {
+ skip_until_end($reader, $name);
+ }
+ } elsif ($arg_elements{$name}) {
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('automatic'))
+ and $reader->getAttribute('automatic') eq 'on') {
+ skip_until_end($reader, $name);
+ next;
+ }
+ while ($arg_elements{$name}->[0]
+ and $commands_with_args_stack[-1] < $arg_elements{$name}->[0]) {
+ $commands_with_args_stack[-1]++;
+ print ',';
+ }
+ } elsif ($ignored_elements{$name}) {
+ my $keep_indexterm = 0;
+ if ($name eq 'indexterm') {
+ my $node_path = $reader->nodePath();
+ if ($node_path =~ m:([a-z]+)/indexterm$:) {
+ my $parent = $1;
+ if ($parent =~ /^[a-z]?[a-z]index$/ or $parent eq 'indexcommand') {
+ $keep_indexterm = 1;
+ }
+ }
+ }
+ if (!$keep_indexterm) {
+ skip_until_end($reader, $name);
+ next;
+ }
+ } elsif ($name eq 'formattingcommand') {
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('command'))) {
+ print '@'.$reader->getAttribute('command');
+ }
+ # def* automatic
+ } elsif ($reader->hasAttributes()
+ and defined($reader->getAttribute('automatic'))
+ and $reader->getAttribute('automatic') eq 'on') {
+ skip_until_end($reader, $name);
+ # eat the following space
+ $reader->read();
+ } elsif ($eat_space_elements{$name}) {
+ $eat_space = 1;
+ } else {
+ print STDERR "UNKNOWN $name\n" if ($debug);
+ }
+ if ($reader->hasAttributes()) {
+ if (defined($reader->getAttribute('bracketed'))
+ and $reader->getAttribute('bracketed') eq 'on') {
+ print '{';
+ }
+ if (defined($reader->getAttribute('spaces'))) {
+ my $spaces = $reader->getAttribute('spaces');
+ $spaces =~ s/\\n/\n/g;
+ print $spaces;
+ }
+ if (defined($reader->getAttribute('leadingtext'))) {
+ print $reader->getAttribute('leadingtext');
+ }
+ }
+ if ($Texinfo::Common::item_line_commands{$name}
+ and $reader->hasAttributes()
+ and defined($reader->getAttribute('commandarg'))) {
+ print '@'.$reader->getAttribute('commandarg');
+ }
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_END_ELEMENT) {
+ if ($Texinfo::Convert::XML::commands_args_elements{$name}) {
+ pop @commands_with_args_stack;
+ }
+ if ($reader->hasAttributes()) {
+ if (defined($reader->getAttribute('bracketed'))
+ and $reader->getAttribute('bracketed') eq 'on') {
+ print '}';
+ }
+ }
+ if (exists ($Texinfo::Common::brace_commands{$name})) {
+ if ($name eq 'verb' and $reader->hasAttributes()
+ and defined($reader->getAttribute('delimiter'))) {
+ print $reader->getAttribute('delimiter');
+ }
+ print '}';
+ } elsif (exists($Texinfo::Common::block_commands{$name})) {
+ my $end_spaces;
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('endspaces'))) {
+ $end_spaces = $reader->getAttribute('endspaces');
+ }
+ $end_spaces = ' ' if (!defined($end_spaces) or $end_spaces eq '');
+ print "address@hidden".$end_spaces."$name";
+ } elsif (defined($Texinfo::Common::misc_commands{$name})) {
+ if ($Texinfo::Common::root_commands{$name} and $name ne 'node') {
+ $eat_space = 1;
+ }
+ } elsif ($elements_end_attributes{$name}) {
+ if ($name eq 'accent') {
+ if ($reader->hasAttributes()) {
+ if (!defined($reader->getAttribute('spaces'))
+ and !(defined($reader->getAttribute('bracketed'))
+ and $reader->getAttribute('bracketed') eq 'off')) {
+ print '}';
+ }
+ } else {
+ print '}';
+ }
+ } elsif ($reader->hasAttributes()
+ and defined($reader->getAttribute('separator'))) {
+ print $reader->getAttribute('separator');
+ }
+ } elsif ($eat_space_elements{$name}) {
+ $eat_space = 1;
+ } else {
+ print STDERR "END UNKNOWN $name\n" if ($debug);
+ }
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('trailingspaces'))) {
+ print $reader->getAttribute('trailingspaces');
+ }
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_ENTITY_REFERENCE) {
+ if (defined($entity_texts{$name})) {
+ print $entity_texts{$name};
+ }
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_COMMENT) {
+ my $comment;
+ if ($reader->hasValue()) {
+ $comment = $reader->value();
+ $comment =~ s/^ (comment|c)//;
+ my $command = $1;
+ $comment =~ s/ $//;
+ print "address@hidden";
+ }
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_DOCUMENT_TYPE) {
+ $eat_space = 1;
+ }
+}
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo tp/MANIFEST ChangeLog TODO util/Makefil...,
Patrice Dumas <=