[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Convert/XML.pm t/results/xml...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Convert/XML.pm t/results/xml... |
Date: |
Tue, 06 Sep 2011 23:27:53 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/09/06 23:27:52
Modified files:
tp/Texinfo/Convert: XML.pm
tp/t/results/xml_tests: comments_on_block_command_lines.pl
image_inline_or_not.pl
Log message:
Let XML for @table @item follow the tree structure.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/XML.pm?cvsroot=texinfo&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/xml_tests/comments_on_block_command_lines.pl?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/xml_tests/image_inline_or_not.pl?cvsroot=texinfo&r1=1.2&r2=1.3
Patches:
Index: Texinfo/Convert/XML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/XML.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- Texinfo/Convert/XML.pm 6 Sep 2011 23:04:02 -0000 1.18
+++ Texinfo/Convert/XML.pm 6 Sep 2011 23:27:52 -0000 1.19
@@ -18,9 +18,13 @@
# Original author: Patrice Dumas <address@hidden>
# msg Karl:
-# preformatted -> pre
-# <tableterm command="item">
-# 'command_as_argument' -> apply it? definfoenclosed? attribute
automatic=on?
+# preformatted -> <pre xml:space="preserve">
+# if a 'command_as_argument' is definfoenclosed should lead to
+# @definfoenclose a,:,:
+# <table commandarg="a" begin=":" end=":">
+# ..... <item><itemformat infoenclose="a" begin=":" end=":"> ...
+# @itemize: add a <prepend>•</prepend> if needed.
+# consistently use command="@$command"
package Texinfo::Convert::XML;
@@ -226,8 +230,9 @@
'menu_entry_description' => 'menudescription',
'menu_entry_name' => 'menutitle',
'preamble' => 'preamble',
- 'table_item' => 'item',
- 'table_entry' => 'tableitem',
+ 'table_item' => 'tableitem',
+ 'table_entry' => 'tableentry',
+ 'table_term' => 'tableterm',
'row' => 'row',
'multitable_head' => 'thead',
'multitable_body' => 'tbody',
@@ -435,17 +440,16 @@
and $root->{'parent'}->{'type'}
and $root->{'parent'}->{'type'} eq 'table_term') {
my $table_command = $root->{'parent'}->{'parent'}->{'parent'};
- my $format_item_attribute;
my $format_item_command;
if ($table_command->{'extra'}
and $table_command->{'extra'}->{'command_as_argument'}) {
$format_item_command
= $table_command->{'extra'}->{'command_as_argument'}->{'cmdname'};
- $format_item_attribute = " itemfunction=\"$format_item_command\"";
- } else {
- $format_item_attribute = '';
}
- $result .= "<tableterm
command=\"$root->{'cmdname'}\"${format_item_attribute}>";
+ $result .= "<$root->{'cmdname'}>";
+ if ($format_item_command) {
+ $result .= "<itemformat command=\"address@hidden">";
+ }
$result .= $self->_index_entry($root);
# FIXME
my $in_code;
@@ -457,7 +461,10 @@
$result .= $self->_convert($root->{'args'}->[0]);
$self->{'document_context'}->[-1]->{'code'}-- if ($in_code);
chomp ($result);
- $result .= "</tableterm>\n";
+ if ($format_item_command) {
+ $result .= "</itemformat>";
+ }
+ $result .= "</$root->{'cmdname'}>\n";
} else {
unless (($root->{'cmdname'} eq 'item'
or $root->{'cmdname'} eq 'headitem'
Index: t/results/xml_tests/comments_on_block_command_lines.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/xml_tests/comments_on_block_command_lines.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/results/xml_tests/comments_on_block_command_lines.pl 6 Sep 2011
23:04:04 -0000 1.1
+++ t/results/xml_tests/comments_on_block_command_lines.pl 6 Sep 2011
23:27:52 -0000 1.2
@@ -2441,8 +2441,8 @@
</para></item></enumerate>
<table commandarg="@asis"><!-- table -->
-<tableitem><tableterm command="item" itemfunction="asis">it</tableterm>
-</tableitem></table>
+<tableentry><tableterm><item><itemformat command="@asis">it</itemformat></item>
+</tableterm></tableentry></table>
<quotation><!-- quot no arg -->
<para>Quot no arg
Index: t/results/xml_tests/image_inline_or_not.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/xml_tests/image_inline_or_not.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/xml_tests/image_inline_or_not.pl 6 Sep 2011 23:04:05 -0000
1.2
+++ t/results/xml_tests/image_inline_or_not.pl 6 Sep 2011 23:27:52 -0000
1.3
@@ -2248,14 +2248,14 @@
</quotation>
<table commandarg="@asis">
-<tableitem><tableterm command="item" itemfunction="asis"><image
where="inline"><imagefile>in_table_item</imagefile><image></tableterm>
-<item>
+<tableentry><tableterm><item><itemformat command="@asis"><image
where="inline"><imagefile>in_table_item</imagefile><image></itemformat></item>
+</tableterm><tableitem>
<image><imagefile>in_table_def</imagefile><image>
<para>AA <image where="inline"><imagefile>in_table_def_para</imagefile><image>
</para>
<image><imagefile>in_table_def_after</imagefile><image>
-</item></tableitem></table>
+</tableitem></tableentry></table>
<menu>
<menuentry><menunode><image
where="inline"><imagefile>node_image</imagefile><image></menunode><menudescription><image
where="inline"><imagefile>image_in_description</imagefile><image>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp Texinfo/Convert/XML.pm t/results/xml...,
Patrice Dumas <=