[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo/Convert XML.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo/Convert XML.pm |
Date: |
Sat, 03 Sep 2011 23:54:34 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/09/03 23:54:34
Modified files:
tp/Texinfo/Convert: XML.pm
Log message:
Handle @multitable args.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/XML.pm?cvsroot=texinfo&r1=1.12&r2=1.13
Patches:
Index: XML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/XML.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- XML.pm 3 Sep 2011 23:35:51 -0000 1.12
+++ XML.pm 3 Sep 2011 23:54:34 -0000 1.13
@@ -31,6 +31,7 @@
# <ftable commandarg="asis"> or <itemize commandarg="bullet">
# in itemize <itemfunction> -> <itemprepend>?
# no more <floatpos>
+# both inlineimage and image?
package Texinfo::Convert::XML;
@@ -671,7 +672,8 @@
."\"";
}
$result .= "<$root->{'cmdname'}${attribute}>";
- if ($root->{'args'} and $commands_args_elements{$root->{'cmdname'}}) {
+ if ($root->{'args'}) {
+ if ($commands_args_elements{$root->{'cmdname'}}) {
my $arg_index = 0;
foreach my $element (@{$commands_args_elements{$root->{'cmdname'}}}) {
if (defined($root->{'args'}->[$arg_index])) {
@@ -683,7 +685,6 @@
my $arg = $self->_convert($root->{'args'}->[$arg_index]);
chomp($arg);
if ($arg ne '') {
-
$result .= "<$element>$arg</$element>\n";
}
$self->{'document_context'}->[-1]->{'code'}-- if ($in_code);
@@ -692,6 +693,20 @@
}
$arg_index++;
}
+ } elsif ($root->{'cmdname'} eq 'multitable' and $root->{'extra'}) {
+ if ($root->{'extra'}->{'prototypes'}) {
+ foreach my $prototype (@{$root->{'extra'}->{'prototypes'}}) {
+ $result .= "<columnprototype>".$self->_convert($prototype)
+ ."</columnprototype>";
+ }
+ } elsif ($root->{'extra'}->{'columnfractions'}) {
+ $result .= "<columnfractions>";
+ foreach my $fraction (@{$root->{'extra'}->{'columnfractions'}}) {
+ $result .= "<columnfraction
value=\"$fraction\"></columnfraction>";
+ }
+ $result .= "</columnfractions>";
+ }
+ }
}
chomp($result);
$result .= "\n";
@@ -811,11 +826,6 @@
# return '<verbatim xml:space="preserve">' . &$protect_text($text) .
'</verbatim>';
-#<columnfraction fraction="0.4"></columnfraction><columnfraction
fraction="0.6"></columnfraction>
-
-#If prototypes are used, something along
-#<columnprototype fraction="0.7">prototy</columnprototype><columnprototype
fraction="0.5">pro</columnprototype>
-
# $complex_format_map{$complex_format}->{'begin'} = "<$complex_format
xml:space=\"preserve\">";
# $complex_format_map{$complex_format}->{'end'} = "</$complex_format>";
@@ -823,9 +833,6 @@
# $tag = 'image' if ($preformatted or !$in_paragraph);
# return "<$tag width=\"$width\" height=\"$height\" name=\"".
&$protect_text($base)."\"
extension=\"$extension\"><alttext>$alt</alttext></$tag>";
-#quotation
-# return "<$command>\n" . $text . "</$command>\n";
-
#%def_format_xml = (
# 'deffn' => [ ['category', 'category'], ['function', 'name'] ],
# 'defvr' => [ ['category', 'category'], ['variable', 'name'] ],
- texinfo/tp/Texinfo/Convert XML.pm,
Patrice Dumas <=