[docs] xmldocs - docelic modified 2 files
docs at icdevgroup.org
docs at icdevgroup.org
Mon Jan 3 15:41:02 EST 2005
User: docelic
Date: 2005-01-03 20:41:01 GMT
Modified: bin generic-autogen refs-autogen
Log:
- bin/refs-autogen:
- support 'vars' document (containing glob+cat vars)
- add separate xml template for vars
- bin/generic-autogen: add <toc/>, although it doesnt help for the moment
Revision Changes Path
1.11 +2 -0 xmldocs/bin/generic-autogen
rev 1.11, prev_rev 1.10
Index: generic-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/generic-autogen,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- generic-autogen 27 Dec 2004 01:06:10 -0000 1.10
+++ generic-autogen 3 Jan 2005 20:41:01 -0000 1.11
@@ -44,6 +44,8 @@
<glossary>
<title>Interchange Documentation: Glossary</title>
+<toc/>
+
__ENDP__
my $howtos = <<__ENDP__;
<?xml version="1.0" standalone="no"?>
1.79 +97 -2 xmldocs/bin/refs-autogen
rev 1.79, prev_rev 1.78
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- refs-autogen 27 Dec 2004 01:06:10 -0000 1.78
+++ refs-autogen 3 Jan 2005 20:41:01 -0000 1.79
@@ -82,6 +82,7 @@
# Summarized / compounds:
tag => "Tag",
conf => "Configuration directive",
+ var => "Global and catalog variable",
);
my %tagname = (
@@ -97,6 +98,7 @@
# Summarized:
tag => "tag",
conf => "option",
+ var => "varname",
);
# Default fields
@@ -113,6 +115,7 @@
purpose => "&DEF_PURPOSE;",
structure => "&DEF_STRUCTURE;",
'directive type' => "&DEF_DIRECTIVE_TYPE;",
+ 'variable type' => "&DEF_VARIABLE_TYPE;",
'filter type' => "&DEF_FILTER_TYPE;",
);
@@ -140,6 +143,7 @@
catvar => "",
pragma => "",
filter => "",
+ var => "",
);
my @paths = @ARGV; # Versions requested
@@ -181,6 +185,7 @@
if ( $compounds ) {
$gkey =~ /tag$/ and $name = 'tag';
$gkey =~ /conf$/ and $name = 'conf';
+ $gkey =~ /var$/ and $name = 'var';
$pref = "${gkey}s -> ";
}
@@ -283,6 +288,16 @@
push @{ $$ag{'_directive type'} }, "Catalog directive";
}
}
+ # This is just copied from above hoping to solve the problem
+ # for free.
+ if ( $gkey eq 'globvar' ) {
+ @{ $$ag{'_variable type'} } = ("Global variable");
+ if ( $hash{symbols}{catvar}{$key} ) {
+ push @{ $ar }, @{ $hash{symbols}{catvar}{$key} };
+ delete $hash{symbols}{catvar}{$key};
+ push @{ $$ag{'_variable type'} }, "Catalog variable";
+ }
+ }
if ( $ar ) {
$$ag{source} = "";
@@ -528,9 +543,13 @@
# Compress 4.6.0, 4.8.0, 5.0.0 to 4.6.0-5.0.0
$ag{'available in'} = compress_availability($ag{'_available in'});
+ # COMPOUNDS
$ag{"_directive type"} and
$ag{"directive type"} = join "<sbr/>\n", @{ $ag{"_directive type"} };
+ $ag{"_variable type"} and
+ $ag{"variable type"} = join "<sbr/>\n", @{ $ag{"_variable type"} };
+
# DONE
$ag{latest} = $hash{version};
@@ -613,8 +632,14 @@
%{ $symbols{catconf} },
};
+ $symbols{var} = {
+ %{ $symbols{globvar} },
+ %{ $symbols{catvar} },
+ };
+
delete @symbols{qw/systemtag usertag uitag/};
delete @symbols{qw/globconf catconf/};
+ delete @symbols{qw/globvar catvar/};
}
@@ -862,6 +887,8 @@
# we didn't modify the templates to do this trick, those old files
# can remain as-they-are and work properly !! Excellent.
my ( $sec, $title) = split /\s*:\s*/, $1, 2;
+ # XXX in the next line we don't treat ** example"2": title **
+ # properly!
$section = $sec;
$title = $title ? "<title>$title</title>" : "";
$pre_content = sprintf($item_header{$section}||"", $title);
@@ -1390,8 +1417,76 @@
</refentry>
__ENDP__
-$templates{globvar} = $templates{pragma};
-$templates{catvar} = $templates{pragma};
+
+$templates{globvar} = <<'__ENDP__';
+<refentry id="$ag{id}">
+
+<refmeta>
+<refentrytitle>$ag{"name"}</refentrytitle>
+<manvolnum>7ic</manvolnum>
+<refmiscinfo class="title">$ag{"name"}</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>$ag{"name"}</refname>
+<refpurpose>$ag{"purpose"}</refpurpose>
+</refnamediv>
+
+<refsect1 id='$ag{"name"}_synopsis'>
+<title>SYNOPSIS</title>
+<cmdsynopsis>
+$ag{"synopsis"}
+</cmdsynopsis>
+</refsect1>
+
+<refsect1 id='$ag{"name"}_description'>
+<title>DESCRIPTION</title>
+<para>$ag{"description"}</para>
+</refsect1>
+
+<refsect1 id='$ag{"name"}_type'>
+<title>VARIABLE TYPE</title>
+<para>$ag{"variable type"}</para>
+</refsect1>
+
+<refsect1 id='$ag{"name"}_examples'>
+<title>EXAMPLES</title>
+$ag{"example"}
+</refsect1>
+
+<refsect1 id='$ag{"name"}_notes'>
+<title>NOTES</title>
+<para>$ag{"notes"}</para>
+</refsect1>
+
+<refsect1 id='$ag{"name"}_availability'>
+<title>AVAILABILITY</title>
+<para>$ag{"name"} is available in Interchange versions:
+</para><para>
+$ag{"available in"}</para>
+</refsect1>
+
+<refsect1 id='$ag{"name"}_source'>
+<title>SOURCE</title>
+<para>Interchange $ag{"source ver"}:
+</para>
+$ag{source}
+</refsect1>
+
+<refsect1 id='$ag{"name"}_authors'>
+<title>AUTHORS</title>
+<para>$ag{"author"}</para>
+</refsect1>
+
+<refsect1 id='$ag{"name"}_seeAlso'>
+<title>SEE ALSO</title>
+<para>$ag{"see also"}</para>
+</refsect1>
+
+</refentry>
+__ENDP__
+
+$templates{catvar} = $templates{globvar};
$templates{uitag} = $templates{usertag};
$templates{systemtag} = $templates{usertag};
$templates{catconf} = $templates{globconf};
More information about the docs
mailing list