Skip to content

Commit

Permalink
A large commit with many enhancements:
Browse files Browse the repository at this point in the history
- README: update to current
- TODO: items
- bin/refs-autogen: restructured the order of sections in generated refentries
- docbook/common.xsl: turned use.extensions to 0 (it prevented <table>s from working)
- docbook/xmldocs.css: definitions for table elements (needs more tuning)
- docbook/item-skel/*: adjusted
- refs/*/synopsis: adjusted to new scheme
  • Loading branch information
docelic committed Sep 24, 2004
1 parent 322e4c6 commit a0f2502
Show file tree
Hide file tree
Showing 34 changed files with 410 additions and 102 deletions.
49 changes: 38 additions & 11 deletions README
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ http://www.icdevgroup.org
ICDEVGROUP Documentation Set ICDEVGROUP Documentation Set
http://www.icdevgroup.org/cgi-bin/cvsweb/xmldocs/ http://www.icdevgroup.org/cgi-bin/cvsweb/xmldocs/


This is a technical look at the XMLDOCS system, and it tells you how to get
the documentation generated. For the XMLDOCS authoring QuickStart, see
guides/xmldocs.xml (or that is OUTPUT/xmldocs.html after you run 'make').



INTRODUCTION INTRODUCTION


Expand All @@ -24,9 +28,9 @@ targets would include:
make OUTPUT/iccattut.man make OUTPUT/iccattut.man


make OUTPUT/xmldocs.css make OUTPUT/xmldocs.css
make tmp/stattrees
make tmp/refs-autogen
make tmp/olinkdbs make tmp/olinkdbs
make tmp/stattrees (same as 'make cache')
make tmp/refs-autogen (same as 'make refxmls')




PREREQUISITES PREREQUISITES
Expand Down Expand Up @@ -59,8 +63,9 @@ During the invocation of 'make', few files will be created:
from it are created by bin/mkreport. from it are created by bin/mkreport.


The cache is Perl's portable Storable dump, and is only The cache is Perl's portable Storable dump, and is only
a convenience. If the binary is incompatible for you, a convenience. If the binary is incompatible for you
simply get Interchange sources and run bin/stattree yourself. (which often happens to be the case), simply get
Interchange sources and run bin/stattree yourself.


OUTPUT/ - Autogenerated: OUTPUT/ - Autogenerated:
directory containing the actual completely self-contained directory containing the actual completely self-contained
Expand All @@ -80,6 +85,7 @@ DEVELOPMENT NOTES
guides - Collection of guides guides - Collection of guides
howtos - Collection of howtos howtos - Collection of howtos
refs - Collection of reference pages refs - Collection of reference pages
glossary - Collection of glossary items
images - All images images - All images
tmp - (not in CVS) Scratch and temporary file space tmp - (not in CVS) Scratch and temporary file space
pending - A "pending" directory. pending - A "pending" directory.
Expand All @@ -91,7 +97,6 @@ DEVELOPMENT NOTES
in with subdirectories containing Interchange releases in with subdirectories containing Interchange releases
(say, 4.8.0/, 5.0.0/, 5.2.0, cvs-head/), then you can run (say, 4.8.0/, 5.0.0/, 5.2.0, cvs-head/), then you can run
'make tmp/stattrees' to generate the source tree information. 'make tmp/stattrees' to generate the source tree information.
Both sources/ and its subdirectories can be symlinks.




Updating cache/: Updating cache/:
Expand Down Expand Up @@ -119,11 +124,12 @@ DEVELOPMENT NOTES
files are filesystem interface to tree-level statistics, and can be files are filesystem interface to tree-level statistics, and can be
used in numerous ways, XInclude for example. used in numerous ways, XInclude for example.
Like: Interchange consists of <xi:include file='.../total.files'> files. Like: Interchange consists of <xi:include file='.../total.files'> files.
(Currently this is not enabled).




The XML "preprocessor" tool: The XML "preprocessor" tool:
There's bin/pp tool which you can use to write XML more conveniently. There's bin/pp tool which you can use to write larger blocks of
See the script itself for usage notes. XML more conveniently. See the script itself for usage notes.




Autogeneration of the reference pages: ** IMPORTANT ** Autogeneration of the reference pages: ** IMPORTANT **
Expand All @@ -139,9 +145,14 @@ DEVELOPMENT NOTES
other parts must be added manually by us. other parts must be added manually by us.


Let's take an example of "post_page" pragma (but the principle is the same Let's take an example of "post_page" pragma (but the principle is the same
for any symbol). User-supplied information is found in refs/<symbol>/ for any symbol). User-supplied information is found in either:
directory. Information which is needed to consider a symbol documentation
complete includes: o refs/<symbol>/ directory, or
o refs/<symbol> file, where multiple sections are defined using the
__NAME__ <section> and __END__ tokens (similar to IC profiles ;-).

Regardless of the way you document an item, the following information
is needed to consider the symbol documentation complete:


- autogenerated: - autogenerated:
id, name, symbol type, availability, source occurences id, name, symbol type, availability, source occurences
Expand All @@ -151,8 +162,10 @@ DEVELOPMENT NOTES
purpose, synopsis, description, examples, see also purpose, synopsis, description, examples, see also


All of those fields can both be overriden or appended with user-supplied All of those fields can both be overriden or appended with user-supplied
information. information:


o refs/<symbol>/* method (one-directory, multiple-files):

To unconditionally override values and/or provide one-liner contents, use To unconditionally override values and/or provide one-liner contents, use
refs/<symbol>/control file. It has pretty much inflexible "field: content" refs/<symbol>/control file. It has pretty much inflexible "field: content"
line format, but # comments can be used. line format, but # comments can be used.
Expand All @@ -177,6 +190,20 @@ DEVELOPMENT NOTES
To avoid having to escape all HTML entities and everything, simply To avoid having to escape all HTML entities and everything, simply
enclose "dirty" blocks in <![CDATA[ ... ]]>. enclose "dirty" blocks in <![CDATA[ ... ]]>.


o refs/<symbol> method (one-file):

All rules apply as above, except that instead of creating a new file
(say, refs/post_page/description), you add it to refs/post_page this way:

__NAME__ description
...anything...
__END__

Over time it appeared we only want to append information and never
override it, so this method does not have a way to override a value
like refs/<symbol>/control file can do.


** To create the documentation for a yet non-existant item or modify an ** To create the documentation for a yet non-existant item or modify an
** existing item, simply run bin/editem <name>. It will create all the ** existing item, simply run bin/editem <name>. It will create all the
** skeleton files, auto-let you edit the important files and do basic checks. ** skeleton files, auto-let you edit the important files and do basic checks.
Expand Down
4 changes: 4 additions & 0 deletions TODO
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PRIMARY:
- See why the autogenerated navigation links are so retarded (just home/up, - See why the autogenerated navigation links are so retarded (just home/up,
no next/prev) no next/prev)
- not to forget, fix cases where context goes to negative values - not to forget, fix cases where context goes to negative values
- Source contexts get some weird values reported in header information


- In iccattut: - In iccattut:
- under important file and directories, mention default username, - under important file and directories, mention default username,
Expand All @@ -23,6 +24,9 @@ PRIMARY:
bin/editem bin/editem
- in source contexts, wrap runaway lines - in source contexts, wrap runaway lines


HOWTOs:
- how to delete item from cart in all possible ways

DOCUMENTATION SYSTEM: DOCUMENTATION SYSTEM:
- copy the definition for <example> to a - copy the definition for <example> to a
new name so we'll be able to differentiate between source chunks and new name so we'll be able to differentiate between source chunks and
Expand Down
49 changes: 39 additions & 10 deletions bin/refs-autogen
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -607,8 +607,10 @@ $templates{pragma} = <<'__ENDP__';
</refnamediv> </refnamediv>
<refsect1 id='$ag{"name"}_synopsis'> <refsect1 id='$ag{"name"}_synopsis'>
<title>SYNOPSIS</title> <title>VALUE</title>
<cmdsynopsis>
$ag{"synopsis"} $ag{"synopsis"}
</cmdsynopsis>
</refsect1> </refsect1>
<refsect1 id='$ag{"name"}_default'> <refsect1 id='$ag{"name"}_default'>
Expand Down Expand Up @@ -677,31 +679,55 @@ $templates{usertag} = <<'__ENDP__';
<refpurpose>$ag{"purpose"}</refpurpose> <refpurpose>$ag{"purpose"}</refpurpose>
</refnamediv> </refnamediv>
<refsect1 id='$ag{"name"}_description'>
<title>DESCRIPTION</title>
<para>$ag{"description"}</para>
</refsect1>
<refsect1 id='$ag{"name"}_synopsis'> <refsect1 id='$ag{"name"}_synopsis'>
<title>SYNOPSIS</title> <title>PARAMETERS</title>
<informaltable cellspacing='4' cellpadding='2' pgwide='1'>
<tgroup cols='5' align='left' colsep='1' rowsep='1'>
<colspec colname='arg'/>
<colspec colname='pos'/>
<colspec colname='req'/>
<colspec colname='def'/>
<colspec colname='dsc'/>
<thead>
<row>
<entry>Argument</entry>
<entry>Pos.</entry>
<entry>Req.</entry>
<entry>Default</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
$ag{"synopsis"} $ag{"synopsis"}
</tbody>
</tgroup>
</informaltable>
</refsect1> </refsect1>
<!-- Disabled. I could remove it unless I do something useful with it.
<refsect1 id='$ag{"name"}_structure"}'> <refsect1 id='$ag{"name"}_structure"}'>
<title>TAG STRUCTURE</title> <title>TAG STRUCTURE</title>
<para>$ag{"structure"}</para> <para>$ag{"structure"}</para>
</refsect1> </refsect1>
-->
<refsect1 id='$ag{"name"}_description'> <refsect1 id='$ag{"name"}_notes'>
<title>DESCRIPTION</title> <title>NOTES</title>
<para>$ag{"description"}</para> <para>$ag{"notes"}</para>
</refsect1> </refsect1>
<refsect1 id='$ag{"name"}_examples'> <refsect1 id='$ag{"name"}_examples'>
<title>EXAMPLES</title> <title>EXAMPLES</title>
$ag{"example"} $ag{"example"}
</refsect1> </refsect1>
<refsect1 id='$ag{"name"}_notes'>
<title>NOTES</title>
<para>$ag{"notes"}</para>
</refsect1>
<refsect1 id='$ag{"name"}_availability'> <refsect1 id='$ag{"name"}_availability'>
<title>AVAILABILITY</title> <title>AVAILABILITY</title>
<para>$ag{"name"} is available in Interchange versions: <para>$ag{"name"} is available in Interchange versions:
Expand All @@ -721,10 +747,13 @@ $ag{source}
<para>$ag{"author"}</para> <para>$ag{"author"}</para>
</refsect1> </refsect1>
<!-- Removed because copyright is seen in Source (first few lines),
and the generated document starts with copyright notice
<refsect1 id='$ag{"name"}_copyright'> <refsect1 id='$ag{"name"}_copyright'>
<title>COPYRIGHT</title> <title>COPYRIGHT</title>
$ag{"copyright"} $ag{"copyright"}
</refsect1> </refsect1>
-->
<refsect1 id='$ag{"name"}_seeAlso'> <refsect1 id='$ag{"name"}_seeAlso'>
<title>SEE ALSO</title> <title>SEE ALSO</title>
Expand Down
2 changes: 1 addition & 1 deletion docbook/common.xsl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<xsl:param name="callout.graphics">1</xsl:param> <xsl:param name="callout.graphics">1</xsl:param>
<xsl:param name="callout.graphics.path">./images/</xsl:param> <xsl:param name="callout.graphics.path">./images/</xsl:param>


<xsl:param name="use.extensions">1</xsl:param> <xsl:param name="use.extensions">0</xsl:param>
<xsl:param name="textinsert.extension">1</xsl:param> <xsl:param name="textinsert.extension">1</xsl:param>


<!--<xsl:template match="tag"><xsl:text>[</xsl:text><xsl:call-template name="inline.monoseq"/><xsl:text>]</xsl:text></xsl:template>--> <!--<xsl:template match="tag"><xsl:text>[</xsl:text><xsl:call-template name="inline.monoseq"/><xsl:text>]</xsl:text></xsl:template>-->
Expand Down
2 changes: 0 additions & 2 deletions docbook/item-skel/bugs

This file was deleted.

2 changes: 1 addition & 1 deletion docbook/item-skel/example
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Template example. Fill in the title (in title), short description <!-- Template example. Fill in the title (in title), short description
(in para) and actual program chunk (inside listing/cdata). (in para) and actual program chunk (inside programlisting/cdata).
Delete those 3 lines of comments. --> Delete those 3 lines of comments. -->


<example> <example>
Expand Down
26 changes: 18 additions & 8 deletions docbook/item-skel/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,11 +1,21 @@
<!-- Where applicable, show syntax in a way which is opposite of the <!-- Syntax section appears to be very complex. The convention follows:
default value.


Describe various options inside 'description' file, not here. 1. pragmas/globvars (context is <cmdsynopsis>):
Delete those comment lines. <group choice='req'>
<arg choice='plain'>0</arg>
<arg choice='plain'>1</arg>
<arg choice='plain'><replaceable>string</replaceable></arg>
</group>


** If you're documenting a TAG, leave this file completely empty, 2. any kind of tags (context is <table> with all headers etc.):
syntax line for tags is autogenerated ** --> <row>
<entry>SYMBOL_ARGUMENT_NAME</entry>
<entry>POSITIONAL ('Yes' or empty)</entry>
<entry>REQUIRED ('Yes' or empty)</entry>
<entry>DEFAULT (number, description or <literal>value</literal>)</entry>
<entry>DESCRIPTION</entry>
</row>


<cmdsynopsis>
</cmdsynopsis> Take out the template that suits you best, edit it and delete all other
comments. -->
11 changes: 11 additions & 0 deletions docbook/xmldocs.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -300,3 +300,14 @@ a {
color: #208cbd; color: #208cbd;
} }



thead {
background-color: black;
color: white;
}

table, tbody,thead,tfoot, tr,td {
border-color: #8F8F8F;
border: dotted 1px;
}

2 changes: 0 additions & 2 deletions refs/CGIWRAP_WORKAROUND/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,4 @@
<cmdsynopsis>
<group choice='req'> <group choice='req'>
<arg choice='plain'>0</arg> <arg choice='plain'>0</arg>
<arg choice='plain'>1</arg> <arg choice='plain'>1</arg>
</group> </group>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_BAD_LOCK/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,4 @@
<cmdsynopsis>
<group choice='req'> <group choice='req'>
<arg choice='plain'>0</arg> <arg choice='plain'>0</arg>
<arg choice='plain'>1</arg> <arg choice='plain'>1</arg>
</group> </group>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_DOLLAR_ZERO/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,5 @@
<cmdsynopsis>
<group choice='req'> <group choice='req'>
<arg choice='plain'>0</arg> <arg choice='plain'>0</arg>
<arg choice='plain'>1</arg> <arg choice='plain'>1</arg>
<arg choice='plain'><replaceable>string</replaceable></arg> <arg choice='plain'><replaceable>string</replaceable></arg>
</group> </group>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_FILE/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1 @@
<cmdsynopsis>
@@MV_FILE@@ @@MV_FILE@@
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_GETPPID_BROKEN/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,4 @@
<cmdsynopsis>
<group choice='req'> <group choice='req'>
<arg choice='plain'>0</arg> <arg choice='plain'>0</arg>
<arg choice='plain'>1</arg> <arg choice='plain'>1</arg>
</group> </group>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_HELO/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1 @@
<cmdsynopsis>
<arg choice='req'><replaceable>host name</replaceable></arg> <arg choice='req'><replaceable>host name</replaceable></arg>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_HTML4_COMPLIANT/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,4 @@
<cmdsynopsis>
<group choice='req'> <group choice='req'>
<arg choice='plain'>0</arg> <arg choice='plain'>0</arg>
<arg choice='plain'>1</arg> <arg choice='plain'>1</arg>
</group> </group>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_MAILFROM/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,4 @@
<cmdsynopsis>
<group choice='req'> <group choice='req'>
<arg choice='plain'><replaceable>user name</replaceable></arg> <arg choice='plain'><replaceable>user name</replaceable></arg>
<arg choice='plain'><replaceable>e-mail address</replaceable></arg> <arg choice='plain'><replaceable>e-mail address</replaceable></arg>
</group> </group>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_NO_CRYPT/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,4 @@
<cmdsynopsis>
<group choice='req'> <group choice='req'>
<arg choice='plain'>0</arg> <arg choice='plain'>0</arg>
<arg choice='plain'>1</arg> <arg choice='plain'>1</arg>
</group> </group>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_PAGE/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1 @@
<cmdsynopsis>
@@MV_PAGE@@ @@MV_PAGE@@
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_PREV_PAGE/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1 @@
<cmdsynopsis>
@@MV_PREV_PAGE@@ @@MV_PREV_PAGE@@
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_SESSION_READ_RETRY/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1 @@
<cmdsynopsis>
<arg choice='req'><replaceable>count</replaceable></arg> <arg choice='req'><replaceable>count</replaceable></arg>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_SMTPHOST/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1 @@
<cmdsynopsis>
<arg choice='req'><replaceable>host name</replaceable></arg> <arg choice='req'><replaceable>host name</replaceable></arg>
</cmdsynopsis>
2 changes: 0 additions & 2 deletions refs/MV_SUBJECT/synopsis
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1 @@
<cmdsynopsis>
@@MV_SUBJECT@@ @@MV_SUBJECT@@
</cmdsynopsis>
Loading

0 comments on commit a0f2502

Please sign in to comment.