TIVI-153: Add docbook-style-dssl as dep for iputils 86/1586/1 1.0 2.0alpha 1.0_branch accepted/trunk/20120904.191541 submit/trunk/20120831.183452
authorGraydon, Tracy <tracy.graydon@intel.com>
Fri, 31 Aug 2012 18:34:41 +0000 (11:34 -0700)
committerGraydon, Tracy <tracy.graydon@intel.com>
Fri, 31 Aug 2012 18:34:41 +0000 (11:34 -0700)
285 files changed:
BUGS [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
README [new file with mode: 0644]
RELEASE-NOTES.html [new file with mode: 0644]
RELEASE-NOTES.txt [new file with mode: 0644]
RELEASE-NOTES.xml [new file with mode: 0644]
VERSION [new file with mode: 0644]
WhatsNew [new file with mode: 0644]
bin/ChangeLog [new file with mode: 0644]
bin/collateindex.pl [new file with mode: 0644]
bin/collateindex.pl.1 [new file with mode: 0644]
catalog [new file with mode: 0644]
common/ChangeLog [new file with mode: 0644]
common/catalog [new file with mode: 0644]
common/cs-hack.pl [new file with mode: 0644]
common/dbcommon.dsl [new file with mode: 0644]
common/dbl10n.dsl [new file with mode: 0644]
common/dbl10n.ent [new file with mode: 0644]
common/dbl10n.pl [new file with mode: 0644]
common/dbl10n.template [new file with mode: 0644]
common/dbl1af.dsl [new file with mode: 0644]
common/dbl1af.ent [new file with mode: 0644]
common/dbl1bg.dsl [new file with mode: 0644]
common/dbl1bg.ent [new file with mode: 0644]
common/dbl1bs.dsl [new file with mode: 0644]
common/dbl1bs.ent [new file with mode: 0644]
common/dbl1ca.dsl [new file with mode: 0644]
common/dbl1ca.ent [new file with mode: 0644]
common/dbl1cs.dsl [new file with mode: 0644]
common/dbl1cs.ent [new file with mode: 0644]
common/dbl1da.dsl [new file with mode: 0644]
common/dbl1da.ent [new file with mode: 0644]
common/dbl1de.dsl [new file with mode: 0644]
common/dbl1de.ent [new file with mode: 0644]
common/dbl1el.dsl [new file with mode: 0644]
common/dbl1el.ent [new file with mode: 0644]
common/dbl1en.dsl [new file with mode: 0644]
common/dbl1en.ent [new file with mode: 0644]
common/dbl1es.dsl [new file with mode: 0644]
common/dbl1es.ent [new file with mode: 0644]
common/dbl1et.dsl [new file with mode: 0644]
common/dbl1et.ent [new file with mode: 0644]
common/dbl1eu.dsl [new file with mode: 0644]
common/dbl1eu.ent [new file with mode: 0644]
common/dbl1fi.dsl [new file with mode: 0644]
common/dbl1fi.ent [new file with mode: 0644]
common/dbl1fr.dsl [new file with mode: 0644]
common/dbl1fr.ent [new file with mode: 0644]
common/dbl1hu.dsl [new file with mode: 0644]
common/dbl1hu.ent [new file with mode: 0644]
common/dbl1id.dsl [new file with mode: 0644]
common/dbl1id.ent [new file with mode: 0644]
common/dbl1it.dsl [new file with mode: 0644]
common/dbl1it.ent [new file with mode: 0644]
common/dbl1ja.dsl [new file with mode: 0644]
common/dbl1ja.ent [new file with mode: 0644]
common/dbl1ko.dsl [new file with mode: 0644]
common/dbl1ko.ent [new file with mode: 0644]
common/dbl1nl.dsl [new file with mode: 0644]
common/dbl1nl.ent [new file with mode: 0644]
common/dbl1nn.dsl [new file with mode: 0644]
common/dbl1nn.ent [new file with mode: 0644]
common/dbl1no.dsl [new file with mode: 0644]
common/dbl1no.ent [new file with mode: 0644]
common/dbl1null.dsl [new file with mode: 0644]
common/dbl1pl.dsl [new file with mode: 0644]
common/dbl1pl.ent [new file with mode: 0644]
common/dbl1pt.dsl [new file with mode: 0644]
common/dbl1pt.ent [new file with mode: 0644]
common/dbl1ptbr.dsl [new file with mode: 0644]
common/dbl1ptbr.ent [new file with mode: 0644]
common/dbl1ro.dsl [new file with mode: 0644]
common/dbl1ro.ent [new file with mode: 0644]
common/dbl1ru.dsl [new file with mode: 0644]
common/dbl1ru.ent [new file with mode: 0644]
common/dbl1sk.dsl [new file with mode: 0644]
common/dbl1sk.ent [new file with mode: 0644]
common/dbl1sl.dsl [new file with mode: 0644]
common/dbl1sl.ent [new file with mode: 0644]
common/dbl1sr.dsl [new file with mode: 0644]
common/dbl1sr.ent [new file with mode: 0644]
common/dbl1sv.dsl [new file with mode: 0644]
common/dbl1sv.ent [new file with mode: 0644]
common/dbl1th.ent [new file with mode: 0644]
common/dbl1tr.dsl [new file with mode: 0644]
common/dbl1tr.ent [new file with mode: 0644]
common/dbl1uk.dsl [new file with mode: 0644]
common/dbl1uk.ent [new file with mode: 0644]
common/dbl1xh.dsl [new file with mode: 0644]
common/dbl1xh.ent [new file with mode: 0644]
common/dbl1zhcn.dsl [new file with mode: 0644]
common/dbl1zhcn.ent [new file with mode: 0644]
common/dbl1zhtw.dsl [new file with mode: 0644]
common/dbl1zhtw.ent [new file with mode: 0644]
common/dbtable.dsl [new file with mode: 0644]
contrib/html/ChangeLog [new file with mode: 0644]
contrib/html/short-biblioentry.dsl [new file with mode: 0644]
contrib/imagemap/ChangeLog [new file with mode: 0644]
contrib/imagemap/imagemap.dsl [new file with mode: 0644]
contrib/imagemap/testdoc.sgm [new file with mode: 0644]
contrib/imagemap/testimg.jpg [new file with mode: 0644]
contrib/print/ChangeLog [new file with mode: 0644]
contrib/print/short-biblioentry.dsl [new file with mode: 0644]
contrib/renumberinpart/ChangeLog [new file with mode: 0644]
contrib/renumberinpart/renumberinpart.dsl [new file with mode: 0644]
contrib/renumberinpart/test.sgm [new file with mode: 0644]
contrib/subdoc/ChangeLog [new file with mode: 0644]
contrib/subdoc/book.sgm [new file with mode: 0644]
contrib/subdoc/subdoc.dsl [new file with mode: 0644]
contrib/subdoc/subdoc.dtd [new file with mode: 0644]
contrib/subdoc/subdoc1.sgm [new file with mode: 0644]
contrib/subdoc/subdoc2.sgm [new file with mode: 0644]
contrib/subdoc/subdocbc.mod [new file with mode: 0644]
dtds/dbdsssl/ChangeLog [new file with mode: 0644]
dtds/dbdsssl/dbdsssl.dtd [new file with mode: 0644]
dtds/decls/ChangeLog [new file with mode: 0644]
dtds/decls/docbook.dcl [new file with mode: 0644]
dtds/decls/xml.dcl [new file with mode: 0644]
dtds/html/ChangeLog [new file with mode: 0644]
dtds/html/ISOlat1.gml [new file with mode: 0644]
dtds/html/catalog [new file with mode: 0644]
dtds/html/dbhtml.dcl [new file with mode: 0644]
dtds/html/dbhtml.dtd [new file with mode: 0644]
dtds/html/test.htm [new file with mode: 0644]
dtds/imagelib/ChangeLog [new file with mode: 0644]
dtds/imagelib/imagelib.dtd [new file with mode: 0644]
dtds/olink/ChangeLog [new file with mode: 0644]
dtds/olink/olinksum.dtd [new file with mode: 0644]
frames/ChangeLog [new file with mode: 0644]
frames/README [new file with mode: 0644]
frames/docbook.css [new file with mode: 0644]
frames/docbook.js [new file with mode: 0644]
frames/frames.dsl [new file with mode: 0644]
frames/frames.htm [new file with mode: 0644]
frames/navbar.htm [new file with mode: 0644]
html/ChangeLog [new file with mode: 0644]
html/XREF [new file with mode: 0644]
html/catalog [new file with mode: 0644]
html/dbadmon.dsl [new file with mode: 0644]
html/dbautoc.dsl [new file with mode: 0644]
html/dbbibl.dsl [new file with mode: 0644]
html/dbblock.dsl [new file with mode: 0644]
html/dbcallou.dsl [new file with mode: 0644]
html/dbchunk.dsl [new file with mode: 0644]
html/dbcompon.dsl [new file with mode: 0644]
html/dbdivis.dsl [new file with mode: 0644]
html/dbefsyn.dsl [new file with mode: 0644]
html/dbfootn.dsl [new file with mode: 0644]
html/dbgloss.dsl [new file with mode: 0644]
html/dbgraph.dsl [new file with mode: 0644]
html/dbhtml.dsl [new file with mode: 0644]
html/dbindex.dsl [new file with mode: 0644]
html/dbinfo.dsl [new file with mode: 0644]
html/dbinline.dsl [new file with mode: 0644]
html/dblink.dsl [new file with mode: 0644]
html/dblists.dsl [new file with mode: 0644]
html/dblot.dsl [new file with mode: 0644]
html/dbmath.dsl [new file with mode: 0644]
html/dbmsgset.dsl [new file with mode: 0644]
html/dbnavig.dsl [new file with mode: 0644]
html/dbparam.dsl [new file with mode: 0644]
html/dbpi.dsl [new file with mode: 0644]
html/dbprocdr.dsl [new file with mode: 0644]
html/dbqanda.dsl [new file with mode: 0644]
html/dbrfntry.dsl [new file with mode: 0644]
html/dbsect.dsl [new file with mode: 0644]
html/dbsynop.dsl [new file with mode: 0644]
html/dbtable.dsl [new file with mode: 0644]
html/dbtitle.dsl [new file with mode: 0644]
html/dbttlpg.dsl [new file with mode: 0644]
html/dbverb.dsl [new file with mode: 0644]
html/docbook.dsl [new file with mode: 0644]
html/version.dsl [new file with mode: 0644]
images/ChangeLog [new file with mode: 0644]
images/Make.images [new file with mode: 0644]
images/callouts/1.eps [new file with mode: 0644]
images/callouts/1.gif [new file with mode: 0644]
images/callouts/1.pdf [new file with mode: 0644]
images/callouts/10.eps [new file with mode: 0644]
images/callouts/10.gif [new file with mode: 0644]
images/callouts/10.pdf [new file with mode: 0644]
images/callouts/2.eps [new file with mode: 0644]
images/callouts/2.gif [new file with mode: 0644]
images/callouts/2.pdf [new file with mode: 0644]
images/callouts/3.eps [new file with mode: 0644]
images/callouts/3.gif [new file with mode: 0644]
images/callouts/3.pdf [new file with mode: 0644]
images/callouts/4.eps [new file with mode: 0644]
images/callouts/4.gif [new file with mode: 0644]
images/callouts/4.pdf [new file with mode: 0644]
images/callouts/5.eps [new file with mode: 0644]
images/callouts/5.gif [new file with mode: 0644]
images/callouts/5.pdf [new file with mode: 0644]
images/callouts/6.eps [new file with mode: 0644]
images/callouts/6.gif [new file with mode: 0644]
images/callouts/6.pdf [new file with mode: 0644]
images/callouts/7.eps [new file with mode: 0644]
images/callouts/7.gif [new file with mode: 0644]
images/callouts/7.pdf [new file with mode: 0644]
images/callouts/8.eps [new file with mode: 0644]
images/callouts/8.gif [new file with mode: 0644]
images/callouts/8.pdf [new file with mode: 0644]
images/callouts/9.eps [new file with mode: 0644]
images/callouts/9.gif [new file with mode: 0644]
images/callouts/9.pdf [new file with mode: 0644]
images/callouts/ChangeLog [new file with mode: 0644]
images/caution.eps [new file with mode: 0644]
images/caution.gif [new file with mode: 0644]
images/caution.pdf [new file with mode: 0644]
images/home.eps [new file with mode: 0644]
images/home.gif [new file with mode: 0644]
images/home.pdf [new file with mode: 0644]
images/important.eps [new file with mode: 0644]
images/important.gif [new file with mode: 0644]
images/important.pdf [new file with mode: 0644]
images/next.eps [new file with mode: 0644]
images/next.gif [new file with mode: 0644]
images/next.pdf [new file with mode: 0644]
images/note.eps [new file with mode: 0644]
images/note.gif [new file with mode: 0644]
images/note.pdf [new file with mode: 0644]
images/prev.eps [new file with mode: 0644]
images/prev.gif [new file with mode: 0644]
images/prev.pdf [new file with mode: 0644]
images/tip.eps [new file with mode: 0644]
images/tip.gif [new file with mode: 0644]
images/tip.pdf [new file with mode: 0644]
images/toc-blank.eps [new file with mode: 0644]
images/toc-blank.gif [new file with mode: 0644]
images/toc-blank.pdf [new file with mode: 0644]
images/toc-minus.eps [new file with mode: 0644]
images/toc-minus.gif [new file with mode: 0644]
images/toc-minus.pdf [new file with mode: 0644]
images/toc-plus.eps [new file with mode: 0644]
images/toc-plus.gif [new file with mode: 0644]
images/toc-plus.pdf [new file with mode: 0644]
images/up.eps [new file with mode: 0644]
images/up.gif [new file with mode: 0644]
images/up.pdf [new file with mode: 0644]
images/warning.eps [new file with mode: 0644]
images/warning.gif [new file with mode: 0644]
images/warning.pdf [new file with mode: 0644]
lib/ChangeLog [new file with mode: 0644]
lib/dblib.dsl [new file with mode: 0644]
olink/ChangeLog [new file with mode: 0644]
olink/olink.dsl [new file with mode: 0644]
packaging/docbook-style-dsssl.Makefile [new file with mode: 0644]
packaging/docbook-style-dsssl.changes [new file with mode: 0644]
packaging/docbook-style-dsssl.spec [new file with mode: 0644]
print/ChangeLog [new file with mode: 0644]
print/XREF [new file with mode: 0644]
print/catalog [new file with mode: 0644]
print/dbadmon.dsl [new file with mode: 0644]
print/dbautoc.dsl [new file with mode: 0644]
print/dbbibl.dsl [new file with mode: 0644]
print/dbblock.dsl [new file with mode: 0644]
print/dbcallou.dsl [new file with mode: 0644]
print/dbcompon.dsl [new file with mode: 0644]
print/dbdivis.dsl [new file with mode: 0644]
print/dbefsyn.dsl [new file with mode: 0644]
print/dbgloss.dsl [new file with mode: 0644]
print/dbgraph.dsl [new file with mode: 0644]
print/dbindex.dsl [new file with mode: 0644]
print/dbinfo.dsl [new file with mode: 0644]
print/dbinline.dsl [new file with mode: 0644]
print/dblink.dsl [new file with mode: 0644]
print/dblists.dsl [new file with mode: 0644]
print/dblot.dsl [new file with mode: 0644]
print/dbmath.dsl [new file with mode: 0644]
print/dbmsgset.dsl [new file with mode: 0644]
print/dbparam.dsl [new file with mode: 0644]
print/dbprint.dsl [new file with mode: 0644]
print/dbprocdr.dsl [new file with mode: 0644]
print/dbqanda.dsl [new file with mode: 0644]
print/dbrfntry.dsl [new file with mode: 0644]
print/dbsect.dsl [new file with mode: 0644]
print/dbsynop.dsl [new file with mode: 0644]
print/dbtable.dsl [new file with mode: 0644]
print/dbtitle.dsl [new file with mode: 0644]
print/dbttlpg.dsl [new file with mode: 0644]
print/dbverb.dsl [new file with mode: 0644]
print/docbook.dsl [new file with mode: 0644]
print/notoc.dsl [new file with mode: 0644]
print/plain.dsl [new file with mode: 0644]
print/version.dsl [new file with mode: 0644]

diff --git a/BUGS b/BUGS
new file mode 100644 (file)
index 0000000..2400c96
--- /dev/null
+++ b/BUGS
@@ -0,0 +1,35 @@
+Using Equations w/o titles results in incorrectly numbered
+  equations with titles.  Use InformalEquation instead.
+
+InlineEquations don't work in the RTF backend.  It's not my fault.
+
+Callout support is somewhat fragile.
+
+Line numbering of linespecific displays is somewhat fragile.
+
+In two-sided mode, with the RTF backend, the appropriate
+  alternation of inner/outer headers and footers does not work
+  correctly unless %page-number-restart% is true.  This is
+  caused by a limitation in RTF.
+
+CHAR alignment in tables is not supported
+
+The stylesheets can't automatically put callout marks on a
+PROGRAMLISTING or SCREEN if the text comes from an external file
+using the LINESPECIFIC INLINEGRAPHIC trick.
+
+"Extra" </P> elements appear in the HTML output if you put block
+elements inside of <para> elements in your source. The problem
+is that
+
+  <para>Some text <table>...</table></p>
+
+Is translated into
+
+  <P>Some text <table>...</table></P>
+
+but HTML doesn't allow "table" inside a P, so the begin table
+implies an "</P>" which makes the </P> after the table erroneous.
+I don't have a good answer for this, but I'm tempted to make all
+<P> tags empty in the HTML so that the browser has to imply all
+the </P>s.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..778484b
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,140 @@
+2004-11-05  Michael Smith <xmldoc@users.sourceforge.net>
+
+       * Makefile: plain-text release notes, added target to make
+
+2004-11-04  Michael Smith <xmldoc@users.sourceforge.net>
+
+       * .cvsignore: ignore RELEASE-NOTES.html
+
+       * .cvsignore: ignore RELEASE-NOTES.txt
+
+       * FRESHMEAT: New file.
+
+       * Makefile: RELEASE-NOTES.html and freshmeat targets added
+
+       * RELEASE-NOTES.xml: New file.
+
+       * VERSION: Version 1.79 released.
+
+2004-10-23  <petere78@users.sourceforge.net>
+
+       * Makefile: The debian directory no longer corresponds to the actual Debian package, so
+       it would only be confusing to keep it around.
+
+       * TODO: TODO items are nowadays listed at SourceForge; this file doesn't serve a
+       purpose anymore.
+
+2004-09-14  <petere78@users.sourceforge.net>
+
+       * README.CVS: Add note that xmlcharent also needs to be checked out when working from CVS.
+
+2003-03-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: clean target cleans backup files and CVS junk
+
+       * VERSION: Keep CVS and real releases distinct
+
+2003-02-20  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: don't distrib empty debian dir and *.orig
+
+2003-02-19  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * VERSION: Version 1.78 released.
+
+2002-12-16  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * .cvsignore: ignorables, esp stuff built by debian/rules
+
+2002-08-08  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: 'doc' target uses bin subdir, clean target additional goes into print,
+       html, and bin
+
+       * catalog: appropriate DTDDECL for dtds/html/dbhtml.dcl (merging in Debian changes)
+
+2002-08-07  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * README.CVS: some more information in the 'Installation' section
+
+2002-07-07  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * Makefile: Keep the debian directory out of the distribution
+
+       * VERSION: Keep CVS and real releases distinct
+
+       * VERSION: Version 1.77 released.
+
+2002-03-24  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: clean does more subdirs now
+
+2002-02-22  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * Makefile: Improve archive construction
+
+       * VERSION: Version 1.76 released.
+
+2002-02-21  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * VERSION: Version 1.75 released.
+
+2001-12-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * Makefile: Bug #449776: include EPS/PDF graphics
+
+2001-11-30  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * VERSION: Keep CVS versions distinct from real releases
+
+       * VERSION: Merged V174bugfixes
+
+       * VERSION: New file.
+
+2001-11-28  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * VERSION: branches:  1.11.2;
+       Version 1.74 released.
+
+2001-09-29  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * VERSION: Version 1.73 released.
+
+       * VERSION: Keep CVS versions distinct from real releases
+
+2001-08-06  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * VERSION: Keep CVS versions distinct from real releases
+
+       * VERSION: Version 1.72 released.
+
+2001-07-08  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * VERSION: Version 1.71 released.
+
+2001-05-22  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * VERSION: Version 1.70 released.
+
+2001-04-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * VERSION: Version 1.68 released.
+
+       * VERSION: Version 1.69 released.
+
+2001-04-15  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * Makefile: Various distribution hacks
+
+2001-04-04  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * .cvsignore, Makefile, README: Adjust Makefiles and documentation for building a new distrib
+
+       * VERSION: Version 1.67 released.
+
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * BUGS, README.CVS, TODO, VERSION, catalog: Initial checkins
+
+       * Makefile: New file.
+
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..4665743
--- /dev/null
+++ b/README
@@ -0,0 +1,91 @@
+README for the DocBook Stylesheets
+
+These are DSSSL stylesheets for the DocBook DTD.
+
+For more information, see http://docbook.sourceforge.net/
+
+Manifest
+--------
+
+bin/     contains scripts for some (optional) post-processing
+common/  contains code common to both stylesheets
+contrib/ contains contributions
+doc/     contains installation and reference documentation (this is
+         now distributed in a separate ZIP archive)
+docsrc/  contains the SGML source for the documentation
+dtds/    contains auxiliary DTDs
+frames/  contains support for frames
+html/   contains the HTML stylesheet (for use with -t sgml)
+images/  contains images used by the HTML stylesheets
+lib/    contains DSSSL functions that are believed to be useful but
+        are totally independent of any particular stylesheet
+olink/   contains olink support
+print/  contains the print stylesheet
+
+Changes
+-------
+
+See the ChangeLog in each directory for additional information
+about the specific changes.
+
+See WhatsNew for changes since the last release.
+
+Installation
+------------
+
+See doc/install.html and/or http://nwalsh.com/docbook/dsssl/
+
+Copyright
+---------
+
+Copyright (C) 1997-2001 Norman Walsh
+
+The original inspiration for these stylesheets came from the
+work of Jon Bosak, Anders Berglund, Tony Graham, Terry Allen,
+James Clark, and many others.  I am indebted to them and to the
+community of users on dssslist@mulberrytech.com for making
+substantial contributions to this work and for answering my many
+questions.
+
+This software may be distributed under the same terms as Jade:
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the ``Software''), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+Except as contained in this notice, the names of individuals
+credited with contribution to this software shall not be used in
+advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization
+from the individuals in question.
+
+Any stylesheet derived from this Software that is publically
+distributed will be identified with a different name and the
+version strings in any derived Software will be changed so that
+no possibility of confusion between the derived package and this
+Software will exist.
+
+Warranty
+--------
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT.  IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Contacting the Author
+---------------------
+
+These stylesheets are maintained by Norman Walsh, <ndw@nwalsh.com>.
diff --git a/RELEASE-NOTES.html b/RELEASE-NOTES.html
new file mode 100644 (file)
index 0000000..a7b97e3
--- /dev/null
@@ -0,0 +1,34 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>DocBook DSSSL Stylesheet Release Notes</title><meta name="generator" content="DocBook XSL Stylesheets V2004-10-18_18:25_snapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d0e1"></a>DocBook DSSSL Stylesheet Release Notes</h1></div><div><h3 class="corpauthor">DocBook Open Repository Team</h3></div><div><p class="releaseinfo">$Id: RELEASE-NOTES.xml,v 1.1 2004/11/04 11:34:01 xmldoc Exp $</p></div><div><p class="pubdate">03 November 2004</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#d0e18">Release 1.79</a></span></dt></dl></div><p>These are the release notes for the DocBook DSSSL Stylesheets.
+    At a minimum, this file attempts to document changes to the public
+    APIs and provide a high-level overview of the features added in each
+    release.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e18"></a>Release 1.79</h2></div></div></div><p>This release contains fixes for a number of long-standing
+      bugs. See the <a href="WhatsNew" target="_top">WhatsNew</a> file for more
+      details. Among the user-visible changes are:</p><div class="itemizedlist"><ul type="disc"><li><p><b>HTML stylesheets.&nbsp;</b>
+            </p><div class="itemizedlist"><ul type="circle"><li><p>The doctype definition in the HTML output now
+                  contains a system identifier, required for better
+                  parsing in contemporary browsers.</p></li><li><p>CSS decoration has been added to procedure
+                  steps.</p></li><li><p>Uses of &lt;VAR&gt; in HTML output (often rendered
+                  in italic) have been changed to something more
+                  appropriate</p></li><li><p>The last character of the version was cut off in
+                  previous releases.</p></li><li><p>Processing instruction parsing has been made
+                  more robust against arbitrarily formed PIs.</p></li><li><p>Callout graphics and admonition graphics share a
+                  single variable, %stock-graphics-extension%.</p></li><li><p>The value of the VALIGN attribute has been
+                  corrected to MIDDLE instead of CENTER.</p></li></ul></div><p>
+          </p></li><li><p><b>Print stylesheets.&nbsp;</b>
+            </p><div class="itemizedlist"><ul type="circle"><li><p>Admonition titles and contents are kept
+                  together.</p></li><li><p>Programlistings with callouts now honor the
+                  width attribute.</p></li><li><p>The rendering of othercredit has been made more
+                  useful.</p></li><li><p>Excessive after spacing when a listitem contains
+                  multiple paras or verbatim environments has been
+                  fixed.</p></li><li><p>Empty ulinks don't generate footnotes, so they
+                  are now omitted from the footnote counting.</p></li><li><p>Some cases where components were restarting the
+                  page numbering were fixed.</p></li><li><p>article-titlepage-recto-elements has been made
+                  to match the HTML version.</p></li><li><p>Support for revdescription inside revison on
+                  titlepages has been added.</p></li></ul></div><p>
+          </p></li><li><p><b>General.&nbsp;</b>
+            </p><div class="itemizedlist"><ul type="circle"><li><p>"pc" is now allowed as abbreviation for
+                  "pica".</p></li><li><p>The return value of my-debug has been
+                  fixed.</p></li><li><p>A Bosnian translation has been added.</p></li><li><p>A Bulgarian translation has been added.</p></li></ul></div><p>
+          </p></li></ul></div></div></div></body></html>
\ No newline at end of file
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
new file mode 100644 (file)
index 0000000..43fb394
--- /dev/null
@@ -0,0 +1,76 @@
+DocBook DSSSL Stylesheet Release Notes
+
+DocBook Open Repository Team
+
+$Id: RELEASE-NOTES.xml,v 1.1 2004/11/04 11:34:01 xmldoc Exp $
+
+03 November 2004
+
+-------------------------------------------------------------------------------
+
+Table of Contents
+
+Release 1.79
+
+These are the release notes for the DocBook DSSSL Stylesheets. At a minimum,
+this file attempts to document changes to the public APIs and provide a
+high-level overview of the features added in each release.
+
+Release 1.79
+
+This release contains fixes for a number of long-standing bugs. See the
+WhatsNew file for more details. Among the user-visible changes are:
+
+  * HTML stylesheets. 
+
+      o The doctype definition in the HTML output now contains a system
+        identifier, required for better parsing in contemporary browsers.
+
+      o CSS decoration has been added to procedure steps.
+
+      o Uses of <VAR> in HTML output (often rendered in italic) have been
+        changed to something more appropriate
+
+      o The last character of the version was cut off in previous releases.
+
+      o Processing instruction parsing has been made more robust against
+        arbitrarily formed PIs.
+
+      o Callout graphics and admonition graphics share a single variable,
+        %stock-graphics-extension%.
+
+      o The value of the VALIGN attribute has been corrected to MIDDLE instead
+        of CENTER.
+
+  * Print stylesheets. 
+
+      o Admonition titles and contents are kept together.
+
+      o Programlistings with callouts now honor the width attribute.
+
+      o The rendering of othercredit has been made more useful.
+
+      o Excessive after spacing when a listitem contains multiple paras or
+        verbatim environments has been fixed.
+
+      o Empty ulinks don't generate footnotes, so they are now omitted from the
+        footnote counting.
+
+      o Some cases where components were restarting the page numbering were
+        fixed.
+
+      o article-titlepage-recto-elements has been made to match the HTML
+        version.
+
+      o Support for revdescription inside revison on titlepages has been added.
+
+  * General. 
+
+      o "pc" is now allowed as abbreviation for "pica".
+
+      o The return value of my-debug has been fixed.
+
+      o A Bosnian translation has been added.
+
+      o A Bulgarian translation has been added.
+
diff --git a/RELEASE-NOTES.xml b/RELEASE-NOTES.xml
new file mode 100644 (file)
index 0000000..dbaa087
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version='1.0' encoding="utf-8"?>
+<!DOCTYPE article SYSTEM "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+<article>
+  <articleinfo>
+    <title>DocBook DSSSL Stylesheet Release Notes</title>
+    <pubdate>03 November 2004</pubdate>
+    <releaseinfo role="cvs">$Id: RELEASE-NOTES.xml,v 1.1 2004/11/04 11:34:01 xmldoc Exp $</releaseinfo> 
+    <corpauthor>DocBook Open Repository Team</corpauthor> 
+  </articleinfo> 
+  <para>These are the release notes for the DocBook DSSSL Stylesheets.
+    At a minimum, this file attempts to document changes to the public
+    APIs and provide a high-level overview of the features added in each
+    release.</para>
+  <section>
+    <title>Release 1.79</title>
+    <para>This release contains fixes for a number of long-standing
+      bugs. See the <ulink url="WhatsNew"/> file for more
+      details. Among the user-visible changes are:</para>
+    <itemizedlist>
+      <listitem>
+        <formalpara>
+          <title>HTML stylesheets</title>
+          <para>
+            <itemizedlist>
+              <listitem>
+                <para>The doctype definition in the HTML output now
+                  contains a system identifier, required for better
+                  parsing in contemporary browsers.</para>
+              </listitem>
+              <listitem>
+                <para>CSS decoration has been added to procedure
+                  steps.</para>
+              </listitem>
+              <listitem>
+                <para>Uses of &lt;VAR> in HTML output (often rendered
+                  in italic) have been changed to something more
+                  appropriate</para>
+              </listitem>
+              <listitem>
+                <para>The last character of the version was cut off in
+                  previous releases.</para>
+              </listitem>
+              <listitem>
+                <para>Processing instruction parsing has been made
+                  more robust against arbitrarily formed PIs.</para>
+              </listitem>
+              <listitem>
+                <para>Callout graphics and admonition graphics share a
+                  single variable, %stock-graphics-extension%.</para>
+              </listitem>
+              <listitem>
+                <para>The value of the VALIGN attribute has been
+                  corrected to MIDDLE instead of CENTER.</para>
+              </listitem>
+            </itemizedlist>
+          </para>
+        </formalpara>
+      </listitem>
+      <listitem>
+        <formalpara>
+          <title>Print stylesheets</title>
+          <para>
+            <itemizedlist>
+              <listitem>
+                <para>Admonition titles and contents are kept
+                  together.</para>
+              </listitem>
+              <listitem>
+                <para>Programlistings with callouts now honor the
+                  width attribute.</para>
+              </listitem>
+              <listitem>
+                <para>The rendering of othercredit has been made more
+                  useful.</para>
+              </listitem>
+              <listitem>
+                <para>Excessive after spacing when a listitem contains
+                  multiple paras or verbatim environments has been
+                  fixed.</para>
+              </listitem>
+              <listitem>
+                <para>Empty ulinks don't generate footnotes, so they
+                  are now omitted from the footnote counting.</para>
+              </listitem>
+              <listitem>
+                <para>Some cases where components were restarting the
+                  page numbering were fixed.</para>
+              </listitem>
+              <listitem>
+                <para>article-titlepage-recto-elements has been made
+                  to match the HTML version.</para>
+              </listitem>
+              <listitem>
+                <para>Support for revdescription inside revison on
+                  titlepages has been added.</para>
+              </listitem>
+            </itemizedlist>
+          </para>
+        </formalpara>
+      </listitem>
+      <listitem>
+        <formalpara>
+          <title>General</title>
+          <para>
+            <itemizedlist>
+              <listitem>
+                <para>"pc" is now allowed as abbreviation for
+                  "pica".</para>
+              </listitem>
+              <listitem>
+                <para>The return value of my-debug has been
+                  fixed.</para>
+              </listitem>
+              <listitem>
+                <para>A Bosnian translation has been added.</para>
+              </listitem>
+              <listitem>
+                <para>A Bulgarian translation has been added.</para>
+              </listitem>
+            </itemizedlist>
+          </para>
+        </formalpara>
+      </listitem>
+    </itemizedlist>
+  </section>
+</article>
diff --git a/VERSION b/VERSION
new file mode 100644 (file)
index 0000000..17420a5
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+1.79
diff --git a/WhatsNew b/WhatsNew
new file mode 100644 (file)
index 0000000..b26f319
--- /dev/null
+++ b/WhatsNew
@@ -0,0 +1,372 @@
+Changes since version 1.78 (2003-02-19)
+
+Changes to dsssl/*
+
+  | 2004-11-05  Michael Smith <xmldoc@users.sourceforge.net>
+  | 
+  |    * Makefile: plain-text release notes, added target to make
+  | 
+  | 2004-11-04  Michael Smith <xmldoc@users.sourceforge.net>
+  | 
+  |    * .cvsignore: ignore RELEASE-NOTES.html
+  | 
+  |    * .cvsignore: ignore RELEASE-NOTES.txt
+  | 
+  |    * FRESHMEAT: New file.
+  | 
+  |    * Makefile: RELEASE-NOTES.html and freshmeat targets added
+  | 
+  |    * RELEASE-NOTES.xml: New file.
+  | 
+  |    * VERSION: Version 1.79 released.
+  | 
+  | 2004-10-23  <petere78@users.sourceforge.net>
+  | 
+  |    * Makefile: The debian directory no longer corresponds to the
+  |      actual Debian package, so it would only be confusing to keep
+  |      it around.
+  | 
+  |    * TODO: TODO items are nowadays listed at SourceForge; this
+  |      file doesn't serve a purpose anymore.
+  | 
+  | 2004-09-14  <petere78@users.sourceforge.net>
+  | 
+  |    * README.CVS: Add note that xmlcharent also needs to be
+  |      checked out when working from CVS.
+  | 
+  | 2003-03-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * Makefile: clean target cleans backup files and CVS junk
+  | 
+  |    * VERSION: Keep CVS and real releases distinct
+  | 
+  | 2003-02-20  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * Makefile: don't distrib empty debian dir and *.orig
+  | 
+
+Changes to dsssl/bin/*
+
+  | 2004-10-24  <petere78@users.sourceforge.net>
+  | 
+  |    * collateindex.pl: Only mention the program's base name in the
+  |      error messages.
+  | 
+  | 2004-10-23  <petere78@users.sourceforge.net>
+  | 
+  |    * Makefile: Don't put a "v" before the version number here.
+  | 
+  |    * collateindex.pl: Put the options list in some kind of order,
+  |      and make the error messages have a consistent format.
+  | 
+  | 2003-03-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * Makefile: clean target cleans backup files and CVS junk
+  | 
+  | 2003-03-16  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * Makefile: fix the POD release variable
+  | 
+
+Changes to dsssl/doc/*
+
+  | 2003-03-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * Makefile: clean target cleans backup files and CVS junk
+  | 
+  | 2003-03-17  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * Makefile: Make required stuff in ../docsrc as needed
+  | 
+  | 2003-03-16  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * Makefile: removing *.htm in addition to the *.html
+  | 
+
+Changes to dsssl/common/*
+
+  | 2004-10-10  <petere78@users.sourceforge.net>
+  | 
+  |    * dbcommon.dsl: Give othercredit some useful rendering in
+  |      print output, by copying over the author rendering. Fix
+  |      author-list-string for authorgroups that contain both
+  |      authors and othercredits. (bug #1038081)
+  | 
+  | 2004-10-09  <petere78@users.sourceforge.net>
+  | 
+  |    * .cvsignore, Makefile, dbl10n.dsl, dbl10n.ent,
+  |      dbl10n.template, dbl1bg.dsl: New Bulgarian translation by
+  |      Viktor Vasilev (SF patch #1040075)
+  | 
+  |    * dbl1bs.dsl: Additional fixes for Bosnian translation, by
+  |      Kemal Skripic (SF patch #1037371)
+  | 
+  | 2004-09-22  Michael Smith <xmldoc@users.sourceforge.net>
+  | 
+  |    * .cvsignore: dbl1bs.ent added to ignore list; also re-sorted
+  |      list
+  | 
+  | 2004-09-17  <petere78@users.sourceforge.net>
+  | 
+  |    * Makefile, dbl10n.dsl, dbl10n.ent, dbl10n.template,
+  |      dbl1bs.dsl: Bosnian translation by Kemal Skripic
+  | 
+  | 2003-04-28  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbcommon.dsl: Fix a problem pointed out by Tim Waugh in
+  |      articleinfo vs artheader in the article-title procedure.
+  |      Also ensure articleinfo is used in some other contexts.
+  | 
+
+Changes to dsssl/docsrc/*
+
+  | 2004-10-23  Michael Smith <xmldoc@users.sourceforge.net>
+  | 
+  |    * collateindex.sgm, dblib.sgm, docbook.sgm, htparam.sgm,
+  |      imagelib.sgm, indexing.sgm, olinksemantics.sgm,
+  |      otherdoc.sgm, prparam.sgm: Bug #1052834 (PIs in dsssl/doc
+  |      sources causing jade errors) apparently jade has a problem
+  |      dealing with single quotation marks in PIs -- at least it
+  |      appears like that in the case where it needs to take a
+  |      single-quoted value from within a PI and use it to write a
+  |      filename; so changed al single-quote filenames in PIs to
+  |      doubly quoted ones; seems to have made jade happy
+  | 
+  | 2004-09-18  <petere78@users.sourceforge.net>
+  | 
+  |    * custom.sgm: Fix for Documentation Request #510281: Add
+  |      missing -d option in example
+  | 
+  |    * custom.sgm: Fix for Documentation Request #992388: Removed
+  |      obsolete section about setting the stylesheet language via a
+  |      customization layer (now done using a stylesheet parameter).
+  | 
+  | 2003-03-17  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * doc.dsl: Minor readability fixes.
+  | 
+
+Changes to dsssl/html/*
+
+  | 2004-10-10  <petere78@users.sourceforge.net>
+  | 
+  |    * dbhtml.dsl, dbparam.dsl, dbttlpg.dsl: Support for specifying
+  |      a system ID for the HTML output documents, required for
+  |      better parsing in contemporary browsers. A default system ID
+  |      is set if %html40% is true.
+  | 
+  | 2004-10-09  <petere78@users.sourceforge.net>
+  | 
+  |    * docbook.dsl: New Bulgarian translation by Viktor Vasilev (SF
+  |      patch #1040075)
+  | 
+  | 2004-09-23  <petere78@users.sourceforge.net>
+  | 
+  |    * dbprocdr.dsl: Add CSS decoration of procedure steps (RFE
+  |      #1033197)
+  | 
+  | 2004-09-17  <petere78@users.sourceforge.net>
+  | 
+  |    * docbook.dsl: Bosnian translation by Kemal Skripic
+  | 
+  | 2004-09-14  <petere78@users.sourceforge.net>
+  | 
+  |    * dbinline.dsl: Fix for bug #860398: Change uses of $var-seq$
+  |      to something more appropriate.
+  | 
+  | 2004-07-11  <nyraghu@users.sourceforge.net>
+  | 
+  |    * version.dsl: Closes Bug 912831: the last character of
+  |      VERSION was being cut off.
+  | 
+  | 2003-05-28  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbblock.dsl: HTML attribs for comments variablized for
+  |      maintenance.
+  | 
+  | 2003-04-29  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbcompon.dsl: Finding the subtitle for a component should
+  |      use the parent title if set; this is consistent with how the
+  |      title is already set; closes SF bug 613773.
+  | 
+  | 2003-04-28  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbpi.dsl: Ensure dbhtml-findvalue can handle the
+  |      pi-field-list being a non-pair, which may occur in some
+  |      poorly formed dbhtml PIs; returns #f in this case.
+  | 
+  | 2003-04-27  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbcompon.dsl: Simplify some code, no functional changes
+  | 
+  | 2003-04-26  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbcallou.dsl, dbparam.dsl: callout graphics and admonition
+  |      graphics, if needed, share a single variable,
+  |      %stock-graphics-extension% -- "stock" here referring to
+  |      standard, stock images, e.g., not per document images; this
+  |      closes Debian Bug#187429
+  | 
+  | 2003-04-12  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbadmon.dsl: VALIGN should be MIDDLE, not CENTER; closes
+  |      Debian Bug#187569
+  | 
+  | 2003-04-05  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dblists.dsl: back out my last change; there are 4 places
+  |      taht use this and until I understand how
+  |      varlistentry-term-too-long? is supposed to work at all I
+  |      better not mess with it
+  | 
+  |    * dblists.dsl: termlength in varlist is measurement-to-length,
+  |      not string->number
+  | 
+  | 2003-03-25  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * db31.dsl, dbblock.dsl, dbcompon.dsl, dbgraph.dsl,
+  |      dbqanda.dsl, dbsect.dsl, docbook.dsl: move data from db31
+  |      into its proper component files
+  | 
+  | 2003-03-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * Makefile: Don't hardcode DSSSL file list, use $(wildcard
+  |      *.dsl); clean is cleaner
+  | 
+
+Changes to dsssl/lib/*
+
+  | 2004-10-24  <petere78@users.sourceforge.net>
+  | 
+  |    * dblib.dsl: Revision 1.6 completely broke PI processing, so
+  |      back that out for now.
+  | 
+  | 2003-04-29  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dblib.dsl: Fix my-debug so it actually returns what you ask
+  |      it to.
+  | 
+  | 2003-04-28  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dblib.dsl: Make PI parsing more robust by rewriting
+  |      parse-pi-attribute and a fix in parse-starttag-pi. I'm still
+  |      not entirely happy with the PI parsing, its probably a
+  |      little flakey, but it shouldn't completely bail out when it
+  |      hits data its not expecting. Closes Debian Bug#186886.
+  | 
+  | 2003-04-26  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dblib.dsl: Fix a typo in the param docs
+  | 
+  | 2003-04-05  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dblib.dsl: xsl stylesheet refers to pica as "pc" rather than
+  |      "pi", so we allow either one as a pica
+  | 
+
+Changes to dsssl/print/*
+
+  | 2004-10-10  <petere78@users.sourceforge.net>
+  | 
+  |    * dbadmon.dsl: Fix for bug #522140: Keep admonition titles and
+  |      contents together when graphics are used.
+  | 
+  |    * dbcallou.dsl: Synchronized $callout-verbatim-display$ with
+  |      $verbatim-display$; fixes bug #517520 (callout ignores width
+  |      of programlisting)
+  | 
+  |    * dbttlpg.dsl: Give othercredit some useful rendering in print
+  |      output, by copying over the author rendering. Fix
+  |      author-list-string for authorgroups that contain both
+  |      authors and othercredits. (bug #1038081)
+  | 
+  | 2004-10-09  <petere78@users.sourceforge.net>
+  | 
+  |    * dbprint.dsl, dbverb.dsl: Patch #571688: Fixes excessive
+  |      after spacing when a listitem contains multiple paras or
+  |      verbatim environments. Patches originally by Tim Waugh and
+  |      Tammy Fox.
+  | 
+  |    * docbook.dsl: New Bulgarian translation by Viktor Vasilev (SF
+  |      patch #1040075)
+  | 
+  | 2004-09-17  <petere78@users.sourceforge.net>
+  | 
+  |    * docbook.dsl: Bosnian translation by Kemal Skripic
+  | 
+  | 2004-09-14  <petere78@users.sourceforge.net>
+  | 
+  |    * dbblock.dsl: Fix for bug #502066: Empty ulinks don't
+  |      generate footnotes, so they should be omitted from the
+  |      footnote counting. Patch by Bruce A. Mah.
+  | 
+  |    * dbprint.dsl: Fix for bug #529969: Make italic monospace and
+  |      strong monospace inherit verbatim-size-factor. Patch by
+  |      David Aumueller.
+  | 
+  | 2004-07-11  <nyraghu@users.sourceforge.net>
+  | 
+  |    * version.dsl: Closes Bug 912831: the last character of
+  |      VERSION was being cut off.
+  | 
+  | 2003-12-05  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbdivis.dsl: fix a bug when multiple elements in
+  |      $generate-book-lot-list$ had content; whitespace and comment
+  |      updates
+  | 
+  | 2003-04-29  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbcompon.dsl: Finding the subtitle for a component should
+  |      use the parent title if set; this is consistent with how the
+  |      title is already set; closes SF bug 613773.
+  | 
+  |    * dbcompon.dsl: Suppress some cases where components were
+  |      restarting page numbering, fix from Ian Castle; closes SF
+  |      bug 439751.
+  | 
+  |    * dbparam.dsl: Correct reference to undefined variable
+  |      "admon-graphic-default-extension".
+  | 
+  |    * dbttlpg.dsl: Add elements to print version of
+  |      article-titlepage-recto-elements so that it matches the HTML
+  |      version, fixes SF bug 626909.
+  | 
+  | 2003-04-26  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * dbparam.dsl: rename parameter
+  |      admon-graphic-default-extension to
+  |      %admon-graphics-extension% for consistency
+  | 
+  |    * dbparam.dsl: Note that %admon-graphics-path% requires the
+  |      trailing directory separator --
+  | 
+  |    * dbparam.dsl: %admon-graphics-extension% will use the old
+  |      name, admon-graphic-default-extension, if set
+  | 
+  | 2003-03-25  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * db31.dsl, dbblock.dsl, dbcompon.dsl, dbgraph.dsl,
+  |      dbinline.dsl, dbqanda.dsl, dbsect.dsl, docbook.dsl: move
+  |      data from db31 into its proper component files
+  | 
+  | 2003-03-24  Jirka Kosek <kosek@users.sourceforge.net>
+  | 
+  |    * dbttlpg.dsl: Added support for revdescription inside revison
+  |      on titlepages
+  | 
+  | 2003-03-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * Makefile: Don't hardcode DSSSL file list, use $(wildcard
+  |      *.dsl); clean is cleaner
+  | 
+
+Changes to dsssl/doc/testdata/*
+
+  | 2003-03-16  Adam Di Carlo <adicarlo@users.sourceforge.net>
+  | 
+  |    * c01.htm, jtest.rtf, test.rtf: Generated files should not be
+  |      in CVS
+  | 
+
diff --git a/bin/ChangeLog b/bin/ChangeLog
new file mode 100644 (file)
index 0000000..8c75e0d
--- /dev/null
@@ -0,0 +1,58 @@
+2004-10-24  <petere78@users.sourceforge.net>
+
+       * collateindex.pl: Only mention the program's base name in the error messages.
+
+2004-10-23  <petere78@users.sourceforge.net>
+
+       * Makefile: Don't put a "v" before the version number here.
+
+       * collateindex.pl: Put the options list in some kind of order, and make the error messages
+       have a consistent format.
+
+2003-03-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: clean target cleans backup files and CVS junk
+
+2003-03-16  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: fix the POD release variable
+
+2003-01-19  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * collateindex.pl: fix from Tim Waugh for when the same indexterm has too different
+       seealso's, where currently script produces invalid SGML/XML; fixes bug #551318
+
+2002-12-16  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * .cvsignore: New file.
+
+2002-08-08  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: New file.
+
+2002-01-07  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * collateindex.pl: emit a warning if a duplicated index entry is found and removed
+
+2001-12-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * collateindex.pl: Patch #468645: fix for indexterm zones in print
+
+2001-04-20  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * collateindex.pl: add POD documentation; remove the usage message documentation in the name of reducing redundancy
+
+2001-04-18  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * collateindex.pl: add -q (quiet) and -V (report version only) arguments
+
+2001-04-03  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * collateindex.pl: Whitespace changes
+
+       * collateindex.pl: Fix bug 412898, produce links in the index, even in the presence of seealso
+
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * collateindex.pl: New file.
+
diff --git a/bin/collateindex.pl b/bin/collateindex.pl
new file mode 100644 (file)
index 0000000..e384711
--- /dev/null
@@ -0,0 +1,737 @@
+#!/usr/bin/perl -- # -*- Perl -*-
+#
+# $Id: collateindex.pl,v 1.10 2004/10/24 17:05:41 petere78 Exp $
+
+=head1 NAME
+
+collateindex.pl - generate DocBook index files
+
+=head1 SYNOPSIS
+
+B<collateindex.pl> [B<-f>] [B<-g>] [B<-i> I<id>] [B<-I> I<scope>] [B<-N>]
+                [B<-o> F<file>] [B<-p>] [B<-P> F<file>] [B<-q>] [B<-s> I<name>]
+                [B<-S> I<scope>] [B<-t> I<name>] [B<-x>] F<file>
+
+=head1 DESCRIPTION
+
+B<collateindex.pl> creates index data for DocBook XML or SGML files.
+
+=cut
+
+use File::Basename;
+use Getopt::Std;
+
+$me = basename($0);
+
+$usage = "Usage: $0 [options] file
+Try \"perldoc $me\" for documentation.\n";
+
+( $version = '$Revision: 1.10 $' ) =~ s/^\$[R]evision:\s*([^ ]*)\s*\$$/$1/;
+
+=head1 OPTIONS
+
+=over 5
+
+=item B<-f>
+
+Force the output file to be written, even if it appears to have been
+edited by hand.
+
+=item B<-g>
+
+Group terms with IndexDiv based on the first letter of the term (or
+its SortAs attribute).  (This might not handle all language environments.)
+
+=item B<-i> I<id>
+
+The ID to use for the E<lt>indexE<gt> tag.
+
+=item B<-I> I<scope>
+
+The implied scope, must be C<all>, C<local>, or C<global>.  IndexTerms
+which do not specify a scope will have the implied scope.  If
+unspecified, C<all> is assumed.
+
+=item B<-N>
+
+New index (generates an empty index file).
+
+=item B<-o> F<file>
+
+Output to F<file>. Defaults to F<stdout>.
+
+=item B<-p>
+
+Link to points in the document.  The default is to link to the closest
+containing section.
+
+=item B<-P> F<file>
+
+Read a preamble from F<file>.  The contents of F<file> will be
+inserted before the E<lt>indexE<gt> tag.
+
+=item B<-q>
+
+Run quietly.
+
+=item B<-s> I<name>
+
+Name the IndexDiv that contains symbols.  The default is C<Symbols>.
+Meaningless if B<-g> is not used.
+
+=item B<-S> I<scope>
+
+Scope of the index, must be C<all>, C<local>, or C<global>.  If
+unspecified, C<all> is assumed.
+
+=item B<-t> I<name>
+
+Title for the index.
+
+=item B<-x>
+
+Make a SetIndex.
+
+=item B<-V>
+
+Print version number and exit.
+
+=item F<file>
+
+The file containing index data generated with the DocBook DSSSL
+HTML stylesheet (usually called F<HTML.index>).
+
+=back
+
+=cut
+
+
+die $usage if ! getopts('Dfgi:NpP:s:o:S:I:t:xqV');
+
+$linkpoints   = $opt_p;
+$lettergroups = $opt_g;
+$symbolsname  = $opt_s || "Symbols";
+$title        = $opt_t;
+$preamble     = $opt_P;
+$outfile      = $opt_o || '-';
+$indexid      = $opt_i;
+$scope        = uc($opt_S) || 'ALL';
+$impliedscope = uc($opt_I) || 'ALL';
+$setindex     = $opt_x;
+$forceoutput  = $opt_f;
+$newindex     = $opt_N;
+$debug        = $opt_D;
+$quiet        = $opt_q;
+
+if ( $opt_V ) {
+    print "collateindex.pl $version\n";
+    exit 0;
+}
+
+$indextag     = $setindex ? 'setindex' : 'index';
+
+if ($newindex) {
+    safe_open(*OUT, $outfile);
+    if ($indexid) {
+       print OUT "<$indextag id='$indexid'>\n\n";
+    } else {
+       print OUT "<$indextag>\n\n";
+    }
+
+    print OUT "<!-- This file was produced by collateindex.pl.         -->\n";
+    print OUT "<!-- Remove this comment if you edit this file by hand! -->\n";
+
+    print OUT "</$indextag>\n";
+    exit 0;
+}
+
+$dat = shift @ARGV || die $usage;
+die "$me: file \"$dat\" does not exist\n" if ! -f $dat;
+
+%legal_scopes = ('ALL' => 1, 'LOCAL' => 1, 'GLOBAL' => 1);
+if ($scope && !$legal_scopes{$scope}) {
+    die "$me: invalid scope: $scope\n";
+}
+if ($impliedscope && !$legal_scopes{$impliedscope}) {
+    die "$me: invalid implied scope: $impliedscope\n";
+}
+
+@term = ();
+%id   = ();
+
+$termcount = 0;
+
+$quiet || print STDERR "Processing $dat...\n";
+
+# Read the index file, creating an array of objects.  Each object
+# represents and indexterm and has fields for the content of the
+# indexterm
+
+open (F, $dat);
+while (<F>) {
+    chop;
+    chop if /\r$/;
+
+    if (/^\/indexterm/i) {
+       push (@term, $idx);
+       next;
+    }
+
+    if (/^indexterm (.*)$/i) {
+       $termcount++;
+       $idx = {};
+       $idx->{'zone'} = {};
+       $idx->{'href'} = $1;
+       $idx->{'count'} = $termcount;
+       $idx->{'scope'} = $impliedscope;
+       next;
+    }
+
+    if (/^indexpoint (.*)$/i) {
+       $idx->{'hrefpoint'} = $1;
+       next;
+    }
+
+    if (/^title (.*)$/i) {
+       $idx->{'title'} = $1;
+       next;
+    }
+
+    if (/^primary[\[ ](.*)$/i) {
+       if (/^primary\[(.*?)\] (.*)$/i) {
+           $idx->{'psortas'} = &escape($1);
+           $idx->{'primary'} = &escape($2);
+       } else {
+           $idx->{'psortas'} = &escape($1);
+           $idx->{'primary'} = &escape($1);
+       }
+       next;
+    }
+
+    if (/^secondary[\[ ](.*)$/i) {
+       if (/^secondary\[(.*?)\] (.*)$/i) {
+           $idx->{'ssortas'} = &escape($1);
+           $idx->{'secondary'} = &escape($2);
+       } else {
+           $idx->{'ssortas'} = &escape($1);
+           $idx->{'secondary'} = &escape($1);
+       }
+       next;
+    }
+
+    if (/^tertiary[\[ ](.*)$/i) {
+       if (/^tertiary\[(.*?)\] (.*)$/i) {
+           $idx->{'tsortas'} = &escape($1);
+           $idx->{'tertiary'} = &escape($2);
+       } else {
+           $idx->{'tsortas'} = &escape($1);
+           $idx->{'tertiary'} = &escape($1);
+       }
+       next;
+    }
+
+    if (/^see (.*)$/i) {
+       $idx->{'see'} = &escape($1);
+       next;
+    }
+
+    if (/^seealso (.*)$/i) {
+       $idx->{'seealso'} = &escape($1);
+       next;
+    }
+
+    if (/^significance (.*)$/i) {
+       $idx->{'significance'} = &escape($1);
+       next;
+    }
+
+    if (/^class (.*)$/i) {
+       $idx->{'class'} = &escape($1);
+       next;
+    }
+
+    if (/^scope (.*)$/i) {
+       $idx->{'scope'} = &escape(uc($1));
+       next;
+    }
+
+    if (/^startref (.*)$/i) {
+       $idx->{'startref'} = $1;
+       next;
+    }
+
+    if (/^id (.*)$/i) {
+       $idx->{'id'} = $1;
+       $id{$1} = $idx;
+       next;
+    }
+
+    if (/^zone (.*)$/i) {
+       my($href) = $1;
+       $_ = scalar(<F>);
+       chop;
+       die "$me: invalid zone: $_\n" if !/^title (.*)$/i;
+       $idx->{'zone'}->{$href} = $1;
+       next;
+    }
+
+    die "$me: unrecognized tag in input: $_\n";
+}
+close (F);
+
+$quiet || print STDERR "$termcount entries loaded...\n";
+
+# Fixup the startrefs...
+# In DocBook, STARTREF is a #CONREF attribute; support this by copying
+# all of the fields from the indexterm with the id specified by STARTREF
+# to the indexterm that has the STARTREF.
+foreach $idx (@term) {
+    my($ididx, $field);
+    if ($idx->{'startref'}) {
+       $ididx = $id{$idx->{'startref'}};
+       foreach $field ('primary', 'secondary', 'tertiary', 'see', 'seealso',
+                       'psortas', 'ssortas', 'tsortas', 'significance',
+                       'class', 'scope') {
+           $idx->{$field} = $ididx->{$field};
+       }
+    }
+}
+
+# Sort the index terms
+@term = sort termsort @term;
+
+# Move all of the non-alphabetic entries to the front of the index.
+@term = sortsymbols(@term);
+
+safe_open(*OUT, $outfile);
+
+# Write the index...
+if ($indexid) {
+    print OUT "<$indextag id='$indexid'>\n\n";
+} else {
+    print OUT "<$indextag>\n\n";
+}
+
+print OUT "<!-- This file was produced by collateindex.pl.         -->\n";
+print OUT "<!-- Remove this comment if you edit this file by hand! -->\n";
+
+print OUT "<!-- ULINK is abused here.
+
+      The URL attribute holds the URL that points from the index entry
+      back to the appropriate place in the output produced by the HTML
+      stylesheet. (It's much easier to calculate this URL in the first
+      pass.)
+
+      The Role attribute holds the ID (either real or manufactured) of
+      the corresponding INDEXTERM.  This is used by the print backends
+      to produce page numbers.
+
+      The entries below are sorted and collated into the correct order.
+      Duplicates may be removed in the HTML backend, but in the print
+      backends, it is impossible to suppress duplicate pages or coalesce
+      sequences of pages into a range.
+-->\n\n";
+
+print OUT "<title>$title</title>\n\n" if $title;
+
+$last = {};     # the last indexterm we processed
+$first = 1;     # this is the first one
+$group = "";    # we're not in a group yet
+$lastout = "";  # we've not put anything out yet
+@seealsos = (); # See also stack.
+
+foreach $idx (@term) {
+    next if $idx->{'startref'}; # no way to represent spans...
+    next if ($idx->{'scope'} eq 'LOCAL') && ($scope eq 'GLOBAL');
+    next if ($idx->{'scope'} eq 'GLOBAL') && ($scope eq 'LOCAL');
+    next if &same($idx, $last); # suppress duplicates
+
+    $termcount--;
+
+    # If primary changes, output a whole new index term, otherwise just
+    # output another secondary or tertiary, as appropriate.  We know from
+    # sorting that the terms will always be in the right order.
+    if (!&tsame($last, $idx, 'primary')) {
+       print "DIFF PRIM\n" if $debug;
+       &end_entry() if not $first;
+
+       if ($lettergroups) {
+           # If we're grouping, make the right indexdivs
+           $letter = $idx->{'psortas'};
+           $letter = $idx->{'primary'} if !$letter;
+           $letter = uc(substr($letter, 0, 1));
+
+           # symbols are a special case
+           if (($letter lt 'A') || ($letter gt 'Z')) {
+               if (($group eq '')
+                   || (($group ge 'A') && ($group le 'Z'))) {
+                   print OUT "</indexdiv>\n" if !$first;
+                   print OUT "<indexdiv><title>$symbolsname</title>\n\n";
+                   $group = $letter;
+               }
+           } elsif (($group eq '') || ($group ne $letter)) {
+               print OUT "</indexdiv>\n" if !$first;
+               print OUT "<indexdiv><title>$letter</title>\n\n";
+               $group = $letter;
+           }
+       }
+
+       $first = 0; # there can only be on first ;-)
+
+       print OUT "<indexentry>\n";
+       print OUT "  <primaryie>", $idx->{'primary'};
+       $lastout = "primaryie";
+
+       if ($idx->{'secondary'}) {
+           print OUT "\n  </primaryie>\n";
+           print OUT "  <secondaryie>", $idx->{'secondary'};
+           $lastout = "secondaryie";
+       };
+
+       if ($idx->{'tertiary'}) {
+           print OUT "\n  </secondaryie>\n";
+           print OUT "  <tertiaryie>", $idx->{'tertiary'};
+           $lastout = "tertiaryie";
+       }
+    } elsif (!&tsame($last, $idx, 'secondary')) {
+       print "DIFF SEC\n" if $debug;
+
+       print OUT "\n  </$lastout>\n" if $lastout;
+
+       foreach (@seealsos) {
+           # it'd be nice to make this a link...
+           print OUT $indent, "  <seealsoie>", &escape($_), "</seealsoie>\n";
+       }
+       @seealsos = ();
+
+       print OUT "  <secondaryie>", $idx->{'secondary'};
+       $lastout = "secondaryie";
+       if ($idx->{'tertiary'}) {
+           print OUT "\n  </secondaryie>\n";
+           print OUT "  <tertiaryie>", $idx->{'tertiary'};
+           $lastout = "tertiaryie";
+       }
+    } elsif (!&tsame($last, $idx, 'tertiary')) {
+       print "DIFF TERT\n" if $debug;
+
+       print OUT "\n  </$lastout>\n" if $lastout;
+
+       foreach (@seealsos) {
+           # it'd be nice to make this a link...
+           print OUT $indent, "  <seealsoie>", &escape($_), "</seealsoie>\n";
+       }
+       @seealsos = ();
+
+       if ($idx->{'tertiary'}) {
+           print OUT "  <tertiaryie>", $idx->{'tertiary'};
+           $lastout = "tertiaryie";
+       }
+    }
+
+    &print_term($idx);
+
+    $last = $idx;
+}
+
+# Termcount is > 0 iff some entries were skipped.
+$quiet || print STDERR "$termcount entries ignored...\n";
+
+&end_entry();
+
+print OUT "</indexdiv>\n" if $lettergroups;
+print OUT "</$indextag>\n";
+
+close (OUT);
+
+$quiet || print STDERR "Done.\n";
+
+sub same {
+    my($a) = shift;
+    my($b) = shift;
+
+    my($aP) = $a->{'psortas'} || $a->{'primary'};
+    my($aS) = $a->{'ssortas'} || $a->{'secondary'};
+    my($aT) = $a->{'tsortas'} || $a->{'tertiary'};
+
+    my($bP) = $b->{'psortas'} || $b->{'primary'};
+    my($bS) = $b->{'ssortas'} || $b->{'secondary'};
+    my($bT) = $b->{'tsortas'} || $b->{'tertiary'};
+
+    my($same);
+
+    $aP =~ s/^\s*//; $aP =~ s/\s*$//; $aP = uc($aP);
+    $aS =~ s/^\s*//; $aS =~ s/\s*$//; $aS = uc($aS);
+    $aT =~ s/^\s*//; $aT =~ s/\s*$//; $aT = uc($aT);
+    $bP =~ s/^\s*//; $bP =~ s/\s*$//; $bP = uc($bP);
+    $bS =~ s/^\s*//; $bS =~ s/\s*$//; $bS = uc($bS);
+    $bT =~ s/^\s*//; $bT =~ s/\s*$//; $bT = uc($bT);
+
+#    print "[$aP]=[$bP]\n";
+#    print "[$aS]=[$bS]\n";
+#    print "[$aT]=[$bT]\n";
+
+    # Two index terms are the same if:
+    # 1. the primary, secondary, and tertiary entries are the same
+    #    (or have the same SORTAS)
+    # AND
+    # 2. They occur in the same titled section
+    # AND
+    # 3. They point to the same place
+    #
+    # Notes: Scope is used to suppress some entries, but can't be used
+    #          for comparing duplicates.
+    #        Interpretation of "the same place" depends on whether or
+    #          not $linkpoints is true.
+
+    $same = (($aP eq $bP)
+            && ($aS eq $bS)
+            && ($aT eq $bT)
+            && ($a->{'title'} eq $b->{'title'})
+            && ($a->{'href'} eq $b->{'href'}));
+
+    # If we're linking to points, they're only the same if they link
+    # to exactly the same spot.
+    $same = $same && ($a->{'hrefpoint'} eq $b->{'hrefpoint'})
+       if $linkpoints;
+
+    if ($same) {
+       warn "$me: duplicated index entry found: $aP $aS $aT\n";
+    }
+
+    $same;
+}
+
+sub tsame {
+    # Unlike same(), tsame only compares a single term
+    my($a) = shift;
+    my($b) = shift;
+    my($term) = shift;
+    my($sterm) = substr($term, 0, 1) . "sortas";
+    my($A, $B);
+
+    $A = $a->{$sterm} || $a->{$term};
+    $B = $b->{$sterm} || $b->{$term};
+
+    $A =~ s/^\s*//; $A =~ s/\s*$//; $A = uc($A);
+    $B =~ s/^\s*//; $B =~ s/\s*$//; $B = uc($B);
+
+    return $A eq $B;
+}
+
+sub end_entry {
+    # End any open elements...
+    print OUT "\n  </$lastout>\n" if $lastout;
+
+    foreach (@seealsos) {
+       # it'd be nice to make this a link...
+       print OUT $indent, "  <seealsoie>", &escape($_), "</seealsoie>\n";
+    }
+    @seealsos = ();
+
+    print OUT "</indexentry>\n\n";
+    $lastout = "";
+}
+
+sub print_term {
+    # Print out the links for an indexterm.  There can be more than
+    # one if the term has a ZONE that points to more than one place.
+    # (do we do the right thing in that case?)
+    my($idx) = shift;
+    my($key, $indent, @hrefs);
+    my(%href) = ();
+    my(%phref) = ();
+
+    $indent = "    ";
+
+    if ($idx->{'see'}) {
+       # it'd be nice to make this a link...
+       if ($lastout) {
+           print OUT "\n  </$lastout>\n";
+           $lastout = "";
+       }
+       print OUT $indent, "<seeie>", &escape($idx->{'see'}), "</seeie>\n";
+       return;
+    }
+
+    if (keys %{$idx->{'zone'}}) {
+       foreach $key (keys %{$idx->{'zone'}}) {
+           $href{$key} = $idx->{'zone'}->{$key};
+           $phref{$key} = $key;
+       }
+    } else {
+       $href{$idx->{'href'}} = $idx->{'title'};
+       $phref{$idx->{'href'}} = $idx->{'hrefpoint'};
+    }
+
+    # We can't use <LINK> because we don't know the ID of the term in the
+    # original source (and, in fact, it might not have one).
+    print OUT ",\n";
+    @hrefs = keys %href;
+    while (@hrefs) {
+       my($linkend) = "";
+       my($role) = "";
+       $key = shift @hrefs;
+       if ($linkpoints) {
+           $linkend = $phref{$key};
+       } else {
+           $linkend = $key;
+       }
+
+       $role = $phref{$key};
+       $role = $1 if $role =~ /\#(.*)$/;
+       $role = $1 if $role =~ /(.*)\./;
+
+       print OUT $indent;
+       print OUT "<ulink url=\"$linkend\" role=\"$role\">";
+       print OUT "<emphasis>" if ($idx->{'significance'} eq 'PREFERRED');
+       print OUT &escape($href{$key});
+       print OUT "</emphasis>" if ($idx->{'significance'} eq 'PREFERRED');
+       print OUT "</ulink>";
+    }
+
+    if ($idx->{'seealso'}) {
+       push @seealsos, $idx->{'seealso'};
+    }
+}
+
+sub termsort {
+    my($aP) = $a->{'psortas'} || $a->{'primary'};
+    my($aS) = $a->{'ssortas'} || $a->{'secondary'};
+    my($aT) = $a->{'tsortas'} || $a->{'tertiary'};
+    my($ap) = $a->{'count'};
+
+    my($bP) = $b->{'psortas'} || $b->{'primary'};
+    my($bS) = $b->{'ssortas'} || $b->{'secondary'};
+    my($bT) = $b->{'tsortas'} || $b->{'tertiary'};
+    my($bp) = $b->{'count'};
+
+    $aP =~ s/^\s*//; $aP =~ s/\s*$//; $aP = uc($aP);
+    $aS =~ s/^\s*//; $aS =~ s/\s*$//; $aS = uc($aS);
+    $aT =~ s/^\s*//; $aT =~ s/\s*$//; $aT = uc($aT);
+    $bP =~ s/^\s*//; $bP =~ s/\s*$//; $bP = uc($bP);
+    $bS =~ s/^\s*//; $bS =~ s/\s*$//; $bS = uc($bS);
+    $bT =~ s/^\s*//; $bT =~ s/\s*$//; $bT = uc($bT);
+
+    if ($aP eq $bP) {
+       if ($aS eq $bS) {
+           if ($aT eq $bT) {
+               # make sure seealso's always sort to the bottom
+               return 1 if ($a->{'seealso'});
+               return -1  if ($b->{'seealso'});
+               # if everything else is the same, keep these elements
+               # in document order (so the index links are in the right
+               # order)
+               return $ap <=> $bp;
+           } else {
+               return $aT cmp $bT;
+           }
+       } else {
+           return $aS cmp $bS;
+       }
+    } else {
+       return $aP cmp $bP;
+    }
+}
+
+sub sortsymbols {
+    my(@term) = @_;
+    my(@new) = ();
+    my(@sym) = ();
+    my($letter);
+    my($idx);
+
+    # Move the non-letter things to the front.  Should digits be thier
+    # own group?  Maybe...
+    foreach $idx (@term) {
+       $letter = $idx->{'psortas'};
+       $letter = $idx->{'primary'} if !$letter;
+       $letter = uc(substr($letter, 0, 1));
+
+       if (($letter lt 'A') || ($letter gt 'Z')) {
+           push (@sym, $idx);
+       } else {
+           push (@new, $idx);
+       }
+    }
+
+    return (@sym, @new);
+}
+
+sub safe_open {
+    local(*OUT) = shift;
+    local(*F, $_);
+
+    if (($outfile ne '-') && (!$forceoutput)) {
+       my($handedit) = 1;
+       if (open (OUT, $outfile)) {
+           while (<OUT>) {
+               if (/<!-- Remove this comment if you edit this file by hand! -->/){
+                   $handedit = 0;
+                   last;
+               }
+           }
+           close (OUT);
+       } else {
+           $handedit = 0;
+       }
+
+       if ($handedit) {
+           print STDERR "$me: file \"$outfile\" appears to have been edited by hand\n";
+           print STDERR "Use the -f option or specify a different output file name.\n";
+           exit 1;
+       }
+    }
+
+    open (OUT, ">$outfile") || die "$me: could not open file \"$outfile\": $!\n";
+
+    if ($preamble) {
+       # Copy the preamble
+       if (open(F, $preamble)) {
+           while (<F>) {
+               print OUT $_;
+           }
+           close(F);
+       } else {
+           warn "$me: could not open preamble file \"$preamble\": $!\n";
+       }
+    }
+}
+
+sub escape {
+    # make sure & and < don't show up in the index
+    local $_ = shift;
+    s/&/&amp;/sg;
+    s/</&lt;/sg;
+    s/>/&gt;/sg; # what the heck
+
+    return $_;
+}
+
+
+
+=head1 EXAMPLE
+
+B<collateindex.pl> B<-o> F<index.sgml> F<HTML.index>
+
+=head1 EXIT STATUS
+
+=over 5
+
+=item B<0>
+
+Success
+
+=item B<1>
+
+Failure
+
+=back
+
+=head1 AUTHOR
+
+Norm Walsh E<lt>ndw@nwalsh.comE<gt>
+
+Minor updates by Adam Di Carlo E<lt>adam@onshore.comE<gt> and Peter Eisentraut E<lt>peter_e@gmx.netE<gt>
+
+=cut
+
diff --git a/bin/collateindex.pl.1 b/bin/collateindex.pl.1
new file mode 100644 (file)
index 0000000..a1b7020
--- /dev/null
@@ -0,0 +1,214 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "COLLATEINDEX 1"
+.TH COLLATEINDEX 1 "2004-11-04" "docbook-dsssl 1.79" "DocBook DSSSL"
+.SH "NAME"
+collateindex.pl \- generate DocBook index files
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBcollateindex.pl\fR [\fB\-f\fR] [\fB\-g\fR] [\fB\-i\fR \fIid\fR] [\fB\-I\fR \fIscope\fR] [\fB\-N\fR]
+                [\fB\-o\fR \fIfile\fR] [\fB\-p\fR] [\fB\-P\fR \fIfile\fR] [\fB\-q\fR] [\fB\-s\fR \fIname\fR]
+                [\fB\-S\fR \fIscope\fR] [\fB\-t\fR \fIname\fR] [\fB\-x\fR] \fIfile\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBcollateindex.pl\fR creates index data for DocBook \s-1XML\s0 or \s-1SGML\s0 files.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-f\fR" 5
+.IX Item "-f"
+Force the output file to be written, even if it appears to have been
+edited by hand.
+.IP "\fB\-g\fR" 5
+.IX Item "-g"
+Group terms with IndexDiv based on the first letter of the term (or
+its SortAs attribute).  (This might not handle all language environments.)
+.IP "\fB\-i\fR \fIid\fR" 5
+.IX Item "-i id"
+The \s-1ID\s0 to use for the <index> tag.
+.IP "\fB\-I\fR \fIscope\fR" 5
+.IX Item "-I scope"
+The implied scope, must be \f(CW\*(C`all\*(C'\fR, \f(CW\*(C`local\*(C'\fR, or \f(CW\*(C`global\*(C'\fR.  IndexTerms
+which do not specify a scope will have the implied scope.  If
+unspecified, \f(CW\*(C`all\*(C'\fR is assumed.
+.IP "\fB\-N\fR" 5
+.IX Item "-N"
+New index (generates an empty index file).
+.IP "\fB\-o\fR \fIfile\fR" 5
+.IX Item "-o file"
+Output to \fIfile\fR. Defaults to \fIstdout\fR.
+.IP "\fB\-p\fR" 5
+.IX Item "-p"
+Link to points in the document.  The default is to link to the closest
+containing section.
+.IP "\fB\-P\fR \fIfile\fR" 5
+.IX Item "-P file"
+Read a preamble from \fIfile\fR.  The contents of \fIfile\fR will be
+inserted before the <index> tag.
+.IP "\fB\-q\fR" 5
+.IX Item "-q"
+Run quietly.
+.IP "\fB\-s\fR \fIname\fR" 5
+.IX Item "-s name"
+Name the IndexDiv that contains symbols.  The default is \f(CW\*(C`Symbols\*(C'\fR.
+Meaningless if \fB\-g\fR is not used.
+.IP "\fB\-S\fR \fIscope\fR" 5
+.IX Item "-S scope"
+Scope of the index, must be \f(CW\*(C`all\*(C'\fR, \f(CW\*(C`local\*(C'\fR, or \f(CW\*(C`global\*(C'\fR.  If
+unspecified, \f(CW\*(C`all\*(C'\fR is assumed.
+.IP "\fB\-t\fR \fIname\fR" 5
+.IX Item "-t name"
+Title for the index.
+.IP "\fB\-x\fR" 5
+.IX Item "-x"
+Make a SetIndex.
+.IP "\fB\-V\fR" 5
+.IX Item "-V"
+Print version number and exit.
+.IP "\fIfile\fR" 5
+.IX Item "file"
+The file containing index data generated with the DocBook \s-1DSSSL\s0
+\&\s-1HTML\s0 stylesheet (usually called \fI\s-1HTML\s0.index\fR).
+.SH "EXAMPLE"
+.IX Header "EXAMPLE"
+\&\fBcollateindex.pl\fR \fB\-o\fR \fIindex.sgml\fR \fI\s-1HTML\s0.index\fR
+.SH "EXIT STATUS"
+.IX Header "EXIT STATUS"
+.IP "\fB0\fR" 5
+.IX Item "0"
+Success
+.IP "\fB1\fR" 5
+.IX Item "1"
+Failure
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Norm Walsh <ndw@nwalsh.com>
+.PP
+Minor updates by Adam Di Carlo <adam@onshore.com> and Peter Eisentraut <peter_e@gmx.net>
diff --git a/catalog b/catalog
new file mode 100644 (file)
index 0000000..df05b02
--- /dev/null
+++ b/catalog
@@ -0,0 +1,53 @@
+OVERRIDE YES
+
+-- Stylesheets --
+
+PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN"
+  print/docbook.dsl
+
+PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN"
+  html/docbook.dsl
+
+PUBLIC "-//Norman Walsh//DOCUMENT DSSSL Library//EN"
+  lib/dblib.dsl
+
+PUBLIC "-//Norman Walsh//DOCUMENT DSSSL Library V2//EN"
+  lib/dblib.dsl
+
+-- DTDs --
+
+PUBLIC "+//IDN nwalsh.com//DTD DocBook DSSSL Architecture V1.0//EN"
+  dtds/dbdsssl/dbdsssl.dtd
+
+PUBLIC "-//Norman Walsh//DTD DocBook OLink Summary V1.1//EN"
+  dtds/olink/olinksum.dtd
+
+PUBLIC "-//Norman Walsh//DTD DocBook HTML 1.0//EN"
+  dtds/html/dbhtml.dtd
+
+DTDDECL "-//Norman Walsh//DTD DocBook HTML 1.0//EN"
+  dtds/html/dbhtml.dcl
+
+PUBLIC "-//Norman Walsh//DTD Image Library 1.0//EN"
+  dtds/imagelib/imagelib.dtd
+
+-- Entities --
+
+PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML" 
+  dtds/html/ISOlat1.gml
+
+-- Documents --
+
+PUBLIC "-//Norman Walsh//DOCUMENT DocBook DSSSL Stylesheet Documentation V1.0//EN"
+  docsrc/docbook.sgm
+
+PUBLIC "-//Norman Walsh//DOCUMENT OLink Test Document V1.0//EN"
+  docsrc/olinktarget.sgm
+
+PUBLIC "-//Norman Walsh//DOCUMENT OLink Semantics in the DocBook DSSSL Stylesheets V1.0//EN"
+  docsrc/olinksemantics.sgm
+
+-- Declarations --
+
+-- SGMLDECL "dtds/decls/docbook.dcl" --
+
diff --git a/common/ChangeLog b/common/ChangeLog
new file mode 100644 (file)
index 0000000..bfdbc87
--- /dev/null
@@ -0,0 +1,157 @@
+2004-10-10  <petere78@users.sourceforge.net>
+
+       * dbcommon.dsl: Give othercredit some useful rendering in print output, by copying over the
+       author rendering.  Fix author-list-string for authorgroups that contain
+       both authors and othercredits.  (bug #1038081)
+
+2004-10-09  <petere78@users.sourceforge.net>
+
+       * .cvsignore, Makefile, dbl10n.dsl, dbl10n.ent, dbl10n.template, dbl1bg.dsl: 
+       New Bulgarian translation by Viktor Vasilev (SF patch #1040075)
+
+       * dbl1bs.dsl: Additional fixes for Bosnian translation, by Kemal Skripic (SF patch
+       #1037371)
+
+2004-09-22  Michael Smith <xmldoc@users.sourceforge.net>
+
+       * .cvsignore: dbl1bs.ent added to ignore list; also re-sorted list
+
+2004-09-17  <petere78@users.sourceforge.net>
+
+       * Makefile, dbl10n.dsl, dbl10n.ent, dbl10n.template, dbl1bs.dsl: 
+       Bosnian translation by Kemal Skripic
+
+2003-04-28  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbcommon.dsl: Fix a problem pointed out by Tim Waugh in articleinfo vs artheader in
+       the article-title procedure.  Also ensure articleinfo is used in some
+       other contexts.
+
+2003-01-15  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbcommon.dsl: make <section> appear correctly in the PDF bookmark hierarchy; also
+       fix font size selection for section titles
+       
+       corrects sourceforge bugs 589247 and 524028; patch from Carsten Haese
+       appreciated
+
+2002-12-20  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbl1en.dsl: fix up some case-folding incidents
+
+2002-08-07  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: dbl1he.ent doesn't exist, was breaking build
+
+2002-06-06  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbl1tr.dsl: Patch #554930: obvious gentext-tr-intra-label-sep fix
+
+2002-04-29  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * .cvsignore, Makefile: (Incomplete) support for Hebrew
+
+2002-03-24  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * .cvsignore, Makefile: suffix rules for the *.ent production; add a rule to create a catalog
+       automatically form the *.dsl files
+
+       * Makefile: clean shouldn't remove dbl10n.ent
+
+2002-03-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbl10n.dsl: Remove duplicated comment
+
+2002-02-22  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbcommon.dsl: Fix test for articles in books
+
+2002-02-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbl1fr.dsl: Fix French quotes
+
+2002-01-03  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * .cvsignore, Makefile: Added Thai localization
+
+2001-12-04  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbcommon.dsl: Bug #435320: Poor enumeration of LoTs and LoFs
+
+2001-12-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbcommon.dsl: Bug #473531 numbering of blocks when the root element is not a component
+
+2001-11-30  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * .cvsignore, dbl10n.ent: Merged V174bugfixes
+
+       * .cvsignore, dbl10n.ent: New file.
+
+       * dbcommon.dsl: Patch #473116: Section levels
+
+       * dbl10n.ent: branches:  1.1.2;
+       file dbl10n.ent was initially added on branch V174bugfixes.
+
+2001-11-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbcommon.dsl: Support artheader or articleinfo as the info-element of an article
+
+2001-11-14  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * Makefile, dbl10n.dsl, dbl10n.pl, dbl10n.template, dbl1eu.dsl, dbl1nn.dsl, dbl1uk.dsl, dbl1xh.dsl: 
+       Added Basque, Nynorsk, Ukranian, and Xhosa
+
+2001-09-23  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbcommon.dsl: Patch #461632, title sizes for bibliography and index divs
+
+       * dbcommon.dsl: Patch #460349, don't check extension for linespecific inclusions
+
+2001-09-09  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbcommon.dsl: Bug #459209, allow format attribute to be absent
+
+2001-09-06  Jirka Kosek <kosek@users.sourceforge.net>
+
+       * dbl1cs.dsl: Synchronized with localization in cs.xml
+
+2001-08-30  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbcommon.dsl: Fix XML/SGML discrepancy wrt normalization of notation names; move some common stuff into dbcommon
+
+2001-07-04  <uid48421@users.sourceforge.net>
+
+       * Makefile, dbl10n.dsl, dbl1af.dsl, dbl1tr.dsl: Added Afrikaans and Turkish
+
+2001-06-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbcommon.dsl, dbl10n.dsl, dbl1ca.dsl, dbl1cs.dsl, dbl1da.dsl, dbl1de.dsl, dbl1el.dsl, dbl1en.dsl, dbl1es.dsl, dbl1et.dsl, dbl1fi.dsl, dbl1fr.dsl, dbl1hu.dsl, dbl1id.dsl, dbl1it.dsl, dbl1ja.dsl, dbl1ko.dsl, dbl1nl.dsl, dbl1no.dsl, dbl1pl.dsl, dbl1pt.dsl, dbl1ptbr.dsl, dbl1ro.dsl, dbl1ru.dsl, dbl1sk.dsl, dbl1sl.dsl, dbl1sr.dsl, dbl1sv.dsl, dbl1zhcn.dsl, dbl1zhtw.dsl: 
+       Updated support for locale-sensitive commas in lists
+
+2001-05-11  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbl10n.dsl, dbl1sr.dsl, dbl1zhtw.dsl: Support Serbian and Traditional Chinese
+
+2001-05-04  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * Makefile: Add (partial support for) Serbian localization
+
+2001-04-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * Makefile, cs-hack.pl: Fixed charset issues that caused the .ent files not to work in SGML
+
+2001-04-09  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbl1ko.dsl: Updates from Park Yong Joo
+
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * .cvsignore: branches:  1.1.2;
+       Added Makefiles to build common/*.ent
+
+       * Makefile: New file.
+
+       * dbcommon.dsl, dbl10n.dsl, dbl1ca.dsl, dbl1cs.dsl, dbl1da.dsl, dbl1de.dsl, dbl1el.dsl, dbl1en.dsl, dbl1es.dsl, dbl1et.dsl, dbl1fi.dsl, dbl1fr.dsl, dbl1hu.dsl, dbl1id.dsl, dbl1it.dsl, dbl1ja.dsl, dbl1ko.dsl, dbl1nl.dsl, dbl1no.dsl, dbl1null.dsl, dbl1pl.dsl, dbl1pt.dsl, dbl1ptbr.dsl, dbl1ro.dsl, dbl1ru.dsl, dbl1sk.dsl, dbl1sl.dsl, dbl1sv.dsl, dbl1zhcn.dsl, dbtable.dsl: 
+       New file.
+
diff --git a/common/catalog b/common/catalog
new file mode 100644 (file)
index 0000000..5829925
--- /dev/null
@@ -0,0 +1,37 @@
+OVERRIDE YES
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//AF" "dbl1af.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//BG" "dbl1bg.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//BS" "dbl1bs.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//CA" "dbl1ca.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//CS" "dbl1cs.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//DA" "dbl1da.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//DE" "dbl1de.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//EL" "dbl1el.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//EN" "dbl1en.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//ES" "dbl1es.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//ET" "dbl1et.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//EU" "dbl1eu.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//FI" "dbl1fi.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//FR" "dbl1fr.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//HU" "dbl1hu.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//IN" "dbl1id.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//IT" "dbl1it.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//JA" "dbl1ja.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//KO" "dbl1ko.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//NL" "dbl1nl.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//NN" "dbl1nn.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//NO" "dbl1no.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//PL" "dbl1pl.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//PT" "dbl1pt.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//PTBR" "dbl1ptbr.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//RO" "dbl1ro.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//RU" "dbl1ru.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//SK" "dbl1sk.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//SL" "dbl1sl.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//SR" "dbl1sr.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//SV" "dbl1sv.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//TR" "dbl1tr.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//UK" "dbl1uk.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//XH" "dbl1xh.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//ZHCN" "dbl1zhcn.ent"
+PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//ZHTW" "dbl1zhtw.ent"
diff --git a/common/cs-hack.pl b/common/cs-hack.pl
new file mode 100644 (file)
index 0000000..7f1c1ee
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/perl -- # -*- Perl -*-
+
+# Charset hacking...
+
+while (<>) {
+    s/\&\#(\d+);/sprintf("\\U-%04X;", $1)/egs;
+    print;
+}
diff --git a/common/dbcommon.dsl b/common/dbcommon.dsl
new file mode 100644 (file)
index 0000000..16e133b
--- /dev/null
@@ -0,0 +1,1904 @@
+;; $Id: dbcommon.dsl,v 1.14 2004/10/10 21:15:05 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+;; This file contains general functions common to both print and HTML
+;; versions of the DocBook stylesheets.
+;;
+
+;; If **ANY** change is made to this file, you _MUST_ alter the
+;; following definition:
+
+(define %docbook-common-version%
+  "Modular DocBook Stylesheet Common Functions")
+
+;; === element lists ====================================================
+
+;; these have to be functions because they have to be evaluated when
+;; there is a current-node so that normalize can know what declaration
+;; is in effect
+
+(define (set-element-list)
+  (list (normalize "set")))
+
+(define (book-element-list)
+  (list (normalize "book")))
+
+(define (division-element-list)
+  (list (normalize "part")))
+
+(define (component-element-list)
+  (list (normalize "preface")
+       (normalize "chapter")
+       (normalize "appendix") 
+       (normalize "article")
+       (normalize "glossary")
+       (normalize "bibliography")
+       (normalize "index")
+       (normalize "colophon")
+       (normalize "setindex")
+       (normalize "reference")
+       (normalize "refentry")
+       (normalize "book"))) ;; just in case nothing else matches...
+
+(define (major-component-element-list)
+  (list (normalize "preface")
+       (normalize "chapter") 
+       (normalize "appendix") 
+       (normalize "article")
+       (normalize "glossary")
+       (normalize "bibliography")
+       (normalize "index")
+       (normalize "colophon")
+       (normalize "setindex")
+       (normalize "reference")
+       (normalize "refentry")
+       (normalize "part")
+       (normalize "book"))) ;; just in case nothing else matches...
+
+(define (section-element-list)
+  (list (normalize "sect1")
+       (normalize "sect2")
+       (normalize "sect3") 
+       (normalize "sect4")
+       (normalize "sect5")
+       (normalize "section")
+       (normalize "simplesect")
+       (normalize "refsect1") 
+       (normalize "refsect2") 
+       (normalize "refsect3")))
+
+(define (block-element-list)
+  (list (normalize "example") 
+       (normalize "figure") 
+       (normalize "table") 
+       (normalize "equation") 
+       (normalize "procedure")))
+
+(define (outer-parent-list)
+  (list (normalize "toc") 
+       (normalize "lot") 
+       (normalize "appendix") 
+       (normalize "chapter") 
+       (normalize "part") 
+       (normalize "preface") 
+       (normalize "reference")
+       (normalize "bibliography") 
+       (normalize "glossary") 
+       (normalize "index") 
+       (normalize "setindex")
+       (normalize "sect1") 
+       (normalize "sect2") 
+       (normalize "sect3") 
+       (normalize "sect4") 
+       (normalize "sect5") 
+       (normalize "simplesect")
+       (normalize "partintro") 
+       (normalize "bibliodiv") 
+       (normalize "glossdiv") 
+       (normalize "indexdiv")
+       (normalize "refentry") 
+       (normalize "refsect1") 
+       (normalize "refsect2") 
+       (normalize "refsect3")
+       (normalize "msgtext") 
+       (normalize "msgexplan")))
+
+(define (list-element-list)
+  (list (normalize "orderedlist") 
+       (normalize "itemizedlist") 
+       (normalize "variablelist") 
+       (normalize "segmentedlist")
+        (normalize "simplelist") 
+       (normalize "calloutlist") 
+       (normalize "step")))
+
+(define (info-element-list)
+  (list (normalize "appendixinfo")
+       (normalize "articleinfo")
+       (normalize "bibliographyinfo")
+       (normalize "bookinfo")
+       (normalize "chapterinfo")
+       (normalize "glossaryinfo")
+       (normalize "indexinfo")
+       (normalize "objectinfo")
+       (normalize "partinfo")
+       (normalize "prefaceinfo")
+       (normalize "refentryinfo")
+       (normalize "referenceinfo")
+       (normalize "refsect1info")
+       (normalize "refsect2info")
+       (normalize "refsect3info")
+       (normalize "refsynopsisdivinfo")
+       (normalize "sect1info")
+       (normalize "sect2info")
+       (normalize "sect3info")
+       (normalize "sect4info")
+       (normalize "sect5info")
+       (normalize "sectioninfo")
+       (normalize "setindexinfo")
+       (normalize "setinfo")
+       (normalize "sidebarinfo")
+       ;; historical
+       (normalize "artheader")
+       (normalize "docinfo")))
+
+;; === automatic TOC ====================================================
+
+;; Returns #t if nd should appear in the auto TOC
+(define (appears-in-auto-toc? nd)
+  (if (or (equal? (gi nd) (normalize "refsect1"))
+         (have-ancestor? (normalize "refsect1") nd))
+      #f
+      #t))
+
+;; # return elements of nl for which appears-in-auto-toc? is #t
+(define (toc-list-filter nodelist)
+  (let loop ((toclist (empty-node-list)) (nl nodelist))
+    (if (node-list-empty? nl)
+       toclist
+       (if (appears-in-auto-toc? (node-list-first nl))
+           (loop (node-list toclist (node-list-first nl))
+                 (node-list-rest nl))
+           (loop toclist (node-list-rest nl))))))
+  
+;; === common ===========================================================
+
+(define (INLIST?)
+  (has-ancestor-member? (current-node) (list-element-list)))
+
+(define (INBLOCK?)
+  (has-ancestor-member? (current-node) 
+                       (list (normalize "example") 
+                             (normalize "informalexample")
+                             (normalize "figure") 
+                             (normalize "informalfigure")
+                             (normalize "equation")
+                             (normalize "informalequation")
+                             (normalize "funcsynopsis")
+                             (normalize "programlistingco")
+                             (normalize "screenco")
+                             (normalize "graphicco"))))
+
+(define (PARNUM)
+  (child-number (parent (current-node))))
+
+(define (NESTEDFNUM n fmt)
+  (if (number? n)
+      (format-number n fmt)
+      #f))
+
+(define (FNUM n) (NESTEDFNUM n "1"))
+
+(define (book-start?)
+  ;; Returns #t if the current-node is in the first division or 
+  ;; component of a book.
+  (let ((book (ancestor (normalize "book")))
+       (nd   (ancestor-member 
+              (current-node) 
+              (append (component-element-list) (division-element-list)))))
+    (let loop ((ch (children book)))
+      (if (node-list-empty? ch)
+         #f
+         (if (member (gi (node-list-first ch)) 
+                     (append (component-element-list) (division-element-list)))
+             (node-list=? (node-list-first ch) nd)
+             (loop (node-list-rest ch)))))))
+
+(define (first-chapter?)
+  ;; Returns #t if the current-node is in the first chapter of a book
+  (let* ((book (ancestor (normalize "book")))
+        (nd   (ancestor-member 
+               (current-node) 
+               (append (component-element-list) (division-element-list))))
+        (bookch (children book))
+        (bookcomp (expand-children bookch (list (normalize "part")))))
+    (let loop ((nl bookcomp))
+      (if (node-list-empty? nl)
+         #f
+         (if (equal? (gi (node-list-first nl)) (normalize "chapter"))
+             (if (node-list=? (node-list-first nl) nd)
+                 #t
+                 #f)
+             (loop (node-list-rest nl)))))))
+
+;; === bibliographic ====================================================
+
+;; Localized author-string
+
+(define (author-list-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of AUTHOR
+  ;; *including appropriate punctuation* if the AUTHOR occurs in a list
+  ;; of AUTHORs in an AUTHORGROUP:
+  ;;
+  ;;   John Doe
+  ;; or
+  ;;   John Doe and Jane Doe
+  ;; or
+  ;;   John Doe, Jane Doe, and A. Nonymous
+  ;;
+
+  (let* ((author-node-list (select-elements
+                           (descendants 
+                            (ancestor (normalize "authorgroup") author))
+                           (normalize "author")))
+        (corpauthor-node-list (select-elements
+                               (descendants 
+                                (ancestor (normalize "authorgroup") author))
+                               (normalize "corpauthor")))
+        (othercredit-node-list (select-elements
+                                (descendants 
+                                 (ancestor (normalize "authorgroup") author))
+                                (normalize "othercredit")))
+        (editor-node-list (select-elements
+                           (descendants 
+                            (ancestor (normalize "authorgroup")))
+                           (normalize "editor")))
+        (author-count (if (have-ancestor? (normalize "authorgroup") author)
+                          (+ (node-list-length author-node-list)
+                             (node-list-length corpauthor-node-list)
+                             (node-list-length othercredit-node-list)
+                             (node-list-length editor-node-list))
+                          1))
+        (this-count (if (have-ancestor? (normalize "authorgroup") author)
+                        (+ (node-list-length (preced author)) 1)
+                        1)))
+    (string-append
+     (if (and (> author-count 1)
+             (absolute-last-sibling? author))
+        (string-append (gentext-and) " ")
+        "")
+
+     (author-string author)
+
+     (if (> author-count 2)
+        (if (> (- author-count this-count) 1)
+            (gentext-listcomma)
+            (if (= (- author-count this-count) 1)
+                (gentext-lastlistcomma)
+                ""))
+        "")
+     (if (and (> author-count 1)
+             (not (absolute-last-sibling? author)))
+        " "
+        ""))))
+
+;; === procedures =======================================================
+
+(define ($proc-hierarch-number-format$ depth)
+  (case (modulo depth 5)
+    ((1) "1")
+    ((2) "a")
+    ((3) "i")
+    ((4) "A")
+    (else "I")))
+
+(define ($proc-hierarch-number$ nd seperator)
+  (if (equal? (gi nd) (normalize "step"))
+      (string-append
+       (format-number
+       (child-number nd) 
+       ($proc-hierarch-number-format$ ($proc-step-depth$ nd)))
+       seperator)
+      ""))
+
+(define ($proc-step-depth$ nd)
+  (let loop ((step nd) (depth 0))
+    (if (equal? (gi step) (normalize "procedure"))
+       depth
+       (loop (parent step) 
+             (if (equal? (gi step) (normalize "step"))
+                 (+ depth 1)
+                 depth)))))
+
+(define ($proc-step-number$ nd)
+  (let* ((step (if (equal? (gi nd) (normalize "step")) nd (parent nd)))
+        (str ($proc-hierarch-number$ step "")))
+    (string-append str (gentext-label-title-sep (normalize "step")))))
+
+(define ($proc-step-xref-number$ nd)
+  (let loop ((step nd) (str "") (first #t))
+    (if (equal? (gi step) (normalize "procedure"))
+       str
+       (loop (parent step) 
+             (if (equal? (gi step) (normalize "step"))
+                 (string-append 
+                  ($proc-hierarch-number$ step
+                                     (if first
+                                         ""
+                                         (gentext-intra-label-sep (normalize "step"))))
+                  str)
+                 str)
+             (if (equal? (gi step) (normalize "step"))
+                 #f
+                 first)))))
+
+;; === sections =========================================================
+
+(define (section-level-by-gi chunked? gi)
+  ;; Figure out the heading level of an element by its name.  We need
+  ;; to distinguish between the chunked processing mode (for HTML) and
+  ;; the non-chunked (print or HTML).  It is important that no heading
+  ;; level is skipped in a document structure (e.g., sect1 = 2, sect2
+  ;; = 4); this results in broken PDF bookmarks.
+  (if chunked?
+      (cond
+       ((equal? gi (normalize "sect5")) 5)
+       ((equal? gi (normalize "sect4")) 4)
+       ((equal? gi (normalize "sect3")) 3)
+       ((equal? gi (normalize "sect2")) 2)
+       ((equal? gi (normalize "sect1")) 1)
+       ((equal? gi (normalize "refsect3")) 4)
+       ((equal? gi (normalize "refsect2")) 3)
+       ((equal? gi (normalize "refsect1")) 2)
+       ((equal? gi (normalize "refsynopsisdiv")) 2)
+       ((equal? gi (normalize "bibliography")) 1)
+       ((equal? gi (normalize "bibliodiv")) 2)
+       ((equal? gi (normalize "index")) 1)
+       ((equal? gi (normalize "setindex")) 1)
+       ((equal? gi (normalize "indexdiv")) 2)
+       (else 1))
+      (cond
+       ((equal? gi (normalize "sect5")) 6)
+       ((equal? gi (normalize "sect4")) 5)
+       ((equal? gi (normalize "sect3")) 4)
+       ((equal? gi (normalize "sect2")) 3)
+       ((equal? gi (normalize "sect1")) 2)
+       ;; The next four are not used by the HTML stylesheets.
+       ((equal? gi (normalize "refsect3")) 5)
+       ((equal? gi (normalize "refsect2")) 4)
+       ((equal? gi (normalize "refsect1")) 3)
+       ((equal? gi (normalize "refsynopsisdiv")) 3)
+       ((equal? gi (normalize "bibliography")) 1)
+       ((equal? gi (normalize "bibliodiv")) 2)
+       ((equal? gi (normalize "index")) 1)
+       ((equal? gi (normalize "setindex")) 1)
+       ((equal? gi (normalize "indexdiv")) 2)
+       (else 1))))
+
+(define (section-level-by-node chunked? sect)
+  (if (equal? (gi sect) (normalize "section"))
+      ;; Section is special, it is recursive.
+      (let ((depth (length (hierarchical-number-recursive 
+                           (normalize "section")))))
+       (if (> depth 5)
+           6
+           (if chunked? (+ depth 1) (+ depth 2))))
+      (if (equal? (gi sect) (normalize "simplesect"))
+         ;; SimpleSect is special, it should be level "n+1", where "n" is
+         ;; the level of the numbered section that contains it.  If it is
+         ;; the *first* sectioning element in a chapter, make it 
+         ;; %default-simplesect-level%
+          (cond
+           ((have-ancestor? (normalize "sect5"))
+           (+ 1 (section-level-by-gi chunked? (normalize "sect5"))))
+           ((have-ancestor? (normalize "sect4"))
+           (+ 1 (section-level-by-gi chunked? (normalize "sect4"))))
+           ((have-ancestor? (normalize "sect3"))
+           (+ 1 (section-level-by-gi chunked? (normalize "sect3"))))
+           ((have-ancestor? (normalize "sect2"))
+           (+ 1 (section-level-by-gi chunked? (normalize "sect2"))))
+           ((have-ancestor? (normalize "sect1"))
+           (+ 1 (section-level-by-gi chunked? (normalize "sect1"))))
+           ((have-ancestor? (normalize "refsect3"))
+           (+ 1 (section-level-by-gi chunked? (normalize "refsect3"))))
+           ((have-ancestor? (normalize "refsect2"))
+           (+ 1 (section-level-by-gi chunked? (normalize "refsect2"))))
+           ((have-ancestor? (normalize "refsect1"))
+           (+ 1 (section-level-by-gi chunked? (normalize "refsect1"))))
+           (else %default-simplesect-level%))
+         ;; the rest of the section elements can be identified by name
+         (section-level-by-gi chunked? (gi sect)))))
+  
+;; === synopsis =========================================================
+
+;; The following definitions match those given in the reference
+;; documentation for DocBook V3.0
+(define        %arg-choice-opt-open-str% "[")
+(define        %arg-choice-opt-close-str% "]")
+(define        %arg-choice-req-open-str% "{")
+(define        %arg-choice-req-close-str% "}")
+(define        %arg-choice-plain-open-str% " ")
+(define        %arg-choice-plain-close-str% " ")
+(define        %arg-choice-def-open-str% "[")
+(define        %arg-choice-def-close-str% "]")
+(define        %arg-rep-repeat-str% "...")
+(define        %arg-rep-norepeat-str% "")
+(define        %arg-rep-def-str% "")
+(define %arg-or-sep% " | ")
+(define %cmdsynopsis-hanging-indent% 4pi)
+
+;; === linking ==========================================================
+
+;; From the DocBook V3.0 Reference entry for element XREF:
+;;
+;; Description
+;;
+;;   Cross reference link to another part of the document. XRef is empty,
+;;   and has common, Linkend, and Endterm attributes.
+;;
+;;   Processing Expectations
+;;
+;;   XRef must have a Linkend, but the Endterm is optional. If it is used,
+;;   the content of the element it points to is displayed as the text of
+;;   the cross reference; if it is absent, the XRefLabel of the
+;;   cross-referenced object is displayed.
+;;
+;; If neither the ENDTERM nor the XREFLABEL is present, then the cross
+;; reference text is taken from the (gentext-xref-strings) function
+;; in the localization file, like this
+;; 
+;; A cross reference to an element, the target, begins with the
+;; text returned by (gentext-xref-strings (gi target)).  Within
+;; that text, the following substitutions are made:
+;; 
+;; %p is replaced by the number of the page on which target occurs
+;; %g is replaced by the (gentext-element-name)
+;; %n is replaced by the label
+;; %t is replaced by the title
+;;
+;; After the "direct" cross reference, a number of indirect references
+;; are possible.  If the target element is in a different block, section,
+;; component, division, or book an indirect cross reference may be made.
+;;
+;; The indirect cross reference will only be made if
+;;
+;;   (auto-xref-indirect? target ancestor) 
+;;
+;; returns #t. The indirect reference is created by appending the
+;; connect returned by (auto-xref-indirect-connector) to the direct
+;; reference and then adding a direct refernce to the ancestor.
+;; The process is repeated for each ancestral element.
+;;
+;; For example, if a direct reference to a section returns
+;;
+;;    "the section called %t"
+;;
+;; and a direct reference to a chapter returns 
+;;
+;;    "Chapter %n"
+;;
+;; and (auto-xref-indirect? sect1 chapter) returns #t, and 
+;; (auto-xref-indirect-connector chapter) returns "in", then
+;; an xref to a section in another chapter will be:
+;;
+;;    "the section called %t in Chapter %n"
+;;
+;; Where %t and %n will be filled in accordingly.
+;;
+;; ======================================================================
+
+(define (auto-xref-indirect? target ancestor)
+  ;; This function answers the question: should an indirect reference
+  ;; to ancestor be made for target?  For example:
+  ;;
+  ;; (auto-xref-indirect? SECT1 CHAP)
+  ;;
+  ;; should return #t iff a reference of the form "in [CHAP-xref]" should
+  ;; be generated for a reference to SECT1 if SECT1 is in a different
+  ;; chapter than the XREF to SECT1.
+  ;;
+  ;; This function _does not_ have to consider the case of whether or
+  ;; not target and the xref are in the same ancestor.  
+  ;;
+  (cond
+   ;; Always add indirect references to another book
+   ((member (gi ancestor) (book-element-list))
+    #t)
+   ;; Add indirect references to the section or component a block
+   ;; is in iff chapters aren't autolabelled.  (Otherwise "Figure 1-3"
+   ;; is sufficient)
+   ((and (member (gi target) (block-element-list))
+        (not %chapter-autolabel%))
+    #t)
+   ;; Add indirect references to the component a section is in if
+   ;; the sections are not autolabelled
+   ((and (member (gi target) (section-element-list))
+        (member (gi ancestor) (component-element-list))
+        (not %section-autolabel%))
+    #t)
+   (else #f)))
+
+(define (auto-xref-direct target 
+                         #!optional 
+                         (xref-string (gentext-xref-strings target)))
+  (let* ((substitute (list
+                     (list "%g"  (element-gi-sosofo target))
+                     (list "%n"  (element-label-sosofo target))
+                     (list "%p"  (element-page-number-sosofo target))
+                     (list "%t"  (element-title-xref-sosofo target))))
+        (tlist   (match-split-list xref-string (assoc-objs substitute))))
+    (string-list-sosofo tlist substitute)))
+
+(define (auto-xref-indirect target 
+                           #!optional
+                           (xref-string (gentext-xref-strings target)))
+  (make sequence
+    (auto-xref-indirect-connector target)
+    (auto-xref-direct target xref-string)))
+
+(define (auto-xref target 
+                  #!optional (xref-string (gentext-xref-strings target)))
+  (let ((source (current-node))
+       (cont-blok (ancestor-member target (block-element-list)))
+       (cont-sect (ancestor-member target (section-element-list)))
+       (cont-comp (ancestor-member target (component-element-list)))
+       (cont-divn (ancestor-member target (division-element-list)))
+       (cont-book (ancestor-member target (book-element-list))))
+    (make sequence
+      (auto-xref-direct target xref-string)
+      (if (or (node-list=? cont-blok 
+                          (ancestor-member source (block-element-list)))
+             (node-list=? cont-blok target)
+             (not (auto-xref-indirect? target cont-blok)))
+         (empty-sosofo)
+         (auto-xref-indirect cont-blok))
+      (if (or (node-list=? cont-sect 
+                          (ancestor-member source (section-element-list)))
+             (node-list=? cont-sect target)
+             (not (auto-xref-indirect? target cont-sect)))
+         (empty-sosofo)
+         (auto-xref-indirect cont-sect))
+      (if (or (node-list=? cont-comp 
+                          (ancestor-member source (component-element-list)))
+             (node-list=? cont-comp target)
+             (not (auto-xref-indirect? target cont-comp)))
+         (empty-sosofo)
+         (auto-xref-indirect cont-comp))
+      (if (or (node-list=? cont-divn 
+                          (ancestor-member source (division-element-list)))
+             (node-list=? cont-divn target)
+             (not (auto-xref-indirect? target cont-divn)))
+         (empty-sosofo)
+         (auto-xref-indirect cont-divn))
+      (if (or (node-list=? cont-book 
+                          (ancestor-member source (book-element-list)))
+             (node-list=? cont-book target)
+             (not (auto-xref-indirect? target cont-book)))
+         (empty-sosofo)
+         (auto-xref-indirect cont-book)))))
+
+;; ======================================================================
+
+(define (set-number-restart-list cmp)       (list (normalize "set")))
+(define (book-number-restart-list cmp)      (list (normalize "set")))
+(define (part-number-restart-list cmp)      (list (normalize "book")))
+(define (reference-number-restart-list cmp) (list (normalize "book")))
+(define (preface-number-restart-list cmp)   (list (normalize "book")))
+(define (chapter-number-restart-list cmp)   (list (normalize "book")))
+(define (appendix-number-restart-list cmp)  (list (normalize "book") 
+                                                 (normalize "article")))
+(define (article-number-restart-list cmp)   (list (normalize "book")))
+(define (glossary-number-restart-list cmp)  (list (normalize "book")))
+(define (bibliography-number-restart-list cmp) (list (normalize "book")))
+(define (index-number-restart-list cmp)     (list (normalize "book")))
+(define (setindex-number-restart-list cmp)  (list (normalize "set")))
+(define (refentry-number-restart-list cmp)  (list (normalize "reference")))
+(define (default-number-restart-list cmp)   (list (normalize "book")))
+
+(define (component-number-restart-list cmp)
+  ;; Return the list of elements at which numbering of 'cmp' should reset.
+  ;; For example, for CHAPTER, it might return '("BOOK") causing chapters
+  ;; to be sequentially numbered across a book.  If it returned
+  ;; '("BOOK" "PART") then chapter numbering would restart at each 
+  ;; BOOK or PART.
+  (let ((name (gi cmp)))
+    (cond
+     ((equal? name (normalize "set"))       (set-number-restart-list cmp))
+     ((equal? name (normalize "book"))      (book-number-restart-list cmp))
+     ((equal? name (normalize "part"))      (part-number-restart-list cmp))
+     ((equal? name (normalize "reference")) (reference-number-restart-list cmp))
+     ((equal? name (normalize "preface"))   (preface-number-restart-list cmp))
+     ((equal? name (normalize "chapter"))   (chapter-number-restart-list cmp))
+     ((equal? name (normalize "appendix"))  (appendix-number-restart-list cmp))
+     ((equal? name (normalize "article"))   (article-number-restart-list cmp))
+     ((equal? name (normalize "glossary"))  (glossary-number-restart-list cmp))
+     ((equal? name (normalize "bibliography")) (bibliography-number-restart-list cmp))
+     ((equal? name (normalize "index"))     (index-number-restart-list cmp))
+     ((equal? name (normalize "setindex"))  (setindex-number-restart-list cmp))
+     ((equal? name (normalize "refentry"))  (refentry-number-restart-list cmp))
+     (else (default-number-restart-list cmp)))))
+
+(define (set-number-ignore-list cmp)       '())
+(define (book-number-ignore-list cmp)      '())
+(define (part-number-ignore-list cmp)      '())
+(define (reference-number-ignore-list cmp) (list (normalize "part")))
+(define (preface-number-ignore-list cmp)   (list (normalize "part")))
+(define (chapter-number-ignore-list cmp)   (list (normalize "part")))
+(define (appendix-number-ignore-list cmp)  (list (normalize "part")))
+(define (article-number-ignore-list cmp)   (list (normalize "part")))
+(define (glossary-number-ignore-list cmp)  (list (normalize "part")))
+(define (bibliography-number-ignore-list cmp) (list (normalize "part")))
+(define (index-number-ignore-list cmp)     (list (normalize "part")))
+(define (setindex-number-ignore-list cmp)  (list (normalize "part")))
+(define (refentry-number-ignore-list cmp)  '())
+(define (default-number-ignore-list cmp)   '())
+
+(define (component-number-ignore-list cmp)
+  ;; Return the list of elements (inside the restart list) which are
+  ;; hierarchy levels which should be ignored.  For example, for CHAPTER,
+  ;; it might return '("PART") causing chapter numbering inside books
+  ;; to ignore parts.
+  ;;
+  ;; Basically, if you skip up past a component/division element in
+  ;; the restart list, you better put the element(s) you skipped in 
+  ;; the ignore list or the stylesheet may never see your component
+  ;; when it's trying to do the numbering.
+  (let ((name (gi cmp)))
+    (cond
+     ((equal? name (normalize "set"))       (set-number-ignore-list cmp))
+     ((equal? name (normalize "book"))      (book-number-ignore-list cmp))
+     ((equal? name (normalize "part"))      (part-number-ignore-list cmp))
+     ((equal? name (normalize "reference")) (reference-number-ignore-list cmp))
+     ((equal? name (normalize "preface"))   (preface-number-ignore-list cmp))
+     ((equal? name (normalize "chapter"))   (chapter-number-ignore-list cmp))
+     ((equal? name (normalize "appendix"))  (appendix-number-ignore-list cmp))
+     ((equal? name (normalize "article"))   (article-number-ignore-list cmp))
+     ((equal? name (normalize "glossary"))  (glossary-number-ignore-list cmp))
+     ((equal? name (normalize "bibliography")) (bibliography-number-ignore-list cmp))
+     ((equal? name (normalize "index"))     (index-number-ignore-list cmp))
+     ((equal? name (normalize "setindex"))  (setindex-number-ignore-list cmp))
+     ((equal? name (normalize "refentry"))  (refentry-number-ignore-list cmp))
+     (else (default-number-ignore-list cmp)))))
+
+(define (set-number-sibling-list cmp)       '())
+(define (book-number-sibling-list cmp)      '())
+(define (part-number-sibling-list cmp)      '())
+(define (reference-number-sibling-list cmp) '())
+(define (preface-number-sibling-list cmp)   '())
+(define (chapter-number-sibling-list cmp)   '())
+(define (appendix-number-sibling-list cmp)  '())
+(define (article-number-sibling-list cmp)   '())
+(define (glossary-number-sibling-list cmp)  '())
+(define (bibliography-number-sibling-list cmp) '())
+(define (index-number-sibling-list cmp)     '())
+(define (setindex-number-sibling-list cmp)  '())
+(define (refentry-number-sibling-list cmp)  '())
+(define (default-number-sibling-list cmp)   '())
+
+(define (component-number-sibling-list cmp)
+  ;; Return the list of elements with which 'cmp' should be numbered.
+  ;; For example, for PART it might return '("PART" "REFERENCE") causing
+  ;; sibling parts and references to be numbered together.
+  (let ((name (gi cmp)))
+    (cond
+     ((equal? name (normalize "set"))       (set-number-sibling-list cmp))
+     ((equal? name (normalize "book"))      (book-number-sibling-list cmp))
+     ((equal? name (normalize "part"))      (part-number-sibling-list cmp))
+     ((equal? name (normalize "reference")) (reference-number-sibling-list cmp))
+     ((equal? name (normalize "preface"))   (preface-number-sibling-list cmp))
+     ((equal? name (normalize "chapter"))   (chapter-number-sibling-list cmp))
+     ((equal? name (normalize "appendix"))  (appendix-number-sibling-list cmp))
+     ((equal? name (normalize "article"))   (article-number-sibling-list cmp))
+     ((equal? name (normalize "glossary"))  (glossary-number-sibling-list cmp))
+     ((equal? name (normalize "bibliography")) (bibliography-number-sibling-list cmp))
+     ((equal? name (normalize "index"))     (index-number-sibling-list cmp))
+     ((equal? name (normalize "setindex"))  (setindex-number-sibling-list cmp))
+     ((equal? name (normalize "refentry"))  (refentry-number-sibling-list cmp))
+     (else (default-number-sibling-list cmp)))))
+
+(define (component-number component-node)
+  (let* ((root  (ancestor-member component-node 
+                                (component-number-restart-list 
+                                 component-node)))
+        (clist (expand-children (children root) 
+                                (component-number-ignore-list
+                                 component-node)))
+        (slist (append (list (gi component-node))
+                       (component-number-sibling-list component-node))))
+    (let loop ((nl clist) (count 1))
+      (if (node-list-empty? nl) 
+         1
+         (if (node-list=? (node-list-first nl) component-node)
+             count
+             (if (member (gi (node-list-first nl)) slist)
+                 (loop (node-list-rest nl) (+ count 1))
+                 (loop (node-list-rest nl) count)))))))
+
+;; == components and divisions == 
+
+(define (set-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (book-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (part-autolabel nd #!optional (force-label? #f))
+  (format-number (component-number nd) (label-number-format nd)))
+
+(define (reference-autolabel nd #!optional (force-label? #f))
+  (format-number (component-number nd) (label-number-format nd)))
+
+(define (preface-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (chapter-autolabel nd #!optional (force-label? #f))
+  (if (or force-label? %chapter-autolabel%)
+      (format-number (component-number nd) (label-number-format nd))
+      ""))
+
+(define (appendix-autolabel nd #!optional (force-label? #f))
+  ;; Abandoned special processing for appendixes in articles. Maybe
+  ;; it's a good idea, but it can't be done here because it screws
+  ;; up cross references to appendixes.
+  (if (or force-label? %chapter-autolabel%)
+      (format-number (component-number nd) (label-number-format nd))
+      ""))
+
+(define (article-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (glossary-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (bibliography-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (index-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (indexdiv-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (colophon-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (setindex-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (refentry-autolabel nd #!optional (force-label? #f))
+  (let* ((isep       (gentext-intra-label-sep nd))
+        (refnamediv (select-elements (children nd)
+                                     (normalize "refnamediv")))
+        (refd       (select-elements (children refnamediv)
+                                     (normalize "refdescriptor")))
+        (refnames   (select-elements (children refnamediv)
+                                     (normalize "refname"))))
+    ""))
+
+;; == /components and divisions == 
+
+(define (dedication-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (bibliodiv-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (glossdiv-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (section-autolabel-prefix nd)
+  (let* ((isep   (gentext-intra-label-sep nd))
+        (haschn (not (node-list-empty? (ancestor (normalize "chapter") nd))))
+        (hasapn (not (node-list-empty? (ancestor (normalize "appendix") nd)))))
+    (cond
+     (haschn (string-append 
+             (element-label (ancestor (normalize "chapter") nd)) isep))
+     (hasapn (string-append 
+             (element-label (ancestor (normalize "appendix") nd)) isep))
+     (else ""))))
+
+(define (section-autolabel nd #!optional (force-label? #f))
+  (let* ((isep (gentext-intra-label-sep nd))
+        (hasprf (not (node-list-empty? (ancestor (normalize "preface") nd))))
+        (prefix (section-autolabel-prefix nd)))
+    (if (and (or force-label? %section-autolabel%)
+            (or %label-preface-sections%
+                (not hasprf)))
+       (cond
+        ((equal? (gi nd) (normalize "sect1"))
+         (string-append prefix (format-number (child-number nd) 
+                                              (label-number-format nd))))
+        ((equal? (gi nd) (normalize "sect2"))
+         (string-append 
+          (element-label (ancestor (normalize "sect1") nd) force-label?)
+          isep 
+          (format-number (child-number nd) (label-number-format nd))))
+        ((equal? (gi nd) (normalize "sect3"))
+         (string-append
+          (element-label (ancestor (normalize "sect2") nd) force-label?)
+          isep 
+          (format-number (child-number nd) (label-number-format nd))))
+        ((equal? (gi nd) (normalize "sect4"))
+         (string-append
+          (element-label (ancestor (normalize "sect3") nd) force-label?)
+          isep 
+          (format-number (child-number nd) (label-number-format nd))))
+        ((equal? (gi nd) (normalize "sect5"))
+         (string-append 
+          (element-label (ancestor (normalize "sect4") nd) force-label?)
+          isep 
+          (format-number (child-number nd) (label-number-format nd))))
+
+        ((equal? (gi nd) (normalize "simplesect"))
+         (let* ((possible-sect-ancestors
+                 (node-list (ancestor (normalize "section") nd)
+                            (ancestor (normalize "sect5") nd)
+                            (ancestor (normalize "sect4") nd)
+                            (ancestor (normalize "sect3") nd)
+                            (ancestor (normalize "sect2") nd)
+                            (ancestor (normalize "sect1") nd)))
+                (section-ancestor (node-list-first possible-sect-ancestors)))
+           (if (node-list-empty? section-ancestor)
+               (string-append prefix (format-number (child-number nd) 
+                                                    (label-number-format nd)))
+               (string-append 
+                (element-label section-ancestor force-label?)
+                isep 
+                (format-number (child-number nd) (label-number-format nd))))))
+
+        ((equal? (gi nd) (normalize "section"))
+         (if (node-list-empty? (ancestor (normalize "section") nd))
+             (string-append prefix (format-number (child-number nd) 
+                                                  (label-number-format nd)))
+             (string-append 
+              (element-label (ancestor (normalize "section") nd) force-label?)
+              isep 
+              (format-number (child-number nd) (label-number-format nd)))))
+        (else (string-append (gi nd) " IS NOT A SECTION!")))
+       "")))
+  
+(define (refsection-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (step-autolabel nd #!optional (force-label? #f))
+  ($proc-step-xref-number$ nd))
+
+(define (listitem-autolabel nd #!optional (force-label? #f))
+  (if (equal? (gi (parent nd)) (normalize "orderedlist"))
+      (number->string (child-number nd))
+      "[xref to LISTITEM only supported in ORDEREDLIST]"))
+
+(define (sidebar-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (legalnotice-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (abstract-autolabel nd #!optional (force-label? #f))
+  "")
+
+(define (block-autolabel nd #!optional (force-label? #f))
+  (let* ((chn    (element-label (ancestor (normalize "chapter") nd)))
+        (apn    (element-label (ancestor (normalize "appendix") nd)))
+        (rfn    (element-label (ancestor (normalize "refentry") nd)))
+        ;; If the root of this document isn't in component-element-list, these
+        ;; things all wind up being numbered 0. To avoid that, we force the
+        ;; root element to be in the list of components if it isn't already
+        ;; a component.
+        (incomp (member (gi (sgml-root-element)) (component-element-list)))
+        ;; In articles in books, number blocks from book not from article.
+        ;; Otherwise you get 1, 1, 1, 1, etc. for the first figure in each
+        ;; article.
+        (artinbook (and (not (node-list-empty? (ancestor (normalize "article") nd)))
+                        (not (node-list-empty? (ancestor (normalize "book") nd)))))
+
+        (bkn    (if artinbook
+                    (format-number (component-child-number
+                                    nd
+                                    (list (normalize "book")))
+                                   (label-number-format nd))
+                    (if incomp
+                        (format-number (component-child-number
+                                        nd
+                                        (component-element-list))
+                                       (label-number-format nd))
+                        (format-number (component-child-number
+                                        nd
+                                        (append (component-element-list)
+                                                (list (gi (sgml-root-element)))))
+                                       (label-number-format nd))))))
+    (if (equal? chn "")
+       (if (equal? apn "")
+           (if (equal? rfn "")
+               bkn
+               (string-append rfn (gentext-intra-label-sep nd) bkn))
+           (string-append apn (gentext-intra-label-sep nd) bkn))
+       (string-append chn (gentext-intra-label-sep nd) bkn))))
+
+;; For all elements, if a LABEL attribute is present, that is the label
+;; that they get.  Otherwise:
+;; BOOK gets the Book volume, by book-autolabel
+;; PREFACE gets "", by preface-autolabel
+;; CHAPTER gets the Chapter number, by chapter-autolabel
+;; APPENDIX gets the Appendix letter, by appendix-autolabel
+;; REFERENCE gets "", by reference-autolabel
+;; REFENTRY gets "", by refentry-autolabel
+;; SECT* gets the nested section number (e.g., 1.3.5), by section-autolabel
+;; REFSECT* gets the nested section number, by refsection-autolabel
+;; everything else gets numbered by block-autolabel
+;;
+(define (element-label #!optional (nd (current-node)) (force-label? #f))
+  (if (node-list-empty? nd)
+      ""
+      (let ((label (attribute-string (normalize "label") nd)))
+       (if label
+           label
+           (cond
+            ;; Use a seperately defined assoc list?
+            ((equal? (gi nd) (normalize "abstract"))
+             (abstract-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "appendix"))
+             (appendix-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "article"))
+             (article-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "bibliodiv"))
+             (bibliodiv-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "bibliography"))
+             (bibliography-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "book"))
+             (book-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "chapter"))
+             (chapter-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "dedication"))
+             (dedication-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "glossary"))
+             (glossary-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "glossdiv"))
+             (glossdiv-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "index"))
+             (index-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "colophon"))
+             (colophon-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "indexdiv"))
+             (indexdiv-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "setindex"))
+             (setindex-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "legalnotice"))
+             (legalnotice-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "listitem"))
+             (listitem-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "part"))
+             (part-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "preface"))
+             (preface-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "refentry"))
+             (refentry-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "reference"))
+             (reference-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "refsynopsisdiv"))
+             (refsection-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "refsect1"))
+             (refsection-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "refsect2"))
+             (refsection-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "refsect3"))
+             (refsection-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "sect1"))
+             (section-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "sect2"))
+             (section-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "sect3"))
+             (section-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "sect4"))
+             (section-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "sect5"))
+             (section-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "section"))
+             (section-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "simplesect"))
+             (section-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "set"))
+             (set-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "sidebar"))
+             (sidebar-autolabel nd force-label?))
+            ((equal? (gi nd) (normalize "step"))
+             (step-autolabel nd force-label?))
+            (else (block-autolabel nd force-label?)))))))
+
+;; ======================================================================
+
+;; Returns the element label as a sosofo
+;;
+(define (element-label-sosofo nd #!optional (force-label? #f))
+  (if (string=? (element-label nd force-label?) "")
+      (empty-sosofo)
+      (make sequence
+       (literal (element-label nd force-label?)))))
+
+;; ======================================================================
+
+(define (set-title nd)
+  (let* ((setinfo (select-elements (children nd) (normalize "setinfo")))
+        (sititles (select-elements  
+                   (expand-children (children setinfo) 
+                                    (list (normalize "bookbiblio") 
+                                           (normalize "bibliomisc")
+                                           (normalize "biblioset")))
+                   (normalize "title")))
+        (settitles (select-elements (children nd) (normalize "title")))
+        (titles   (if (node-list-empty? settitles)
+                      sititles
+                      settitles)))
+    (if (node-list-empty? titles)
+       ""
+       (node-list-first titles))))
+
+(define (book-title nd)
+  (let* ((bookinfo (select-elements (children nd) (normalize "bookinfo")))
+        (bititles (select-elements  
+                   (expand-children (children bookinfo) 
+                                    (list (normalize "bookbiblio") 
+                                          (normalize "bibliomisc")
+                                          (normalize "biblioset")))
+                   (normalize "title")))
+        (chtitles (select-elements (children nd) (normalize "title")))
+        (titles   (if (node-list-empty? chtitles)
+                      bititles
+                      chtitles)))
+    (if (node-list-empty? titles)
+       ""
+       (node-list-first titles))))
+
+(define (part-title nd)
+  (let* ((docinfo  (select-elements (children nd) (normalize "docinfo")))
+        (dititles (select-elements  
+                   (expand-children (children docinfo) 
+                                    (list (normalize "bookbiblio") 
+                                          (normalize "bibliomisc")
+                                          (normalize "biblioset")))
+                   (normalize "title")))
+        (chtitles (select-elements (children nd) (normalize "title")))
+        (titles   (if (node-list-empty? chtitles)
+                      dititles
+                      chtitles)))
+    (if (node-list-empty? titles)
+       ""
+       (node-list-first titles))))
+
+ (define (article-title nd)
+   (let* ((titles
+          (or (select-elements (children
+                                (node-list-filter-by-gi (children nd)
+                                                        (list (normalize "artheader")
+                                                              (normalize "articleinfo"))))
+                               (normalize "title"))
+              (select-elements (children nd)
+                               (normalize "title")))))
+     (if (node-list-empty? titles)
+       ""
+       (node-list-first titles))))
+
+(define (preface-title nd)
+  (chapter-title nd))
+
+(define (chapter-title nd)
+  (let* ((docinfo  (select-elements (children nd) (normalize "docinfo")))
+        (dititles (select-elements  
+                   (expand-children (children docinfo) 
+                                    (list (normalize "bookbiblio") 
+                                          (normalize "bibliomisc")
+                                          (normalize "biblioset")))
+                   (normalize "title")))
+        (chtitles (select-elements (children nd) (normalize "title")))
+        (titles   (if (node-list-empty? chtitles)
+                      dititles
+                      chtitles)))
+    (if (node-list-empty? titles)
+       ""
+       (node-list-first titles))))
+
+(define (appendix-title nd)
+  (chapter-title nd))
+
+(define (reference-title nd)
+  (chapter-title nd))
+
+(define (refsynopsisdiv-title nd)
+  (optional-title nd))
+
+;; Returns either the REFENTRYTITLE or the first REFNAME.
+;;
+(define (refentry-title nd)
+  (let* ((refmeta (select-elements (descendants nd) (normalize "refmeta")))
+        (refttl  (select-elements (descendants refmeta) (normalize "refentrytitle")))
+        (refndiv (select-elements (descendants nd) (normalize "refnamediv")))
+        (refname (select-elements (descendants refndiv) (normalize "refname"))))
+    (if (node-list-empty? refttl)
+       (if (node-list-empty? refname)
+           ""
+           (node-list-first refname))
+       (node-list-first refttl))))
+
+(define (optional-title nd)
+  (let* ((docinfo  (select-elements (children nd) (normalize "docinfo")))
+        (dititles (select-elements (children docinfo) (normalize "title")))
+        (chtitles (select-elements (children nd) (normalize "title")))
+        (titles   (if (node-list-empty? chtitles)
+                      dititles
+                      chtitles)))
+    (if (node-list-empty? titles)
+       (gentext-element-name nd)
+       (node-list-first titles))))
+
+(define (glossary-title nd)
+  (optional-title nd))
+
+(define (bibliography-title nd)
+  (optional-title nd))
+
+(define (index-title nd)
+  (optional-title nd))
+
+(define (setindex-title nd)
+  (optional-title nd))
+
+(define (dedication-title nd)
+  (optional-title nd))
+
+(define (colophon-title nd)
+  (gentext-element-name nd))
+
+(define (section-title nd)
+  (let* ((info     (select-elements (children nd) 
+                                   (list (normalize "sect1info")
+                                         (normalize "sect2info")
+                                         (normalize "sect3info")
+                                         (normalize "sect4info")
+                                         (normalize "sect5info")
+                                         (normalize "section"))))
+        (ititles  (select-elements (children info) (normalize "title")))
+        (ctitles  (select-elements (children nd) (normalize "title")))
+        (titles   (if (node-list-empty? ctitles)
+                      ititles
+                      ctitles)))
+    (if (node-list-empty? titles)
+       ""
+       (node-list-first titles))))
+
+(define (refsection-title nd)
+  (let* ((info     (select-elements (children nd) 
+                                   (list (normalize "refsect1info")
+                                         (normalize "refsect2info") 
+                                         (normalize "refsect3info"))))
+        (ititles  (select-elements (children info) (normalize "title")))
+        (ctitles  (select-elements (children nd) (normalize "title")))
+        (titles   (if (node-list-empty? ctitles)
+                      ititles
+                      ctitles)))
+    (if (node-list-empty? titles)
+       ""
+       (node-list-first titles))))
+
+(define (block-title nd)
+  (let ((titles (select-elements (children nd) (normalize "title"))))
+    (if (node-list-empty? titles)
+       ""
+       (node-list-first titles))))
+
+;; ======================================================================
+
+(define (set-title-sosofo nd)
+  (let ((title (set-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (book-title-sosofo nd)
+  (let ((title (book-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (part-title-sosofo nd)
+  (let ((title (part-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (article-title-sosofo nd)
+  (let ((title (article-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (preface-title-sosofo nd)
+  (let ((title (preface-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (chapter-title-sosofo nd)
+  (let ((title (chapter-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (appendix-title-sosofo nd)
+  (let ((title (appendix-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (reference-title-sosofo nd)
+  (let ((title (reference-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (refsynopsisdiv-title-sosofo nd)
+  (optional-title-sosofo nd))
+
+(define (refentry-title-sosofo nd)
+  (let ((title (refentry-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (optional-title-sosofo nd)
+  (let ((title (optional-title nd)))
+    (if (string? title)
+       (literal title)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (glossary-title-sosofo nd)
+  (optional-title-sosofo nd))
+
+(define (bibliography-title-sosofo nd)
+  (optional-title-sosofo nd))
+
+(define (index-title-sosofo nd)
+  (optional-title-sosofo nd))
+
+(define (setindex-title-sosofo nd)
+  (optional-title-sosofo nd))
+
+(define (dedication-title-sosofo nd)
+  (optional-title-sosofo nd))
+
+(define (colophon-title-sosofo nd)
+  (literal (gentext-element-name nd)))
+
+(define (section-title-sosofo nd)
+  (let ((title (section-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (refsection-title-sosofo nd)
+  (let ((title (refsection-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(define (block-title-sosofo nd)
+  (let ((title (block-title nd)))
+    (if (string? title)
+       (empty-sosofo)
+       (with-mode title-sosofo-mode
+         (process-node-list title)))))
+
+(mode title-sosofo-mode
+  (element title
+    (process-children-trim))
+
+  (element citetitle
+    (process-children-trim))
+
+  (element refname
+    (process-children-trim))
+
+  (element refentrytitle
+    (process-children-trim)))
+
+;; Returns the title of the element as a sosofo.
+;;
+(define (element-title-sosofo #!optional (nd (current-node)))
+  (if (node-list-empty? nd)
+      (empty-sosofo)
+      (cond
+       ;; Use a seperately defined assoc list?
+       ((equal? (gi nd) (normalize "appendix")) (appendix-title-sosofo nd))
+       ((equal? (gi nd) (normalize "article")) (article-title-sosofo nd))
+       ((equal? (gi nd) (normalize "bibliography")) (bibliography-title-sosofo nd))
+       ((equal? (gi nd) (normalize "book")) (book-title-sosofo nd))
+       ((equal? (gi nd) (normalize "chapter")) (chapter-title-sosofo nd))
+       ((equal? (gi nd) (normalize "dedication")) (dedication-title-sosofo nd))
+       ((equal? (gi nd) (normalize "glossary")) (glossary-title-sosofo nd))
+       ((equal? (gi nd) (normalize "index")) (index-title-sosofo nd))
+       ((equal? (gi nd) (normalize "colophon")) (colophon-title-sosofo nd))
+       ((equal? (gi nd) (normalize "setindex")) (index-title-sosofo nd))
+       ((equal? (gi nd) (normalize "part")) (part-title-sosofo nd))
+       ((equal? (gi nd) (normalize "preface")) (preface-title-sosofo nd))
+       ((equal? (gi nd) (normalize "refentry")) (refentry-title-sosofo nd))
+       ((equal? (gi nd) (normalize "reference")) (reference-title-sosofo nd))
+       ((equal? (gi nd) (normalize "refsect1")) (refsection-title-sosofo nd))
+       ((equal? (gi nd) (normalize "refsect2")) (refsection-title-sosofo nd))
+       ((equal? (gi nd) (normalize "refsect3")) (refsection-title-sosofo nd))
+       ((equal? (gi nd) (normalize "refsynopsisdiv")) (refsynopsisdiv-title-sosofo nd))
+       ((equal? (gi nd) (normalize "sect1")) (section-title-sosofo nd))
+       ((equal? (gi nd) (normalize "sect2")) (section-title-sosofo nd))
+       ((equal? (gi nd) (normalize "sect3")) (section-title-sosofo nd))
+       ((equal? (gi nd) (normalize "sect4")) (section-title-sosofo nd))
+       ((equal? (gi nd) (normalize "sect5")) (section-title-sosofo nd))
+       ((equal? (gi nd) (normalize "set")) (set-title-sosofo nd))
+       (else (block-title-sosofo nd)))))
+
+;; ======================================================================
+
+;; Returns the title of the element; returns a node if possible, or a string
+(define (element-title nd)
+  (if (node-list-empty? nd)
+      ""
+      (cond
+       ;; Use a seperately defined assoc list?
+       ((equal? (gi nd) (normalize "appendix")) (appendix-title nd))
+       ((equal? (gi nd) (normalize "article")) (article-title nd))
+       ((equal? (gi nd) (normalize "bibliography")) (bibliography-title nd))
+       ((equal? (gi nd) (normalize "book")) (book-title nd))
+       ((equal? (gi nd) (normalize "chapter")) (chapter-title nd))
+       ((equal? (gi nd) (normalize "dedication")) (dedication-title nd))
+       ((equal? (gi nd) (normalize "glossary")) (glossary-title nd))
+       ((equal? (gi nd) (normalize "index")) (index-title nd))
+       ((equal? (gi nd) (normalize "colophon")) (colophon-title nd))
+       ((equal? (gi nd) (normalize "setindex")) (setindex-title nd))
+       ((equal? (gi nd) (normalize "part")) (part-title nd))
+       ((equal? (gi nd) (normalize "preface")) (preface-title nd))
+       ((equal? (gi nd) (normalize "refentry")) (refentry-title nd))
+       ((equal? (gi nd) (normalize "reference")) (reference-title nd))
+       ((equal? (gi nd) (normalize "refsect1")) (refsection-title nd))
+       ((equal? (gi nd) (normalize "refsect2")) (refsection-title nd))
+       ((equal? (gi nd) (normalize "refsect3")) (refsection-title nd))
+       ((equal? (gi nd) (normalize "refsynopsisdiv")) (refsynopsisdiv-title nd))
+       ((equal? (gi nd) (normalize "sect1")) (section-title nd))
+       ((equal? (gi nd) (normalize "sect2")) (section-title nd))
+       ((equal? (gi nd) (normalize "sect3")) (section-title nd))
+       ((equal? (gi nd) (normalize "sect4")) (section-title nd))
+       ((equal? (gi nd) (normalize "sect5")) (section-title nd))
+       ((equal? (gi nd) (normalize "set")) (set-title nd))
+       (else (block-title nd)))))
+
+;; ======================================================================
+;; Returns the data of a node, carefully excising INDEXTERMs from 
+;; the data content
+;;
+
+(define (data-of node)
+  ;; return the data characters of a node, except for the content of
+  ;; indexterms which are suppressed.
+  (let loop ((nl (children node)) (result ""))
+    (if (node-list-empty? nl)
+       result
+       (if (equal? (node-property 'class-name (node-list-first nl)) 'element)
+           (if (or (equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                   (equal? (gi (node-list-first nl)) (normalize "comment"))
+                   (equal? (gi (node-list-first nl)) (normalize "remark")))
+               (loop (node-list-rest nl) result)
+               (loop (node-list-rest nl)
+                     (string-append result (data-of (node-list-first nl)))))
+           (if (or (equal? (node-property 'class-name (node-list-first nl))
+                           'data-char)
+                   (equal? (node-property 'class-name (node-list-first nl))
+                           'sdata))
+               (loop (node-list-rest nl)
+                     (string-append result (data (node-list-first nl))))
+               (loop (node-list-rest nl) result))))))
+
+;; ======================================================================
+;; Returns the element title data of nd
+;;
+(define (element-title-string nd)
+  (let ((title (element-title nd)))
+    (if (string? title)
+       title
+       (data-of title))))
+
+;; ======================================================================
+;; Returns the element gi as a sosofo
+;;
+(define (element-gi-sosofo nd)
+  (if (node-list-empty? nd)
+      (empty-sosofo)
+      (make sequence
+       (literal (gentext-element-name nd)))))
+
+;; ======================================================================
+
+(define (titlepage-info-elements node info #!optional (intro (empty-node-list)))
+  ;; Returns a node-list of the elements that might appear on a title
+  ;; page.  This node-list is constructed as follows:
+  ;;
+  ;; 1. The "title" child of node is considered as a possibility
+  ;; 2. If info is not empty, then node-list starts as the children
+  ;;    of info.  If the children of info don't include a title, then
+  ;;    the title from the node is added.
+  ;; 3. If info is empty, then node-list starts as the children of node,
+  ;;    but with "partintro" filtered out.
+
+  (let* ((title (select-elements (children node) (normalize "title")))
+        (nl    (if (node-list-empty? info)
+                   (node-list-filter-by-not-gi (children node) 
+                                               (list (normalize "partintro")))
+                   (children info)))
+        (nltitle (node-list-filter-by-gi nl (list (normalize "title")))))
+    (if (node-list-empty? info)
+       (node-list nl
+                  intro)
+       (node-list (if (node-list-empty? nltitle)
+                      title
+                      (empty-node-list))
+                  nl
+                  intro))))
+
+;; ======================================================================
+
+(define (info-element #!optional (nd (current-node)))
+  ;; Returns the *INFO element for the nd or (empty-node-list) if no
+  ;; such node exists...
+  (cond
+   ((equal? (gi nd) (normalize "set"))
+    (select-elements (children nd) (normalize "setinfo")))
+   ((equal? (gi nd) (normalize "book"))
+    (select-elements (children nd) (normalize "bookinfo")))
+   ((equal? (gi nd) (normalize "section"))
+    (select-elements (children nd) (normalize "sectioninfo")))
+   ((equal? (gi nd) (normalize "sect1"))
+    (select-elements (children nd) (normalize "sect1info")))
+   ((equal? (gi nd) (normalize "sect2"))
+    (select-elements (children nd) (normalize "sect2info")))
+   ((equal? (gi nd) (normalize "sect3"))
+    (select-elements (children nd) (normalize "sect3info")))
+   ((equal? (gi nd) (normalize "sect4"))
+    (select-elements (children nd) (normalize "sect4info")))
+   ((equal? (gi nd) (normalize "sect5"))
+    (select-elements (children nd) (normalize "sect5info")))
+   ((equal? (gi nd) (normalize "refsect1"))
+    (select-elements (children nd) (normalize "refsect1info")))
+   ((equal? (gi nd) (normalize "refsect2"))
+    (select-elements (children nd) (normalize "refsect2info")))
+   ((equal? (gi nd) (normalize "refsect3"))
+    (select-elements (children nd) (normalize "refsect3info")))
+   ((equal? (gi nd) (normalize "refsynopsisdiv"))
+    (select-elements (children nd) (normalize "refsynopsisdivinfo")))
+   ((equal? (gi nd) (normalize "article"))
+    (node-list-filter-by-gi (children nd) (list (normalize "artheader")
+                                               (normalize "articleinfo"))))
+   (else ;; BIBLIODIV, GLOSSDIV, INDEXDIV, PARTINTRO, SIMPLESECT
+    (select-elements (children nd) (normalize "docinfo")))))
+
+;; ======================================================================
+;;
+;; Bibliography filtering...
+
+(define (biblio-filter allentries)
+  (let* ((all  (descendants (sgml-root-element)))
+        (link (select-elements all (normalize "link")))
+        (xref (select-elements all (normalize "xref")))
+        (cite (select-elements all (normalize "citation")))
+        (xref-elements (node-list link xref)))
+    (let loop ((entries allentries) (used (empty-node-list)))
+      (if (node-list-empty? entries)
+         used
+         (if (or (cited-by-xref (node-list-first entries) xref-elements)
+                 (cited-by-citation (node-list-first entries) cite))
+             (loop (node-list-rest entries) 
+                   (node-list used (node-list-first entries)))
+             (loop (node-list-rest entries) used))))))
+
+(define (cited-by-xref bib xref-elements)
+  (let* ((id (attribute-string (normalize "id") bib)))
+    (if id
+       (let loop ((links xref-elements))
+         (if (node-list-empty? links)
+             #f
+             (if (equal? (attribute-string (normalize "linkend") 
+                                           (node-list-first links)) id)
+                 #t
+                 (loop (node-list-rest links)))))
+       #f)))
+
+(define (cited-by-citation bib citations)
+  (let loop ((links citations))
+    (if (node-list-empty? links)
+       #f
+       (if (citation-matches-target? (node-list-first links) bib)
+           #t
+           (loop (node-list-rest links))))))
+
+(define (citation-matches-target? citation target)
+  (let* ((fchild (node-list-first 
+                 (node-list-filter-out-pis 
+                  (children target))))
+        (abbrev (if (equal? (gi fchild) (normalize "abbrev"))
+                    fchild
+                    (empty-node-list)))
+        (cite   (data-of citation)))
+    (or (equal? (attribute-string "id" target) (normalize cite))
+       (equal? (attribute-string "xreflabel" target) (normalize cite))
+       (equal? (normalize cite) (normalize (data-of abbrev))))))
+
+(define (bibentry-number bibentry)
+  (let* ((bgraphy (ancestor-member bibentry 
+                                  (list (normalize "bibliography"))))
+        (comps   (expand-children (children bgraphy) 
+                                  (list (normalize "bibliodiv")))))
+    (let loop ((nl comps) (count 1))
+      (if (node-list-empty? nl) 
+         0
+         (if (node-list=? (node-list-first nl) bibentry)
+             count
+             (if (or (equal? (gi (node-list-first nl))
+                             (normalize "biblioentry"))
+                     (equal? (gi (node-list-first nl))
+                             (normalize "bibliomixed")))
+                 (loop (node-list-rest nl) (+ count 1))
+                 (loop (node-list-rest nl) count)))))))
+
+;; ======================================================================
+
+(define (olink-resource-title pubid sysid)
+  ;; This version of olink-resource-title expects public identifiers
+  ;; with the following format:
+  ;;
+  ;;   -//owner//TEXT title Vx.x//EN
+  ;; 
+  ;; Specifically the title is the description field of the public
+  ;; identifier minus the first word (TEXT, the type) and the last
+  ;; word, in my case a version string.  Words are blank delimited.
+  ;; The parsing will fail if a "/" appears anywhere in any field.
+  ;; The system identifier is ignored
+  ;; 
+  (let* ((pubidparts   (if pubid
+                          (split pubid '(#\/))
+                          (split "-//none//type version//la" '(#\/))))
+        (description  (car (cdr (cdr pubidparts))))
+        (descparts    (split description))
+        (titleparts   (list-head (cdr descparts) (- (length descparts) 2))))
+    (join titleparts)))
+
+;; ======================================================================
+
+(define (orderedlist-listitem-number listitem)
+  ;; return the number of listitem, taking continuation into account
+  (let* ((orderedlist (parent listitem))
+        (listitems (select-elements (children orderedlist)
+                                    (normalize "listitem")))
+        (continue? (equal? (attribute-string (normalize "continuation")
+                                             orderedlist)
+                           (normalize "continues")))
+
+;; If a list is the continuation of a previous list, we must find the
+;; list that is continued in order to calculate the starting
+;; item number of this list.
+;;
+;; Of all the lists in this component, only the following are candidates:
+;; 1. Lists which precede this list
+;; 2. Lists which are not ancestors of this list
+;; 3. Lists that do not have ancestors that are lists which precede this one
+;;
+;; Of the candidates, the last one, in document order, is the preceding
+;; list
+        (all-lists (select-elements
+                    (descendants (ancestor-member orderedlist
+                                                  (component-element-list)))
+                    (normalize "orderedlist")))
+
+        (cand1     (if continue?
+                       (let loop ((nl all-lists)
+                                  (prec (empty-node-list)))
+                         (if (node-list-empty? nl)
+                             prec
+                             (if (node-list=? (node-list-first nl)
+                                              orderedlist)
+                                 prec
+                                 (loop (node-list-rest nl)
+                                       (node-list prec
+                                                  (node-list-first nl))))))
+                       (empty-node-list)))
+
+        (cand2     (let loop ((nl cand1)
+                              (cand2lists (empty-node-list)))
+                     (if (node-list-empty? nl)
+                         cand2lists
+                         (loop (node-list-rest nl)
+                               (if (descendant-of? (node-list-first nl)
+                                                   orderedlist)
+                                   cand2lists
+                                   (node-list cand2lists
+                                              (node-list-first nl)))))))
+
+        ;; now find the last item of cand2 that is not a descendant
+        ;; of some other element of the cand2 list.
+        (preclist  (let loop ((nl (node-list-reverse cand2)))
+                     (if (node-list-empty? nl)
+                         (empty-node-list)
+                         (if (descendant-member-of?
+                              (node-list-first nl)
+                              (node-list-rest nl))
+                             (loop (node-list-rest nl))
+                             (node-list-first nl)))))
+
+        (precitem (if (node-list-empty? preclist)
+                      (empty-node-list)
+                      (node-list-last (children preclist))))
+        (precitem-number (if (and continue? (not (node-list-empty? precitem)))
+                             (orderedlist-listitem-number precitem)
+                             0)))
+
+    (+ precitem-number (child-number listitem))))
+
+(define (descendant-member-of? node node-list)
+  ;; return true if node is a descedant of any member of node-list
+  (let loop ((nl node-list))
+    (if (node-list-empty? nl)
+       #f
+       (if (descendant-of? (node-list-first nl) node)
+           #t
+           (loop (node-list-rest nl))))))
+
+;; ======================================================================
+
+(define (orderedlist-listitem-label listitem)
+  ;; return the formatted number of listitem
+  (let* ((number  (orderedlist-listitem-number listitem))
+        (depth   (length (hierarchical-number-recursive
+                          (normalize "orderedlist")
+                          listitem)))
+        (numeration (inherited-attribute-string (normalize "numeration")
+                                                listitem))
+        ;; rawnum allows for numbering to alternate
+        (rawnum (cond
+                 ((equal? numeration (normalize "arabic")) 1)
+                 ((equal? numeration (normalize "loweralpha")) 2)
+                 ((equal? numeration (normalize "lowerroman")) 3)
+                 ((equal? numeration (normalize "upperalpha")) 4)
+                 ((equal? numeration (normalize "upperroman")) 0)
+                 (else (modulo depth 5)))))
+    (case rawnum
+      ((1) (format-number number "1"))
+      ((2) (format-number number "a"))
+      ((3) (format-number number "i"))
+      ((4) (format-number number "A"))
+      ((0) (format-number number "I")))))
+
+(define (orderedlist-listitem-label-recursive listitem)
+  ;; return the recursively formatted number of the listitem.
+  ;; In other words, something of the form 1.2.3 for a third level
+  ;; nested ordered list
+  (let loop ((li (parent listitem)) 
+            (label (orderedlist-listitem-label listitem)))
+    (if (or (node-list-empty? li)
+           (node-list-empty? (ancestor (normalize "orderedlist") li)))
+       label
+       (if (and (equal? (gi li) (normalize "listitem"))
+                (equal? (gi (parent li)) (normalize "orderedlist")))
+           (loop (parent li)
+                 (string-append 
+                  (orderedlist-listitem-label li)
+                  (gentext-intra-label-sep li)
+                  label))
+           (loop (parent li) label)))))
+
+(define (question-answer-label #!optional (node (current-node)))
+  (let* ((inhlabel (inherited-attribute-string (normalize "defaultlabel")
+                                              node))
+        (deflabel (if inhlabel inhlabel (qanda-defaultlabel)))
+        (label    (attribute-string (normalize "label") node))
+        (hnr      (hierarchical-number-recursive (normalize "qandadiv")
+                                                 node))
+
+        (parsect  (ancestor-member node (section-element-list)))
+
+        (defnum   (if (and %qanda-inherit-numeration% 
+                           %section-autolabel%)
+                      (if (node-list-empty? parsect)
+                          (section-autolabel-prefix node)
+                          (section-autolabel parsect))
+                      ""))
+
+        (hnumber  (let loop ((numlist hnr) (number defnum) 
+                             (sep (if (equal? defnum "") "" ".")))
+                    (if (null? numlist)
+                        number
+                        (loop (cdr numlist) 
+                              (string-append number
+                                             sep
+                                             (number->string (car numlist)))
+                              "."))))
+        (cnumber  (child-number (parent node)))
+        (number   (string-append hnumber 
+                                 (if (equal? hnumber "")
+                                     ""
+                                     ".")
+                                 (number->string cnumber))))
+    (cond
+     ((equal? deflabel (normalize "qanda"))
+      (gentext-element-name node))
+     ((equal? deflabel (normalize "label"))
+      label)
+     ;; Note: only questions are numbered...
+     ((and (equal? deflabel (normalize "number"))
+          (equal? (gi node) (normalize "question")))
+      (string-append number "."))
+     (else ""))))
+
+;; ======================================================================
+;; Calculate term lengths...
+
+(define (varlistentry-term-too-long? vle termlength)
+  (let loop ((nl (select-elements (children vle) (normalize "term")))
+            (too-long? #f))
+    (if (or too-long? (node-list-empty? nl))
+       too-long?
+       (loop (node-list-rest nl)
+             (> (string-length (data (node-list-first nl)))
+                termlength)))))
+
+(define (variablelist-term-too-long? termlength)
+  (let loop ((nl (select-elements (children (current-node))
+                                 (normalize "varlistentry")))
+            (too-long? #f))
+    (if (or too-long? (node-list-empty? nl))
+       too-long?
+       (loop (node-list-rest nl)
+             (varlistentry-term-too-long? (node-list-first nl) termlength)))))
+
+;; ======================================================================
+;; bibliography elements
+
+(define (biblioentry-inline-elements)
+  (list (normalize "abbrev")
+       (normalize "affiliation")
+       (normalize "artpagenums")
+       (normalize "author")
+       (normalize "authorgroup")
+       (normalize "authorinitials")
+       (normalize "citetitle")
+       (normalize "collab")
+       (normalize "confgroup")
+       (normalize "contractnum")
+       (normalize "contractsponsor")
+       (normalize "contrib")
+       (normalize "copyright")
+       (normalize "corpauthor")
+       (normalize "corpname")
+       (normalize "date")
+       (normalize "edition")
+       (normalize "editor")
+       (normalize "firstname")
+       (normalize "honorific")
+       (normalize "invpartnumber")
+       (normalize "isbn")
+       (normalize "issn")
+       (normalize "issuenum")
+       (normalize "lineage")
+       (normalize "orgname")
+       (normalize "othercredit")
+       (normalize "othername")
+       (normalize "pagenums")
+       (normalize "productname")
+       (normalize "productnumber")
+       (normalize "pubdate")
+       (normalize "publisher")
+       (normalize "publishername")
+       (normalize "pubsnumber")
+       (normalize "releaseinfo")
+       (normalize "seriesvolnums")
+       (normalize "subtitle")
+       (normalize "surname")
+       (normalize "title")
+       (normalize "titleabbrev")
+       (normalize "volumenum")))
+
+(define (biblioentry-block-elements)
+  (list (normalize "abstract")
+       (normalize "address")
+       (normalize "authorblurb")
+       (normalize "printhistory")
+       (normalize "revhistory")
+       (normalize "seriesinfo")))
+
+(define (biblioentry-flatten-elements)
+  (list (normalize "articleinfo")
+       (normalize "biblioset")
+       (normalize "bookbiblio")
+        (normalize "artheader")))
+
+;; === db31 common ======================================================
+
+(define (data-filename dataobj)
+  (let* ((entityref (attribute-string (normalize "entityref") dataobj))
+        (fileref   (attribute-string (normalize "fileref") dataobj))
+        (filename  (if fileref
+                       fileref
+                       (system-id-filename entityref)))
+        (ext       (file-extension filename)))
+    (if (or (not filename)
+           (not %graphic-default-extension%)
+           (member ext %graphic-extensions%))
+       filename
+       (string-append filename "." %graphic-default-extension%))))
+
+(define (normalized-member string string-list)
+  (if (string? string)
+      (let loop ((sl string-list))
+       (if (null? sl)
+           #f
+           (if (string=? (normalize string) (normalize (car sl)))
+               #t
+               (loop (cdr sl)))))
+      #f))
+
+(define (find-displayable-object objlist notlist extlist)
+  (let loop ((nl objlist))
+    (if (node-list-empty? nl)
+       (empty-node-list)
+       (let* ((objdata  (node-list-filter-by-gi
+                         (children (node-list-first nl))
+                         (list (normalize "videodata")
+                               (normalize "audiodata")
+                               (normalize "imagedata"))))
+              (filename  (data-filename objdata))
+              (extension (file-extension filename))
+              (notation  (attribute-string (normalize "format") objdata)))
+         (if (or (normalized-member notation notlist)
+                 (normalized-member extension extlist)
+                 (and notation
+                      (string=? notation (normalize "linespecific"))))
+             (node-list-first nl)
+             (loop (node-list-rest nl)))))))
+
+(define (select-displayable-object objlist)
+  (let ((pref (find-displayable-object objlist
+                                      preferred-mediaobject-notations
+                                      preferred-mediaobject-extensions))
+       (ok   (find-displayable-object objlist
+                                      acceptable-mediaobject-notations
+                                      acceptable-mediaobject-extensions)))
+    (if (node-list-empty? pref)
+       ok
+       pref)))
+
+(define ($mediaobject$)
+  (let* ((objects (node-list-filter-by-gi
+                  (children (current-node))
+                  (list (normalize "videoobject")
+                        (normalize "imageobject")
+                        (normalize "audioobject"))))
+        (dobject (select-displayable-object objects))
+        (textobj (select-elements (children (current-node))
+                                  (normalize "textobject")))
+        (caption (select-elements (children (current-node))
+                                  (normalize "caption"))))
+    (make sequence
+      (if (node-list-empty? dobject)
+         (if (node-list-empty? textobj)
+             (empty-sosofo)
+             (process-node-list (node-list-first textobj)))
+         (process-node-list dobject))
+      (process-node-list caption))))
+
+;; ======================================================================
diff --git a/common/dbl10n.dsl b/common/dbl10n.dsl
new file mode 100644 (file)
index 0000000..35876bd
--- /dev/null
@@ -0,0 +1,1554 @@
+;; $Id: dbl10n.dsl,v 1.8 2004/10/09 21:36:35 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com.  Please use the ISO 639 language
+;; code to identify the language.  Append a subtag as per RFC 1766,
+;; if necessary.
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x and #x
+;; keywords.
+;;
+
+;; The following language codes from ISO 639 are recognized:
+;; af - Afrikaans                           1.71
+;; bg - Bulgarian
+;; bs - Bosnian
+;; ca - Catalan
+;; cs - Czech
+;; da - Danish (previously dk)
+;; de - German (previously dege)
+;; el - Greek
+;; en - English (previously usen)
+;; es - Spanish
+;; et - Estonian                            1.55
+;; eu - Basque                              1.74
+;; fi - Finnish
+;; fr - French
+;; hu - Hungarian                           1.55
+;; id - Indonesian                          1.55
+;; it - Italian
+;; ja - Japanese
+;; ko - Korean                              1.59
+;; nl - Dutch
+;; nn - Nnyorsk                             1.74
+;; no - Norwegian (previously bmno) ???
+;; pl - Polish
+;; pt - Portuguese
+;; pt_br - Portuguese (Brazil)
+;; ro - Romanian
+;; ru - Russian
+;; sk - Slovak
+;; sl - Slovenian                           1.55
+;; sr - Serbian                             1.70
+;; sv - Swedish (previously svse)
+;; tr - Turkish                             1.71
+;; uk - Ukranian                            1.74
+;; xh - Xhosa                               1.74
+;; zh_cn - Chinese (Continental)            1.55
+;; zh_tw - Chinese (Traditional)            1.70
+
+;; The following language codes are recognized for historical reasons:
+
+;; bmno(no) - Norwegian (Norsk Bokmal) ???
+;; dege(de) - German
+;; dk(da)   - Danish
+;; svse(sv) - Swedish
+;; usen(en) - English
+
+(define %default-language% "en")
+(define %gentext-language% #f)
+(define %gentext-use-xref-lang% #f)
+
+(define ($lang$ #!optional (target (current-node)) (xref-context #f))
+  (if %gentext-language%
+      (lang-fix %gentext-language%)
+      (if (or xref-context %gentext-use-xref-lang%)
+         (let loop ((here target))
+           (if (node-list-empty? here)
+               (lang-fix %default-language%)
+               (if (attribute-string (normalize "lang") here)
+                   (lang-fix (attribute-string (normalize "lang") here))
+                   (loop (parent here)))))
+         (if (inherited-attribute-string (normalize "lang"))
+             (lang-fix (inherited-attribute-string (normalize "lang")))
+             (lang-fix %default-language%)))))
+
+(define (lang-fix language)
+  ;; Lowercase the language
+  ;; Translate 'xx-yy' to 'xx_yy'
+  (let ((fixed-lang (if (> (string-index language "-") 0)
+                       (let ((pos (string-index language "-")))
+                         (string-append
+                          (substring language 0 pos)
+                          "_"
+                          (substring language (+ pos 1)
+                                     (string-length language))))
+                       language)))
+    (case-fold-down fixed-lang)))
+
+(define (author-string #!optional (author (current-node)))
+  (let ((lang   (if (string? author) ($lang$) ($lang$ author))))
+    (case lang
+      ;; ISO 639/ISO 3166/RFC 1766
+      <![%l10n-af[   (("af")    (af-author-string author)) ]]>
+      <![%l10n-bg[   (("bg")    (bg-author-string author)) ]]>
+      <![%l10n-bs[   (("bs")    (bs-author-string author)) ]]>
+      <![%l10n-ca[   (("ca")    (ca-author-string author)) ]]>
+      <![%l10n-cs[   (("cs")    (cs-author-string author)) ]]>
+      <![%l10n-da[   (("da")    (da-author-string author)) ]]>
+      <![%l10n-de[   (("de")    (de-author-string author)) ]]>
+      <![%l10n-el[   (("el")    (el-author-string author)) ]]>
+      <![%l10n-en[   (("en")    (en-author-string author)) ]]>
+      <![%l10n-es[   (("es")    (es-author-string author)) ]]>
+      <![%l10n-et[   (("et")    (et-author-string author)) ]]>
+      <![%l10n-eu[   (("eu")    (eu-author-string author)) ]]>
+      <![%l10n-fi[   (("fi")    (fi-author-string author)) ]]>
+      <![%l10n-fr[   (("fr")    (fr-author-string author)) ]]>
+      <![%l10n-hu[   (("hu")    (hu-author-string author)) ]]>
+      <![%l10n-id[   (("id")    (id-author-string author)) ]]>
+      <![%l10n-it[   (("it")    (it-author-string author)) ]]>
+      <![%l10n-ja[   (("ja")    (ja-author-string author)) ]]>
+      <![%l10n-ko[   (("ko")    (ko-author-string author)) ]]>
+      <![%l10n-nl[   (("nl")    (nl-author-string author)) ]]>
+      <![%l10n-nn[   (("nn")    (nn-author-string author)) ]]>
+      <![%l10n-no[   (("no")    (no-author-string author)) ]]>
+      <![%l10n-pl[   (("pl")    (pl-author-string author)) ]]>
+      <![%l10n-pt[   (("pt")    (pt-author-string author)) ]]>
+      <![%l10n-ptbr[   (("pt_br")    (ptbr-author-string author)) ]]>
+      <![%l10n-ro[   (("ro")    (ro-author-string author)) ]]>
+      <![%l10n-ru[   (("ru")    (ru-author-string author)) ]]>
+      <![%l10n-sk[   (("sk")    (sk-author-string author)) ]]>
+      <![%l10n-sl[   (("sl")    (sl-author-string author)) ]]>
+      <![%l10n-sr[   (("sr")    (sr-author-string author)) ]]>
+      <![%l10n-sv[   (("sv")    (sv-author-string author)) ]]>
+      <![%l10n-tr[   (("tr")    (tr-author-string author)) ]]>
+      <![%l10n-uk[   (("uk")    (uk-author-string author)) ]]>
+      <![%l10n-xh[   (("xh")    (xh-author-string author)) ]]>
+      <![%l10n-zhcn[   (("zh_cn")    (zhcn-author-string author)) ]]>
+      <![%l10n-zhtw[   (("zh_tw")    (zhtw-author-string author)) ]]>
+      <![%l10n-no[   (("bmno")    (no-author-string author)) ]]>
+      <![%l10n-de[   (("dege")    (de-author-string author)) ]]>
+      <![%l10n-da[   (("dk")    (da-author-string author)) ]]>
+      <![%l10n-sv[   (("svse")    (sv-author-string author)) ]]>
+      <![%l10n-en[   (("usen")    (en-author-string author)) ]]>
+      (else (error (string-append "L10N ERROR: author-string: "
+                                 lang))))))
+
+(define (gentext-xref-strings target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-af[ (("af") (gentext-af-xref-strings giname)) ]]>
+      <![%l10n-bg[ (("bg") (gentext-bg-xref-strings giname)) ]]>
+      <![%l10n-bs[ (("bs") (gentext-bs-xref-strings giname)) ]]>
+      <![%l10n-ca[ (("ca") (gentext-ca-xref-strings giname)) ]]>
+      <![%l10n-cs[ (("cs") (gentext-cs-xref-strings giname)) ]]>
+      <![%l10n-da[ (("da") (gentext-da-xref-strings giname)) ]]>
+      <![%l10n-de[ (("de") (gentext-de-xref-strings giname)) ]]>
+      <![%l10n-el[ (("el") (gentext-el-xref-strings giname)) ]]>
+      <![%l10n-en[ (("en") (gentext-en-xref-strings giname)) ]]>
+      <![%l10n-es[ (("es") (gentext-es-xref-strings giname)) ]]>
+      <![%l10n-et[ (("et") (gentext-et-xref-strings giname)) ]]>
+      <![%l10n-eu[ (("eu") (gentext-eu-xref-strings giname)) ]]>
+      <![%l10n-fi[ (("fi") (gentext-fi-xref-strings giname)) ]]>
+      <![%l10n-fr[ (("fr") (gentext-fr-xref-strings giname)) ]]>
+      <![%l10n-hu[ (("hu") (gentext-hu-xref-strings giname)) ]]>
+      <![%l10n-id[ (("id") (gentext-id-xref-strings giname)) ]]>
+      <![%l10n-it[ (("it") (gentext-it-xref-strings giname)) ]]>
+      <![%l10n-ja[ (("ja") (gentext-ja-xref-strings giname)) ]]>
+      <![%l10n-ko[ (("ko") (gentext-ko-xref-strings giname)) ]]>
+      <![%l10n-nl[ (("nl") (gentext-nl-xref-strings giname)) ]]>
+      <![%l10n-nn[ (("nn") (gentext-nn-xref-strings giname)) ]]>
+      <![%l10n-no[ (("no") (gentext-no-xref-strings giname)) ]]>
+      <![%l10n-pl[ (("pl") (gentext-pl-xref-strings giname)) ]]>
+      <![%l10n-pt[ (("pt") (gentext-pt-xref-strings giname)) ]]>
+      <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-xref-strings giname)) ]]>
+      <![%l10n-ro[ (("ro") (gentext-ro-xref-strings giname)) ]]>
+      <![%l10n-ru[ (("ru") (gentext-ru-xref-strings giname)) ]]>
+      <![%l10n-sk[ (("sk") (gentext-sk-xref-strings giname)) ]]>
+      <![%l10n-sl[ (("sl") (gentext-sl-xref-strings giname)) ]]>
+      <![%l10n-sr[ (("sr") (gentext-sr-xref-strings giname)) ]]>
+      <![%l10n-sv[ (("sv") (gentext-sv-xref-strings giname)) ]]>
+      <![%l10n-tr[ (("tr") (gentext-tr-xref-strings giname)) ]]>
+      <![%l10n-uk[ (("uk") (gentext-uk-xref-strings giname)) ]]>
+      <![%l10n-xh[ (("xh") (gentext-xh-xref-strings giname)) ]]>
+      <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-xref-strings giname)) ]]>
+      <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-xref-strings giname)) ]]>
+      <![%l10n-no[ (("bmno") (gentext-no-xref-strings giname)) ]]>
+      <![%l10n-de[ (("dege") (gentext-de-xref-strings giname)) ]]>
+      <![%l10n-da[ (("dk") (gentext-da-xref-strings giname)) ]]>
+      <![%l10n-sv[ (("svse") (gentext-sv-xref-strings giname)) ]]>
+      <![%l10n-en[ (("usen") (gentext-en-xref-strings giname)) ]]>
+      (else (error (string-append "L10N ERROR: gentext-xref-strings: " 
+                                 lang))))))
+
+(define (auto-xref-indirect-connector before) 
+  (case ($lang$)
+    <![%l10n-af[ (("af") (af-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-bg[ (("bg") (bg-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-bs[ (("bs") (bs-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-ca[ (("ca") (ca-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-cs[ (("cs") (cs-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-da[ (("da") (da-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-de[ (("de") (de-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-el[ (("el") (el-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-en[ (("en") (en-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-es[ (("es") (es-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-et[ (("et") (et-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-eu[ (("eu") (eu-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-fi[ (("fi") (fi-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-fr[ (("fr") (fr-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-hu[ (("hu") (hu-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-id[ (("id") (id-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-it[ (("it") (it-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-ja[ (("ja") (ja-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-ko[ (("ko") (ko-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-nl[ (("nl") (nl-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-nn[ (("nn") (nn-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-no[ (("no") (no-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-pl[ (("pl") (pl-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-pt[ (("pt") (pt-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-ptbr[ (("pt_br") (ptbr-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-ro[ (("ro") (ro-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-ru[ (("ru") (ru-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-sk[ (("sk") (sk-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-sl[ (("sl") (sl-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-sr[ (("sr") (sr-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-sv[ (("sv") (sv-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-tr[ (("tr") (tr-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-uk[ (("uk") (uk-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-xh[ (("xh") (xh-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-zhcn[ (("zh_cn") (zhcn-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-zhtw[ (("zh_tw") (zhtw-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-no[ (("bmno") (no-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-de[ (("dege") (de-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-da[ (("dk") (da-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-sv[ (("svse") (sv-auto-xref-indirect-connector before)) ]]>
+    <![%l10n-en[ (("usen") (en-auto-xref-indirect-connector before)) ]]>
+    (else (error "L10N ERROR: auto-xref-indirect-connector"))))
+
+(define (generate-toc-in-front)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %generate-af-toc-in-front%) ]]>
+    <![%l10n-bg[ (("bg") %generate-bg-toc-in-front%) ]]>
+    <![%l10n-bs[ (("bs") %generate-bs-toc-in-front%) ]]>
+    <![%l10n-ca[ (("ca") %generate-ca-toc-in-front%) ]]>
+    <![%l10n-cs[ (("cs") %generate-cs-toc-in-front%) ]]>
+    <![%l10n-da[ (("da") %generate-da-toc-in-front%) ]]>
+    <![%l10n-de[ (("de") %generate-de-toc-in-front%) ]]>
+    <![%l10n-el[ (("el") %generate-el-toc-in-front%) ]]>
+    <![%l10n-en[ (("en") %generate-en-toc-in-front%) ]]>
+    <![%l10n-es[ (("es") %generate-es-toc-in-front%) ]]>
+    <![%l10n-et[ (("et") %generate-et-toc-in-front%) ]]>
+    <![%l10n-eu[ (("eu") %generate-eu-toc-in-front%) ]]>
+    <![%l10n-fi[ (("fi") %generate-fi-toc-in-front%) ]]>
+    <![%l10n-fr[ (("fr") %generate-fr-toc-in-front%) ]]>
+    <![%l10n-hu[ (("hu") %generate-hu-toc-in-front%) ]]>
+    <![%l10n-id[ (("id") %generate-id-toc-in-front%) ]]>
+    <![%l10n-it[ (("it") %generate-it-toc-in-front%) ]]>
+    <![%l10n-ja[ (("ja") %generate-ja-toc-in-front%) ]]>
+    <![%l10n-ko[ (("ko") %generate-ko-toc-in-front%) ]]>
+    <![%l10n-nl[ (("nl") %generate-nl-toc-in-front%) ]]>
+    <![%l10n-nn[ (("nn") %generate-nn-toc-in-front%) ]]>
+    <![%l10n-no[ (("no") %generate-no-toc-in-front%) ]]>
+    <![%l10n-pl[ (("pl") %generate-pl-toc-in-front%) ]]>
+    <![%l10n-pt[ (("pt") %generate-pt-toc-in-front%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %generate-ptbr-toc-in-front%) ]]>
+    <![%l10n-ro[ (("ro") %generate-ro-toc-in-front%) ]]>
+    <![%l10n-ru[ (("ru") %generate-ru-toc-in-front%) ]]>
+    <![%l10n-sk[ (("sk") %generate-sk-toc-in-front%) ]]>
+    <![%l10n-sl[ (("sl") %generate-sl-toc-in-front%) ]]>
+    <![%l10n-sr[ (("sr") %generate-sr-toc-in-front%) ]]>
+    <![%l10n-sv[ (("sv") %generate-sv-toc-in-front%) ]]>
+    <![%l10n-tr[ (("tr") %generate-tr-toc-in-front%) ]]>
+    <![%l10n-uk[ (("uk") %generate-uk-toc-in-front%) ]]>
+    <![%l10n-xh[ (("xh") %generate-xh-toc-in-front%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %generate-zhcn-toc-in-front%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %generate-zhtw-toc-in-front%) ]]>
+    <![%l10n-no[ (("bmno") %generate-no-toc-in-front%) ]]>
+    <![%l10n-de[ (("dege") %generate-de-toc-in-front%) ]]>
+    <![%l10n-da[ (("dk") %generate-da-toc-in-front%) ]]>
+    <![%l10n-sv[ (("svse") %generate-sv-toc-in-front%) ]]>
+    <![%l10n-en[ (("usen") %generate-en-toc-in-front%) ]]>
+    (else (error "L10N ERROR: generate-toc-in-front"))))
+
+(define (gentext-element-name target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target #t))))
+    (case lang
+      <![%l10n-af[ (("af") (gentext-af-element-name giname)) ]]>
+      <![%l10n-bg[ (("bg") (gentext-bg-element-name giname)) ]]>
+      <![%l10n-bs[ (("bs") (gentext-bs-element-name giname)) ]]>
+      <![%l10n-ca[ (("ca") (gentext-ca-element-name giname)) ]]>
+      <![%l10n-cs[ (("cs") (gentext-cs-element-name giname)) ]]>
+      <![%l10n-da[ (("da") (gentext-da-element-name giname)) ]]>
+      <![%l10n-de[ (("de") (gentext-de-element-name giname)) ]]>
+      <![%l10n-el[ (("el") (gentext-el-element-name giname)) ]]>
+      <![%l10n-en[ (("en") (gentext-en-element-name giname)) ]]>
+      <![%l10n-es[ (("es") (gentext-es-element-name giname)) ]]>
+      <![%l10n-et[ (("et") (gentext-et-element-name giname)) ]]>
+      <![%l10n-eu[ (("eu") (gentext-eu-element-name giname)) ]]>
+      <![%l10n-fi[ (("fi") (gentext-fi-element-name giname)) ]]>
+      <![%l10n-fr[ (("fr") (gentext-fr-element-name giname)) ]]>
+      <![%l10n-hu[ (("hu") (gentext-hu-element-name giname)) ]]>
+      <![%l10n-id[ (("id") (gentext-id-element-name giname)) ]]>
+      <![%l10n-it[ (("it") (gentext-it-element-name giname)) ]]>
+      <![%l10n-ja[ (("ja") (gentext-ja-element-name giname)) ]]>
+      <![%l10n-ko[ (("ko") (gentext-ko-element-name giname)) ]]>
+      <![%l10n-nl[ (("nl") (gentext-nl-element-name giname)) ]]>
+      <![%l10n-nn[ (("nn") (gentext-nn-element-name giname)) ]]>
+      <![%l10n-no[ (("no") (gentext-no-element-name giname)) ]]>
+      <![%l10n-pl[ (("pl") (gentext-pl-element-name giname)) ]]>
+      <![%l10n-pt[ (("pt") (gentext-pt-element-name giname)) ]]>
+      <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-element-name giname)) ]]>
+      <![%l10n-ro[ (("ro") (gentext-ro-element-name giname)) ]]>
+      <![%l10n-ru[ (("ru") (gentext-ru-element-name giname)) ]]>
+      <![%l10n-sk[ (("sk") (gentext-sk-element-name giname)) ]]>
+      <![%l10n-sl[ (("sl") (gentext-sl-element-name giname)) ]]>
+      <![%l10n-sr[ (("sr") (gentext-sr-element-name giname)) ]]>
+      <![%l10n-sv[ (("sv") (gentext-sv-element-name giname)) ]]>
+      <![%l10n-tr[ (("tr") (gentext-tr-element-name giname)) ]]>
+      <![%l10n-uk[ (("uk") (gentext-uk-element-name giname)) ]]>
+      <![%l10n-xh[ (("xh") (gentext-xh-element-name giname)) ]]>
+      <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-element-name giname)) ]]>
+      <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-element-name giname)) ]]>
+      <![%l10n-no[ (("bmno") (gentext-no-element-name giname)) ]]>
+      <![%l10n-de[ (("dege") (gentext-de-element-name giname)) ]]>
+      <![%l10n-da[ (("dk") (gentext-da-element-name giname)) ]]>
+      <![%l10n-sv[ (("svse") (gentext-sv-element-name giname)) ]]>
+      <![%l10n-en[ (("usen") (gentext-en-element-name giname)) ]]>
+      (else (error (string-append "L10N ERROR: gentext-element-name: "
+                                 lang
+                                 " ("
+                                 giname
+                                 ")"))))))
+
+(define (gentext-element-name-space target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-af[ (("af") (gentext-af-element-name-space giname)) ]]>
+      <![%l10n-bg[ (("bg") (gentext-bg-element-name-space giname)) ]]>
+      <![%l10n-bs[ (("bs") (gentext-bs-element-name-space giname)) ]]>
+      <![%l10n-ca[ (("ca") (gentext-ca-element-name-space giname)) ]]>
+      <![%l10n-cs[ (("cs") (gentext-cs-element-name-space giname)) ]]>
+      <![%l10n-da[ (("da") (gentext-da-element-name-space giname)) ]]>
+      <![%l10n-de[ (("de") (gentext-de-element-name-space giname)) ]]>
+      <![%l10n-el[ (("el") (gentext-el-element-name-space giname)) ]]>
+      <![%l10n-en[ (("en") (gentext-en-element-name-space giname)) ]]>
+      <![%l10n-es[ (("es") (gentext-es-element-name-space giname)) ]]>
+      <![%l10n-et[ (("et") (gentext-et-element-name-space giname)) ]]>
+      <![%l10n-eu[ (("eu") (gentext-eu-element-name-space giname)) ]]>
+      <![%l10n-fi[ (("fi") (gentext-fi-element-name-space giname)) ]]>
+      <![%l10n-fr[ (("fr") (gentext-fr-element-name-space giname)) ]]>
+      <![%l10n-hu[ (("hu") (gentext-hu-element-name-space giname)) ]]>
+      <![%l10n-id[ (("id") (gentext-id-element-name-space giname)) ]]>
+      <![%l10n-it[ (("it") (gentext-it-element-name-space giname)) ]]>
+      <![%l10n-ja[ (("ja") (gentext-ja-element-name-space giname)) ]]>
+      <![%l10n-ko[ (("ko") (gentext-ko-element-name-space giname)) ]]>
+      <![%l10n-nl[ (("nl") (gentext-nl-element-name-space giname)) ]]>
+      <![%l10n-nn[ (("nn") (gentext-nn-element-name-space giname)) ]]>
+      <![%l10n-no[ (("no") (gentext-no-element-name-space giname)) ]]>
+      <![%l10n-pl[ (("pl") (gentext-pl-element-name-space giname)) ]]>
+      <![%l10n-pt[ (("pt") (gentext-pt-element-name-space giname)) ]]>
+      <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-element-name-space giname)) ]]>
+      <![%l10n-ro[ (("ro") (gentext-ro-element-name-space giname)) ]]>
+      <![%l10n-ru[ (("ru") (gentext-ru-element-name-space giname)) ]]>
+      <![%l10n-sk[ (("sk") (gentext-sk-element-name-space giname)) ]]>
+      <![%l10n-sl[ (("sl") (gentext-sl-element-name-space giname)) ]]>
+      <![%l10n-sr[ (("sr") (gentext-sr-element-name-space giname)) ]]>
+      <![%l10n-sv[ (("sv") (gentext-sv-element-name-space giname)) ]]>
+      <![%l10n-tr[ (("tr") (gentext-tr-element-name-space giname)) ]]>
+      <![%l10n-uk[ (("uk") (gentext-uk-element-name-space giname)) ]]>
+      <![%l10n-xh[ (("xh") (gentext-xh-element-name-space giname)) ]]>
+      <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-element-name-space giname)) ]]>
+      <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-element-name-space giname)) ]]>
+      <![%l10n-no[ (("bmno") (gentext-no-element-name-space giname)) ]]>
+      <![%l10n-de[ (("dege") (gentext-de-element-name-space giname)) ]]>
+      <![%l10n-da[ (("dk") (gentext-da-element-name-space giname)) ]]>
+      <![%l10n-sv[ (("svse") (gentext-sv-element-name-space giname)) ]]>
+      <![%l10n-en[ (("usen") (gentext-en-element-name-space giname)) ]]>
+      (else (error "L10N ERROR: gentext-element-name-space")))))
+
+(define (gentext-intra-label-sep target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-af[ (("af") (gentext-af-intra-label-sep giname)) ]]>
+      <![%l10n-bg[ (("bg") (gentext-bg-intra-label-sep giname)) ]]>
+      <![%l10n-bs[ (("bs") (gentext-bs-intra-label-sep giname)) ]]>
+      <![%l10n-ca[ (("ca") (gentext-ca-intra-label-sep giname)) ]]>
+      <![%l10n-cs[ (("cs") (gentext-cs-intra-label-sep giname)) ]]>
+      <![%l10n-da[ (("da") (gentext-da-intra-label-sep giname)) ]]>
+      <![%l10n-de[ (("de") (gentext-de-intra-label-sep giname)) ]]>
+      <![%l10n-el[ (("el") (gentext-el-intra-label-sep giname)) ]]>
+      <![%l10n-en[ (("en") (gentext-en-intra-label-sep giname)) ]]>
+      <![%l10n-es[ (("es") (gentext-es-intra-label-sep giname)) ]]>
+      <![%l10n-et[ (("et") (gentext-et-intra-label-sep giname)) ]]>
+      <![%l10n-eu[ (("eu") (gentext-eu-intra-label-sep giname)) ]]>
+      <![%l10n-fi[ (("fi") (gentext-fi-intra-label-sep giname)) ]]>
+      <![%l10n-fr[ (("fr") (gentext-fr-intra-label-sep giname)) ]]>
+      <![%l10n-hu[ (("hu") (gentext-hu-intra-label-sep giname)) ]]>
+      <![%l10n-id[ (("id") (gentext-id-intra-label-sep giname)) ]]>
+      <![%l10n-it[ (("it") (gentext-it-intra-label-sep giname)) ]]>
+      <![%l10n-ja[ (("ja") (gentext-ja-intra-label-sep giname)) ]]>
+      <![%l10n-ko[ (("ko") (gentext-ko-intra-label-sep giname)) ]]>
+      <![%l10n-nl[ (("nl") (gentext-nl-intra-label-sep giname)) ]]>
+      <![%l10n-nn[ (("nn") (gentext-nn-intra-label-sep giname)) ]]>
+      <![%l10n-no[ (("no") (gentext-no-intra-label-sep giname)) ]]>
+      <![%l10n-pl[ (("pl") (gentext-pl-intra-label-sep giname)) ]]>
+      <![%l10n-pt[ (("pt") (gentext-pt-intra-label-sep giname)) ]]>
+      <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-intra-label-sep giname)) ]]>
+      <![%l10n-ro[ (("ro") (gentext-ro-intra-label-sep giname)) ]]>
+      <![%l10n-ru[ (("ru") (gentext-ru-intra-label-sep giname)) ]]>
+      <![%l10n-sk[ (("sk") (gentext-sk-intra-label-sep giname)) ]]>
+      <![%l10n-sl[ (("sl") (gentext-sl-intra-label-sep giname)) ]]>
+      <![%l10n-sr[ (("sr") (gentext-sr-intra-label-sep giname)) ]]>
+      <![%l10n-sv[ (("sv") (gentext-sv-intra-label-sep giname)) ]]>
+      <![%l10n-tr[ (("tr") (gentext-tr-intra-label-sep giname)) ]]>
+      <![%l10n-uk[ (("uk") (gentext-uk-intra-label-sep giname)) ]]>
+      <![%l10n-xh[ (("xh") (gentext-xh-intra-label-sep giname)) ]]>
+      <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-intra-label-sep giname)) ]]>
+      <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-intra-label-sep giname)) ]]>
+      <![%l10n-no[ (("bmno") (gentext-no-intra-label-sep giname)) ]]>
+      <![%l10n-de[ (("dege") (gentext-de-intra-label-sep giname)) ]]>
+      <![%l10n-da[ (("dk") (gentext-da-intra-label-sep giname)) ]]>
+      <![%l10n-sv[ (("svse") (gentext-sv-intra-label-sep giname)) ]]>
+      <![%l10n-en[ (("usen") (gentext-en-intra-label-sep giname)) ]]>
+      (else (error "L10N ERROR: gentext-intra-label-sep")))))
+
+(define (gentext-label-title-sep target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-af[ (("af") (gentext-af-label-title-sep giname)) ]]>
+      <![%l10n-bg[ (("bg") (gentext-bg-label-title-sep giname)) ]]>
+      <![%l10n-bs[ (("bs") (gentext-bs-label-title-sep giname)) ]]>
+      <![%l10n-ca[ (("ca") (gentext-ca-label-title-sep giname)) ]]>
+      <![%l10n-cs[ (("cs") (gentext-cs-label-title-sep giname)) ]]>
+      <![%l10n-da[ (("da") (gentext-da-label-title-sep giname)) ]]>
+      <![%l10n-de[ (("de") (gentext-de-label-title-sep giname)) ]]>
+      <![%l10n-el[ (("el") (gentext-el-label-title-sep giname)) ]]>
+      <![%l10n-en[ (("en") (gentext-en-label-title-sep giname)) ]]>
+      <![%l10n-es[ (("es") (gentext-es-label-title-sep giname)) ]]>
+      <![%l10n-et[ (("et") (gentext-et-label-title-sep giname)) ]]>
+      <![%l10n-eu[ (("eu") (gentext-eu-label-title-sep giname)) ]]>
+      <![%l10n-fi[ (("fi") (gentext-fi-label-title-sep giname)) ]]>
+      <![%l10n-fr[ (("fr") (gentext-fr-label-title-sep giname)) ]]>
+      <![%l10n-hu[ (("hu") (gentext-hu-label-title-sep giname)) ]]>
+      <![%l10n-id[ (("id") (gentext-id-label-title-sep giname)) ]]>
+      <![%l10n-it[ (("it") (gentext-it-label-title-sep giname)) ]]>
+      <![%l10n-ja[ (("ja") (gentext-ja-label-title-sep giname)) ]]>
+      <![%l10n-ko[ (("ko") (gentext-ko-label-title-sep giname)) ]]>
+      <![%l10n-nl[ (("nl") (gentext-nl-label-title-sep giname)) ]]>
+      <![%l10n-nn[ (("nn") (gentext-nn-label-title-sep giname)) ]]>
+      <![%l10n-no[ (("no") (gentext-no-label-title-sep giname)) ]]>
+      <![%l10n-pl[ (("pl") (gentext-pl-label-title-sep giname)) ]]>
+      <![%l10n-pt[ (("pt") (gentext-pt-label-title-sep giname)) ]]>
+      <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-label-title-sep giname)) ]]>
+      <![%l10n-ro[ (("ro") (gentext-ro-label-title-sep giname)) ]]>
+      <![%l10n-ru[ (("ru") (gentext-ru-label-title-sep giname)) ]]>
+      <![%l10n-sk[ (("sk") (gentext-sk-label-title-sep giname)) ]]>
+      <![%l10n-sl[ (("sl") (gentext-sl-label-title-sep giname)) ]]>
+      <![%l10n-sr[ (("sr") (gentext-sr-label-title-sep giname)) ]]>
+      <![%l10n-sv[ (("sv") (gentext-sv-label-title-sep giname)) ]]>
+      <![%l10n-tr[ (("tr") (gentext-tr-label-title-sep giname)) ]]>
+      <![%l10n-uk[ (("uk") (gentext-uk-label-title-sep giname)) ]]>
+      <![%l10n-xh[ (("xh") (gentext-xh-label-title-sep giname)) ]]>
+      <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-label-title-sep giname)) ]]>
+      <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-label-title-sep giname)) ]]>
+      <![%l10n-no[ (("bmno") (gentext-no-label-title-sep giname)) ]]>
+      <![%l10n-de[ (("dege") (gentext-de-label-title-sep giname)) ]]>
+      <![%l10n-da[ (("dk") (gentext-da-label-title-sep giname)) ]]>
+      <![%l10n-sv[ (("svse") (gentext-sv-label-title-sep giname)) ]]>
+      <![%l10n-en[ (("usen") (gentext-en-label-title-sep giname)) ]]>
+      (else (error "L10N ERROR: gentext-label-title-sep")))))
+
+(define (label-number-format target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-af[ (("af") (af-label-number-format target)) ]]>
+      <![%l10n-bg[ (("bg") (bg-label-number-format target)) ]]>
+      <![%l10n-bs[ (("bs") (bs-label-number-format target)) ]]>
+      <![%l10n-ca[ (("ca") (ca-label-number-format target)) ]]>
+      <![%l10n-cs[ (("cs") (cs-label-number-format target)) ]]>
+      <![%l10n-da[ (("da") (da-label-number-format target)) ]]>
+      <![%l10n-de[ (("de") (de-label-number-format target)) ]]>
+      <![%l10n-el[ (("el") (el-label-number-format target)) ]]>
+      <![%l10n-en[ (("en") (en-label-number-format target)) ]]>
+      <![%l10n-es[ (("es") (es-label-number-format target)) ]]>
+      <![%l10n-et[ (("et") (et-label-number-format target)) ]]>
+      <![%l10n-eu[ (("eu") (eu-label-number-format target)) ]]>
+      <![%l10n-fi[ (("fi") (fi-label-number-format target)) ]]>
+      <![%l10n-fr[ (("fr") (fr-label-number-format target)) ]]>
+      <![%l10n-hu[ (("hu") (hu-label-number-format target)) ]]>
+      <![%l10n-id[ (("id") (id-label-number-format target)) ]]>
+      <![%l10n-it[ (("it") (it-label-number-format target)) ]]>
+      <![%l10n-ja[ (("ja") (ja-label-number-format target)) ]]>
+      <![%l10n-ko[ (("ko") (ko-label-number-format target)) ]]>
+      <![%l10n-nl[ (("nl") (nl-label-number-format target)) ]]>
+      <![%l10n-nn[ (("nn") (nn-label-number-format target)) ]]>
+      <![%l10n-no[ (("no") (no-label-number-format target)) ]]>
+      <![%l10n-pl[ (("pl") (pl-label-number-format target)) ]]>
+      <![%l10n-pt[ (("pt") (pt-label-number-format target)) ]]>
+      <![%l10n-ptbr[ (("pt_br") (ptbr-label-number-format target)) ]]>
+      <![%l10n-ro[ (("ro") (ro-label-number-format target)) ]]>
+      <![%l10n-ru[ (("ru") (ru-label-number-format target)) ]]>
+      <![%l10n-sk[ (("sk") (sk-label-number-format target)) ]]>
+      <![%l10n-sl[ (("sl") (sl-label-number-format target)) ]]>
+      <![%l10n-sr[ (("sr") (sr-label-number-format target)) ]]>
+      <![%l10n-sv[ (("sv") (sv-label-number-format target)) ]]>
+      <![%l10n-tr[ (("tr") (tr-label-number-format target)) ]]>
+      <![%l10n-uk[ (("uk") (uk-label-number-format target)) ]]>
+      <![%l10n-xh[ (("xh") (xh-label-number-format target)) ]]>
+      <![%l10n-zhcn[ (("zh_cn") (zhcn-label-number-format target)) ]]>
+      <![%l10n-zhtw[ (("zh_tw") (zhtw-label-number-format target)) ]]>
+      <![%l10n-no[ (("bmno") (no-label-number-format target)) ]]>
+      <![%l10n-de[ (("dege") (de-label-number-format target)) ]]>
+      <![%l10n-da[ (("dk") (da-label-number-format target)) ]]>
+      <![%l10n-sv[ (("svse") (sv-label-number-format target)) ]]>
+      <![%l10n-en[ (("usen") (en-label-number-format target)) ]]>
+      (else (error "L10N ERROR: label-number-format")))))
+
+(define ($lot-title$ lotgi)
+  (case ($lang$)
+    <![%l10n-af[ (("af") ($lot-title-af$ lotgi)) ]]>
+    <![%l10n-bg[ (("bg") ($lot-title-bg$ lotgi)) ]]>
+    <![%l10n-bs[ (("bs") ($lot-title-bs$ lotgi)) ]]>
+    <![%l10n-ca[ (("ca") ($lot-title-ca$ lotgi)) ]]>
+    <![%l10n-cs[ (("cs") ($lot-title-cs$ lotgi)) ]]>
+    <![%l10n-da[ (("da") ($lot-title-da$ lotgi)) ]]>
+    <![%l10n-de[ (("de") ($lot-title-de$ lotgi)) ]]>
+    <![%l10n-el[ (("el") ($lot-title-el$ lotgi)) ]]>
+    <![%l10n-en[ (("en") ($lot-title-en$ lotgi)) ]]>
+    <![%l10n-es[ (("es") ($lot-title-es$ lotgi)) ]]>
+    <![%l10n-et[ (("et") ($lot-title-et$ lotgi)) ]]>
+    <![%l10n-eu[ (("eu") ($lot-title-eu$ lotgi)) ]]>
+    <![%l10n-fi[ (("fi") ($lot-title-fi$ lotgi)) ]]>
+    <![%l10n-fr[ (("fr") ($lot-title-fr$ lotgi)) ]]>
+    <![%l10n-hu[ (("hu") ($lot-title-hu$ lotgi)) ]]>
+    <![%l10n-id[ (("id") ($lot-title-id$ lotgi)) ]]>
+    <![%l10n-it[ (("it") ($lot-title-it$ lotgi)) ]]>
+    <![%l10n-ja[ (("ja") ($lot-title-ja$ lotgi)) ]]>
+    <![%l10n-ko[ (("ko") ($lot-title-ko$ lotgi)) ]]>
+    <![%l10n-nl[ (("nl") ($lot-title-nl$ lotgi)) ]]>
+    <![%l10n-nn[ (("nn") ($lot-title-nn$ lotgi)) ]]>
+    <![%l10n-no[ (("no") ($lot-title-no$ lotgi)) ]]>
+    <![%l10n-pl[ (("pl") ($lot-title-pl$ lotgi)) ]]>
+    <![%l10n-pt[ (("pt") ($lot-title-pt$ lotgi)) ]]>
+    <![%l10n-ptbr[ (("pt_br") ($lot-title-ptbr$ lotgi)) ]]>
+    <![%l10n-ro[ (("ro") ($lot-title-ro$ lotgi)) ]]>
+    <![%l10n-ru[ (("ru") ($lot-title-ru$ lotgi)) ]]>
+    <![%l10n-sk[ (("sk") ($lot-title-sk$ lotgi)) ]]>
+    <![%l10n-sl[ (("sl") ($lot-title-sl$ lotgi)) ]]>
+    <![%l10n-sr[ (("sr") ($lot-title-sr$ lotgi)) ]]>
+    <![%l10n-sv[ (("sv") ($lot-title-sv$ lotgi)) ]]>
+    <![%l10n-tr[ (("tr") ($lot-title-tr$ lotgi)) ]]>
+    <![%l10n-uk[ (("uk") ($lot-title-uk$ lotgi)) ]]>
+    <![%l10n-xh[ (("xh") ($lot-title-xh$ lotgi)) ]]>
+    <![%l10n-zhcn[ (("zh_cn") ($lot-title-zhcn$ lotgi)) ]]>
+    <![%l10n-zhtw[ (("zh_tw") ($lot-title-zhtw$ lotgi)) ]]>
+    <![%l10n-no[ (("bmno") ($lot-title-no$ lotgi)) ]]>
+    <![%l10n-de[ (("dege") ($lot-title-de$ lotgi)) ]]>
+    <![%l10n-da[ (("dk") ($lot-title-da$ lotgi)) ]]>
+    <![%l10n-sv[ (("svse") ($lot-title-sv$ lotgi)) ]]>
+    <![%l10n-en[ (("usen") ($lot-title-en$ lotgi)) ]]>
+    (else (error "L10N ERROR: $lot-title$"))))
+
+(define (gentext-start-quote)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-start-quote%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-start-quote%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-start-quote%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-start-quote%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-start-quote%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-start-quote%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-start-quote%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-start-quote%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-start-quote%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-start-quote%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-start-quote%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-start-quote%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-start-quote%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-start-quote%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-start-quote%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-start-quote%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-start-quote%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-start-quote%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-start-quote%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-start-quote%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-start-quote%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-start-quote%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-start-quote%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-start-quote%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-start-quote%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-start-quote%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-start-quote%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-start-quote%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-start-quote%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-start-quote%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-start-quote%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-start-quote%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-start-quote%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-start-quote%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-start-quote%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-start-quote%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-start-quote%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-start-quote%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-start-quote%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-start-quote%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-start-quote%) ]]>
+    (else (error "L10N ERROR: gentext-start-quote"))))
+
+(define (gentext-end-quote)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-end-quote%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-end-quote%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-end-quote%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-end-quote%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-end-quote%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-end-quote%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-end-quote%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-end-quote%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-end-quote%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-end-quote%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-end-quote%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-end-quote%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-end-quote%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-end-quote%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-end-quote%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-end-quote%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-end-quote%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-end-quote%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-end-quote%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-end-quote%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-end-quote%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-end-quote%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-end-quote%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-end-quote%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-end-quote%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-end-quote%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-end-quote%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-end-quote%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-end-quote%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-end-quote%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-end-quote%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-end-quote%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-end-quote%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-end-quote%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-end-quote%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-end-quote%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-end-quote%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-end-quote%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-end-quote%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-end-quote%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-end-quote%) ]]>
+    (else (error "L10N ERROR: gentext-end-quote"))))
+
+(define (gentext-start-nested-quote)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-start-nested-quote%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-start-nested-quote%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-start-nested-quote%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-start-nested-quote%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-start-nested-quote%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-start-nested-quote%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-start-nested-quote%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-start-nested-quote%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-start-nested-quote%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-start-nested-quote%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-start-nested-quote%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-start-nested-quote%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-start-nested-quote%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-start-nested-quote%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-start-nested-quote%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-start-nested-quote%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-start-nested-quote%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-start-nested-quote%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-start-nested-quote%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-start-nested-quote%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-start-nested-quote%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-start-nested-quote%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-start-nested-quote%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-start-nested-quote%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-start-nested-quote%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-start-nested-quote%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-start-nested-quote%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-start-nested-quote%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-start-nested-quote%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-start-nested-quote%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-start-nested-quote%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-start-nested-quote%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-start-nested-quote%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-start-nested-quote%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-start-nested-quote%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-start-nested-quote%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-start-nested-quote%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-start-nested-quote%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-start-nested-quote%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-start-nested-quote%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-start-nested-quote%) ]]>
+    (else (error "L10N ERROR: gentext-start-nested-quote"))))
+
+(define (gentext-end-nested-quote)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-end-nested-quote%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-end-nested-quote%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-end-nested-quote%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-end-nested-quote%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-end-nested-quote%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-end-nested-quote%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-end-nested-quote%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-end-nested-quote%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-end-nested-quote%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-end-nested-quote%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-end-nested-quote%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-end-nested-quote%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-end-nested-quote%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-end-nested-quote%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-end-nested-quote%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-end-nested-quote%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-end-nested-quote%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-end-nested-quote%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-end-nested-quote%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-end-nested-quote%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-end-nested-quote%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-end-nested-quote%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-end-nested-quote%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-end-nested-quote%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-end-nested-quote%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-end-nested-quote%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-end-nested-quote%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-end-nested-quote%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-end-nested-quote%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-end-nested-quote%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-end-nested-quote%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-end-nested-quote%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-end-nested-quote%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-end-nested-quote%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-end-nested-quote%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-end-nested-quote%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-end-nested-quote%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-end-nested-quote%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-end-nested-quote%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-end-nested-quote%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-end-nested-quote%) ]]>
+    (else (error "L10N ERROR: gentext-end-nested-quote"))))
+
+(define (gentext-by)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-by%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-by%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-by%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-by%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-by%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-by%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-by%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-by%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-by%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-by%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-by%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-by%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-by%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-by%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-by%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-by%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-by%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-by%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-by%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-by%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-by%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-by%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-by%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-by%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-by%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-by%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-by%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-by%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-by%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-by%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-by%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-by%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-by%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-by%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-by%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-by%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-by%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-by%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-by%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-by%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-by%) ]]>
+    (else (error "L10N ERROR: gentext-by"))))
+
+(define (gentext-edited-by)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-edited-by%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-edited-by%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-edited-by%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-edited-by%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-edited-by%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-edited-by%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-edited-by%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-edited-by%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-edited-by%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-edited-by%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-edited-by%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-edited-by%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-edited-by%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-edited-by%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-edited-by%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-edited-by%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-edited-by%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-edited-by%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-edited-by%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-edited-by%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-edited-by%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-edited-by%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-edited-by%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-edited-by%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-edited-by%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-edited-by%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-edited-by%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-edited-by%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-edited-by%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-edited-by%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-edited-by%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-edited-by%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-edited-by%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-edited-by%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-edited-by%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-edited-by%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-edited-by%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-edited-by%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-edited-by%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-edited-by%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-edited-by%) ]]>
+    (else (error "L10N ERROR: gentext-edited-by"))))
+
+(define (gentext-revised-by)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-revised-by%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-revised-by%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-revised-by%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-revised-by%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-revised-by%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-revised-by%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-revised-by%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-revised-by%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-revised-by%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-revised-by%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-revised-by%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-revised-by%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-revised-by%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-revised-by%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-revised-by%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-revised-by%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-revised-by%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-revised-by%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-revised-by%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-revised-by%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-revised-by%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-revised-by%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-revised-by%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-revised-by%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-revised-by%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-revised-by%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-revised-by%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-revised-by%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-revised-by%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-revised-by%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-revised-by%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-revised-by%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-revised-by%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-revised-by%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-revised-by%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-revised-by%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-revised-by%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-revised-by%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-revised-by%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-revised-by%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-revised-by%) ]]>
+    (else (error "L10N ERROR: gentext-revised-by"))))
+
+(define (gentext-page)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-page%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-page%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-page%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-page%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-page%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-page%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-page%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-page%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-page%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-page%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-page%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-page%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-page%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-page%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-page%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-page%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-page%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-page%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-page%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-page%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-page%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-page%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-page%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-page%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-page%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-page%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-page%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-page%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-page%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-page%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-page%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-page%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-page%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-page%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-page%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-page%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-page%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-page%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-page%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-page%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-page%) ]]>
+    (else (error "L10N ERROR: gentext-page"))))
+
+(define (gentext-and)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-and%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-and%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-and%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-and%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-and%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-and%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-and%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-and%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-and%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-and%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-and%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-and%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-and%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-and%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-and%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-and%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-and%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-and%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-and%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-and%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-and%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-and%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-and%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-and%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-and%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-and%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-and%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-and%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-and%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-and%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-and%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-and%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-and%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-and%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-and%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-and%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-and%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-and%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-and%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-and%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-and%) ]]>
+    (else (error "L10N ERROR: gentext-and"))))
+
+(define (gentext-listcomma)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-listcomma%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-listcomma%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-listcomma%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-listcomma%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-listcomma%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-listcomma%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-listcomma%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-listcomma%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-listcomma%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-listcomma%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-listcomma%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-listcomma%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-listcomma%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-listcomma%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-listcomma%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-listcomma%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-listcomma%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-listcomma%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-listcomma%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-listcomma%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-listcomma%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-listcomma%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-listcomma%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-listcomma%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-listcomma%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-listcomma%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-listcomma%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-listcomma%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-listcomma%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-listcomma%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-listcomma%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-listcomma%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-listcomma%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-listcomma%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-listcomma%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-listcomma%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-listcomma%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-listcomma%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-listcomma%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-listcomma%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-listcomma%) ]]>
+    (else (error "L10N ERROR: gentext-listcomma"))))
+
+(define (gentext-lastlistcomma)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-lastlistcomma%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-lastlistcomma%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-lastlistcomma%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-lastlistcomma%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-lastlistcomma%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-lastlistcomma%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-lastlistcomma%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-lastlistcomma%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-lastlistcomma%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-lastlistcomma%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-lastlistcomma%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-lastlistcomma%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-lastlistcomma%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-lastlistcomma%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-lastlistcomma%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-lastlistcomma%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-lastlistcomma%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-lastlistcomma%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-lastlistcomma%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-lastlistcomma%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-lastlistcomma%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-lastlistcomma%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-lastlistcomma%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-lastlistcomma%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-lastlistcomma%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-lastlistcomma%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-lastlistcomma%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-lastlistcomma%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-lastlistcomma%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-lastlistcomma%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-lastlistcomma%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-lastlistcomma%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-lastlistcomma%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-lastlistcomma%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-lastlistcomma%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-lastlistcomma%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-lastlistcomma%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-lastlistcomma%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-lastlistcomma%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-lastlistcomma%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-lastlistcomma%) ]]>
+    (else (error "L10N ERROR: gentext-lastlistcomma"))))
+
+(define (gentext-bibl-pages)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-bibl-pages%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-bibl-pages%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-bibl-pages%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-bibl-pages%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-bibl-pages%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-bibl-pages%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-bibl-pages%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-bibl-pages%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-bibl-pages%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-bibl-pages%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-bibl-pages%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-bibl-pages%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-bibl-pages%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-bibl-pages%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-bibl-pages%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-bibl-pages%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-bibl-pages%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-bibl-pages%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-bibl-pages%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-bibl-pages%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-bibl-pages%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-bibl-pages%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-bibl-pages%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-bibl-pages%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-bibl-pages%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-bibl-pages%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-bibl-pages%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-bibl-pages%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-bibl-pages%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-bibl-pages%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-bibl-pages%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-bibl-pages%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-bibl-pages%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-bibl-pages%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-bibl-pages%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-bibl-pages%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-bibl-pages%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-bibl-pages%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-bibl-pages%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-bibl-pages%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-bibl-pages%) ]]>
+    (else (error "L10N ERROR: gentext-bibl-pages"))))
+
+(define (gentext-endnotes)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-endnotes%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-endnotes%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-endnotes%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-endnotes%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-endnotes%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-endnotes%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-endnotes%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-endnotes%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-endnotes%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-endnotes%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-endnotes%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-endnotes%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-endnotes%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-endnotes%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-endnotes%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-endnotes%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-endnotes%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-endnotes%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-endnotes%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-endnotes%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-endnotes%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-endnotes%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-endnotes%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-endnotes%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-endnotes%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-endnotes%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-endnotes%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-endnotes%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-endnotes%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-endnotes%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-endnotes%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-endnotes%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-endnotes%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-endnotes%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-endnotes%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-endnotes%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-endnotes%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-endnotes%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-endnotes%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-endnotes%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-endnotes%) ]]>
+    (else (error "L10N ERROR: gentext-endnotes"))))
+
+(define (gentext-table-endnotes)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-table-endnotes%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-table-endnotes%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-table-endnotes%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-table-endnotes%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-table-endnotes%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-table-endnotes%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-table-endnotes%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-table-endnotes%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-table-endnotes%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-table-endnotes%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-table-endnotes%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-table-endnotes%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-table-endnotes%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-table-endnotes%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-table-endnotes%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-table-endnotes%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-table-endnotes%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-table-endnotes%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-table-endnotes%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-table-endnotes%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-table-endnotes%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-table-endnotes%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-table-endnotes%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-table-endnotes%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-table-endnotes%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-table-endnotes%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-table-endnotes%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-table-endnotes%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-table-endnotes%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-table-endnotes%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-table-endnotes%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-table-endnotes%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-table-endnotes%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-table-endnotes%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-table-endnotes%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-table-endnotes%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-table-endnotes%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-table-endnotes%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-table-endnotes%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-table-endnotes%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-table-endnotes%) ]]>
+    (else (error "L10N ERROR: gentext-table-endnotes"))))
+
+(define (gentext-index-see)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-index-see%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-index-see%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-index-see%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-index-see%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-index-see%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-index-see%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-index-see%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-index-see%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-index-see%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-index-see%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-index-see%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-index-see%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-index-see%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-index-see%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-index-see%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-index-see%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-index-see%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-index-see%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-index-see%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-index-see%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-index-see%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-index-see%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-index-see%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-index-see%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-index-see%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-index-see%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-index-see%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-index-see%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-index-see%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-index-see%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-index-see%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-index-see%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-index-see%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-index-see%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-index-see%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-index-see%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-index-see%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-index-see%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-index-see%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-index-see%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-index-see%) ]]>
+    (else (error "L10N ERROR: gentext-index-see"))))
+
+(define (gentext-index-seealso)
+  (case ($lang$)
+    <![%l10n-af[ (("af") %gentext-af-index-seealso%) ]]>
+    <![%l10n-bg[ (("bg") %gentext-bg-index-seealso%) ]]>
+    <![%l10n-bs[ (("bs") %gentext-bs-index-seealso%) ]]>
+    <![%l10n-ca[ (("ca") %gentext-ca-index-seealso%) ]]>
+    <![%l10n-cs[ (("cs") %gentext-cs-index-seealso%) ]]>
+    <![%l10n-da[ (("da") %gentext-da-index-seealso%) ]]>
+    <![%l10n-de[ (("de") %gentext-de-index-seealso%) ]]>
+    <![%l10n-el[ (("el") %gentext-el-index-seealso%) ]]>
+    <![%l10n-en[ (("en") %gentext-en-index-seealso%) ]]>
+    <![%l10n-es[ (("es") %gentext-es-index-seealso%) ]]>
+    <![%l10n-et[ (("et") %gentext-et-index-seealso%) ]]>
+    <![%l10n-eu[ (("eu") %gentext-eu-index-seealso%) ]]>
+    <![%l10n-fi[ (("fi") %gentext-fi-index-seealso%) ]]>
+    <![%l10n-fr[ (("fr") %gentext-fr-index-seealso%) ]]>
+    <![%l10n-hu[ (("hu") %gentext-hu-index-seealso%) ]]>
+    <![%l10n-id[ (("id") %gentext-id-index-seealso%) ]]>
+    <![%l10n-it[ (("it") %gentext-it-index-seealso%) ]]>
+    <![%l10n-ja[ (("ja") %gentext-ja-index-seealso%) ]]>
+    <![%l10n-ko[ (("ko") %gentext-ko-index-seealso%) ]]>
+    <![%l10n-nl[ (("nl") %gentext-nl-index-seealso%) ]]>
+    <![%l10n-nn[ (("nn") %gentext-nn-index-seealso%) ]]>
+    <![%l10n-no[ (("no") %gentext-no-index-seealso%) ]]>
+    <![%l10n-pl[ (("pl") %gentext-pl-index-seealso%) ]]>
+    <![%l10n-pt[ (("pt") %gentext-pt-index-seealso%) ]]>
+    <![%l10n-ptbr[ (("pt_br") %gentext-ptbr-index-seealso%) ]]>
+    <![%l10n-ro[ (("ro") %gentext-ro-index-seealso%) ]]>
+    <![%l10n-ru[ (("ru") %gentext-ru-index-seealso%) ]]>
+    <![%l10n-sk[ (("sk") %gentext-sk-index-seealso%) ]]>
+    <![%l10n-sl[ (("sl") %gentext-sl-index-seealso%) ]]>
+    <![%l10n-sr[ (("sr") %gentext-sr-index-seealso%) ]]>
+    <![%l10n-sv[ (("sv") %gentext-sv-index-seealso%) ]]>
+    <![%l10n-tr[ (("tr") %gentext-tr-index-seealso%) ]]>
+    <![%l10n-uk[ (("uk") %gentext-uk-index-seealso%) ]]>
+    <![%l10n-xh[ (("xh") %gentext-xh-index-seealso%) ]]>
+    <![%l10n-zhcn[ (("zh_cn") %gentext-zhcn-index-seealso%) ]]>
+    <![%l10n-zhtw[ (("zh_tw") %gentext-zhtw-index-seealso%) ]]>
+    <![%l10n-no[ (("bmno") %gentext-no-index-seealso%) ]]>
+    <![%l10n-de[ (("dege") %gentext-de-index-seealso%) ]]>
+    <![%l10n-da[ (("dk") %gentext-da-index-seealso%) ]]>
+    <![%l10n-sv[ (("svse") %gentext-sv-index-seealso%) ]]>
+    <![%l10n-en[ (("usen") %gentext-en-index-seealso%) ]]>
+    (else (error "L10N ERROR: gentext-index-seealso"))))
+
+(define (gentext-nav-prev prev) 
+  (case ($lang$)
+    <![%l10n-af[ (("af") (gentext-af-nav-prev prev)) ]]>
+    <![%l10n-bg[ (("bg") (gentext-bg-nav-prev prev)) ]]>
+    <![%l10n-bs[ (("bs") (gentext-bs-nav-prev prev)) ]]>
+    <![%l10n-ca[ (("ca") (gentext-ca-nav-prev prev)) ]]>
+    <![%l10n-cs[ (("cs") (gentext-cs-nav-prev prev)) ]]>
+    <![%l10n-da[ (("da") (gentext-da-nav-prev prev)) ]]>
+    <![%l10n-de[ (("de") (gentext-de-nav-prev prev)) ]]>
+    <![%l10n-el[ (("el") (gentext-el-nav-prev prev)) ]]>
+    <![%l10n-en[ (("en") (gentext-en-nav-prev prev)) ]]>
+    <![%l10n-es[ (("es") (gentext-es-nav-prev prev)) ]]>
+    <![%l10n-et[ (("et") (gentext-et-nav-prev prev)) ]]>
+    <![%l10n-eu[ (("eu") (gentext-eu-nav-prev prev)) ]]>
+    <![%l10n-fi[ (("fi") (gentext-fi-nav-prev prev)) ]]>
+    <![%l10n-fr[ (("fr") (gentext-fr-nav-prev prev)) ]]>
+    <![%l10n-hu[ (("hu") (gentext-hu-nav-prev prev)) ]]>
+    <![%l10n-id[ (("id") (gentext-id-nav-prev prev)) ]]>
+    <![%l10n-it[ (("it") (gentext-it-nav-prev prev)) ]]>
+    <![%l10n-ja[ (("ja") (gentext-ja-nav-prev prev)) ]]>
+    <![%l10n-ko[ (("ko") (gentext-ko-nav-prev prev)) ]]>
+    <![%l10n-nl[ (("nl") (gentext-nl-nav-prev prev)) ]]>
+    <![%l10n-nn[ (("nn") (gentext-nn-nav-prev prev)) ]]>
+    <![%l10n-no[ (("no") (gentext-no-nav-prev prev)) ]]>
+    <![%l10n-pl[ (("pl") (gentext-pl-nav-prev prev)) ]]>
+    <![%l10n-pt[ (("pt") (gentext-pt-nav-prev prev)) ]]>
+    <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-nav-prev prev)) ]]>
+    <![%l10n-ro[ (("ro") (gentext-ro-nav-prev prev)) ]]>
+    <![%l10n-ru[ (("ru") (gentext-ru-nav-prev prev)) ]]>
+    <![%l10n-sk[ (("sk") (gentext-sk-nav-prev prev)) ]]>
+    <![%l10n-sl[ (("sl") (gentext-sl-nav-prev prev)) ]]>
+    <![%l10n-sr[ (("sr") (gentext-sr-nav-prev prev)) ]]>
+    <![%l10n-sv[ (("sv") (gentext-sv-nav-prev prev)) ]]>
+    <![%l10n-tr[ (("tr") (gentext-tr-nav-prev prev)) ]]>
+    <![%l10n-uk[ (("uk") (gentext-uk-nav-prev prev)) ]]>
+    <![%l10n-xh[ (("xh") (gentext-xh-nav-prev prev)) ]]>
+    <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-nav-prev prev)) ]]>
+    <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-nav-prev prev)) ]]>
+    <![%l10n-no[ (("bmno") (gentext-no-nav-prev prev)) ]]>
+    <![%l10n-de[ (("dege") (gentext-de-nav-prev prev)) ]]>
+    <![%l10n-da[ (("dk") (gentext-da-nav-prev prev)) ]]>
+    <![%l10n-sv[ (("svse") (gentext-sv-nav-prev prev)) ]]>
+    <![%l10n-en[ (("usen") (gentext-en-nav-prev prev)) ]]>
+    (else (error "L10N ERROR: gentext-nav-prev"))))
+
+(define (gentext-nav-prev-sibling prevsib) 
+  (case ($lang$)
+    <![%l10n-af[ (("af") (gentext-af-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-bg[ (("bg") (gentext-bg-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-bs[ (("bs") (gentext-bs-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-ca[ (("ca") (gentext-ca-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-cs[ (("cs") (gentext-cs-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-da[ (("da") (gentext-da-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-de[ (("de") (gentext-de-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-el[ (("el") (gentext-el-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-en[ (("en") (gentext-en-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-es[ (("es") (gentext-es-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-et[ (("et") (gentext-et-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-eu[ (("eu") (gentext-eu-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-fi[ (("fi") (gentext-fi-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-fr[ (("fr") (gentext-fr-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-hu[ (("hu") (gentext-hu-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-id[ (("id") (gentext-id-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-it[ (("it") (gentext-it-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-ja[ (("ja") (gentext-ja-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-ko[ (("ko") (gentext-ko-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-nl[ (("nl") (gentext-nl-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-nn[ (("nn") (gentext-nn-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-no[ (("no") (gentext-no-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-pl[ (("pl") (gentext-pl-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-pt[ (("pt") (gentext-pt-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-ro[ (("ro") (gentext-ro-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-ru[ (("ru") (gentext-ru-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-sk[ (("sk") (gentext-sk-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-sl[ (("sl") (gentext-sl-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-sr[ (("sr") (gentext-sr-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-sv[ (("sv") (gentext-sv-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-tr[ (("tr") (gentext-tr-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-uk[ (("uk") (gentext-uk-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-xh[ (("xh") (gentext-xh-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-no[ (("bmno") (gentext-no-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-de[ (("dege") (gentext-de-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-da[ (("dk") (gentext-da-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-sv[ (("svse") (gentext-sv-nav-prev-sibling prevsib)) ]]>
+    <![%l10n-en[ (("usen") (gentext-en-nav-prev-sibling prevsib)) ]]>
+    (else (error "L10N ERROR: gentext-nav-prev-sibling "))))
+
+(define (gentext-nav-next-sibling nextsib)
+  (case ($lang$)
+    <![%l10n-af[ (("af") (gentext-af-nav-next-sibling nextsib)) ]]>
+    <![%l10n-bg[ (("bg") (gentext-bg-nav-next-sibling nextsib)) ]]>
+    <![%l10n-bs[ (("bs") (gentext-bs-nav-next-sibling nextsib)) ]]>
+    <![%l10n-ca[ (("ca") (gentext-ca-nav-next-sibling nextsib)) ]]>
+    <![%l10n-cs[ (("cs") (gentext-cs-nav-next-sibling nextsib)) ]]>
+    <![%l10n-da[ (("da") (gentext-da-nav-next-sibling nextsib)) ]]>
+    <![%l10n-de[ (("de") (gentext-de-nav-next-sibling nextsib)) ]]>
+    <![%l10n-el[ (("el") (gentext-el-nav-next-sibling nextsib)) ]]>
+    <![%l10n-en[ (("en") (gentext-en-nav-next-sibling nextsib)) ]]>
+    <![%l10n-es[ (("es") (gentext-es-nav-next-sibling nextsib)) ]]>
+    <![%l10n-et[ (("et") (gentext-et-nav-next-sibling nextsib)) ]]>
+    <![%l10n-eu[ (("eu") (gentext-eu-nav-next-sibling nextsib)) ]]>
+    <![%l10n-fi[ (("fi") (gentext-fi-nav-next-sibling nextsib)) ]]>
+    <![%l10n-fr[ (("fr") (gentext-fr-nav-next-sibling nextsib)) ]]>
+    <![%l10n-hu[ (("hu") (gentext-hu-nav-next-sibling nextsib)) ]]>
+    <![%l10n-id[ (("id") (gentext-id-nav-next-sibling nextsib)) ]]>
+    <![%l10n-it[ (("it") (gentext-it-nav-next-sibling nextsib)) ]]>
+    <![%l10n-ja[ (("ja") (gentext-ja-nav-next-sibling nextsib)) ]]>
+    <![%l10n-ko[ (("ko") (gentext-ko-nav-next-sibling nextsib)) ]]>
+    <![%l10n-nl[ (("nl") (gentext-nl-nav-next-sibling nextsib)) ]]>
+    <![%l10n-nn[ (("nn") (gentext-nn-nav-next-sibling nextsib)) ]]>
+    <![%l10n-no[ (("no") (gentext-no-nav-next-sibling nextsib)) ]]>
+    <![%l10n-pl[ (("pl") (gentext-pl-nav-next-sibling nextsib)) ]]>
+    <![%l10n-pt[ (("pt") (gentext-pt-nav-next-sibling nextsib)) ]]>
+    <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-nav-next-sibling nextsib)) ]]>
+    <![%l10n-ro[ (("ro") (gentext-ro-nav-next-sibling nextsib)) ]]>
+    <![%l10n-ru[ (("ru") (gentext-ru-nav-next-sibling nextsib)) ]]>
+    <![%l10n-sk[ (("sk") (gentext-sk-nav-next-sibling nextsib)) ]]>
+    <![%l10n-sl[ (("sl") (gentext-sl-nav-next-sibling nextsib)) ]]>
+    <![%l10n-sr[ (("sr") (gentext-sr-nav-next-sibling nextsib)) ]]>
+    <![%l10n-sv[ (("sv") (gentext-sv-nav-next-sibling nextsib)) ]]>
+    <![%l10n-tr[ (("tr") (gentext-tr-nav-next-sibling nextsib)) ]]>
+    <![%l10n-uk[ (("uk") (gentext-uk-nav-next-sibling nextsib)) ]]>
+    <![%l10n-xh[ (("xh") (gentext-xh-nav-next-sibling nextsib)) ]]>
+    <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-nav-next-sibling nextsib)) ]]>
+    <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-nav-next-sibling nextsib)) ]]>
+    <![%l10n-no[ (("bmno") (gentext-no-nav-next-sibling nextsib)) ]]>
+    <![%l10n-de[ (("dege") (gentext-de-nav-next-sibling nextsib)) ]]>
+    <![%l10n-da[ (("dk") (gentext-da-nav-next-sibling nextsib)) ]]>
+    <![%l10n-sv[ (("svse") (gentext-sv-nav-next-sibling nextsib)) ]]>
+    <![%l10n-en[ (("usen") (gentext-en-nav-next-sibling nextsib)) ]]>
+    (else (error "L10N ERROR: gentext-nav-next-sibling"))))
+
+(define (gentext-nav-next next)
+  (case ($lang$)
+    <![%l10n-af[ (("af") (gentext-af-nav-next next)) ]]>
+    <![%l10n-bg[ (("bg") (gentext-bg-nav-next next)) ]]>
+    <![%l10n-bs[ (("bs") (gentext-bs-nav-next next)) ]]>
+    <![%l10n-ca[ (("ca") (gentext-ca-nav-next next)) ]]>
+    <![%l10n-cs[ (("cs") (gentext-cs-nav-next next)) ]]>
+    <![%l10n-da[ (("da") (gentext-da-nav-next next)) ]]>
+    <![%l10n-de[ (("de") (gentext-de-nav-next next)) ]]>
+    <![%l10n-el[ (("el") (gentext-el-nav-next next)) ]]>
+    <![%l10n-en[ (("en") (gentext-en-nav-next next)) ]]>
+    <![%l10n-es[ (("es") (gentext-es-nav-next next)) ]]>
+    <![%l10n-et[ (("et") (gentext-et-nav-next next)) ]]>
+    <![%l10n-eu[ (("eu") (gentext-eu-nav-next next)) ]]>
+    <![%l10n-fi[ (("fi") (gentext-fi-nav-next next)) ]]>
+    <![%l10n-fr[ (("fr") (gentext-fr-nav-next next)) ]]>
+    <![%l10n-hu[ (("hu") (gentext-hu-nav-next next)) ]]>
+    <![%l10n-id[ (("id") (gentext-id-nav-next next)) ]]>
+    <![%l10n-it[ (("it") (gentext-it-nav-next next)) ]]>
+    <![%l10n-ja[ (("ja") (gentext-ja-nav-next next)) ]]>
+    <![%l10n-ko[ (("ko") (gentext-ko-nav-next next)) ]]>
+    <![%l10n-nl[ (("nl") (gentext-nl-nav-next next)) ]]>
+    <![%l10n-nn[ (("nn") (gentext-nn-nav-next next)) ]]>
+    <![%l10n-no[ (("no") (gentext-no-nav-next next)) ]]>
+    <![%l10n-pl[ (("pl") (gentext-pl-nav-next next)) ]]>
+    <![%l10n-pt[ (("pt") (gentext-pt-nav-next next)) ]]>
+    <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-nav-next next)) ]]>
+    <![%l10n-ro[ (("ro") (gentext-ro-nav-next next)) ]]>
+    <![%l10n-ru[ (("ru") (gentext-ru-nav-next next)) ]]>
+    <![%l10n-sk[ (("sk") (gentext-sk-nav-next next)) ]]>
+    <![%l10n-sl[ (("sl") (gentext-sl-nav-next next)) ]]>
+    <![%l10n-sr[ (("sr") (gentext-sr-nav-next next)) ]]>
+    <![%l10n-sv[ (("sv") (gentext-sv-nav-next next)) ]]>
+    <![%l10n-tr[ (("tr") (gentext-tr-nav-next next)) ]]>
+    <![%l10n-uk[ (("uk") (gentext-uk-nav-next next)) ]]>
+    <![%l10n-xh[ (("xh") (gentext-xh-nav-next next)) ]]>
+    <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-nav-next next)) ]]>
+    <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-nav-next next)) ]]>
+    <![%l10n-no[ (("bmno") (gentext-no-nav-next next)) ]]>
+    <![%l10n-de[ (("dege") (gentext-de-nav-next next)) ]]>
+    <![%l10n-da[ (("dk") (gentext-da-nav-next next)) ]]>
+    <![%l10n-sv[ (("svse") (gentext-sv-nav-next next)) ]]>
+    <![%l10n-en[ (("usen") (gentext-en-nav-next next)) ]]>
+    (else (error "L10N ERROR: gentext-nav-next"))))
+
+(define (gentext-nav-up up)
+  (case ($lang$)
+    <![%l10n-af[ (("af") (gentext-af-nav-up up)) ]]>
+    <![%l10n-bg[ (("bg") (gentext-bg-nav-up up)) ]]>
+    <![%l10n-bs[ (("bs") (gentext-bs-nav-up up)) ]]>
+    <![%l10n-ca[ (("ca") (gentext-ca-nav-up up)) ]]>
+    <![%l10n-cs[ (("cs") (gentext-cs-nav-up up)) ]]>
+    <![%l10n-da[ (("da") (gentext-da-nav-up up)) ]]>
+    <![%l10n-de[ (("de") (gentext-de-nav-up up)) ]]>
+    <![%l10n-el[ (("el") (gentext-el-nav-up up)) ]]>
+    <![%l10n-en[ (("en") (gentext-en-nav-up up)) ]]>
+    <![%l10n-es[ (("es") (gentext-es-nav-up up)) ]]>
+    <![%l10n-et[ (("et") (gentext-et-nav-up up)) ]]>
+    <![%l10n-eu[ (("eu") (gentext-eu-nav-up up)) ]]>
+    <![%l10n-fi[ (("fi") (gentext-fi-nav-up up)) ]]>
+    <![%l10n-fr[ (("fr") (gentext-fr-nav-up up)) ]]>
+    <![%l10n-hu[ (("hu") (gentext-hu-nav-up up)) ]]>
+    <![%l10n-id[ (("id") (gentext-id-nav-up up)) ]]>
+    <![%l10n-it[ (("it") (gentext-it-nav-up up)) ]]>
+    <![%l10n-ja[ (("ja") (gentext-ja-nav-up up)) ]]>
+    <![%l10n-ko[ (("ko") (gentext-ko-nav-up up)) ]]>
+    <![%l10n-nl[ (("nl") (gentext-nl-nav-up up)) ]]>
+    <![%l10n-nn[ (("nn") (gentext-nn-nav-up up)) ]]>
+    <![%l10n-no[ (("no") (gentext-no-nav-up up)) ]]>
+    <![%l10n-pl[ (("pl") (gentext-pl-nav-up up)) ]]>
+    <![%l10n-pt[ (("pt") (gentext-pt-nav-up up)) ]]>
+    <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-nav-up up)) ]]>
+    <![%l10n-ro[ (("ro") (gentext-ro-nav-up up)) ]]>
+    <![%l10n-ru[ (("ru") (gentext-ru-nav-up up)) ]]>
+    <![%l10n-sk[ (("sk") (gentext-sk-nav-up up)) ]]>
+    <![%l10n-sl[ (("sl") (gentext-sl-nav-up up)) ]]>
+    <![%l10n-sr[ (("sr") (gentext-sr-nav-up up)) ]]>
+    <![%l10n-sv[ (("sv") (gentext-sv-nav-up up)) ]]>
+    <![%l10n-tr[ (("tr") (gentext-tr-nav-up up)) ]]>
+    <![%l10n-uk[ (("uk") (gentext-uk-nav-up up)) ]]>
+    <![%l10n-xh[ (("xh") (gentext-xh-nav-up up)) ]]>
+    <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-nav-up up)) ]]>
+    <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-nav-up up)) ]]>
+    <![%l10n-no[ (("bmno") (gentext-no-nav-up up)) ]]>
+    <![%l10n-de[ (("dege") (gentext-de-nav-up up)) ]]>
+    <![%l10n-da[ (("dk") (gentext-da-nav-up up)) ]]>
+    <![%l10n-sv[ (("svse") (gentext-sv-nav-up up)) ]]>
+    <![%l10n-en[ (("usen") (gentext-en-nav-up up)) ]]>
+    (else (error "L10N ERROR: gentext-nav-up"))))
+
+(define (gentext-nav-home home)
+  (case ($lang$)
+    <![%l10n-af[ (("af") (gentext-af-nav-home home)) ]]>
+    <![%l10n-bg[ (("bg") (gentext-bg-nav-home home)) ]]>
+    <![%l10n-bs[ (("bs") (gentext-bs-nav-home home)) ]]>
+    <![%l10n-ca[ (("ca") (gentext-ca-nav-home home)) ]]>
+    <![%l10n-cs[ (("cs") (gentext-cs-nav-home home)) ]]>
+    <![%l10n-da[ (("da") (gentext-da-nav-home home)) ]]>
+    <![%l10n-de[ (("de") (gentext-de-nav-home home)) ]]>
+    <![%l10n-el[ (("el") (gentext-el-nav-home home)) ]]>
+    <![%l10n-en[ (("en") (gentext-en-nav-home home)) ]]>
+    <![%l10n-es[ (("es") (gentext-es-nav-home home)) ]]>
+    <![%l10n-et[ (("et") (gentext-et-nav-home home)) ]]>
+    <![%l10n-eu[ (("eu") (gentext-eu-nav-home home)) ]]>
+    <![%l10n-fi[ (("fi") (gentext-fi-nav-home home)) ]]>
+    <![%l10n-fr[ (("fr") (gentext-fr-nav-home home)) ]]>
+    <![%l10n-hu[ (("hu") (gentext-hu-nav-home home)) ]]>
+    <![%l10n-id[ (("id") (gentext-id-nav-home home)) ]]>
+    <![%l10n-it[ (("it") (gentext-it-nav-home home)) ]]>
+    <![%l10n-ja[ (("ja") (gentext-ja-nav-home home)) ]]>
+    <![%l10n-ko[ (("ko") (gentext-ko-nav-home home)) ]]>
+    <![%l10n-nl[ (("nl") (gentext-nl-nav-home home)) ]]>
+    <![%l10n-nn[ (("nn") (gentext-nn-nav-home home)) ]]>
+    <![%l10n-no[ (("no") (gentext-no-nav-home home)) ]]>
+    <![%l10n-pl[ (("pl") (gentext-pl-nav-home home)) ]]>
+    <![%l10n-pt[ (("pt") (gentext-pt-nav-home home)) ]]>
+    <![%l10n-ptbr[ (("pt_br") (gentext-ptbr-nav-home home)) ]]>
+    <![%l10n-ro[ (("ro") (gentext-ro-nav-home home)) ]]>
+    <![%l10n-ru[ (("ru") (gentext-ru-nav-home home)) ]]>
+    <![%l10n-sk[ (("sk") (gentext-sk-nav-home home)) ]]>
+    <![%l10n-sl[ (("sl") (gentext-sl-nav-home home)) ]]>
+    <![%l10n-sr[ (("sr") (gentext-sr-nav-home home)) ]]>
+    <![%l10n-sv[ (("sv") (gentext-sv-nav-home home)) ]]>
+    <![%l10n-tr[ (("tr") (gentext-tr-nav-home home)) ]]>
+    <![%l10n-uk[ (("uk") (gentext-uk-nav-home home)) ]]>
+    <![%l10n-xh[ (("xh") (gentext-xh-nav-home home)) ]]>
+    <![%l10n-zhcn[ (("zh_cn") (gentext-zhcn-nav-home home)) ]]>
+    <![%l10n-zhtw[ (("zh_tw") (gentext-zhtw-nav-home home)) ]]>
+    <![%l10n-no[ (("bmno") (gentext-no-nav-home home)) ]]>
+    <![%l10n-de[ (("dege") (gentext-de-nav-home home)) ]]>
+    <![%l10n-da[ (("dk") (gentext-da-nav-home home)) ]]>
+    <![%l10n-sv[ (("svse") (gentext-sv-nav-home home)) ]]>
+    <![%l10n-en[ (("usen") (gentext-en-nav-home home)) ]]>
+    (else (error "L10N ERROR: gentext-nav-home"))))
diff --git a/common/dbl10n.ent b/common/dbl10n.ent
new file mode 100644 (file)
index 0000000..5b9b3a2
--- /dev/null
@@ -0,0 +1,361 @@
+<!ENTITY % l10n-af "INCLUDE">
+<!ENTITY % l10n-bg "INCLUDE">
+<!ENTITY % l10n-bs "INCLUDE">
+<!ENTITY % l10n-ca "INCLUDE">
+<!ENTITY % l10n-cs "INCLUDE">
+<!ENTITY % l10n-da "INCLUDE">
+<!ENTITY % l10n-de "INCLUDE">
+<!ENTITY % l10n-el "INCLUDE">
+<!ENTITY % l10n-en "INCLUDE">
+<!ENTITY % l10n-es "INCLUDE">
+<!ENTITY % l10n-et "INCLUDE">
+<!ENTITY % l10n-eu "INCLUDE">
+<!ENTITY % l10n-fi "INCLUDE">
+<!ENTITY % l10n-fr "INCLUDE">
+<!ENTITY % l10n-hu "INCLUDE">
+<!ENTITY % l10n-id "INCLUDE">
+<!ENTITY % l10n-it "INCLUDE">
+<!ENTITY % l10n-ja "INCLUDE">
+<!ENTITY % l10n-ko "INCLUDE">
+<!ENTITY % l10n-nl "INCLUDE">
+<!ENTITY % l10n-nn "INCLUDE">
+<!ENTITY % l10n-no "INCLUDE">
+<!ENTITY % l10n-pl "INCLUDE">
+<!ENTITY % l10n-pt "INCLUDE">
+<!ENTITY % l10n-ptbr "INCLUDE">
+<!ENTITY % l10n-ro "INCLUDE">
+<!ENTITY % l10n-ru "INCLUDE">
+<!ENTITY % l10n-sk "INCLUDE">
+<!ENTITY % l10n-sl "INCLUDE">
+<!ENTITY % l10n-sr "INCLUDE">
+<!ENTITY % l10n-sv "INCLUDE">
+<!ENTITY % l10n-tr "INCLUDE">
+<!ENTITY % l10n-uk "INCLUDE">
+<!ENTITY % l10n-xh "INCLUDE">
+<!ENTITY % l10n-zhcn "INCLUDE">
+<!ENTITY % l10n-zhtw "INCLUDE">
+
+<![%l10n-af;[
+<!ENTITY dbl1af
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//AF"
+         "../common/dbl1af.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1af
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+          "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-bg;[
+<!ENTITY dbl1bg
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//BG"
+         "../common/dbl1bg.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1bg
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+          "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-bs;[
+<!ENTITY dbl1bs
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//BS"
+         "../common/dbl1bs.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1bs
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+          "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-ca;[
+<!ENTITY dbl1ca
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//CA"
+         "../common/dbl1ca.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1ca
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+          "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-cs;[
+<!ENTITY dbl1cs
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//CS"
+         "../common/dbl1cs.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1cs
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-da;[
+<!ENTITY dbl1da
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//DA"
+         "../common/dbl1da.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1da
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-de;[
+<!ENTITY dbl1de
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//DE"
+         "../common/dbl1de.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1de
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-el;[
+<!ENTITY dbl1el
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//EL"
+         "../common/dbl1el.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1el
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EL"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-en;[
+<!ENTITY dbl1en
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//EN"
+         "../common/dbl1en.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1en
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-es;[
+<!ENTITY dbl1es
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//ES"
+         "../common/dbl1es.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1es
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-et;[
+<!ENTITY dbl1et
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//ET"
+         "../common/dbl1et.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1et
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-eu;[
+<!ENTITY dbl1eu
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//EU"
+         "../common/dbl1eu.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1eu
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-fi;[
+<!ENTITY dbl1fi
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//FI"
+         "../common/dbl1fi.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1fi
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-fr;[
+<!ENTITY dbl1fr
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//FR"
+         "../common/dbl1fr.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1fr
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-hu;[
+<!ENTITY dbl1hu
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//HU"
+         "../common/dbl1hu.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1hu
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-id;[
+<!ENTITY dbl1id
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//ID"
+         "../common/dbl1id.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1id
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-it;[
+<!ENTITY dbl1it
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//IT"
+         "../common/dbl1it.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1it
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-ja;[
+<!ENTITY dbl1ja
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//JA"
+         "../common/dbl1ja.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1ja
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-ko;[
+<!ENTITY dbl1ko
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//KO"
+         "../common/dbl1ko.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1ko
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-nl;[
+<!ENTITY dbl1nl
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//NL"
+         "../common/dbl1nl.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1nl
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-nn;[
+<!ENTITY dbl1nn
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//NN"
+         "../common/dbl1nn.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1nn
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-no;[
+<!ENTITY dbl1no
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//NO"
+         "../common/dbl1no.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1no
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-pl;[
+<!ENTITY dbl1pl
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//PL"
+         "../common/dbl1pl.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1pl
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-pt;[
+<!ENTITY dbl1pt
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//PT"
+         "../common/dbl1pt.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1pt
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-ptbr;[
+<!ENTITY dbl1ptbr
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//PTBR"
+         "../common/dbl1ptbr.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1ptbr
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-ro;[
+<!ENTITY dbl1ro
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//RO"
+         "../common/dbl1ro.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1ro
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-ru;[
+<!ENTITY dbl1ru
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//RU"
+         "../common/dbl1ru.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1ru
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-sk;[
+<!ENTITY dbl1sk
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//SK"
+         "../common/dbl1sk.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1sk
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-sl;[
+<!ENTITY dbl1sl
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//SL"
+         "../common/dbl1sl.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1sl
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-sr;[
+<!ENTITY dbl1sr
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//SR"
+         "../common/dbl1sr.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1sr
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-sv;[
+<!ENTITY dbl1sv
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//SV"
+         "../common/dbl1sv.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1sv
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-tr;[
+<!ENTITY dbl1tr
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//TR"
+         "../common/dbl1tr.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1tr
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-uk;[
+<!ENTITY dbl1uk
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//UK"
+         "../common/dbl1uk.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1uk
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-xh;[
+<!ENTITY dbl1xh
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//XH"
+         "../common/dbl1xh.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1xh
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-zhcn;[
+<!ENTITY dbl1zhcn
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//ZHCN"
+         "../common/dbl1zhcn.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1zhcn
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
+<![%l10n-zhtw;[
+<!ENTITY dbl1zhtw
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Localization//ZHTW"
+         "../common/dbl1zhtw.dsl" CDATA DSSSL>
+]]>
+<!ENTITY dbl1zhtw
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Stylesheet Null Localization//EN"
+         "../common/dbl1null.dsl" CDATA DSSSL>
+
diff --git a/common/dbl10n.pl b/common/dbl10n.pl
new file mode 100644 (file)
index 0000000..8683841
--- /dev/null
@@ -0,0 +1,55 @@
+#!/usr/bin/perl -w -- # -*- Perl -*-
+
+use strict;
+
+my $template = "dbl10n.template";
+my $dbl10n   = "dbl10n.dsl";
+my @languages = ();
+my %langsection = ();
+my $inlist = 0;
+my $historical = 0;
+
+open (F, $template);
+open (G, ">$dbl10n");
+
+while (<F>) {
+    if (/\%\%\/?LANGUAGES\%\%/ || /\%\%HISTORICAL\%\%/) {
+       $inlist = 1 if $& eq '%%LANGUAGES%%';
+       $inlist = 0 if $& eq '%%/LANGUAGES%%';
+       $historical = 1 if $& eq '%%HISTORICAL%%';
+       next;
+    }
+
+    if ($inlist && /^;; (\S+)\s+-/) {
+       my $lang = $1;
+       my $section = $1;
+
+       if ($historical) {
+           $lang =~ /^(\S+)\((\S+)\)/;
+           $lang = $1;
+           $section = $2;
+       }
+
+       $section =~ s/\_//sg;
+#      print "$lang = $section\n";
+
+       push (@languages, $lang);
+       $langsection{$lang} = $section;
+    }
+
+    if (/<!\[\%l10n-XX/) {
+       my $line = $_;
+       foreach my $lang (@languages) {
+           my $section = $langsection{$lang};
+           $_ = $line;
+           s/\"XX\"/\"$lang\"/g;
+           s/XX/$section/g;
+           print G $_;
+       }
+    } else {
+       print G $_;
+    }
+}
+
+close (F);
+close (G);
diff --git a/common/dbl10n.template b/common/dbl10n.template
new file mode 100644 (file)
index 0000000..b05f789
--- /dev/null
@@ -0,0 +1,277 @@
+;; $Id: dbl10n.template,v 1.3 2004/10/09 21:36:35 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com.  Please use the ISO 639 language
+;; code to identify the language.  Append a subtag as per RFC 1766,
+;; if necessary.
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x and #x
+;; keywords.
+;;
+
+;; The following language codes from ISO 639 are recognized:
+;; %%LANGUAGES%%
+;; af - Afrikaans                           1.71
+;; bg - Bulgarian
+;; bs - Bosnian
+;; ca - Catalan
+;; cs - Czech
+;; da - Danish (previously dk)
+;; de - German (previously dege)
+;; el - Greek
+;; en - English (previously usen)
+;; es - Spanish
+;; et - Estonian                            1.55
+;; eu - Basque                              1.74
+;; fi - Finnish
+;; fr - French
+;; hu - Hungarian                           1.55
+;; id - Indonesian                          1.55
+;; it - Italian
+;; ja - Japanese
+;; ko - Korean                              1.59
+;; nl - Dutch
+;; nn - Nnyorsk                             1.74
+;; no - Norwegian (previously bmno) ???
+;; pl - Polish
+;; pt - Portuguese
+;; pt_br - Portuguese (Brazil)
+;; ro - Romanian
+;; ru - Russian
+;; sk - Slovak
+;; sl - Slovenian                           1.55
+;; sr - Serbian                             1.70
+;; sv - Swedish (previously svse)
+;; tr - Turkish                             1.71
+;; uk - Ukranian                            1.74
+;; xh - Xhosa                               1.74
+;; zh_cn - Chinese (Continental)            1.55
+;; zh_tw - Chinese (Traditional)            1.70
+
+;; The following language codes are recognized for historical reasons:
+
+;; %%HISTORICAL%%
+;; bmno(no) - Norwegian (Norsk Bokmal) ???
+;; dege(de) - German
+;; dk(da)   - Danish
+;; svse(sv) - Swedish
+;; usen(en) - English
+;; %%/LANGUAGES%%
+
+(define %default-language% "en")
+(define %gentext-language% #f)
+(define %gentext-use-xref-lang% #f)
+
+(define ($lang$ #!optional (target (current-node)) (xref-context #f))
+  (if %gentext-language%
+      (lang-fix %gentext-language%)
+      (if (or xref-context %gentext-use-xref-lang%)
+         (let loop ((here target))
+           (if (node-list-empty? here)
+               (lang-fix %default-language%)
+               (if (attribute-string (normalize "lang") here)
+                   (lang-fix (attribute-string (normalize "lang") here))
+                   (loop (parent here)))))
+         (if (inherited-attribute-string (normalize "lang"))
+             (lang-fix (inherited-attribute-string (normalize "lang")))
+             (lang-fix %default-language%)))))
+
+(define (lang-fix language)
+  ;; Lowercase the language
+  ;; Translate 'xx-yy' to 'xx_yy'
+  (let ((fixed-lang (if (> (string-index language "-") 0)
+                       (let ((pos (string-index language "-")))
+                         (string-append
+                          (substring language 0 pos)
+                          "_"
+                          (substring language (+ pos 1)
+                                     (string-length language))))
+                       language)))
+    (case-fold-down fixed-lang)))
+
+(define (author-string #!optional (author (current-node)))
+  (let ((lang   (if (string? author) ($lang$) ($lang$ author))))
+    (case lang
+      ;; ISO 639/ISO 3166/RFC 1766
+      <![%l10n-XX[   (("XX")    (XX-author-string author)) ]]>
+      (else (error (string-append "L10N ERROR: author-string: "
+                                 lang))))))
+
+(define (gentext-xref-strings target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-XX[ (("XX") (gentext-XX-xref-strings giname)) ]]>
+      (else (error (string-append "L10N ERROR: gentext-xref-strings: " 
+                                 lang))))))
+
+(define (auto-xref-indirect-connector before) 
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") (XX-auto-xref-indirect-connector before)) ]]>
+    (else (error "L10N ERROR: auto-xref-indirect-connector"))))
+
+(define (generate-toc-in-front)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %generate-XX-toc-in-front%) ]]>
+    (else (error "L10N ERROR: generate-toc-in-front"))))
+
+(define (gentext-element-name target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target #t))))
+    (case lang
+      <![%l10n-XX[ (("XX") (gentext-XX-element-name giname)) ]]>
+      (else (error (string-append "L10N ERROR: gentext-element-name: "
+                                 lang
+                                 " ("
+                                 giname
+                                 ")"))))))
+
+(define (gentext-element-name-space target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-XX[ (("XX") (gentext-XX-element-name-space giname)) ]]>
+      (else (error "L10N ERROR: gentext-element-name-space")))))
+
+(define (gentext-intra-label-sep target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-XX[ (("XX") (gentext-XX-intra-label-sep giname)) ]]>
+      (else (error "L10N ERROR: gentext-intra-label-sep")))))
+
+(define (gentext-label-title-sep target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-XX[ (("XX") (gentext-XX-label-title-sep giname)) ]]>
+      (else (error "L10N ERROR: gentext-label-title-sep")))))
+
+(define (label-number-format target)
+  (let ((giname (if (string? target) (normalize target) (gi target)))
+       (lang   (if (string? target) ($lang$) ($lang$ target))))
+    (case lang
+      <![%l10n-XX[ (("XX") (XX-label-number-format target)) ]]>
+      (else (error "L10N ERROR: label-number-format")))))
+
+(define ($lot-title$ lotgi)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") ($lot-title-XX$ lotgi)) ]]>
+    (else (error "L10N ERROR: $lot-title$"))))
+
+(define (gentext-start-quote)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-start-quote%) ]]>
+    (else (error "L10N ERROR: gentext-start-quote"))))
+
+(define (gentext-end-quote)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-end-quote%) ]]>
+    (else (error "L10N ERROR: gentext-end-quote"))))
+
+(define (gentext-start-nested-quote)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-start-nested-quote%) ]]>
+    (else (error "L10N ERROR: gentext-start-nested-quote"))))
+
+(define (gentext-end-nested-quote)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-end-nested-quote%) ]]>
+    (else (error "L10N ERROR: gentext-end-nested-quote"))))
+
+(define (gentext-by)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-by%) ]]>
+    (else (error "L10N ERROR: gentext-by"))))
+
+(define (gentext-edited-by)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-edited-by%) ]]>
+    (else (error "L10N ERROR: gentext-edited-by"))))
+
+(define (gentext-revised-by)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-revised-by%) ]]>
+    (else (error "L10N ERROR: gentext-revised-by"))))
+
+(define (gentext-page)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-page%) ]]>
+    (else (error "L10N ERROR: gentext-page"))))
+
+(define (gentext-and)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-and%) ]]>
+    (else (error "L10N ERROR: gentext-and"))))
+
+(define (gentext-listcomma)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-listcomma%) ]]>
+    (else (error "L10N ERROR: gentext-listcomma"))))
+
+(define (gentext-lastlistcomma)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-lastlistcomma%) ]]>
+    (else (error "L10N ERROR: gentext-lastlistcomma"))))
+
+(define (gentext-bibl-pages)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-bibl-pages%) ]]>
+    (else (error "L10N ERROR: gentext-bibl-pages"))))
+
+(define (gentext-endnotes)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-endnotes%) ]]>
+    (else (error "L10N ERROR: gentext-endnotes"))))
+
+(define (gentext-table-endnotes)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-table-endnotes%) ]]>
+    (else (error "L10N ERROR: gentext-table-endnotes"))))
+
+(define (gentext-index-see)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-index-see%) ]]>
+    (else (error "L10N ERROR: gentext-index-see"))))
+
+(define (gentext-index-seealso)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") %gentext-XX-index-seealso%) ]]>
+    (else (error "L10N ERROR: gentext-index-seealso"))))
+
+(define (gentext-nav-prev prev) 
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") (gentext-XX-nav-prev prev)) ]]>
+    (else (error "L10N ERROR: gentext-nav-prev"))))
+
+(define (gentext-nav-prev-sibling prevsib) 
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") (gentext-XX-nav-prev-sibling prevsib)) ]]>
+    (else (error "L10N ERROR: gentext-nav-prev-sibling "))))
+
+(define (gentext-nav-next-sibling nextsib)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") (gentext-XX-nav-next-sibling nextsib)) ]]>
+    (else (error "L10N ERROR: gentext-nav-next-sibling"))))
+
+(define (gentext-nav-next next)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") (gentext-XX-nav-next next)) ]]>
+    (else (error "L10N ERROR: gentext-nav-next"))))
+
+(define (gentext-nav-up up)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") (gentext-XX-nav-up up)) ]]>
+    (else (error "L10N ERROR: gentext-nav-up"))))
+
+(define (gentext-nav-home home)
+  (case ($lang$)
+    <![%l10n-XX[ (("XX") (gentext-XX-nav-home home)) ]]>
+    (else (error "L10N ERROR: gentext-nav-home"))))
diff --git a/common/dbl1af.dsl b/common/dbl1af.dsl
new file mode 100644 (file)
index 0000000..47b62e0
--- /dev/null
@@ -0,0 +1,440 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % af.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//AF"
+         "dbl1af.ent">
+%af.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-af">
+<style-specification-body>
+
+;; $Id: dbl1af.dsl,v 1.1 2001/07/04 14:46:00 uid48421 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Modified for Afrikaans
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (af-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (af-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-af-start-quote%
+                                                      "%t"
+                                                      %gentext-af-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-af-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (af-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (af-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-af-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (af-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&ISBN;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-af-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (af-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-af-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-af-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-af-intra-label-sep)
+  (list))
+
+(define (af-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-af-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (sep    (assoc name (af-intra-label-sep))))
+    (if sep
+       (car (cdr sep))
+       "")))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-af-label-title-sep)
+  (list))
+
+(define (af-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-af-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (sep    (assoc name (af-label-title-sep))))
+    (if sep
+       (car (cdr sep))
+       "")))
+
+(define (af-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (af-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (af-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (af-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-af$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (af-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-af-start-quote% (dingbat "ldquo"))
+
+(define %gentext-af-end-quote% (dingbat "rdquo"))
+
+(define %gentext-af-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-af-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-af-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-af-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-af-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-af-page% "")
+
+(define %gentext-af-and% "&and;")
+
+(define %gentext-af-listcomma% "&listcomma;")
+
+(define %gentext-af-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-af-bibl-pages% "&Pgs;")
+
+(define %gentext-af-endnotes% "&Notes;")
+
+(define %gentext-af-table-endnotes% "&TableNotes;:")
+
+(define %gentext-af-index-see% "&See;")
+
+(define %gentext-af-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-af-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-af-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-af-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-af-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-af-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-af-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
+
diff --git a/common/dbl1af.ent b/common/dbl1af.ent
new file mode 100644 (file)
index 0000000..893f197
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Samevatting">
+<!ENTITY abstract        "samevatting">
+<!ENTITY Answer          "Antwoord:">
+<!ENTITY answer          "antwoord:">
+<!ENTITY Appendix        "Aanhangsel">
+<!ENTITY appendix        "aanhangsel">
+<!ENTITY Article         "Artikel">
+<!ENTITY article         "artikel">
+<!ENTITY Bibliography    "Bibliografie">
+<!ENTITY bibliography    "bibliografie">
+<!ENTITY Book            "Boek">
+<!ENTITY book            "boek">
+<!ENTITY Caution         "Pas op">
+<!ENTITY caution         "pas op">
+<!ENTITY CAUTION         "PAS OP">
+<!ENTITY Chapter         "Hoofdstuk">
+<!ENTITY chapter         "hoofdstuk">
+<!ENTITY Colophon        "Kolifon">
+<!ENTITY colophon        "kolifon">
+<!ENTITY Copyright       "Kopie reg">
+<!ENTITY copyright       "kopie reg">
+<!ENTITY Dedication      "Opgedra aan">
+<!ENTITY dedication      "opgedra aan">
+<!ENTITY Edition         "Uitgawe">
+<!ENTITY edition         "uitgawe">
+<!ENTITY Equation        "Vergelyking">
+<!ENTITY equation        "vergelyking">
+<!ENTITY Example         "Voorbeeld">
+<!ENTITY example         "voorbeeld">
+<!ENTITY Figure          "Figuur">
+<!ENTITY figure          "figuur">
+<!ENTITY Glossary        "Woordlys">
+<!ENTITY glossary        "woordlys">
+<!ENTITY GlossSee        "WoordelysSien">
+<!ENTITY glosssee        "woordelyssien">
+<!ENTITY GlossSeeAlso    "WoordelysSienOok">
+<!ENTITY glossseealso    "woordelyssienook">
+<!ENTITY IMPORTANT       "BELANGRIK">
+<!ENTITY Important       "Belangrik">
+<!ENTITY important       "belangrik">
+<!ENTITY Index           "Indeks">
+<!ENTITY index           "indeks">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "isbn">
+<!ENTITY LegalNotice     "RegsKennisgewing">
+<!ENTITY legalnotice     "regskennisgewing">
+<!ENTITY MsgAud          "Teikengroep">
+<!ENTITY msgaud          "teikengroep">
+<!ENTITY MsgLevel        "Vlak">
+<!ENTITY msglevel        "vlak">
+<!ENTITY MsgOrig         "Herkoms">
+<!ENTITY msgorig         "herkoms">
+<!ENTITY note            "opmerking">
+<!ENTITY NOTE            "OPMERKING">
+<!ENTITY Note            "Opmerking">
+<!ENTITY Part            "Deel">
+<!ENTITY part            "deel">
+<!ENTITY Preface         "Voorwoord">
+<!ENTITY preface         "voorwoord">
+<!ENTITY Procedure       "Prosedure">
+<!ENTITY procedure       "prosedure">
+<!ENTITY ProductionSet   "ProduksieStel">
+<!ENTITY Published       "Uitgegee">
+<!ENTITY published       "uitgegee">
+<!ENTITY Question        "Vraag:">
+<!ENTITY question        "vraag:">
+<!ENTITY RefEntry        "Verwysingslemma">
+<!ENTITY refentry        "verwysingslemma">
+<!ENTITY Reference       "Verwysing">
+<!ENTITY reference       "verwysing">
+<!ENTITY RefName         "Verwysingsnaam">
+<!ENTITY refname         "verwysingsnaam">
+<!ENTITY RefSection      "Verwysingsparagraaf">
+<!ENTITY refsection      "verwysingsparagraaf">
+<!ENTITY RefSynopsisDiv  "Verwysingsamevatting">
+<!ENTITY refsynopsisdiv  "verwysingsamevatting">
+<!ENTITY RevHistory      "Hersiening geskiedenis">
+<!ENTITY revhistory      "hersiening geskiedenis">
+<!ENTITY Revision        "Hersiening">
+<!ENTITY revision        "hersiening">
+<!ENTITY sect1           "Paragraaf">
+<!ENTITY sect2           "Paragraaf">
+<!ENTITY sect3           "Paragraaf">
+<!ENTITY sect4           "Paragraaf">
+<!ENTITY sect5           "Paragraaf">
+<!ENTITY Section         "Paragraaf">
+<!ENTITY section         "paragraaf">
+<!ENTITY see             "sien">
+<!ENTITY See             "Sien">
+<!ENTITY Seealso         "Sien ook">
+<!ENTITY seealso         "sien ook">
+<!ENTITY SeeAlso         "Sien Ook">
+<!ENTITY set             "versameling">
+<!ENTITY Set             "Versameling">
+<!ENTITY SetIndex        "VersamelingIndeks">
+<!ENTITY setindex        "versamelingindeks">
+<!ENTITY Sidebar         "Kantbalk">
+<!ENTITY sidebar         "kantbalk">
+<!ENTITY step            "stap">
+<!ENTITY Step            "Stap">
+<!ENTITY table           "tabel">
+<!ENTITY Table           "Tabel">
+<!ENTITY TIP             "LEIDRAAD">
+<!ENTITY Tip             "Leidraad">
+<!ENTITY tip             "leidraad">
+<!ENTITY WARNING         "WAARSKUWING">
+<!ENTITY Warning         "Waarskuwing">
+<!ENTITY warning         "waarskuwing">
+<!ENTITY and             "en">
+<!ENTITY by              "deur">
+<!ENTITY Edited          "Geredigeer">
+<!ENTITY edited          "geredigeer">
+<!ENTITY Editedby        "Geredigeer deur">
+<!ENTITY editedby        "geredigeer deur">
+<!ENTITY in              "in">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "element bestaan nie">
+<!ENTITY notes           "Notas">
+<!ENTITY Notes           "notas">
+<!ENTITY Pgs             "bl.">
+<!ENTITY pgs             "bl.">
+<!ENTITY Revisedby       "Hersien deur">
+<!ENTITY revisedby       "hersien deur">
+<!ENTITY TableNotes      "TabelOpmerking">
+<!ENTITY tablenotes      "tabelopmerking">
+<!ENTITY TableofContents "Inhoudsopgawe">
+<!ENTITY tableofcontents "inhoudsopgawe">
+<!ENTITY unexpectedelementname "onverwagte element naam">
+<!ENTITY unsupported     "nie geondersteun">
+<!ENTITY xrefto          "verwysing na">
+<!ENTITY listofequations "lys van vergelykings">
+<!ENTITY ListofEquations "Lys van vergelykings">
+<!ENTITY ListofExamples  "Lys van voorbeelde">
+<!ENTITY listofexamples  "lys van voorbeelde">
+<!ENTITY ListofFigures   "Lys van figure">
+<!ENTITY listoffigures   "lys van figure">
+<!ENTITY listoftables    "lys van tabelle">
+<!ENTITY ListofTables    "Lys van tabelle">
+<!ENTITY ListofUnknown   "Lys van onbekende tipes">
+<!ENTITY listofunknown   "lys van onbekende tipes">
+<!ENTITY nav-home        "Begin">
+<!ENTITY nav-next        "Volgende">
+<!ENTITY nav-next-sibling "Verder vooruit">
+<!ENTITY nav-prev        "Terug">
+<!ENTITY nav-prev-sibling "Verder terug">
+<!ENTITY nav-up          "Boontoe">
+<!ENTITY Draft           "Proef">
+<!ENTITY above           "bo">
+<!ENTITY below           "onder">
+<!ENTITY sectioncalled   "die seksie genaamd">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1bg.dsl b/common/dbl1bg.dsl
new file mode 100644 (file)
index 0000000..3b1417d
--- /dev/null
@@ -0,0 +1,431 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % cyr1 PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN">
+%cyr1;
+<!ENTITY % bg.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//BG"
+         "dbl1bg.ent">
+%bg.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-bg">
+<style-specification-body>
+
+;; $Id: dbl1bg.dsl,v 1.1 2004/10/09 21:36:35 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The Bulgarian version of this file used the Romanian as a template.
+
+(define (bg-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (bg-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&appendix; %t"))
+       (list (normalize "article")     (string-append %gentext-bg-start-quote%
+                                                      "%t"
+                                                      %gentext-bg-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "&chapter; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-bg-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (bg-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (bg-auto-xref-indirect-connector before) 
+    (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-bg-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (bg-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-bg-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (bg-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-bg-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-bg-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-bg-intra-label-sep)
+  (list))
+
+(define (bg-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-bg-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-bg-intra-label-sep)))
+        (sep    (assoc name (bg-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-bg-label-title-sep)
+  (list))
+
+(define (bg-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-bg-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-bg-label-title-sep)))
+        (sep    (assoc name (bg-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (bg-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (bg-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (bg-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (bg-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-bg$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (bg-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-bg-start-quote% (dingbat "ldquo"))
+
+(define %gentext-bg-end-quote% (dingbat "rdquo"))
+
+(define %gentext-bg-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-bg-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-bg-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-bg-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-bg-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-bg-page% "")
+
+(define %gentext-bg-and% "&and;")
+
+(define %gentext-bg-listcomma% "&listcomma;")
+
+(define %gentext-bg-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-bg-bibl-pages% "&Pgs;")
+
+(define %gentext-bg-endnotes% "&Notes;")
+
+(define %gentext-bg-table-endnotes% "&TableNotes;:")
+
+(define %gentext-bg-index-see% "&See;")
+
+(define %gentext-bg-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-bg-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-bg-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-bg-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-bg-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-bg-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-bg-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1bg.ent b/common/dbl1bg.ent
new file mode 100644 (file)
index 0000000..be544f2
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-0410;\U-043D;\U-043E;\U-0442;\U-0430;\U-0446;\U-0438;\U-044F;">
+<!ENTITY abstract        "\U-0410;\U-043D;\U-043E;\U-0442;\U-0430;\U-0446;\U-0438;\U-044F;">
+<!ENTITY Answer          "\U-041E;:">
+<!ENTITY answer          "\U-041E;:">
+<!ENTITY Appendix        "\U-041F;\U-0440;\U-0438;\U-043B;\U-043E;\U-0436;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY appendix        "\U-043F;\U-0440;\U-0438;\U-043B;\U-043E;\U-0436;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Article         "\U-0421;\U-0442;\U-0430;\U-0442;\U-0438;\U-044F;">
+<!ENTITY article         "\U-0421;\U-0442;\U-0430;\U-0442;\U-0438;\U-044F;">
+<!ENTITY Bibliography    "\U-041B;\U-0438;\U-0442;\U-0435;\U-0440;\U-0430;\U-0442;\U-0443;\U-0440;\U-0430;">
+<!ENTITY bibliography    "\U-041B;\U-0438;\U-0442;\U-0435;\U-0440;\U-0430;\U-0442;\U-0443;\U-0440;\U-0430;">
+<!ENTITY Book            "\U-041A;\U-043D;\U-0438;\U-0433;\U-0430;">
+<!ENTITY book            "\U-041A;\U-043D;\U-0438;\U-0433;\U-0430;">
+<!ENTITY CAUTION         "\U-0412;\U-041D;\U-0418;\U-041C;\U-0410;\U-041D;\U-0418;\U-0415;">
+<!ENTITY Caution         "\U-0412;\U-043D;\U-0438;\U-043C;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY caution         "\U-0412;\U-043D;\U-0438;\U-043C;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Chapter         "\U-0413;\U-043B;\U-0430;\U-0432;\U-0430;">
+<!ENTITY chapter         "\U-0433;\U-043B;\U-0430;\U-0432;\U-0430;">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "\U-041F;\U-043E;\U-0441;\U-0432;\U-0435;\U-0449;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY dedication      "\U-041F;\U-043E;\U-0441;\U-0432;\U-0435;\U-0449;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Edition         "\U-0418;\U-0437;\U-0434;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY edition         "\U-0418;\U-0437;\U-0434;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Equation        "\U-0424;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;\U-0430;">
+<!ENTITY equation        "\U-0424;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;\U-0430;">
+<!ENTITY Example         "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;">
+<!ENTITY example         "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;">
+<!ENTITY Figure          "\U-0424;\U-0438;\U-0433;\U-0443;\U-0440;\U-0430;">
+<!ENTITY figure          "\U-0424;\U-0438;\U-0433;\U-0443;\U-0440;\U-0430;">
+<!ENTITY Glossary        "\U-0422;\U-0435;\U-0440;\U-043C;\U-0438;\U-043D;\U-043E;\U-043B;\U-043E;\U-0433;\U-0438;\U-0447;\U-0435;\U-043D; \U-0440;\U-0435;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY glossary        "\U-0422;\U-0435;\U-0440;\U-043C;\U-0438;\U-043D;\U-043E;\U-043B;\U-043E;\U-0433;\U-0438;\U-0447;\U-0435;\U-043D; \U-0440;\U-0435;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY GlossSee        "\U-0432;\U-0436;.">
+<!ENTITY glosssee        "\U-0432;\U-0436;.">
+<!ENTITY GlossSeeAlso    "\U-0432;\U-0436;. \U-0441;\U-044A;\U-0449;\U-043E;">
+<!ENTITY glossseealso    "\U-0432;\U-0436;. \U-0441;\U-044A;\U-0449;\U-043E;">
+<!ENTITY IMPORTANT       "\U-0412;\U-0410;\U-0416;\U-041D;\U-041E;">
+<!ENTITY important       "\U-0412;\U-0430;\U-0436;\U-043D;\U-043E;">
+<!ENTITY Important       "\U-0412;\U-0430;\U-0436;\U-043D;\U-043E;">
+<!ENTITY Index           "\U-0418;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441;">
+<!ENTITY index           "\U-0418;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "\U-0410;\U-0432;\U-0442;\U-043E;\U-0440;\U-0441;\U-043A;\U-0438; \U-043F;\U-0440;\U-0430;\U-0432;\U-0430;">
+<!ENTITY legalnotice     "\U-0410;\U-0432;\U-0442;\U-043E;\U-0440;\U-0441;\U-043A;\U-0438; \U-043F;\U-0440;\U-0430;\U-0432;\U-0430;">
+<!ENTITY MsgAud          "Audience">
+<!ENTITY msgaud          "Audience">
+<!ENTITY MsgLevel        "\U-041D;\U-0438;\U-0432;\U-043E;">
+<!ENTITY msglevel        "\U-041D;\U-0438;\U-0432;\U-043E;">
+<!ENTITY MsgOrig         "\U-0418;\U-0437;\U-0442;\U-043E;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY msgorig         "\U-0418;\U-0437;\U-0442;\U-043E;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY NOTE            "\U-0417;\U-0410;\U-0411;\U-0415;\U-041B;\U-0415;\U-0416;\U-041A;\U-0410;">
+<!ENTITY Note            "\U-0417;\U-0430;\U-0431;\U-0435;\U-043B;\U-0435;\U-0436;\U-043A;\U-0430;">
+<!ENTITY note            "\U-0417;\U-0430;\U-0431;\U-0435;\U-043B;\U-0435;\U-0436;\U-043A;\U-0430;">
+<!ENTITY Part            "\U-0427;\U-0430;\U-0441;\U-0442;">
+<!ENTITY part            "\U-0427;\U-0430;\U-0441;\U-0442;">
+<!ENTITY Preface         "\U-041F;\U-0440;\U-0435;\U-0434;\U-0433;\U-043E;\U-0432;\U-043E;\U-0440;">
+<!ENTITY preface         "\U-041F;\U-0440;\U-0435;\U-0434;\U-0433;\U-043E;\U-0432;\U-043E;\U-0440;">
+<!ENTITY Procedure       "\U-041F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY procedure       "\U-041F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY PubDate         "\U-0414;\U-0430;\U-0442;\U-0430; \U-043D;\U-0430; \U-0438;\U-0437;\U-0434;\U-0430;\U-0432;\U-0430;\U-043D;\U-0435;">
+<!ENTITY pubdate         "\U-0414;\U-0430;\U-0442;\U-0430; \U-043D;\U-0430; \U-0438;\U-0437;\U-0434;\U-0430;\U-0432;\U-0430;\U-043D;\U-0435;">
+<!ENTITY Published       "\U-0418;\U-0437;\U-0434;\U-0430;\U-0434;\U-0435;\U-043D;">
+<!ENTITY published       "\U-0418;\U-0437;\U-0434;\U-0430;\U-0434;\U-0435;\U-043D;">
+<!ENTITY Qandadiv        "\U-0412;\U-044A;\U-043F;\U-0440;\U-043E;\U-0441;\U-0438; \U-0438; \U-043E;\U-0442;\U-0433;\U-043E;\U-0432;\U-043E;\U-0440;\U-0438;">
+<!ENTITY qandadiv        "\U-0412;\U-044A;\U-043F;\U-0440;\U-043E;\U-0441;\U-0438; \U-0438; \U-043E;\U-0442;\U-0433;\U-043E;\U-0432;\U-043E;\U-0440;\U-0438;">
+<!ENTITY Question        "\U-0412;:">
+<!ENTITY question        "\U-0412;:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "\U-0421;\U-043F;\U-0440;\U-0430;\U-0432;\U-043E;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY reference       "\U-0421;\U-043F;\U-0440;\U-0430;\U-0432;\U-043E;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY RefName         "\U-041D;\U-0430;\U-0437;\U-0432;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY refname         "\U-041D;\U-0430;\U-0437;\U-0432;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "\U-0421;\U-0438;\U-043D;\U-0442;\U-0430;\U-043A;\U-0441;\U-0438;\U-0441;">
+<!ENTITY refsynopsisdiv  "\U-0421;\U-0438;\U-043D;\U-0442;\U-0430;\U-043A;\U-0441;\U-0438;\U-0441;">
+<!ENTITY RevHistory      "\U-041F;\U-0440;\U-043E;\U-043C;\U-0435;\U-043D;\U-0438;">
+<!ENTITY revhistory      "\U-041F;\U-0440;\U-043E;\U-043C;\U-0435;\U-043D;\U-0438;">
+<!ENTITY revision        "\U-0418;\U-0437;\U-0434;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Revision        "\U-0418;\U-0437;\U-0434;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY sect1           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY sect2           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY sect3           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY sect4           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY sect5           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY section         "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY Section         "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY see             "\U-0432;\U-0436;.">
+<!ENTITY See             "\U-0412;\U-0436;.">
+<!ENTITY seealso         "\U-0432;\U-0436;. \U-0441;\U-044A;\U-0449;\U-043E;">
+<!ENTITY Seealso         "\U-0412;\U-0436;. \U-0441;\U-044A;\U-0449;\U-043E;">
+<!ENTITY SeeAlso         "\U-0412;\U-0436;. \U-0441;\U-044A;\U-0449;\U-043E;">
+<!ENTITY set             "\U-0423;\U-043A;\U-0430;\U-0437;\U-0430;\U-0442;\U-0435;\U-043B;">
+<!ENTITY Set             "\U-0423;\U-043A;\U-0430;\U-0437;\U-0430;\U-0442;\U-0435;\U-043B;">
+<!ENTITY setindex        "\U-0423;\U-043A;\U-0430;\U-0437;\U-0430;\U-0442;\U-0435;\U-043B;">
+<!ENTITY SetIndex        "\U-0423;\U-043A;\U-0430;\U-0437;\U-0430;\U-0442;\U-0435;\U-043B;">
+<!ENTITY Sidebar         "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;\U-0438;\U-0442;\U-0435;\U-043B;">
+<!ENTITY sidebar         "\U-0440;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;\U-0438;\U-0442;\U-0435;\U-043B;">
+<!ENTITY step            "\U-0421;\U-0442;\U-044A;\U-043F;\U-043A;\U-0430;">
+<!ENTITY Step            "\U-0421;\U-0442;\U-044A;\U-043F;\U-043A;\U-0430;">
+<!ENTITY Table           "\U-0422;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;\U-0430;">
+<!ENTITY table           "\U-0422;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;\U-0430;">
+<!ENTITY tip             "\U-041F;\U-043E;\U-0437;\U-0434;\U-0441;\U-043A;\U-0430;\U-0437;\U-043A;\U-0430;">
+<!ENTITY TIP             "\U-041F;\U-041E;\U-0414;\U-0421;\U-041A;\U-0410;\U-0417;\U-041A;\U-0410;">
+<!ENTITY Tip             "\U-041F;\U-043E;\U-0437;\U-0434;\U-0441;\U-043A;\U-0430;\U-0437;\U-043A;\U-0430;">
+<!ENTITY Warning         "\U-0412;\U-043D;\U-0438;\U-043C;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY warning         "\U-0412;\U-043D;\U-0438;\U-043C;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY WARNING         "\U-0412;\U-041D;\U-0418;\U-041C;\U-0410;\U-041D;\U-0418;\U-0415;">
+<!ENTITY and             "">
+<!ENTITY by              "">
+<!ENTITY called          "called">
+<!ENTITY Edited          "\U-0420;\U-0435;\U-0434;\U-0430;\U-043A;\U-0442;\U-0438;\U-0440;\U-0430;\U-043D;\U-043E; \U-043E;\U-0442;">
+<!ENTITY edited          "\U-0420;\U-0435;\U-0434;\U-0430;\U-043A;\U-0442;\U-0438;\U-0440;\U-0430;\U-043D;\U-043E; \U-043E;\U-0442;">
+<!ENTITY Editedby        "\U-0420;\U-0435;\U-0434;\U-0430;\U-043A;\U-0442;\U-0438;\U-0440;\U-0430;\U-043D;\U-043E; \U-043E;\U-0442;">
+<!ENTITY editedby        "\U-0420;\U-0435;\U-0434;\U-0430;\U-043A;\U-0442;\U-0438;\U-0440;\U-0430;\U-043D;\U-043E; \U-043E;\U-0442;">
+<!ENTITY in              "\U-0432;">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "non-existant element">
+<!ENTITY notes           "\U-0417;\U-0430;\U-0431;\U-0435;\U-043B;\U-0435;\U-0436;\U-043A;\U-0438;">
+<!ENTITY Notes           "\U-0417;\U-0430;\U-0431;\U-0435;\U-043B;\U-0435;\U-0436;\U-043A;\U-0438;">
+<!ENTITY Pgs             "\U-0441;\U-0442;\U-0440;.">
+<!ENTITY pgs             "\U-0441;\U-0442;\U-0440;.">
+<!ENTITY Revisedby       "\U-041E;\U-0434;\U-043E;\U-0431;\U-0440;\U-0435;\U-043D;\U-043E; \U-043E;\U-0442;: ">
+<!ENTITY revisedby       "\U-041E;\U-0434;\U-043E;\U-0431;\U-0440;\U-0435;\U-043D;\U-043E; \U-043E;\U-0442;: ">
+<!ENTITY TableNotes      "\U-0417;\U-0430;\U-0431;\U-0435;\U-043B;\U-0435;\U-0436;\U-043A;\U-0438;">
+<!ENTITY tablenotes      "\U-0417;\U-0430;\U-0431;\U-0435;\U-043B;\U-0435;\U-0436;\U-043A;\U-0438;">
+<!ENTITY TableofContents "\U-0421;\U-044A;\U-0434;\U-044A;\U-0440;\U-0436;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY tableofcontents "\U-0421;\U-044A;\U-0434;\U-044A;\U-0440;\U-0436;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "unexpected element name">
+<!ENTITY unsupported     "unsupported">
+<!ENTITY xrefto          "xref to">
+<!ENTITY listofequations "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-0444;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;\U-0438;\U-0442;\U-0435;">
+<!ENTITY ListofEquations "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-0444;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;\U-0438;\U-0442;\U-0435;">
+<!ENTITY ListofExamples  "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;\U-0438;\U-0442;\U-0435;">
+<!ENTITY listofexamples  "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;\U-0438;\U-0442;\U-0435;">
+<!ENTITY ListofFigures   "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-0444;\U-0438;\U-0433;\U-0443;\U-0440;\U-0438;\U-0442;\U-0435;">
+<!ENTITY listoffigures   "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-0444;\U-0438;\U-0433;\U-0443;\U-0440;\U-0438;\U-0442;\U-0435;">
+<!ENTITY ListofProcedures "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-043F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0438;\U-0442;\U-0435;">
+<!ENTITY listofprocedures "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-043F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0438;\U-0442;\U-0435;">
+<!ENTITY listoftables    "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-0442;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;\U-0438;\U-0442;\U-0435;">
+<!ENTITY ListofTables    "\U-0421;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A; \U-043D;\U-0430; \U-0442;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;\U-0438;\U-0442;\U-0435;">
+<!ENTITY ListofUnknown   "\U-041D;\U-0435;\U-043E;\U-043F;\U-0440;\U-0435;\U-0434;\U-0435;\U-043B;\U-0435;\U-043D; \U-0441;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A;">
+<!ENTITY listofunknown   "\U-041D;\U-0435;\U-043E;\U-043F;\U-0440;\U-0435;\U-0434;\U-0435;\U-043B;\U-0435;\U-043D; \U-0441;\U-043F;\U-0438;\U-0441;\U-044A;\U-043A;">
+<!ENTITY nav-home        "\U-041D;\U-0430;\U-0447;\U-0430;\U-043B;\U-043E;">
+<!ENTITY nav-next        "\U-0421;\U-043B;\U-0435;\U-0434;\U-0432;\U-0430;\U-0449;\U-0430; \U-0441;\U-0442;\U-0440;\U-0430;\U-043D;\U-0438;\U-0446;\U-0430;">
+<!ENTITY nav-next-sibling "\U-0421;\U-043B;\U-0435;\U-0434;\U-0432;\U-0430;\U-0449; \U-0440;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY nav-prev        "\U-041F;\U-0440;\U-0435;\U-0434;\U-0438;\U-0448;\U-043D;\U-0430; \U-0441;\U-0442;\U-0440;\U-0430;\U-043D;\U-0438;\U-0446;\U-0430;">
+<!ENTITY nav-prev-sibling "\U-041F;\U-0440;\U-0435;\U-0434;\U-0438;\U-0448;\U-0435;\U-043D; \U-0440;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY nav-up          "\U-041D;\U-0430;\U-0447;\U-0430;\U-043B;\U-043E; \U-043D;\U-0430; \U-0440;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;\U-0430;">
+<!ENTITY nav-toc         "\U-0421;\U-044A;\U-0434;\U-044A;\U-0440;\U-0436;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Draft           "\U-0427;\U-0435;\U-0440;\U-043D;\U-043E;\U-0432;\U-0430;">
+<!ENTITY above           "\U-043F;\U-043E;-\U-0433;\U-043E;\U-0440;\U-0435;">
+<!ENTITY below           "\U-043F;\U-043E;-\U-0434;\U-043E;\U-043B;\U-0443;">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY lowercase.alpha "\U-0430;\U-0431;\U-0432;\U-0433;\U-0434;\U-0435;\U-0436;\U-0437;\U-0438;\U-0439;\U-043A;\U-043B;\U-043C;\U-043D;\U-043E;\U-043F;\U-0440;\U-0441;\U-0442;\U-0443;\U-0444;\U-0445;\U-0446;\U-0447;\U-0448;\U-0449;\U-044A;\U-044B;\U-044C;\U-044D;\U-044E;\U-044F;">
+<!ENTITY uppercase.alpha "\U-0410;\U-0411;\U-0412;\U-0413;\U-0414;\U-0415;\U-0416;\U-0417;\U-0418;\U-0419;\U-041A;\U-041B;\U-041C;\U-041D;\U-041E;\U-041F;\U-0420;\U-0421;\U-0422;\U-0423;\U-0424;\U-0425;\U-0426;\U-0427;\U-0428;\U-0429;\U-042A;\U-042B;\U-042C;\U-042D;\U-042E;\U-042F;">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "2">
+<!ENTITY hyphenation-remain-character-count "2">
diff --git a/common/dbl1bs.dsl b/common/dbl1bs.dsl
new file mode 100644 (file)
index 0000000..fe63f66
--- /dev/null
@@ -0,0 +1,444 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % bs.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//BS"
+         "dbl1bs.ent">
+%bs.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-bs">
+<style-specification-body>
+
+;; $Id: dbl1bs.dsl,v 1.2 2004/10/09 21:16:26 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (bs-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (bs-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&appendix; sa nazivom %t"))
+       (list (normalize "article")     (string-append %gentext-bs-start-quote%
+                                                      "%t"
+                                                      %gentext-bs-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "&chapter; sa nazivom %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; sa nazivom %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; sa nazivom %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; sa nazivom %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; sa nazivom %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; sa nazivom %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; sa nazivom %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; sa nazivom %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-bs-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (bs-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (bs-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-bs-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (bs-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&see;")
+   (list (normalize "seealsoie")       "&seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-bs-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (bs-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-bs-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-bs-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-bs-intra-label-sep)
+  (list))
+
+(define (bs-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-bs-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-bs-intra-label-sep)))
+        (sep    (assoc name (bs-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-bs-label-title-sep)
+  (list))
+
+(define (bs-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-bs-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-bs-label-title-sep)))
+        (sep    (assoc name (bs-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (bs-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (bs-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (bs-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (bs-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-bs$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (bs-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-bs-start-quote% (dingbat "ldquo"))
+
+(define %gentext-bs-end-quote% (dingbat "rdquo"))
+
+(define %gentext-bs-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-bs-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-bs-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-bs-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-bs-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-bs-page% "")
+
+(define %gentext-bs-and% "&and;")
+
+(define %gentext-bs-listcomma% "&listcomma;")
+
+(define %gentext-bs-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-bs-bibl-pages% "&Pgs;")
+
+(define %gentext-bs-endnotes% "&Notes;")
+
+(define %gentext-bs-table-endnotes% "&TableNotes;:")
+
+(define %gentext-bs-index-see% "&see;")
+
+(define %gentext-bs-index-seealso% "&seealso;")
+
+
+(define (gentext-bs-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-bs-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-bs-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-bs-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-bs-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-bs-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1bs.ent b/common/dbl1bs.ent
new file mode 100644 (file)
index 0000000..c485ff6
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Sa\U-017E;etak">
+<!ENTITY abstract        "Sa\U-017E;etak">
+<!ENTITY Answer          "O:">
+<!ENTITY answer          "O:">
+<!ENTITY Appendix        "Dodatak">
+<!ENTITY appendix        "Dodatak">
+<!ENTITY Article         "\U-010C;lanak">
+<!ENTITY article         "\U-010C;lanak">
+<!ENTITY Bibliography    "Literatura">
+<!ENTITY bibliography    "Literatura">
+<!ENTITY Book            "Knjiga">
+<!ENTITY book            "Knjiga">
+<!ENTITY CAUTION         "PA\U-017D;NJA">
+<!ENTITY Caution         "Pa\U-017E;nja">
+<!ENTITY caution         "Pa\U-017E;nja">
+<!ENTITY Chapter         "Poglavlje">
+<!ENTITY chapter         "Poglavlje">
+<!ENTITY Colophon        "Kolofon">
+<!ENTITY colophon        "Kolofon">
+<!ENTITY Copyright       "Autorska prava">
+<!ENTITY copyright       "Autorska prava">
+<!ENTITY Dedication      "Posveta">
+<!ENTITY dedication      "Posveta">
+<!ENTITY Edition         "Izdanje">
+<!ENTITY edition         "Izdanje">
+<!ENTITY Equation        "Jedna\U-010D;ina">
+<!ENTITY equation        "Jedna\U-010D;ina">
+<!ENTITY Example         "Primjer">
+<!ENTITY example         "Primjer">
+<!ENTITY Figure          "Slika">
+<!ENTITY figure          "Slika">
+<!ENTITY Glossary        "Glosar">
+<!ENTITY glossary        "Glosar">
+<!ENTITY GlossSee        "Vidi">
+<!ENTITY glosssee        "Vidi">
+<!ENTITY GlossSeeAlso    "Vidi tako\U-0111;e">
+<!ENTITY glossseealso    "Vidi tako\U-0111;e">
+<!ENTITY IMPORTANT       "VA\U-017D;NO">
+<!ENTITY important       "Va\U-017E;no">
+<!ENTITY Important       "Va\U-017E;no">
+<!ENTITY Index           "Indeks">
+<!ENTITY index           "Indeks">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Pravne odredbe">
+<!ENTITY legalnotice     "Pravne odredbe">
+<!ENTITY MsgAud          "Primatelji">
+<!ENTITY msgaud          "Primatelji">
+<!ENTITY MsgLevel        "Nivo">
+<!ENTITY msglevel        "Nivo">
+<!ENTITY MsgOrig         "Izvor">
+<!ENTITY msgorig         "Izvor">
+<!ENTITY NOTE            "BILJE\U-0160;KA">
+<!ENTITY Note            "Bilje\U-0161;ka">
+<!ENTITY note            "Bilje\U-0161;ka">
+<!ENTITY Part            "Dio">
+<!ENTITY part            "Dio">
+<!ENTITY Preface         "Predgovor">
+<!ENTITY preface         "Predgovor">
+<!ENTITY Procedure       "Postupak">
+<!ENTITY procedure       "Postupak">
+<!ENTITY ProductionSet   "Produkcija">
+<!ENTITY PubDate         "Objavljeno">
+<!ENTITY pubdate         "Objavljeno">
+<!ENTITY Published       "Objavljeno">
+<!ENTITY published       "Objavljeno">
+<!ENTITY Qandadiv        "P &amp; O">
+<!ENTITY qandadiv        "P &amp; O">
+<!ENTITY Question        "P:">
+<!ENTITY question        "P:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Referenca">
+<!ENTITY reference       "Referenca">
+<!ENTITY RefName         "Ime">
+<!ENTITY refname         "Ime">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Pregled">
+<!ENTITY refsynopsisdiv  "Pregled">
+<!ENTITY RevHistory      "Historija verzija">
+<!ENTITY revhistory      "Historija verzija">
+<!ENTITY revision        "Verzija">
+<!ENTITY Revision        "Verzija">
+<!ENTITY sect1           "Odjeljak">
+<!ENTITY sect2           "Odjeljak">
+<!ENTITY sect3           "Odjeljak">
+<!ENTITY sect4           "Odjeljak">
+<!ENTITY sect5           "Odjeljak">
+<!ENTITY section         "Odjeljak">
+<!ENTITY Section         "Odjeljak">
+<!ENTITY see             "vidi">
+<!ENTITY See             "Vidi">
+<!ENTITY seealso         "vidi tako\U-0111;e">
+<!ENTITY Seealso         "Vidi tako\U-0111;e">
+<!ENTITY SeeAlso         "Vidi tako\U-0111;e">
+<!ENTITY set             "Set">
+<!ENTITY Set             "Set">
+<!ENTITY setindex        "Indeks">
+<!ENTITY SetIndex        "Indeks">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "sidebar">
+<!ENTITY step            "korak">
+<!ENTITY Step            "Korak">
+<!ENTITY Table           "Tabela">
+<!ENTITY table           "Tabela">
+<!ENTITY tip             "Savjet">
+<!ENTITY TIP             "SAVJET">
+<!ENTITY Tip             "Savjet">
+<!ENTITY Warning         "Upozorenje">
+<!ENTITY warning         "Upozorenje">
+<!ENTITY WARNING         "UPOZORENJE">
+<!ENTITY and             "i">
+<!ENTITY by              "od">
+<!ENTITY called          "called">
+<!ENTITY Edited          "Izdao">
+<!ENTITY edited          "Izdao">
+<!ENTITY Editedby        "Izdao">
+<!ENTITY editedby        "Izdao">
+<!ENTITY in              "u">
+<!ENTITY lastlistcomma   "">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "nepostoje\U-0107;i element">
+<!ENTITY notes           "Bilje\U-0161;ke">
+<!ENTITY Notes           "Bilje\U-0161;ke">
+<!ENTITY Pgs             "Str.">
+<!ENTITY pgs             "Str.">
+<!ENTITY Revisedby       "Izmijenjeno od: ">
+<!ENTITY revisedby       "Izmijenjeno od: ">
+<!ENTITY TableNotes      "Napomene">
+<!ENTITY tablenotes      "Napomene">
+<!ENTITY TableofContents "Sadr\U-017E;aj">
+<!ENTITY tableofcontents "Sadr\U-017E;aj">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "Neo\U-010D;kivano ime elementa">
+<!ENTITY unsupported     "nepodr\U-017E;ano">
+<!ENTITY xrefto          "xref prema">
+<!ENTITY listofequations "Spisak jedna\U-010D;ina">
+<!ENTITY ListofEquations "Spisak jedna\U-010D;ina">
+<!ENTITY ListofExamples  "Spisak primjera">
+<!ENTITY listofexamples  "Spisak primjera">
+<!ENTITY ListofFigures   "Spisak slika">
+<!ENTITY listoffigures   "Spisak slika">
+<!ENTITY ListofProcedures "Spisak postupaka">
+<!ENTITY listofprocedures "Spisak postupaka">
+<!ENTITY listoftables    "Spisak tabela">
+<!ENTITY ListofTables    "Spisak tabela">
+<!ENTITY ListofUnknown   "Spisak ???">
+<!ENTITY listofunknown   "Spisak ???">
+<!ENTITY nav-home        "Po\U-010D;etak">
+<!ENTITY nav-next        "Naprijed">
+<!ENTITY nav-next-sibling "Brzo naprijed">
+<!ENTITY nav-prev        "Nazad">
+<!ENTITY nav-prev-sibling "Brzo nazad">
+<!ENTITY nav-up          "Gore">
+<!ENTITY nav-toc         "Sadr\U-017E;aj">
+<!ENTITY Draft           "Nacrt">
+<!ENTITY above           "iznad">
+<!ENTITY below           "ispod">
+<!ENTITY sectioncalled   "odjeljak sa nazivom">
+<!ENTITY lowercase.alpha "abc\U-010D;\U-0107;d\U-0111;efghijklmnoprs\U-0161;tuvz\U-017E;">
+<!ENTITY uppercase.alpha "ABC\U-010C;\U-0106;D\U-0110;EFGHIJKLMNOPRS\U-0160;TUVZ\U-017D;">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "2">
+<!ENTITY hyphenation-remain-character-count "3">
diff --git a/common/dbl1ca.dsl b/common/dbl1ca.dsl
new file mode 100644 (file)
index 0000000..93980dd
--- /dev/null
@@ -0,0 +1,443 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % ca.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//CA"
+         "dbl1ca.ent">
+%ca.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-ca">
+<style-specification-body>
+
+;; $Id: dbl1ca.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributors:
+;; Perceval - Marc Huguet Puig, mhp@nil.fut.es
+;; marc*, marc.gonzalez-carnicer@european-go.org
+
+(define (ca-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (ca-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "l'&appendix; de nom %t"))
+       (list (normalize "article")     (string-append %gentext-ca-start-quote%
+                                                      "%t"
+                                                      %gentext-ca-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "el &chapter; de nom %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nom %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nom %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nom %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nom %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nom %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nom %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nom %t"))
+       (list (normalize "sidebar")     "la &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-ca-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (ca-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (ca-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " al "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " al; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " a la; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-ca-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (ca-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-ca-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (ca-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-ca-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-ca-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-ca-intra-label-sep)
+  (list))
+
+(define (ca-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-ca-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ca-intra-label-sep)))
+        (sep    (assoc name (ca-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-ca-label-title-sep)
+  (list))
+
+(define (ca-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-ca-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ca-label-title-sep)))
+        (sep    (assoc name (ca-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (ca-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (ca-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (ca-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (ca-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-ca$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (ca-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-ca-start-quote% (dingbat "ldquo"))
+
+(define %gentext-ca-end-quote% (dingbat "rdquo"))
+
+(define %gentext-ca-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-ca-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-ca-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-ca-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-ca-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-ca-page% "")
+
+(define %gentext-ca-and% "&and;")
+
+(define %gentext-ca-listcomma% "&listcomma;")
+
+(define %gentext-ca-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-ca-bibl-pages% "&Pgs;")
+
+(define %gentext-ca-endnotes% "&Notes;")
+
+(define %gentext-ca-table-endnotes% "&TableNotes;:")
+
+(define %gentext-ca-index-see% "&See;")
+
+(define %gentext-ca-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-ca-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-ca-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-ca-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-ca-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-ca-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-ca-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1ca.ent b/common/dbl1ca.ent
new file mode 100644 (file)
index 0000000..cbe3e89
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Resum">
+<!ENTITY abstract        "Resum">
+<!ENTITY Answer          "Resposta">
+<!ENTITY answer          "Resposta">
+<!ENTITY Appendix        "Ap\U-00E8;ndix">
+<!ENTITY appendix        "Ap\U-00E8;ndix">
+<!ENTITY Article         "Article">
+<!ENTITY article         "Article">
+<!ENTITY Bibliography    "Bibliografia">
+<!ENTITY bibliography    "Bibliografia">
+<!ENTITY Book            "Llibre">
+<!ENTITY book            "Llibre">
+<!ENTITY Caution         "Atenci\U-00F3;">
+<!ENTITY caution         "Atenci\U-00F3;">
+<!ENTITY CAUTION         "ATENCI\U-00D3;">
+<!ENTITY Chapter         "Cap\U-00ED;tol">
+<!ENTITY chapter         "Cap\U-00ED;tol">
+<!ENTITY Colophon        "Colof\U-00F3;">
+<!ENTITY colophon        "Colof\U-00F3;">
+<!ENTITY Copyright       "Dret de reproducci\U-00F3;">
+<!ENTITY copyright       "Dret de reproducci\U-00F3;">
+<!ENTITY Dedication      "Dedicat\U-00F2;ria">
+<!ENTITY dedication      "Dedicat\U-00F2;ria">
+<!ENTITY Edition         "Edici\U-00F3;">
+<!ENTITY edition         "Edici\U-00F3;">
+<!ENTITY Equation        "Equaci\U-00F3;">
+<!ENTITY equation        "Equaci\U-00F3;">
+<!ENTITY Example         "Exemple">
+<!ENTITY example         "Exemple">
+<!ENTITY Figure          "Figura">
+<!ENTITY figure          "Figura">
+<!ENTITY Glossary        "Glossari">
+<!ENTITY glossary        "Glossari">
+<!ENTITY GlossSee        "Veure">
+<!ENTITY glosssee        "Veure">
+<!ENTITY GlossSeeAlso    "Veure tamb\U-00E9;">
+<!ENTITY glossseealso    "Veure tamb\U-00E9;">
+<!ENTITY IMPORTANT       "IMPORTANT">
+<!ENTITY Important       "Important">
+<!ENTITY important       "Important">
+<!ENTITY Index           "\U-00CD;ndex alfab\U-00E8;tic">
+<!ENTITY index           "\U-00CD;ndex alfab\U-00E8;tic">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Av\U-00ED;s legal">
+<!ENTITY legalnotice     "Av\U-00ED;s legal">
+<!ENTITY MsgAud          "Audi\U-00E8;ncia">
+<!ENTITY msgaud          "Audi\U-00E8;ncia">
+<!ENTITY MsgLevel        "Nivell">
+<!ENTITY msglevel        "Nivell">
+<!ENTITY MsgOrig         "Origen">
+<!ENTITY msgorig         "Origen">
+<!ENTITY NOTE            "NOTA">
+<!ENTITY Note            "Nota">
+<!ENTITY note            "Nota">
+<!ENTITY Part            "Part">
+<!ENTITY part            "Part">
+<!ENTITY Preface         "Prefaci">
+<!ENTITY preface         "Prefaci">
+<!ENTITY Procedure       "Procediment">
+<!ENTITY procedure       "Procediment">
+<!ENTITY ProductionSet   "Producci\U-00F3;">
+<!ENTITY PubDate         "Data de publicaci\U-00F3;">
+<!ENTITY pubdate         "Data de publicaci\U-00F3;">
+<!ENTITY Published       "Publicat">
+<!ENTITY published       "Publicat">
+<!ENTITY Question        "Pregunta">
+<!ENTITY question        "Pregunta">
+<!ENTITY RefEntry        "Entrada de refer\U-00E8;ncia">
+<!ENTITY refentry        "Entrada de refer\U-00E8;ncia">
+<!ENTITY Reference       "Refer\U-00E8;ncia">
+<!ENTITY reference       "Refer\U-00E8;ncia">
+<!ENTITY RefName         "Nom">
+<!ENTITY refname         "Nom">
+<!ENTITY RefSection      "Secci\U-00F3; de refer\U-00E8;ncia">
+<!ENTITY refsection      "Secci\U-00F3; de refer\U-00E8;ncia">
+<!ENTITY RefSynopsisDiv  "Sinopsi">
+<!ENTITY refsynopsisdiv  "Sinopsi">
+<!ENTITY RevHistory      "Historial de revisions">
+<!ENTITY revhistory      "Historial de revisions">
+<!ENTITY Revision        "Revisi\U-00F3;">
+<!ENTITY revision        "Revisi\U-00F3;">
+<!ENTITY sect1           "Secci\U-00F3;">
+<!ENTITY sect2           "Secci\U-00F3;">
+<!ENTITY sect3           "Secci\U-00F3;">
+<!ENTITY sect4           "Secci\U-00F3;">
+<!ENTITY sect5           "Secci\U-00F3;">
+<!ENTITY Section         "Secci\U-00F3;">
+<!ENTITY section         "Secci\U-00F3;">
+<!ENTITY See             "Veure">
+<!ENTITY see             "Veure">
+<!ENTITY SeeAlso         "Veure Tamb\U-00E9;">
+<!ENTITY Seealso         "Veure tamb\U-00E9;">
+<!ENTITY seealso         "Veure tamb\U-00E9;">
+<!ENTITY Set             "Conjunt">
+<!ENTITY set             "Conjunt">
+<!ENTITY SetIndex        "\U-00CD;ndex del conjunt">
+<!ENTITY setindex        "\U-00CD;ndex del conjunt">
+<!ENTITY Sidebar         "Barra lateral">
+<!ENTITY sidebar         "Barra lateral">
+<!ENTITY step            "Pas">
+<!ENTITY Step            "Pas">
+<!ENTITY table           "Taula">
+<!ENTITY Table           "Taula">
+<!ENTITY TIP             "SUGGERIMENT">
+<!ENTITY Tip             "Suggeriment">
+<!ENTITY tip             "Suggeriment">
+<!ENTITY WARNING         "AV\U-00CD;S">
+<!ENTITY Warning         "Av\U-00ED;s">
+<!ENTITY warning         "Av\U-00ED;s">
+<!ENTITY and             "i">
+<!ENTITY by              "per">
+<!ENTITY Edited          "Editat">
+<!ENTITY edited          "Editat">
+<!ENTITY Editedby        "Editat per">
+<!ENTITY editedby        "Editat per">
+<!ENTITY in              "a">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "element inexistent">
+<!ENTITY notes           "notes">
+<!ENTITY Notes           "Notes">
+<!ENTITY Pgs             "P\U-00E0;gs.">
+<!ENTITY pgs             "P\U-00E0;gs.">
+<!ENTITY Revisedby       "Revisat per: ">
+<!ENTITY revisedby       "Revisat per: ">
+<!ENTITY TableNotes      "Notes de taula">
+<!ENTITY tablenotes      "Notes de taula">
+<!ENTITY TableofContents "Sumari">
+<!ENTITY tableofcontents "Sumari">
+<!ENTITY unexpectedelementname "nom d'element inesperat">
+<!ENTITY unsupported     "no reconeguda">
+<!ENTITY xrefto          "refer\U-00E8;ncia a">
+<!ENTITY listofequations "\U-00CD;ndex d'equacions">
+<!ENTITY ListofEquations "\U-00CD;ndex d'equacions">
+<!ENTITY ListofExamples  "\U-00CD;ndex d'exemples">
+<!ENTITY listofexamples  "\U-00CD;ndex d'exemples">
+<!ENTITY ListofFigures   "\U-00CD;ndex de figures">
+<!ENTITY listoffigures   "\U-00CD;ndex de figures">
+<!ENTITY listoftables    "\U-00CD;ndex de taules">
+<!ENTITY ListofTables    "\U-00CD;ndex de taules">
+<!ENTITY ListofUnknown   "\U-00CD;ndex de desconegut ?">
+<!ENTITY listofunknown   "\U-00CD;ndex de desconegut ?">
+<!ENTITY nav-home        "Inici">
+<!ENTITY nav-next        "Seg\U-00FC;ent">
+<!ENTITY nav-next-sibling "Avan\U-00E7;ar">
+<!ENTITY nav-prev        "Anterior">
+<!ENTITY nav-prev-sibling "Retrocedir">
+<!ENTITY nav-up          "Pujar">
+<!ENTITY Draft           "Esborrany">
+<!ENTITY above           "dalt">
+<!ENTITY below           "baix">
+<!ENTITY sectioncalled   "secci\U-00F3; anomenada">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz\U-00E0;\U-00E8;\U-00E9;\U-00ED;\U-00F2;\U-00F3;\U-00FA;\U-00F1;\U-00E7;">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ\U-00C0;\U-00C8;\U-00C9;\U-00CD;\U-00D2;\U-00D3;\U-00DA;\U-00D1;\U-00C7;">
diff --git a/common/dbl1cs.dsl b/common/dbl1cs.dsl
new file mode 100644 (file)
index 0000000..5d2a7c6
--- /dev/null
@@ -0,0 +1,443 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % cs.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//CS"
+         "dbl1cs.ent">
+%cs.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-cs">
+<style-specification-body>
+
+;; $Id: dbl1cs.dsl,v 1.3 2001/09/06 14:49:24 kosek Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributors:
+;; Ralf Schleitzer, ralf.schleitzer@ixos.de
+
+(define (cs-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (cs-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "%n"
+                                           "%n \U-2013; \U-201E;%t\U-201C;"))
+       (list (normalize "article")     (string-append %gentext-cs-start-quote%
+                                                      "%t"
+                                                      %gentext-cs-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "%n"
+                                           "%n \U-2013; \U-201E;%t\U-201C;"))
+       (list (normalize "equation")    "%n")
+       (list (normalize "example")     "%n")
+       (list (normalize "figure")      "%n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "%n \U-2013; \U-201E;%t\U-201C;")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "%n \U-2013; \U-201E;%t\U-201C;")
+       (list (normalize "reference")   "%t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "%n"
+                                           "\U-201E;%t\U-201C;"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "%n"
+                                           "\U-201E;%t\U-201C;"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "%n"
+                                           "\U-201E;%t\U-201C;"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "%n"
+                                           "\U-201E;%t\U-201C;"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "%n"
+                                           "\U-201E;%t\U-201C;"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "%n"
+                                           "\U-201E;%t\U-201C;"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "%n"
+                                           "\U-201E;%t\U-201C;"))
+       (list (normalize "sidebar")     "%t")
+       (list (normalize "step")        "%n")
+       (list (normalize "table")       "%n")))
+
+(define (gentext-cs-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (cs-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (cs-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-cs-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (cs-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-cs-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (cs-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-cs-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-cs-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-cs-intra-label-sep)
+  (list))
+
+(define (cs-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-cs-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-cs-intra-label-sep)))
+        (sep    (assoc name (cs-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-cs-label-title-sep)
+  (list))
+
+(define (cs-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-cs-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-cs-label-title-sep)))
+        (sep    (assoc name (cs-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (cs-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (cs-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (cs-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (cs-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-cs$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (cs-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+
+(define %gentext-cs-start-quote% "\U-201E;")
+
+(define %gentext-cs-end-quote% "\U-201C;")
+
+(define %gentext-cs-start-nested-quote% "\U-201A;")
+
+(define %gentext-cs-end-nested-quote% "\U-2018;")
+
+(define %gentext-cs-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-cs-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-cs-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-cs-page% "")
+
+(define %gentext-cs-and% "&and;")
+
+(define %gentext-cs-listcomma% "&listcomma;")
+
+(define %gentext-cs-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-cs-bibl-pages% "&Pgs;")
+
+(define %gentext-cs-endnotes% "&Notes;")
+
+(define %gentext-cs-table-endnotes% "&TableNotes;:")
+
+(define %gentext-cs-index-see% "&See;")
+
+(define %gentext-cs-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-cs-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-cs-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-cs-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-cs-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-cs-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-cs-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1cs.ent b/common/dbl1cs.ent
new file mode 100644 (file)
index 0000000..39d3493
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Abstrakt">
+<!ENTITY abstract        "Abstrakt">
+<!ENTITY Answer          "Odpov\U-011B;\U-010F;:">
+<!ENTITY answer          "Odpov\U-011B;\U-010F;:">
+<!ENTITY Appendix        "P\U-0159;\U-00ED;loha">
+<!ENTITY appendix        "P\U-0159;\U-00ED;loha">
+<!ENTITY Article         "\U-010C;l\U-00E1;nek">
+<!ENTITY article         "\U-010C;l\U-00E1;nek">
+<!ENTITY Bibliography    "Bibliografie">
+<!ENTITY bibliography    "Bibliografie">
+<!ENTITY Book            "Kniha">
+<!ENTITY book            "Kniha">
+<!ENTITY CAUTION         "V\U-00FD;straha">
+<!ENTITY Caution         "V\U-00FD;straha">
+<!ENTITY caution         "V\U-00FD;straha">
+<!ENTITY Chapter         "Kapitola">
+<!ENTITY chapter         "Kapitola">
+<!ENTITY Colophon        "Tir\U-00E1;\U-017E;">
+<!ENTITY colophon        "Tir\U-00E1;\U-017E;">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "V\U-011B;nov\U-00E1;n\U-00ED;">
+<!ENTITY dedication      "V\U-011B;nov\U-00E1;n\U-00ED;">
+<!ENTITY Edition         "Vyd\U-00E1;n\U-00ED;">
+<!ENTITY edition         "Vyd\U-00E1;n\U-00ED;">
+<!ENTITY Equation        "Rovnice">
+<!ENTITY equation        "Rovnice">
+<!ENTITY Example         "P\U-0159;\U-00ED;klad">
+<!ENTITY example         "P\U-0159;\U-00ED;klad">
+<!ENTITY Figure          "Obr\U-00E1;zek">
+<!ENTITY figure          "Obr\U-00E1;zek">
+<!ENTITY Glossary        "Slovn\U-00ED;k">
+<!ENTITY glossary        "Slovn\U-00ED;k">
+<!ENTITY GlossSee        "Viz">
+<!ENTITY glosssee        "Viz">
+<!ENTITY GlossSeeAlso    "Viz t\U-00E9;\U-017E;">
+<!ENTITY glossseealso    "Viz t\U-00E9;\U-017E;">
+<!ENTITY IMPORTANT       "D\U-016F;le\U-017E;it\U-00E9;">
+<!ENTITY Important       "D\U-016F;le\U-017E;it\U-00E9;">
+<!ENTITY important       "D\U-016F;le\U-017E;it\U-00E9;">
+<!ENTITY Index           "Rejst\U-0159;\U-00ED;k">
+<!ENTITY index           "Rejst\U-0159;\U-00ED;k">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Pr\U-00E1;vn\U-00ED; dolo\U-017E;ka">
+<!ENTITY legalnotice     "Pr\U-00E1;vn\U-00ED; dolo\U-017E;ka">
+<!ENTITY MsgAud          "Publikum">
+<!ENTITY msgaud          "Publikum">
+<!ENTITY MsgLevel        "\U-00DA;rove\U-0148;">
+<!ENTITY msglevel        "\U-00DA;rove\U-0148;">
+<!ENTITY MsgOrig         "P\U-016F;vod">
+<!ENTITY msgorig         "P\U-016F;vod">
+<!ENTITY NOTE            "Pozn\U-00E1;mka">
+<!ENTITY Note            "Pozn\U-00E1;mka">
+<!ENTITY note            "Pozn\U-00E1;mka">
+<!ENTITY Part            "\U-010C;\U-00E1;st">
+<!ENTITY part            "\U-010C;\U-00E1;st">
+<!ENTITY Preface         "P\U-0159;edmluva">
+<!ENTITY preface         "P\U-0159;edmluva">
+<!ENTITY Procedure       "Postup">
+<!ENTITY procedure       "Postup">
+<!ENTITY ProductionSet   "Produkce">
+<!ENTITY Published       "Vyd\U-00E1;no">
+<!ENTITY published       "Vyd\U-00E1;no">
+<!ENTITY Question        "Ot\U-00E1;zka:">
+<!ENTITY question        "Ot\U-00E1;zka:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Odkaz">
+<!ENTITY reference       "Odkaz">
+<!ENTITY RefName         "Jm\U-00E9;no">
+<!ENTITY refname         "Jm\U-00E9;no">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "P\U-0159;ehled">
+<!ENTITY refsynopsisdiv  "P\U-0159;ehled">
+<!ENTITY RevHistory      "P\U-0159;ehled reviz\U-00ED;">
+<!ENTITY revhistory      "P\U-0159;ehled reviz\U-00ED;">
+<!ENTITY Revision        "Revize">
+<!ENTITY revision        "Revize">
+<!ENTITY sect1           "Odd\U-00ED;l">
+<!ENTITY sect2           "Odd\U-00ED;l">
+<!ENTITY sect3           "Odd\U-00ED;l">
+<!ENTITY sect4           "Odd\U-00ED;l">
+<!ENTITY sect5           "Odd\U-00ED;l">
+<!ENTITY Section         "Odd\U-00ED;l">
+<!ENTITY section         "Odd\U-00ED;l">
+<!ENTITY See             "Viz">
+<!ENTITY see             "Viz">
+<!ENTITY SeeAlso         "Viz t\U-00E9;\U-017E;">
+<!ENTITY Seealso         "Viz t\U-00E9;\U-017E;">
+<!ENTITY seealso         "Viz t\U-00E9;\U-017E;">
+<!ENTITY Set             "Sada">
+<!ENTITY set             "Sada">
+<!ENTITY SetIndex        "Rejst\U-0159;\U-00ED;k sady">
+<!ENTITY setindex        "Rejst\U-0159;\U-00ED;k sady">
+<!ENTITY Sidebar         "Margin\U-00E1;lie">
+<!ENTITY sidebar         "Margin\U-00E1;lie">
+<!ENTITY Step            "Krok">
+<!ENTITY step            "krok">
+<!ENTITY Table           "Tabulka">
+<!ENTITY table           "Tabulka">
+<!ENTITY TIP             "Tip">
+<!ENTITY Tip             "Tip">
+<!ENTITY tip             "Tip">
+<!ENTITY WARNING         "Varov\U-00E1;n\U-00ED;">
+<!ENTITY Warning         "Varov\U-00E1;n\U-00ED;">
+<!ENTITY warning         "Varov\U-00E1;n\U-00ED;">
+<!ENTITY and             "a">
+<!ENTITY by              "">
+<!ENTITY Edited          "Vyd\U-00E1;no">
+<!ENTITY edited          "Vyd\U-00E1;no">
+<!ENTITY Editedby        "Sestavil">
+<!ENTITY editedby        "Sestavil">
+<!ENTITY in              "v">
+<!ENTITY lastlistcomma   "">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "neexistuj\U-00ED;c\U-00ED; prvek">
+<!ENTITY notes           "Pozn\U-00E1;mky">
+<!ENTITY Notes           "Pozn\U-00E1;mky">
+<!ENTITY Pgs             "Str.">
+<!ENTITY pgs             "Str.">
+<!ENTITY Revisedby       "Revidoval: ">
+<!ENTITY revisedby       "Revidoval: ">
+<!ENTITY TableNotes      "Pozn\U-00E1;mky">
+<!ENTITY tablenotes      "Pozn\U-00E1;mky">
+<!ENTITY TableofContents "Obsah">
+<!ENTITY tableofcontents "Obsah">
+<!ENTITY unexpectedelementname "Neo\U-010D;ek\U-00E1;van\U-00E9; jm\U-00E9;no prvku">
+<!ENTITY unsupported     "nepodporovan\U-00FD;">
+<!ENTITY xrefto          "xref k">
+<!ENTITY listofequations "Seznam rovnic">
+<!ENTITY ListofEquations "Seznam rovnic">
+<!ENTITY ListofExamples  "Seznam p\U-0159;\U-00ED;klad\U-016F;">
+<!ENTITY listofexamples  "Seznam p\U-0159;\U-00ED;klad\U-016F;">
+<!ENTITY ListofFigures   "Seznam obr\U-00E1;zk\U-016F;">
+<!ENTITY listoffigures   "Seznam obr\U-00E1;zk\U-016F;">
+<!ENTITY listoftables    "Seznam tabulek">
+<!ENTITY ListofTables    "Seznam tabulek">
+<!ENTITY ListofUnknown   "Seznam nezn\U-00E1;m\U-00E9;ho">
+<!ENTITY listofunknown   "Seznam nezn\U-00E1;m\U-00E9;ho">
+<!ENTITY nav-home        "Dom\U-016F;">
+<!ENTITY nav-next        "Dal\U-0161;\U-00ED;">
+<!ENTITY nav-next-sibling "Rychle dop\U-0159;edu">
+<!ENTITY nav-prev        "P\U-0159;edch\U-00E1;zej\U-00ED;c\U-00ED;">
+<!ENTITY nav-prev-sibling "Rychle zp\U-011B;t">
+<!ENTITY nav-up          "Nahoru">
+<!ENTITY sectioncalled   "odd\U-00ED;l nazvan\U-00FD;">
+<!ENTITY Draft           "N\U-00E1;vrh">
+<!ENTITY above           "nad">
+<!ENTITY below           "pod">
+<!ENTITY lowercase.alpha "a\U-00E1;bc\U-010D;d\U-010F;e\U-00E9;\U-011B;fghi\U-00ED;jklmno\U-00F3;pqr\U-0159;s\U-0161;t\U-0165;u\U-00FA;\U-016F;vwxy\U-00FD;z\U-017E;">
+<!ENTITY uppercase.alpha "A\U-00C1;BC\U-010C;D\U-010E;E\U-00C9;\U-011A;FGHI\U-00CD;JKLMNO\U-00D3;PQR\U-0158;S\U-0160;T\U-0164;U\U-00DA;\U-016E;VWXY\U-00DD;Z\U-017D;">
diff --git a/common/dbl1da.dsl b/common/dbl1da.dsl
new file mode 100644 (file)
index 0000000..79d4823
--- /dev/null
@@ -0,0 +1,432 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % da.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//DA"
+         "dbl1da.ent">
+%da.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-da">
+<style-specification-body>
+
+;; $Id: dbl1da.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributors:
+;; Finn Bock, fbo@dde.dk
+
+(define (da-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (da-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&appendix; med navn %t"))
+       (list (normalize "article")     (string-append %gentext-da-start-quote%
+                                                      "%t"
+                                                      %gentext-da-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "kapitlet om %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "sektionen med navn %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "sektionen med navn %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "undersektionen med navn %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "undersektionen med navn %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "undersektionen med navn %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "undersektionen med navn %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "undersektionen med navn %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-da-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (da-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (da-auto-xref-indirect-connector before) 
+  (literal " i "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-da-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (da-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-da-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (da-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-da-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-da-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-da-intra-label-sep)
+  (list))
+
+(define (da-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-da-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-da-intra-label-sep)))
+        (sep    (assoc name (da-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-da-label-title-sep)
+  (list))
+
+(define (da-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-da-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-da-label-title-sep)))
+        (sep    (assoc name (da-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (da-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (da-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (da-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (da-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-da$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (da-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-da-start-quote% (dingbat "ldquo"))
+
+(define %gentext-da-end-quote% (dingbat "rdquo"))
+
+(define %gentext-da-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-da-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-da-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-da-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-da-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-da-page% "")
+
+(define %gentext-da-and% "&and;")
+
+(define %gentext-da-listcomma% "&listcomma;")
+
+(define %gentext-da-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-da-bibl-pages% "&Pgs;")
+
+(define %gentext-da-endnotes% "&Notes;")
+
+(define %gentext-da-table-endnotes% "&TableNotes;:")
+
+(define %gentext-da-index-see% "&See;")
+
+(define %gentext-da-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-da-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-da-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-da-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-da-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-da-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-da-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1da.ent b/common/dbl1da.ent
new file mode 100644 (file)
index 0000000..0ac6132
--- /dev/null
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Resum\U-00E9;">
+<!ENTITY abstract        "resum\U-00E9;">
+<!ENTITY Answer          "Svar">
+<!ENTITY answer          "svar">
+<!ENTITY Appendix        "Appendiks">
+<!ENTITY appendix        "appendiks">
+<!ENTITY Article         "Artikel">
+<!ENTITY article         "artikel">
+<!ENTITY Bibliography    "Litteraturliste">
+<!ENTITY bibliography    "litteraturliste">
+<!ENTITY Book            "Bog">
+<!ENTITY book            "bog">
+<!ENTITY CAUTION         "PAS P\U-00C5;">
+<!ENTITY Caution         "Pas p\U-00E5;">
+<!ENTITY caution         "pas p\U-00E5;">
+<!ENTITY Chapter         "Kapitel">
+<!ENTITY chapter         "kapitel">
+<!ENTITY Colophon        "Kolofon">
+<!ENTITY colophon        "kolofon">
+<!ENTITY Copyright       "Ophavsret">
+<!ENTITY copyright       "ophavsret">
+<!ENTITY Dedication      "Tilegnet">
+<!ENTITY dedication      "tilegnet">
+<!ENTITY Edition         "Udgave">
+<!ENTITY edition         "udgave">
+<!ENTITY Equation        "Ligning">
+<!ENTITY equation        "ligning">
+<!ENTITY Example         "Eksempel">
+<!ENTITY example         "eksempel">
+<!ENTITY Figure          "Figur">
+<!ENTITY figure          "figur">
+<!ENTITY Glossary        "Ordliste">
+<!ENTITY glossary        "ordliste">
+<!ENTITY GlossSee        "Se">
+<!ENTITY glosssee        "se">
+<!ENTITY GlossSeeAlso    "Se ogs\U-00E5;">
+<!ENTITY glossseealso    "se ogs\U-00E5;">
+<!ENTITY IMPORTANT       "VIGTIGT">
+<!ENTITY Important       "Vigtigt">
+<!ENTITY important       "vigtigt">
+<!ENTITY Index           "Stikordsregister">
+<!ENTITY index           "stikordsregister">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Retslig note">
+<!ENTITY legalnotice     "retslig note">
+<!ENTITY MsgAud          "M\U-00E5;lgruppe">
+<!ENTITY msgaud          "m\U-00E5;lgruppe">
+<!ENTITY MsgLevel        "Niveau">
+<!ENTITY msglevel        "niveau">
+<!ENTITY MsgOrig         "Grundlag">
+<!ENTITY msgorig         "grundlag">
+<!ENTITY NOTE            "BEM\U-00C6;RK">
+<!ENTITY Note            "Bem\U-00E6;rk">
+<!ENTITY note            "bem\U-00E6;rk">
+<!ENTITY Part            "Del">
+<!ENTITY part            "del">
+<!ENTITY Preface         "Forord">
+<!ENTITY preface         "forord">
+<!ENTITY Procedure       "Procedure">
+<!ENTITY procedure       "procedure">
+<!ENTITY ProductionSet   "Produktion">
+<!ENTITY Published       "Udgivet">
+<!ENTITY published       "udgivet">
+<!ENTITY Question        "Sp\U-00F8;rgsm\U-00E5;l">
+<!ENTITY question        "sp\U-00F8;rgsm\U-00E5;l">
+<!ENTITY RefEntry        "Punkt">
+<!ENTITY refentry        "punkt">
+<!ENTITY Reference       "Henvisning">
+<!ENTITY reference       "henvisning">
+<!ENTITY RefName         "Navn">
+<!ENTITY refname         "navn">
+<!ENTITY RefSection      "Afsnit">
+<!ENTITY refsection      "afsnit">
+<!ENTITY RefSynopsisDiv  "Synopsis">
+<!ENTITY refsynopsisdiv  "synopsis">
+<!ENTITY RevHistory      "Revisionshistorie">
+<!ENTITY revhistory      "revisionshistorie">
+<!ENTITY revision        "revision">
+<!ENTITY Revision        "Revision">
+<!ENTITY sect1           "Afsnit">
+<!ENTITY sect2           "Afsnit">
+<!ENTITY sect3           "Afsnit">
+<!ENTITY sect4           "Afsnit">
+<!ENTITY sect5           "Afsnit">
+<!ENTITY section         "afsnit">
+<!ENTITY Section         "Afsnit">
+<!ENTITY See             "Se">
+<!ENTITY see             "se">
+<!ENTITY SeeAlso         "Se ogs\U-00E5;">
+<!ENTITY seealso         "se ogs\U-00E5;">
+<!ENTITY Seealso         "Se ogs\U-00E5;">
+<!ENTITY set             "s\U-00E6;t">
+<!ENTITY Set             "S\U-00E6;t">
+<!ENTITY setindex        "s\U-00E6;t indeks">
+<!ENTITY SetIndex        "S\U-00E6;t indeks">
+<!ENTITY Sidebar         "Sidebj\U-00E6;lke">
+<!ENTITY sidebar         "sidebj\U-00E6;lke">
+<!ENTITY step            "trin">
+<!ENTITY Step            "Trin">
+<!ENTITY Table           "Tabel">
+<!ENTITY table           "tabel">
+<!ENTITY tip             "vink">
+<!ENTITY TIP             "VINK">
+<!ENTITY Tip             "Vink">
+<!ENTITY Warning         "Advarsel">
+<!ENTITY warning         "advarsel">
+<!ENTITY WARNING         "ADVARSEL">
+<!ENTITY and             "og">
+<!ENTITY by              "af">
+<!ENTITY Edited          "Redigeret">
+<!ENTITY edited          "redigeret">
+<!ENTITY Editedby        "Redigeret af">
+<!ENTITY editedby        "redigeret af">
+<!ENTITY in              "i">
+<!ENTITY lastlistcomma   "">
+<!ENTITY listcomma       ", ">
+<!ENTITY nonexistantelement "ikke-eksisterende element">
+<!ENTITY notes           "slutbem\U-00E6;rkning:">
+<!ENTITY Notes           "Slutbem\U-00E6;rkning:">
+<!ENTITY Pgs             "Siderne">
+<!ENTITY pgs             "siderne">
+<!ENTITY Revisedby       "Revideret af: ">
+<!ENTITY revisedby       "revideret af: ">
+<!ENTITY TableNotes      "Noter:">
+<!ENTITY tablenotes      "noter:">
+<!ENTITY TableofContents "Indholdsfortegnelse">
+<!ENTITY tableofcontents "indholdsfortegnelse">
+<!ENTITY unexpectedelementname "uventet elementnavn">
+<!ENTITY unsupported     "ikke underst\U-00F8;ttet">
+<!ENTITY xrefto          "krydshenvisning til">
+<!ENTITY listofequations "ligningsliste">
+<!ENTITY ListofEquations "Ligningsliste">
+<!ENTITY ListofExamples  "Eksempelliste">
+<!ENTITY listofexamples  "eksempelliste">
+<!ENTITY ListofFigures   "Figurliste">
+<!ENTITY listoffigures   "figurliste">
+<!ENTITY listoftables    "tabelliste">
+<!ENTITY ListofTables    "Tabelliste">
+<!ENTITY ListofUnknown   "Liste over ukendte">
+<!ENTITY listofunknown   "liste over ukendte">
+<!ENTITY nav-home        "hjem">
+<!ENTITY nav-next        "n\U-00E6;ste">
+<!ENTITY nav-next-sibling "hurtigt fremad">
+<!ENTITY nav-prev        "forrige">
+<!ENTITY nav-prev-sibling "hurtigt tilbage">
+<!ENTITY nav-up          "op">
+<!ENTITY Draft           "Kladde">
+<!ENTITY above           "over">
+<!ENTITY below           "under">
+<!ENTITY sectioncalled   "afsnittet der hedder">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz\U-00E6;\U-00F8;\U-00E5;">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ\U-00C6;\U-00D8;\U-00C5;">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "2">
+<!ENTITY hyphenation-remain-character-count "2">
diff --git a/common/dbl1de.dsl b/common/dbl1de.dsl
new file mode 100644 (file)
index 0000000..6b323be
--- /dev/null
@@ -0,0 +1,445 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % de.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//DE"
+         "dbl1de.ent">
+%de.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-de">
+<style-specification-body>
+
+;; $Id: dbl1de.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributors:
+;; Rainer Feuerstein, fire@informatik.uni-wuerzburg.de,
+;; Christian Leutloff, leutloff@sundancer.oche.de
+;; Ulrich Windl, Ulrich.Windl@rz.uni-regensburg.de
+;; Christian Kirsch, ck@held.mind.de
+;; Joerg Wittenberger, Joerg.Wittenberger@pobox.com
+
+(define (de-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (de-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&Appendix; namens %t"))
+       (list (normalize "article")     (string-append %gentext-de-start-quote%
+                                                      "%t"
+                                                      %gentext-de-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "&Chapter; namens %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; namens %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; namens %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; namens %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; namens %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; namens %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; namens %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; namens %t"))
+       (list (normalize "sidebar")     "&Sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-de-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (de-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (de-auto-xref-indirect-connector before) 
+  ;; In German one usually says "... in dem Buch ..." (probably because
+  ;; it's a larger piece of work and more commonly known)
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; dem "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-de-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+(define (de-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-de-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (de-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-de-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-de-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-de-intra-label-sep)
+  (list))
+
+(define (de-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-de-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-de-intra-label-sep)))
+        (sep    (assoc name (de-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-de-label-title-sep)
+  (list))
+
+(define (de-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-de-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-de-label-title-sep)))
+        (sep    (assoc name (de-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (de-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (de-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (de-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (de-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-de$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (de-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-de-start-quote% "\U-201E;")
+
+(define %gentext-de-end-quote% "\U-201C;")
+
+(define %gentext-de-start-nested-quote% "\U-201A;")
+
+(define %gentext-de-end-nested-quote% "\U-2018;")
+
+(define %gentext-de-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-de-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-de-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-de-page% "")
+
+(define %gentext-de-and% "&and;")
+
+(define %gentext-de-listcomma% "&listcomma;")
+
+(define %gentext-de-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-de-bibl-pages% "&Pgs;")
+
+(define %gentext-de-endnotes% "&Notes;")
+
+(define %gentext-de-table-endnotes% "&TableNotes;:")
+
+(define %gentext-de-index-see% "&See;")
+
+(define %gentext-de-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-de-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-de-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-de-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-de-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-de-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-de-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1de.ent b/common/dbl1de.ent
new file mode 100644 (file)
index 0000000..0b6e053
--- /dev/null
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Zusammenfassung">
+<!ENTITY abstract        "Zusammenfassung">
+<!ENTITY Answer          "A:">
+<!ENTITY answer          "A:">
+<!ENTITY Appendix        "Anhang">
+<!ENTITY appendix        "Anhang">
+<!ENTITY Article         "Artikel">
+<!ENTITY article         "Artikel">
+<!ENTITY Bibliography    "Literaturverzeichnis">
+<!ENTITY bibliography    "Literaturverzeichnis">
+<!ENTITY Book            "Buch">
+<!ENTITY book            "Buch">
+<!ENTITY Caution         "Achtung">
+<!ENTITY caution         "Achtung">
+<!ENTITY CAUTION         "ACHTUNG">
+<!ENTITY Chapter         "Kapitel">
+<!ENTITY chapter         "Kapitel">
+<!ENTITY Colophon        "Kolophon">
+<!ENTITY colophon        "Kolophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Widmung">
+<!ENTITY dedication      "Widmung">
+<!ENTITY Edition         "Ausgabe">
+<!ENTITY edition         "Ausgabe">
+<!ENTITY Equation        "Gleichung">
+<!ENTITY equation        "Gleichung">
+<!ENTITY Example         "Beispiel">
+<!ENTITY example         "Beispiel">
+<!ENTITY Figure          "Abbildung">
+<!ENTITY figure          "Abbildung">
+<!ENTITY Glossary        "Glossar">
+<!ENTITY glossary        "Glossar">
+<!ENTITY GlossSee        "Siehe">
+<!ENTITY glosssee        "Siehe">
+<!ENTITY GlossSeeAlso    "Siehe auch">
+<!ENTITY glossseealso    "Siehe auch">
+<!ENTITY IMPORTANT       "WICHTIG">
+<!ENTITY Important       "Wichtig">
+<!ENTITY important       "Wichtig">
+<!ENTITY Index           "Stichwortverzeichnis">
+<!ENTITY index           "Stichwortverzeichnis">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Rechtlicher Hinweis">
+<!ENTITY legalnotice     "Rechtlicher Hinweis">
+<!ENTITY MsgAud          "Zielgruppe">
+<!ENTITY msgaud          "Zielgruppe">
+<!ENTITY MsgLevel        "Dringlichkeit">
+<!ENTITY msglevel        "Dringlichkeit">
+<!ENTITY MsgOrig         "Ursprung">
+<!ENTITY msgorig         "Ursprung">
+<!ENTITY note            "Anmerkung">
+<!ENTITY NOTE            "ANMERKUNG">
+<!ENTITY Note            "Anmerkung">
+<!ENTITY part            "Teil">
+<!ENTITY Part            "Teil">
+<!ENTITY Preface         "Vorwort">
+<!ENTITY preface         "Vorwort">
+<!ENTITY Procedure       "Prozedur">
+<!ENTITY procedure       "Prozedur">
+<!ENTITY ProductionSet   "Produktion">
+<!ENTITY PubDate         "Ver\U-00F6;ffentlicht">
+<!ENTITY pubdate         "Ver\U-00F6;ffentlicht">
+<!ENTITY Published       "Ver\U-00F6;ffentlicht">
+<!ENTITY published       "Ver\U-00F6;ffentlicht">
+<!ENTITY Qandadiv        "F &amp; A">
+<!ENTITY qandadiv        "F &amp; A">
+<!ENTITY Question        "F:">
+<!ENTITY question        "F:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Verweis">
+<!ENTITY reference       "Verweis">
+<!ENTITY refname         "Name">
+<!ENTITY RefName         "Name">
+<!ENTITY RefSection      "Abschnitt">
+<!ENTITY refsection      "Abschnitt">
+<!ENTITY RefSynopsisDiv  "Synopsis">
+<!ENTITY refsynopsisdiv  "Synopsis">
+<!ENTITY RevHistory      "Versionsgeschichte">
+<!ENTITY revhistory      "Versionsgeschichte">
+<!ENTITY Revision        "Version">
+<!ENTITY revision        "Version">
+<!ENTITY Section         "Abschnitt">
+<!ENTITY section         "Abschnitt">
+<!ENTITY sect1           "Abschnitt">
+<!ENTITY sect2           "Abschnitt">
+<!ENTITY sect3           "Abschnitt">
+<!ENTITY sect4           "Abschnitt">
+<!ENTITY sect5           "Abschnitt">
+<!ENTITY see             "Siehe">
+<!ENTITY See             "Siehe">
+<!ENTITY SeeAlso         "Siehe auch">
+<!ENTITY seealso         "Siehe auch">
+<!ENTITY Seealso         "Siehe auch">
+<!ENTITY Set             "Satz">
+<!ENTITY set             "Satz">
+<!ENTITY setindex        "Stichwortverzeichnis">
+<!ENTITY SetIndex        "Stichwortverzeichnis">
+<!ENTITY sidebar         "randnotiz">
+<!ENTITY Sidebar         "Randnotiz">
+<!ENTITY Step            "Schritt">
+<!ENTITY step            "Schritt">
+<!ENTITY table           "Tabelle">
+<!ENTITY Table           "Tabelle">
+<!ENTITY TIP             "TIPP">
+<!ENTITY Tip             "Tipp">
+<!ENTITY tip             "Tipp">
+<!ENTITY Warning         "Warnung">
+<!ENTITY warning         "Warnung">
+<!ENTITY WARNING         "WARNUNG">
+<!ENTITY and             "und">
+<!ENTITY by              "von">
+<!ENTITY Edited          "Herausgegeben">
+<!ENTITY edited          "Herausgegeben">
+<!ENTITY Editedby        "Herausgegeben von">
+<!ENTITY editedby        "Herausgegeben von">
+<!ENTITY in              "in">
+<!ENTITY lastlistcomma   "">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "nicht existierendes Element">
+<!ENTITY notes           "Fu\U-00DF;noten">
+<!ENTITY Notes           "Fu\U-00DF;noten">
+<!ENTITY Pgs             "Seiten">
+<!ENTITY pgs             "Seiten">
+<!ENTITY Revisedby       "Ge\U-00E4;ndert durch: ">
+<!ENTITY revisedby       "Ge\U-00E4;ndert durch: ">
+<!ENTITY TableNotes      "Bemerkungen">
+<!ENTITY tablenotes      "Bemerkungen">
+<!ENTITY TableofContents "Inhaltsverzeichnis">
+<!ENTITY tableofcontents "Inhaltsverzeichnis">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "Unerwarteter Elementname">
+<!ENTITY unsupported     "wird nicht unterst\U-00FC;tzt">
+<!ENTITY xrefto          "xref auf">
+<!ENTITY listofequations "Gleichungen">
+<!ENTITY ListofEquations "Gleichungen">
+<!ENTITY ListofExamples  "Beispiele">
+<!ENTITY listofexamples  "Beispiele">
+<!ENTITY ListofFigures   "Abbildungsverzeichnis">
+<!ENTITY listoffigures   "Abbildungsverzeichnis">
+<!ENTITY listoftables    "Tabellenverzeichnis">
+<!ENTITY ListofTables    "Tabellenverzeichnis">
+<!ENTITY ListofUnknown   "???-Verzeichnis">
+<!ENTITY listofunknown   "???-Verzeichnis">
+<!ENTITY nav-home        "Zum Anfang">
+<!ENTITY nav-next        "Weiter">
+<!ENTITY nav-next-sibling "Schnell weiter">
+<!ENTITY nav-prev        "Zur\U-00FC;ck">
+<!ENTITY nav-prev-sibling "Schnell zur\U-00FC;ck">
+<!ENTITY nav-up          "Nach oben">
+<!ENTITY nav-toc         "InhV">
+<!ENTITY sectioncalled   "der Abschnitt namens">
+<!ENTITY Draft           "Entwurf">
+<!ENTITY above           "oben">
+<!ENTITY below           "unten">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz\U-00E4;\U-00F6;\U-00FC;\U-00DF;">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ\U-00C4;\U-00D6;\U-00DC;\U-00DF;">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "2">
+<!ENTITY hyphenation-remain-character-count "3">
diff --git a/common/dbl1el.dsl b/common/dbl1el.dsl
new file mode 100644 (file)
index 0000000..1570238
--- /dev/null
@@ -0,0 +1,445 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % el.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//EL"
+         "dbl1el.ent">
+%el.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-el">
+<style-specification-body>
+
+;; $Id: dbl1el.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (el-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (el-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&#244;&#239; &appendix; &#236;&#229; &#252;&#237;&#239;&#236;&#225; %t"))
+       (list (normalize "article")     (string-append %gentext-el-start-quote%
+                                                      "%t"
+                                                      %gentext-el-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "&#244;&#239; &chapter; &#236;&#229; &#252;&#237;&#239;&#236;&#225; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&#244;&#239; &section; &#236;&#229; &#252;&#237;&#239;&#236;&#225; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&#244;&#239; &section; &#236;&#229; &#252;&#237;&#239;&#236;&#225; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&#244;&#239; &section; &#236;&#229; &#252;&#237;&#239;&#236;&#225; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&#244;&#239; &section; &#236;&#229; &#252;&#237;&#239;&#236;&#225; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&#244;&#239; &section; &#236;&#229; &#252;&#237;&#239;&#236;&#225; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&#244;&#239; &section; &#236;&#229; &#252;&#237;&#239;&#236;&#225; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&#244;&#239; &section; &#236;&#229; &#252;&#237;&#239;&#236;&#225; %t"))
+       (list (normalize "sidebar")     "&#244;&#239; &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+
+(define (gentext-el-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (el-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (el-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-el-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+(define (el-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-el-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (el-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-el-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-el-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-el-intra-label-sep)
+  (list))
+
+(define (el-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-el-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-el-intra-label-sep)))
+        (sep    (assoc name (el-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-el-label-title-sep)
+  (list))
+
+(define (el-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-el-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-el-label-title-sep)))
+        (sep    (assoc name (el-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (el-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (el-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (el-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (el-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-el$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (el-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-el-start-quote% (dingbat "ldquo"))
+
+(define %gentext-el-end-quote% (dingbat "rdquo"))
+
+(define %gentext-el-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-el-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-el-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-el-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-el-revised-by% "&Editedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-el-page% "")
+
+(define %gentext-el-and% "&and;")
+
+(define %gentext-el-listcomma% "&listcomma;")
+
+(define %gentext-el-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-el-bibl-pages% "&Pgs;")
+
+(define %gentext-el-endnotes% "&Notes;")
+
+(define %gentext-el-table-endnotes% "&TableNotes;:")
+
+(define %gentext-el-index-see% "&See;")
+
+(define %gentext-el-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-el-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-el-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-el-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-el-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-el-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-el-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1el.ent b/common/dbl1el.ent
new file mode 100644 (file)
index 0000000..c15e62f
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-00D0;\U-00E5;\U-00F1;\U-00DF;\U-00EB;\U-00E7;\U-00F8;\U-00E7;">
+<!ENTITY Answer          "\U-00C1;:">
+<!ENTITY Appendix        "\U-00D0;\U-00E1;\U-00F1;\U-00DC;\U-00F1;\U-00F4;\U-00E7;\U-00EC;\U-00E1;">
+<!ENTITY Article         "\U-00B6;\U-00F1;\U-00E8;\U-00F1;\U-00EF;">
+<!ENTITY Bibliography    "\U-00C2;\U-00E9;\U-00E2;\U-00EB;\U-00E9;\U-00EF;\U-00E3;\U-00F1;\U-00E1;\U-00F6;\U-00DF;\U-00E1;">
+<!ENTITY Book            "\U-00C2;\U-00E9;\U-00E2;\U-00EB;\U-00DF;\U-00EF;">
+<!ENTITY CAUTION         "\U-00D0;\U-00D1;\U-00CF;\U-00D3;\U-00CF;\U-00D7;\U-00C7;">
+<!ENTITY Caution         "\U-00D0;\U-00F1;\U-00EF;\U-00F3;\U-00EF;\U-00F7;\U-00DE;">
+<!ENTITY Chapter         "\U-00CA;\U-00E5;\U-00F6;\U-00DC;\U-00EB;\U-00E1;\U-00E9;\U-00EF;">
+<!ENTITY Colophon        "\U-00CA;\U-00EF;\U-00F1;\U-00F9;\U-00ED;\U-00DF;\U-00E4;\U-00E1;">
+<!ENTITY Copyright       "\U-00D0;\U-00ED;\U-00E5;\U-00F5;\U-00EC;\U-00E1;\U-00F4;\U-00E9;\U-00EA;\U-00DC; \U-00C4;\U-00E9;\U-00EA;\U-00E1;\U-00E9;\U-00FE;\U-00EC;\U-00E1;\U-00F4;\U-00E1;">
+<!ENTITY Dedication      "\U-00C1;\U-00F6;\U-00E9;\U-00DD;\U-00F1;\U-00F9;\U-00F3;\U-00E7;">
+<!ENTITY Edition         "\U-00B8;\U-00EA;\U-00E4;\U-00EF;\U-00F3;\U-00E7;">
+<!ENTITY Equation        "\U-00C5;\U-00EE;\U-00DF;\U-00F3;\U-00F9;\U-00F3;\U-00E7;">
+<!ENTITY Example         "\U-00D0;\U-00E1;\U-00F1;\U-00DC;\U-00E4;\U-00E5;\U-00E9;\U-00E3;\U-00EC;\U-00E1;">
+<!ENTITY Figure          "\U-00D3;\U-00F7;\U-00DE;\U-00EC;\U-00E1;">
+<!ENTITY GlossSee        "\U-00C4;\U-00E5;\U-00DF;\U-00F4;\U-00E5;">
+<!ENTITY GlossSeeAlso    "\U-00C4;\U-00E5;\U-00DF;\U-00F4;\U-00E5; \U-00C5;\U-00F0;\U-00DF;\U-00F3;\U-00E7;\U-00F2;">
+<!ENTITY Glossary        "\U-00C3;\U-00EB;\U-00F9;\U-00F3;\U-00F3;\U-00DC;\U-00F1;\U-00E9;\U-00EF;">
+<!ENTITY IMPORTANT       "\U-00D3;\U-00C7;\U-00CC;\U-00C1;\U-00CD;\U-00D4;\U-00C9;\U-00CA;\U-00CF;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY Important       "\U-00D3;\U-00E7;\U-00EC;\U-00E1;\U-00ED;\U-00F4;\U-00E9;\U-00EA;\U-00FC;">
+<!ENTITY Index           "\U-00C5;\U-00F5;\U-00F1;\U-00E5;\U-00F4;\U-00DE;\U-00F1;\U-00E9;\U-00EF;">
+<!ENTITY LegalNotice     "\U-00CD;\U-00EF;\U-00EC;\U-00E9;\U-00EA;\U-00DE; \U-00D3;\U-00E7;\U-00EC;\U-00E5;\U-00DF;\U-00F9;\U-00F3;\U-00E7;">
+<!ENTITY MsgAud          "\U-00C1;\U-00EA;\U-00F1;\U-00EF;\U-00E1;\U-00F4;\U-00DE;\U-00F1;\U-00E9;\U-00EF;">
+<!ENTITY MsgLevel        "\U-00C5;\U-00F0;\U-00DF;\U-00F0;\U-00E5;\U-00E4;\U-00EF;">
+<!ENTITY MsgOrig         "\U-00D0;\U-00E7;\U-00E3;\U-00DE;">
+<!ENTITY NOTE            "\U-00D3;\U-00C7;\U-00CC;\U-00C5;\U-00C9;\U-00D9;\U-00D3;\U-00C7;">
+<!ENTITY Note            "\U-00D3;\U-00E7;\U-00EC;\U-00E5;\U-00DF;\U-00F9;\U-00F3;\U-00E7;">
+<!ENTITY Part            "\U-00CC;\U-00DD;\U-00F1;\U-00EF;\U-00F2;">
+<!ENTITY Preface         "\U-00C5;\U-00E9;\U-00F3;\U-00E1;\U-00E3;\U-00F9;\U-00E3;\U-00DE;">
+<!ENTITY Procedure       "\U-00C4;\U-00E9;\U-00E1;\U-00E4;\U-00E9;\U-00EA;\U-00E1;\U-00F3;\U-00DF;\U-00E1;">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "\U-00C4;\U-00E7;\U-00EC;\U-00EF;\U-00F3;\U-00E9;\U-00E5;\U-00F5;\U-00EC;\U-00DD;\U-00ED;\U-00EF;">
+<!ENTITY Question        "\U-00C5;:">
+<!ENTITY RefEntry        "">
+<!ENTITY RefName         "\U-00BC;\U-00ED;\U-00EF;\U-00EC;\U-00E1;">
+<!ENTITY RefSection      "">
+<!ENTITY RefSynopsisDiv  "\U-00D3;\U-00FD;\U-00ED;\U-00EF;\U-00F8;\U-00E7;">
+<!ENTITY Reference       "\U-00C1;\U-00ED;\U-00E1;\U-00F6;\U-00EF;\U-00F1;\U-00DC;">
+<!ENTITY RevHistory      "\U-00C9;\U-00F3;\U-00F4;\U-00EF;\U-00F1;\U-00E9;\U-00EA;\U-00FC; \U-00C1;\U-00ED;\U-00E1;\U-00E8;\U-00E5;\U-00F9;\U-00F1;\U-00DE;\U-00F3;\U-00E5;\U-00F9;\U-00ED;">
+<!ENTITY Revision        "\U-00C1;\U-00ED;\U-00E1;\U-00E8;\U-00E5;\U-00FE;\U-00F1;\U-00E7;\U-00F3;\U-00E7;">
+<!ENTITY Section         "\U-00D4;\U-00EC;\U-00DE;\U-00EC;\U-00E1;">
+<!ENTITY See             "\U-00C4;\U-00E5;\U-00DF;\U-00F4;\U-00E5;">
+<!ENTITY SeeAlso         "\U-00C4;\U-00E5;\U-00DF;\U-00F4;\U-00E5; \U-00C5;\U-00F0;\U-00DF;\U-00F3;\U-00E7;\U-00F2;">
+<!ENTITY Seealso         "\U-00C4;\U-00E5;\U-00DF;\U-00F4;\U-00E5; \U-00E5;\U-00F0;\U-00DF;\U-00F3;\U-00E7;\U-00F2;">
+<!ENTITY Set             "\U-00D3;\U-00FD;\U-00ED;\U-00EF;\U-00EB;\U-00EF;">
+<!ENTITY SetIndex        "\U-00C5;\U-00F5;\U-00F1;\U-00E5;\U-00F4;\U-00DE;\U-00F1;\U-00E9;\U-00EF; \U-00D3;\U-00F5;\U-00ED;\U-00FC;\U-00EB;\U-00F9;\U-00ED;">
+<!ENTITY Sidebar         "">
+<!ENTITY Step            "\U-00D6;\U-00DC;\U-00F3;\U-00E7;">
+<!ENTITY TIP             "\U-00D5;\U-00D0;\U-00CF;\U-00C4;\U-00C5;\U-00C9;\U-00CE;\U-00C7;">
+<!ENTITY Table           "\U-00D0;\U-00DF;\U-00ED;\U-00E1;\U-00EA;\U-00E1;\U-00F2;">
+<!ENTITY Tip             "\U-00D5;\U-00F0;\U-00FC;\U-00E4;\U-00E5;\U-00E9;\U-00EE;\U-00E7;">
+<!ENTITY WARNING         "\U-00D0;\U-00D1;\U-00CF;\U-00C5;\U-00C9;\U-00C4;\U-00CF;\U-00D0;\U-00CF;\U-00C9;\U-00C7;\U-00D3;\U-00C7;">
+<!ENTITY Warning         "\U-00D0;\U-00F1;\U-00EF;\U-00E5;\U-00E9;\U-00E4;\U-00EF;\U-00F0;\U-00EF;\U-00DF;\U-00E7;\U-00F3;\U-00E7;">
+<!ENTITY abstract        "\U-00D0;\U-00E5;\U-00F1;\U-00DF;\U-00EB;\U-00E7;\U-00F8;\U-00E7;">
+<!ENTITY answer          "\U-00C1;:">
+<!ENTITY appendix        "\U-00F0;\U-00E1;\U-00F1;\U-00DC;\U-00F1;\U-00F4;\U-00E7;\U-00EC;\U-00E1;">
+<!ENTITY article         "\U-00B6;\U-00F1;\U-00E8;\U-00F1;\U-00EF;">
+<!ENTITY bibliography    "\U-00C2;\U-00E9;\U-00E2;\U-00EB;\U-00E9;\U-00EF;\U-00E3;\U-00F1;\U-00E1;\U-00F6;\U-00DF;\U-00E1;">
+<!ENTITY book            "\U-00C2;\U-00E9;\U-00E2;\U-00EB;\U-00DF;\U-00EF;">
+<!ENTITY caution         "\U-00D0;\U-00F1;\U-00EF;\U-00F3;\U-00EF;\U-00F7;\U-00DE;">
+<!ENTITY chapter         "\U-00EA;\U-00E5;\U-00F6;\U-00DC;\U-00EB;\U-00E1;\U-00E9;\U-00EF;">
+<!ENTITY colophon        "\U-00CA;\U-00EF;\U-00F1;\U-00F9;\U-00ED;\U-00DF;\U-00E4;\U-00E1;">
+<!ENTITY copyright       "\U-00D0;\U-00ED;\U-00E5;\U-00F5;\U-00EC;\U-00E1;\U-00F4;\U-00E9;\U-00EA;\U-00DC; \U-00C4;\U-00E9;\U-00EA;\U-00E1;\U-00E9;\U-00FE;\U-00EC;\U-00E1;\U-00F4;\U-00E1;">
+<!ENTITY dedication      "\U-00C1;\U-00F6;\U-00E9;\U-00DD;\U-00F1;\U-00F9;\U-00F3;\U-00E7;">
+<!ENTITY edition         "\U-00B8;\U-00EA;\U-00E4;\U-00EF;\U-00F3;\U-00E7;">
+<!ENTITY equation        "\U-00C5;\U-00EE;\U-00DF;\U-00F3;\U-00F9;\U-00F3;\U-00E7;">
+<!ENTITY example         "\U-00D0;\U-00E1;\U-00F1;\U-00DC;\U-00E4;\U-00E5;\U-00E9;\U-00E3;\U-00EC;\U-00E1;">
+<!ENTITY figure          "\U-00D3;\U-00F7;\U-00DE;\U-00EC;\U-00E1;">
+<!ENTITY glossary        "\U-00C3;\U-00EB;\U-00F9;\U-00F3;\U-00F3;\U-00DC;\U-00F1;\U-00E9;\U-00EF;">
+<!ENTITY glosssee        "\U-00C4;\U-00E5;\U-00DF;\U-00F4;\U-00E5;">
+<!ENTITY glossseealso    "\U-00C4;\U-00E5;\U-00DF;\U-00F4;\U-00E5; \U-00C5;\U-00F0;\U-00DF;\U-00F3;\U-00E7;\U-00F2;">
+<!ENTITY important       "\U-00D3;\U-00E7;\U-00EC;\U-00E1;\U-00ED;\U-00F4;\U-00E9;\U-00EA;\U-00FC;">
+<!ENTITY index           "\U-00C5;\U-00F5;\U-00F1;\U-00E5;\U-00F4;\U-00DE;\U-00F1;\U-00E9;\U-00EF;">
+<!ENTITY isbn            "ISBN">
+<!ENTITY legalnotice     "\U-00CD;\U-00EF;\U-00EC;\U-00E9;\U-00EA;\U-00DE; \U-00D3;\U-00E7;\U-00EC;\U-00E5;\U-00DF;\U-00F9;\U-00F3;\U-00E7;">
+<!ENTITY msgaud          "\U-00C1;\U-00EA;\U-00F1;\U-00EF;\U-00E1;\U-00F4;\U-00DE;\U-00F1;\U-00E9;\U-00EF;">
+<!ENTITY msglevel        "\U-00C5;\U-00F0;\U-00DF;\U-00F0;\U-00E5;\U-00E4;\U-00EF;">
+<!ENTITY msgorig         "\U-00D0;\U-00E7;\U-00E3;\U-00DE;">
+<!ENTITY note            "\U-00D3;\U-00E7;\U-00EC;\U-00E5;\U-00DF;\U-00F9;\U-00F3;\U-00E7;">
+<!ENTITY part            "\U-00CC;\U-00DD;\U-00F1;\U-00EF;\U-00F2;">
+<!ENTITY preface         "\U-00C5;\U-00E9;\U-00F3;\U-00E1;\U-00E3;\U-00F9;\U-00E3;\U-00DE;">
+<!ENTITY procedure       "\U-00C4;\U-00E9;\U-00E1;\U-00E4;\U-00E9;\U-00EA;\U-00E1;\U-00F3;\U-00DF;\U-00E1;">
+<!ENTITY published       "\U-00C4;\U-00E7;\U-00EC;\U-00EF;\U-00F3;\U-00E9;\U-00E5;\U-00F5;\U-00EC;\U-00DD;\U-00ED;\U-00EF;">
+<!ENTITY question        "\U-00C5;:">
+<!ENTITY refentry        "">
+<!ENTITY reference       "\U-00C1;\U-00ED;\U-00E1;\U-00F6;\U-00EF;\U-00F1;\U-00DC;">
+<!ENTITY refname         "\U-00BC;\U-00ED;\U-00EF;\U-00EC;\U-00E1;">
+<!ENTITY refsection      "">
+<!ENTITY refsynopsisdiv  "\U-00D3;\U-00FD;\U-00ED;\U-00EF;\U-00F8;\U-00E7;">
+<!ENTITY revhistory      "\U-00C9;\U-00F3;\U-00F4;\U-00EF;\U-00F1;\U-00E9;\U-00EA;\U-00FC; \U-00C1;\U-00ED;\U-00E1;\U-00E8;\U-00E5;\U-00F9;\U-00F1;\U-00DE;\U-00F3;\U-00E5;\U-00F9;\U-00ED;">
+<!ENTITY revision        "\U-00C1;\U-00ED;\U-00E1;\U-00E8;\U-00E5;\U-00FE;\U-00F1;\U-00E7;\U-00F3;\U-00E7;">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY section         "\U-00F4;\U-00EC;\U-00DE;\U-00EC;\U-00E1;">
+<!ENTITY see             "\U-00C4;\U-00E5;\U-00DF;\U-00F4;\U-00E5;">
+<!ENTITY seealso         "\U-00C4;\U-00E5;\U-00DF;\U-00F4;\U-00E5; \U-00C5;\U-00F0;\U-00DF;\U-00F3;\U-00E7;\U-00F2;">
+<!ENTITY set             "\U-00D3;\U-00FD;\U-00ED;\U-00EF;\U-00EB;\U-00EF;">
+<!ENTITY setindex        "\U-00C5;\U-00F5;\U-00F1;\U-00E5;\U-00F4;\U-00DE;\U-00F1;\U-00E9;\U-00EF; \U-00D3;\U-00F5;\U-00ED;\U-00FC;\U-00EB;\U-00F9;\U-00ED;">
+<!ENTITY sidebar         "\U-00E5;\U-00F0;\U-00E5;\U-00EE;\U-00E7;\U-00E3;\U-00E7;\U-00EC;\U-00E1;\U-00F4;\U-00E9;\U-00EA;\U-00FC; \U-00F0;\U-00EB;\U-00E5;\U-00F5;\U-00F1;\U-00E9;\U-00EA;\U-00FC; \U-00E1;\U-00F1;\U-00E8;\U-00F1;\U-00DF;\U-00E4;\U-00E9;\U-00EF;">
+<!ENTITY step            "\U-00F6;\U-00DC;\U-00F3;\U-00E7;">
+<!ENTITY table           "\U-00D0;\U-00DF;\U-00ED;\U-00E1;\U-00EA;\U-00E1;\U-00F2;">
+<!ENTITY tip             "\U-00D5;\U-00F0;\U-00FC;\U-00E4;\U-00E5;\U-00E9;\U-00EE;\U-00E7;">
+<!ENTITY warning         "\U-00D0;\U-00F1;\U-00EF;\U-00E5;\U-00E9;\U-00E4;\U-00EF;\U-00F0;\U-00EF;\U-00DF;\U-00E7;\U-00F3;\U-00E7;">
+<!ENTITY and             "\U-00EA;\U-00E1;\U-00E9;">
+<!ENTITY by              "\U-00E1;\U-00F0;\U-00FC;">
+<!ENTITY Edited          "\U-00C5;\U-00F0;\U-00E9;\U-00EC;\U-00DD;\U-00EB;\U-00E5;\U-00E9;\U-00E1;">
+<!ENTITY edited          "\U-00C5;\U-00F0;\U-00E9;\U-00EC;\U-00DD;\U-00EB;\U-00E5;\U-00E9;\U-00E1;">
+<!ENTITY Editedby        "\U-00C5;\U-00F0;\U-00E9;\U-00EC;\U-00DD;\U-00EB;\U-00E5;\U-00E9;\U-00E1; \U-00E1;\U-00F0;\U-00FC;">
+<!ENTITY editedby        "\U-00C5;\U-00F0;\U-00E9;\U-00EC;\U-00DD;\U-00EB;\U-00E5;\U-00E9;\U-00E1; \U-00E1;\U-00F0;\U-00FC;">
+<!ENTITY in              "\U-00F3;\U-00E5;">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "\U-00EC;\U-00E7;-\U-00F5;\U-00F0;\U-00E1;\U-00F1;\U-00EA;\U-00F4;\U-00FC; \U-00F3;\U-00F4;\U-00EF;\U-00E9;\U-00F7;\U-00E5;\U-00DF;\U-00EF;">
+<!ENTITY notes           "\U-00D3;\U-00E7;\U-00EC;\U-00E5;\U-00E9;\U-00FE;\U-00F3;\U-00E5;\U-00E9;\U-00F2;">
+<!ENTITY Notes           "\U-00D3;\U-00E7;\U-00EC;\U-00E5;\U-00E9;\U-00FE;\U-00F3;\U-00E5;\U-00E9;\U-00F2;">
+<!ENTITY Pgs             "\U-00D3;\U-00EB;\U-00E4;\U-00F2;.">
+<!ENTITY pgs             "\U-00D3;\U-00EB;\U-00E4;\U-00F2;.">
+<!ENTITY Revisedby       "Revised by: ">
+<!ENTITY revisedby       "Revised by: ">
+<!ENTITY TableNotes      "\U-00D0;\U-00DF;\U-00ED;\U-00E1;\U-00EA;\U-00E1;\U-00F2; \U-00D3;\U-00E7;\U-00EC;\U-00E5;\U-00E9;\U-00FE;\U-00F3;\U-00E5;\U-00F9;\U-00ED;">
+<!ENTITY tablenotes      "\U-00D0;\U-00DF;\U-00ED;\U-00E1;\U-00EA;\U-00E1;\U-00F2; \U-00D3;\U-00E7;\U-00EC;\U-00E5;\U-00E9;\U-00FE;\U-00F3;\U-00E5;\U-00F9;\U-00ED;">
+<!ENTITY TableofContents "\U-00D0;\U-00DF;\U-00ED;\U-00E1;\U-00EA;\U-00E1;\U-00F2; \U-00D0;\U-00E5;\U-00F1;\U-00E9;\U-00E5;\U-00F7;\U-00EF;\U-00EC;\U-00DD;\U-00ED;\U-00F9;\U-00ED;">
+<!ENTITY tableofcontents "\U-00D0;\U-00DF;\U-00ED;\U-00E1;\U-00EA;\U-00E1;\U-00F2; \U-00D0;\U-00E5;\U-00F1;\U-00E9;\U-00E5;\U-00F7;\U-00EF;\U-00EC;\U-00DD;\U-00ED;\U-00F9;\U-00ED;">
+<!ENTITY unexpectedelementname "\U-00CC;\U-00E7; \U-00E1;\U-00ED;\U-00E1;\U-00EC;\U-00E5;\U-00ED;\U-00FC;\U-00EC;\U-00E5;\U-00ED;\U-00EF; \U-00FC;\U-00ED;\U-00EF;\U-00EC;\U-00E1; \U-00F3;\U-00F4;\U-00EF;\U-00E9;\U-00F7;\U-00E5;\U-00DF;\U-00EF;\U-00F5;">
+<!ENTITY unsupported     "\U-00EC;\U-00E7; \U-00F5;\U-00F0;\U-00EF;\U-00F3;\U-00F4;\U-00E7;\U-00F1;\U-00E9;\U-00E6;\U-00FC;\U-00EC;\U-00E5;\U-00ED;\U-00EF;">
+<!ENTITY xrefto          "\U-00E1;\U-00ED;\U-00F4;\U-00E9;\U-00F0;\U-00E1;\U-00F1;\U-00E1;\U-00F0;\U-00EF;\U-00EC;\U-00F0;\U-00DE; \U-00F3;\U-00E5;">
+<!ENTITY listofequations "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00C5;\U-00EE;\U-00E9;\U-00F3;\U-00FE;\U-00F3;\U-00E5;\U-00F9;\U-00ED;">
+<!ENTITY ListofEquations "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00C5;\U-00EE;\U-00E9;\U-00F3;\U-00FE;\U-00F3;\U-00E5;\U-00F9;\U-00ED;">
+<!ENTITY ListofExamples  "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00D0;\U-00E1;\U-00F1;\U-00E1;\U-00E4;\U-00E5;\U-00E9;\U-00E3;\U-00EC;\U-00DC;\U-00F4;\U-00F9;\U-00ED;">
+<!ENTITY listofexamples  "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00D0;\U-00E1;\U-00F1;\U-00E1;\U-00E4;\U-00E5;\U-00E9;\U-00E3;\U-00EC;\U-00DC;\U-00F4;\U-00F9;\U-00ED;">
+<!ENTITY ListofFigures   "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00D3;\U-00F7;\U-00E7;\U-00EC;\U-00DC;\U-00F4;\U-00F9;\U-00ED;">
+<!ENTITY listoffigures   "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00D3;\U-00F7;\U-00E7;\U-00EC;\U-00DC;\U-00F4;\U-00F9;\U-00ED;">
+<!ENTITY listoftables    "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00D0;\U-00E9;\U-00ED;\U-00DC;\U-00EA;\U-00F9;\U-00ED;">
+<!ENTITY ListofTables    "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00D0;\U-00E9;\U-00ED;\U-00DC;\U-00EA;\U-00F9;\U-00ED;">
+<!ENTITY ListofUnknown   "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00C1;\U-00E3;\U-00ED;\U-00FE;\U-00F3;\U-00F4;\U-00F9;\U-00ED;">
+<!ENTITY listofunknown   "\U-00CA;\U-00E1;\U-00F4;\U-00DC;\U-00EB;\U-00EF;\U-00E3;\U-00EF;\U-00F2; \U-00C1;\U-00E3;\U-00ED;\U-00FE;\U-00F3;\U-00F4;\U-00F9;\U-00ED;">
+<!ENTITY nav-home        "\U-00C1;\U-00F1;\U-00F7;\U-00DE;">
+<!ENTITY nav-next        "\U-00C5;\U-00F0;\U-00FC;\U-00EC;\U-00E5;\U-00ED;\U-00EF;">
+<!ENTITY nav-next-sibling "\U-00D0;\U-00F1;\U-00EF;\U-00F2; \U-00F4;\U-00EF; \U-00F4;\U-00DD;\U-00EB;\U-00EF;\U-00F2;">
+<!ENTITY nav-prev        "\U-00D0;\U-00F1;\U-00EF;\U-00E7;\U-00E3;">
+<!ENTITY nav-prev-sibling "\U-00D0;\U-00F1;\U-00EF;\U-00F2; \U-00F4;\U-00E7;\U-00ED; \U-00E1;\U-00F1;\U-00F7;\U-00DE;">
+<!ENTITY nav-up          "\U-00D0;\U-00DC;\U-00ED;\U-00F9;">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1en.dsl b/common/dbl1en.dsl
new file mode 100644 (file)
index 0000000..573d28b
--- /dev/null
@@ -0,0 +1,444 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % en.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//EN"
+         "dbl1en.ent">
+%en.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-en">
+<style-specification-body>
+
+;; $Id: dbl1en.dsl,v 1.3 2002/12/20 02:22:06 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (en-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (en-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-en-start-quote%
+                                                      "%t"
+                                                      %gentext-en-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-en-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (en-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (en-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-en-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (en-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&see;")
+   (list (normalize "seealsoie")       "&seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-en-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (en-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-en-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-en-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-en-intra-label-sep)
+  (list))
+
+(define (en-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-en-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-en-intra-label-sep)))
+        (sep    (assoc name (en-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-en-label-title-sep)
+  (list))
+
+(define (en-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-en-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-en-label-title-sep)))
+        (sep    (assoc name (en-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (en-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (en-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (en-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (en-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-en$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (en-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-en-start-quote% (dingbat "ldquo"))
+
+(define %gentext-en-end-quote% (dingbat "rdquo"))
+
+(define %gentext-en-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-en-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-en-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-en-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-en-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-en-page% "")
+
+(define %gentext-en-and% "&and;")
+
+(define %gentext-en-listcomma% "&listcomma;")
+
+(define %gentext-en-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-en-bibl-pages% "&Pgs;")
+
+(define %gentext-en-endnotes% "&Notes;")
+
+(define %gentext-en-table-endnotes% "&TableNotes;:")
+
+(define %gentext-en-index-see% "&see;")
+
+(define %gentext-en-index-seealso% "&seealso;")
+
+
+(define (gentext-en-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-en-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-en-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-en-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-en-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-en-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1en.ent b/common/dbl1en.ent
new file mode 100644 (file)
index 0000000..c0ef979
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Abstract">
+<!ENTITY abstract        "Abstract">
+<!ENTITY Answer          "A:">
+<!ENTITY answer          "A:">
+<!ENTITY Appendix        "Appendix">
+<!ENTITY appendix        "Appendix">
+<!ENTITY Article         "Article">
+<!ENTITY article         "Article">
+<!ENTITY Bibliography    "Bibliography">
+<!ENTITY bibliography    "Bibliography">
+<!ENTITY Book            "Book">
+<!ENTITY book            "Book">
+<!ENTITY CAUTION         "CAUTION">
+<!ENTITY Caution         "Caution">
+<!ENTITY caution         "Caution">
+<!ENTITY Chapter         "Chapter">
+<!ENTITY chapter         "Chapter">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Dedication">
+<!ENTITY dedication      "Dedication">
+<!ENTITY Edition         "Edition">
+<!ENTITY edition         "Edition">
+<!ENTITY Equation        "Equation">
+<!ENTITY equation        "Equation">
+<!ENTITY Example         "Example">
+<!ENTITY example         "Example">
+<!ENTITY Figure          "Figure">
+<!ENTITY figure          "Figure">
+<!ENTITY Glossary        "Glossary">
+<!ENTITY glossary        "Glossary">
+<!ENTITY GlossSee        "See">
+<!ENTITY glosssee        "See">
+<!ENTITY GlossSeeAlso    "See Also">
+<!ENTITY glossseealso    "See Also">
+<!ENTITY IMPORTANT       "IMPORTANT">
+<!ENTITY important       "Important">
+<!ENTITY Important       "Important">
+<!ENTITY Index           "Index">
+<!ENTITY index           "Index">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Legal Notice">
+<!ENTITY legalnotice     "Legal Notice">
+<!ENTITY MsgAud          "Audience">
+<!ENTITY msgaud          "Audience">
+<!ENTITY MsgLevel        "Level">
+<!ENTITY msglevel        "Level">
+<!ENTITY MsgOrig         "Origin">
+<!ENTITY msgorig         "Origin">
+<!ENTITY NOTE            "NOTE">
+<!ENTITY Note            "Note">
+<!ENTITY note            "Note">
+<!ENTITY Part            "Part">
+<!ENTITY part            "Part">
+<!ENTITY Preface         "Preface">
+<!ENTITY preface         "Preface">
+<!ENTITY Procedure       "Procedure">
+<!ENTITY procedure       "Procedure">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY PubDate         "Publication Date">
+<!ENTITY pubdate         "Publication date">
+<!ENTITY Published       "Published">
+<!ENTITY published       "Published">
+<!ENTITY Qandadiv        "Q &amp; A">
+<!ENTITY qandadiv        "Q &amp; A">
+<!ENTITY Question        "Q:">
+<!ENTITY question        "Q:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Reference">
+<!ENTITY reference       "Reference">
+<!ENTITY RefName         "Name">
+<!ENTITY refname         "Name">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Synopsis">
+<!ENTITY refsynopsisdiv  "Synopsis">
+<!ENTITY RevHistory      "Revision History">
+<!ENTITY revhistory      "Revision History">
+<!ENTITY revision        "Revision">
+<!ENTITY Revision        "Revision">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY section         "Section">
+<!ENTITY Section         "Section">
+<!ENTITY see             "see">
+<!ENTITY See             "See">
+<!ENTITY seealso         "see also">
+<!ENTITY Seealso         "See also">
+<!ENTITY SeeAlso         "See Also">
+<!ENTITY set             "Set">
+<!ENTITY Set             "Set">
+<!ENTITY setindex        "Set Index">
+<!ENTITY SetIndex        "Set Index">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "sidebar">
+<!ENTITY step            "step">
+<!ENTITY Step            "Step">
+<!ENTITY Table           "Table">
+<!ENTITY table           "Table">
+<!ENTITY tip             "Tip">
+<!ENTITY TIP             "TIP">
+<!ENTITY Tip             "Tip">
+<!ENTITY Warning         "Warning">
+<!ENTITY warning         "Warning">
+<!ENTITY WARNING         "WARNING">
+<!ENTITY and             "and">
+<!ENTITY by              "by">
+<!ENTITY called          "called">
+<!ENTITY Edited          "Edited">
+<!ENTITY edited          "Edited">
+<!ENTITY Editedby        "Edited by">
+<!ENTITY editedby        "Edited by">
+<!ENTITY in              "in">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "non-existant element">
+<!ENTITY notes           "Notes">
+<!ENTITY Notes           "Notes">
+<!ENTITY Pgs             "Pgs.">
+<!ENTITY pgs             "Pgs.">
+<!ENTITY Revisedby       "Revised by: ">
+<!ENTITY revisedby       "Revised by: ">
+<!ENTITY TableNotes      "Notes">
+<!ENTITY tablenotes      "Notes">
+<!ENTITY TableofContents "Table of Contents">
+<!ENTITY tableofcontents "Table of Contents">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "Unexpected element name">
+<!ENTITY unsupported     "unsupported">
+<!ENTITY xrefto          "xref to">
+<!ENTITY listofequations "List of Equations">
+<!ENTITY ListofEquations "List of Equations">
+<!ENTITY ListofExamples  "List of Examples">
+<!ENTITY listofexamples  "List of Examples">
+<!ENTITY ListofFigures   "List of Figures">
+<!ENTITY listoffigures   "List of Figures">
+<!ENTITY ListofProcedures "List of Procedures">
+<!ENTITY listofprocedures "List of Procedures">
+<!ENTITY listoftables    "List of Tables">
+<!ENTITY ListofTables    "List of Tables">
+<!ENTITY ListofUnknown   "List of Unknown">
+<!ENTITY listofunknown   "List of Unknown">
+<!ENTITY nav-home        "Home">
+<!ENTITY nav-next        "Next">
+<!ENTITY nav-next-sibling "Fast Forward">
+<!ENTITY nav-prev        "Prev">
+<!ENTITY nav-prev-sibling "Fast Backward">
+<!ENTITY nav-up          "Up">
+<!ENTITY nav-toc         "ToC">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "2">
+<!ENTITY hyphenation-remain-character-count "2">
diff --git a/common/dbl1es.dsl b/common/dbl1es.dsl
new file mode 100644 (file)
index 0000000..7d69918
--- /dev/null
@@ -0,0 +1,434 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % es.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//ES"
+         "dbl1es.ent">
+%es.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-es">
+<style-specification-body>
+
+;; $Id: dbl1es.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (es-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (es-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "el &appendix; de nombre %t"))
+       (list (normalize "article")     (string-append %gentext-es-start-quote%
+                                                      "%t"
+                                                      %gentext-es-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "el &chapter; de nombre %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nombre %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nombre %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nombre %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nombre %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nombre %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nombre %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la &section; de nombre %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-es-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (es-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (es-auto-xref-indirect-connector before) 
+  (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-es-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (es-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-es-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (es-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-es-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-es-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-es-intra-label-sep)
+  (list))
+
+(define (es-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-es-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-es-intra-label-sep)))
+        (sep    (assoc name (es-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-es-label-title-sep)
+  (list))
+
+(define (es-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-es-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-es-label-title-sep)))
+        (sep    (assoc name (es-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (es-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (es-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (es-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (es-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-es$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (es-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-es-start-quote% (dingbat "ldquo"))
+
+(define %gentext-es-end-quote% (dingbat "rdquo"))
+
+(define %gentext-es-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-es-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-es-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-es-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-es-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-es-page% "")
+
+(define %gentext-es-and% "&and;")
+
+(define %gentext-es-listcomma% "&listcomma;")
+
+(define %gentext-es-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-es-bibl-pages% "&Pgs;")
+
+(define %gentext-es-endnotes% "&Notes;")
+
+(define %gentext-es-table-endnotes% "&TableNotes;:")
+
+(define %gentext-es-index-see% "&See;")
+
+(define %gentext-es-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-es-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-es-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-es-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-es-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-es-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-es-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1es.ent b/common/dbl1es.ent
new file mode 100644 (file)
index 0000000..3e1b7e0
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Resumen">
+<!ENTITY abstract        "resumen">
+<!ENTITY Answer          "R:">
+<!ENTITY answer          "r:">
+<!ENTITY Appendix        "Ap\U-00E9;ndice">
+<!ENTITY appendix        "ap\U-00E9;ndice">
+<!ENTITY Article         "Art\U-00ED;culo">
+<!ENTITY article         "art\U-00ED;culo">
+<!ENTITY Bibliography    "Bibliograf\U-00ED;a">
+<!ENTITY bibliography    "bibliograf\U-00ED;a">
+<!ENTITY Book            "Libro">
+<!ENTITY book            "libro">
+<!ENTITY CAUTION         "ATENCI\U-00D3;N">
+<!ENTITY Caution         "Atenci\U-00F3;n">
+<!ENTITY caution         "atenci\U-00F3;n">
+<!ENTITY Chapter         "Cap\U-00ED;tulo">
+<!ENTITY chapter         "cap\U-00ED;tulo">
+<!ENTITY Colophon        "Colof\U-00F3;n">
+<!ENTITY colophon        "colof\U-00F3;n">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "copyright">
+<!ENTITY Dedication      "Dedicatoria">
+<!ENTITY dedication      "dedicatoria">
+<!ENTITY Edition         "Edici\U-00F3;n">
+<!ENTITY edition         "edici\U-00F3;n">
+<!ENTITY Equation        "Ecuaci\U-00F3;n">
+<!ENTITY equation        "ecuaci\U-00F3;n">
+<!ENTITY Example         "Ejemplo">
+<!ENTITY example         "ejemplo">
+<!ENTITY Figure          "Figura">
+<!ENTITY figure          "figura">
+<!ENTITY Glossary        "Glosario">
+<!ENTITY glossary        "glosario">
+<!ENTITY GlossSee        "Ver">
+<!ENTITY glosssee        "ver">
+<!ENTITY GlossSeeAlso    "Ver tambi\U-00E9;n">
+<!ENTITY glossseealso    "ver tambi\U-00E9;n">
+<!ENTITY IMPORTANT       "IMPORTANTE">
+<!ENTITY Important       "Importante">
+<!ENTITY important       "importante">
+<!ENTITY Index           "\U-00CD;ndice">
+<!ENTITY index           "\U-00ED;ndice">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "isbn">
+<!ENTITY LegalNotice     "Aviso Legal">
+<!ENTITY legalnotice     "aviso legal">
+<!ENTITY MsgAud          "Audiencia">
+<!ENTITY msgaud          "audiencia">
+<!ENTITY MsgLevel        "Nivel">
+<!ENTITY msglevel        "nivel">
+<!ENTITY MsgOrig         "Origen">
+<!ENTITY msgorig         "origen">
+<!ENTITY NOTE            "NOTA">
+<!ENTITY Note            "Nota">
+<!ENTITY note            "nota">
+<!ENTITY Part            "Parte">
+<!ENTITY part            "parte">
+<!ENTITY Preface         "Prefacio">
+<!ENTITY preface         "prefacio">
+<!ENTITY Procedure       "Procedimiento">
+<!ENTITY procedure       "procedimiento">
+<!ENTITY ProductionSet   "Producci\U-00F3;n">
+<!ENTITY PubDate         "Fecha de publicaci\U-00F3;n">
+<!ENTITY pubdate         "fecha de publicaci\U-00F3;n">
+<!ENTITY Published       "Publicado">
+<!ENTITY published       "publicado">
+<!ENTITY Question        "P:">
+<!ENTITY question        "p:">
+<!ENTITY RefEntry        "Entrada de referencia">
+<!ENTITY refentry        "entrada de referencia">
+<!ENTITY Reference       "Referencia">
+<!ENTITY reference       "referencia">
+<!ENTITY RefName         "Nombre de referencia">
+<!ENTITY refname         "nombre de referencia">
+<!ENTITY RefSection      "Secci\U-00F3;n de referencia">
+<!ENTITY refsection      "secci\U-00F3;n de referencia">
+<!ENTITY RefSynopsisDiv  "Sinopsis">
+<!ENTITY refsynopsisdiv  "sinopsis">
+<!ENTITY RevHistory      "Historial de revisiones">
+<!ENTITY revhistory      "Historial de revisiones">
+<!ENTITY Revision        "Revisi\U-00F3;n">
+<!ENTITY revision        "revisi\U-00F3;n">
+<!ENTITY sect1           "Secci\U-00F3;n">
+<!ENTITY sect2           "Secci\U-00F3;n">
+<!ENTITY sect3           "Secci\U-00F3;n">
+<!ENTITY sect4           "Secci\U-00F3;n">
+<!ENTITY sect5           "Secci\U-00F3;n">
+<!ENTITY Section         "Secci\U-00F3;n">
+<!ENTITY section         "secci\U-00F3;n">
+<!ENTITY See             "Ver">
+<!ENTITY see             "ver">
+<!ENTITY SeeAlso         "Ver Tambi\U-00E9;n">
+<!ENTITY Seealso         "Ver tambi\U-00E9;n">
+<!ENTITY seealso         "ver tambi\U-00E9;n">
+<!ENTITY Set             "Conjunto">
+<!ENTITY set             "conjunto">
+<!ENTITY SetIndex        "\U-00CD;ndice del Conjunto">
+<!ENTITY setindex        "\U-00ED;ndice del conjunto">
+<!ENTITY Sidebar         "Barra lateral">
+<!ENTITY sidebar         "barra lateral">
+<!ENTITY Step            "Paso">
+<!ENTITY step            "paso">
+<!ENTITY Table           "Tabla">
+<!ENTITY table           "tabla">
+<!ENTITY TIP             "SUGERENCIA">
+<!ENTITY Tip             "Sugerencia">
+<!ENTITY tip             "sugerencia">
+<!ENTITY WARNING         "AVISO">
+<!ENTITY Warning         "Aviso">
+<!ENTITY warning         "aviso">
+<!ENTITY and             "y">
+<!ENTITY by              "por">
+<!ENTITY Edited          "Editado">
+<!ENTITY edited          "editado">
+<!ENTITY Editedby        "Editado por">
+<!ENTITY editedby        "editado por">
+<!ENTITY in              "en">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "elemento inexistente">
+<!ENTITY notes           "notas">
+<!ENTITY Notes           "Notas">
+<!ENTITY Pgs             "P\U-00E1;gs.">
+<!ENTITY pgs             "p\U-00E1;gs.">
+<!ENTITY Revisedby       "Revisado por: ">
+<!ENTITY revisedby       "revisado por: ">
+<!ENTITY TableNotes      "Notas de tabla">
+<!ENTITY tablenotes      "notas de tabla">
+<!ENTITY TableofContents "Tabla de contenidos">
+<!ENTITY tableofcontents "tabla de contenidos">
+<!ENTITY unexpectedelementname "nombre de elemento inesperado">
+<!ENTITY unsupported     "no soportado">
+<!ENTITY xrefto          "referencia a">
+<!ENTITY listofequations "lista de ecuaciones">
+<!ENTITY ListofEquations "Lista de ecuaciones">
+<!ENTITY ListofExamples  "Lista de ejemplos">
+<!ENTITY listofexamples  "lista de ejemplos">
+<!ENTITY ListofFigures   "Lista de figuras">
+<!ENTITY listoffigures   "lista de figuras">
+<!ENTITY listoftables    "lista de tablas">
+<!ENTITY ListofTables    "Lista de tablas">
+<!ENTITY ListofUnknown   "Lista de desconocido">
+<!ENTITY listofunknown   "lista de desconocido">
+<!ENTITY nav-home        "Inicio">
+<!ENTITY nav-next        "Siguiente">
+<!ENTITY nav-next-sibling "Avanzar">
+<!ENTITY nav-prev        "Anterior">
+<!ENTITY nav-prev-sibling "Retroceder">
+<!ENTITY nav-up          "Subir">
+<!ENTITY Draft           "Borrador">
+<!ENTITY above           "arriba">
+<!ENTITY below           "abajo">
+<!ENTITY sectioncalled   "secci\U-00F3;n llamada">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz\U-00E1;\U-00E9;\U-00ED;\U-00F3;\U-00FA;\U-00F1;">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ\U-00C1;\U-00C9;\U-00CD;\U-00D3;\U-00DA;\U-00D1;">
diff --git a/common/dbl1et.dsl b/common/dbl1et.dsl
new file mode 100644 (file)
index 0000000..5a75101
--- /dev/null
@@ -0,0 +1,444 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % et.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//ET"
+         "dbl1et.ent">
+%et.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-et">
+<style-specification-body>
+
+;; $Id: dbl1et.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (et-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (et-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&appendix; %t"))
+       (list (normalize "article")     (string-append %gentext-et-start-quote%
+                                                      "%t"
+                                                      %gentext-et-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "&chapter; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-et-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (et-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (et-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-et-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (et-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-et-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (et-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-et-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-et-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-et-intra-label-sep)
+  (list))
+
+(define (et-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-et-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (et-intra-label-sep)))
+        (sep    (assoc name (en-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+           (car (cdr sep))
+           ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-et-label-title-sep)
+  (list))
+
+(define (et-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-et-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-et-label-title-sep)))
+        (sep    (assoc name (et-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (et-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (et-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (et-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (et-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-et$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (et-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-et-start-quote% (dingbat "ldquo"))
+
+(define %gentext-et-end-quote% (dingbat "rdquo"))
+
+(define %gentext-et-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-et-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-et-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-et-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-et-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-et-page% "")
+
+(define %gentext-et-and% "&and;")
+
+(define %gentext-et-listcomma% "&listcomma;")
+
+(define %gentext-et-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-et-bibl-pages% "&Pgs;")
+
+(define %gentext-et-endnotes% "&Notes;")
+
+(define %gentext-et-table-endnotes% "&TableNotes;:")
+
+(define %gentext-et-index-see% "&See;")
+
+(define %gentext-et-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-et-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-et-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-et-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-et-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-et-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-et-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1et.ent b/common/dbl1et.ent
new file mode 100644 (file)
index 0000000..b325fce
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-00DC;levaade">
+<!ENTITY abstract        "\U-00DC;levaade">
+<!ENTITY Answer          "V:">
+<!ENTITY answer          "V:">
+<!ENTITY Appendix        "Lisa">
+<!ENTITY appendix        "lisa">
+<!ENTITY Article         "Artikkel">
+<!ENTITY article         "Artikkel">
+<!ENTITY Bibliography    "Bibliograafia">
+<!ENTITY bibliography    "Bibliograafia">
+<!ENTITY Book            "Raamat">
+<!ENTITY book            "Raamat">
+<!ENTITY CAUTION         "ETTEVAATUST">
+<!ENTITY Caution         "Ettevaatust">
+<!ENTITY caution         "Ettevaatust">
+<!ENTITY Chapter         "Peat\U-00FC;kk">
+<!ENTITY chapter         "peat\U-00FC;kk">
+<!ENTITY Colophon        "L\U-00F5;pum\U-00E4;rgis">
+<!ENTITY colophon        "L\U-00F5;pum\U-00E4;rgis">
+<!ENTITY Copyright       "Autori\U-00F5;igus">
+<!ENTITY copyright       "Autori\U-00F5;igus">
+<!ENTITY Dedication      "P\U-00FC;hendus">
+<!ENTITY dedication      "P\U-00FC;hendus">
+<!ENTITY Edition         "V\U-00E4;ljaanne">
+<!ENTITY edition         "V\U-00E4;ljaanne">
+<!ENTITY Equation        "Valem">
+<!ENTITY equation        "Valem">
+<!ENTITY Example         "N\U-00E4;ide">
+<!ENTITY example         "N\U-00E4;ide">
+<!ENTITY Figure          "Joonis">
+<!ENTITY figure          "Joonis">
+<!ENTITY Glossary        "S\U-00F5;nastik">
+<!ENTITY glossary        "S\U-00F5;nastik">
+<!ENTITY GlossSee        "Vt.">
+<!ENTITY glosssee        "Vt.">
+<!ENTITY GlossSeeAlso    "Vt. ka">
+<!ENTITY glossseealso    "Vt. ka">
+<!ENTITY IMPORTANT       "OLULINE">
+<!ENTITY Important       "Oluline">
+<!ENTITY important       "Oluline">
+<!ENTITY Index           "Aineregister">
+<!ENTITY index           "Aineregister">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Autori\U-00F5;iguse m\U-00E4;rge">
+<!ENTITY legalnotice     "Autori\U-00F5;iguse m\U-00E4;rge">
+<!ENTITY MsgAud          "Auditoorium">
+<!ENTITY msgaud          "Auditoorium">
+<!ENTITY MsgLevel        "Tase">
+<!ENTITY msglevel        "Tase">
+<!ENTITY MsgOrig         "Algallikas">
+<!ENTITY msgorig         "Algallikas">
+<!ENTITY NOTE            "M\U-00C4;RKUS">
+<!ENTITY Note            "M\U-00E4;rkus">
+<!ENTITY note            "M\U-00E4;rkus">
+<!ENTITY Part            "Osa">
+<!ENTITY part            "Osa">
+<!ENTITY Preface         "Eess\U-00F5;na">
+<!ENTITY preface         "Eess\U-00F5;na">
+<!ENTITY Procedure       "Protseduur">
+<!ENTITY procedure       "Protseduur">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "Avaldatud">
+<!ENTITY published       "Avaldatud">
+<!ENTITY Question        "K:">
+<!ENTITY question        "K:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Viide">
+<!ENTITY reference       "Viide">
+<!ENTITY RefName         "Nimi">
+<!ENTITY refname         "Nimi">
+<!ENTITY RefSection      "L\U-00F5;ik">
+<!ENTITY refsection      "L\U-00F5;ik">
+<!ENTITY RefSynopsisDiv  "S\U-00FC;nopsis">
+<!ENTITY refsynopsisdiv  "S\U-00FC;nopsis">
+<!ENTITY RevHistory      "Vigade paranduste ajalugu">
+<!ENTITY revhistory      "Vigade paranduste ajalugu">
+<!ENTITY Revision        "Vigade parandus">
+<!ENTITY revision        "Vigade parandus">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY section         "l\U-00F5;ik">
+<!ENTITY Section         "Sektsioon">
+<!ENTITY See             "Vt.">
+<!ENTITY see             "Vt.">
+<!ENTITY SeeAlso         "Vt. ka">
+<!ENTITY Seealso         "Vt. ka">
+<!ENTITY seealso         "Vt. ka">
+<!ENTITY Set             "Sea">
+<!ENTITY set             "Sea">
+<!ENTITY SetIndex        "Sea indeks">
+<!ENTITY setindex        "Sea indeks">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "k\U-00FC;lgriba">
+<!ENTITY Step            "Samm">
+<!ENTITY step            "samm">
+<!ENTITY Table           "Tabel">
+<!ENTITY table           "Tabel">
+<!ENTITY TIP             "VIHJE">
+<!ENTITY Tip             "Vihje">
+<!ENTITY tip             "Vihje">
+<!ENTITY WARNING         "HOIATUS">
+<!ENTITY Warning         "Hoiatus">
+<!ENTITY warning         "Hoiatus">
+<!ENTITY and             "ja">
+<!ENTITY by              "">
+<!ENTITY Edited          "Redaktsioon">
+<!ENTITY edited          "Redaktsioon">
+<!ENTITY Editedby        "Redaktsiooni autor(id)">
+<!ENTITY editedby        "Redaktsiooni autor(id)">
+<!ENTITY in              "">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "mitte eksisteeriv element">
+<!ENTITY Notes           "M\U-00E4;rkused">
+<!ENTITY notes           "M\U-00E4;rkused">
+<!ENTITY Pgs             "Lk.">
+<!ENTITY pgs             "Lk.">
+<!ENTITY Revisedby       "\U-00DC;le vaadanud: ">
+<!ENTITY revisedby       "\U-00DC;le vaadanud: ">
+<!ENTITY TableNotes      "M\U-00E4;rkused">
+<!ENTITY tablenotes      "M\U-00E4;rkused">
+<!ENTITY TableofContents "Sisukord">
+<!ENTITY tableofcontents "Sisukord">
+<!ENTITY unexpectedelementname "Ootamatu elemendi nimi">
+<!ENTITY unsupported     "toetuseta">
+<!ENTITY xrefto          "viide">
+<!ENTITY listofequations "Valemite nimekiri">
+<!ENTITY ListofEquations "Valemite nimekiri">
+<!ENTITY ListofExamples  "N\U-00E4;idete nimekiri">
+<!ENTITY listofexamples  "N\U-00E4;idete nimekiri">
+<!ENTITY ListofFigures   "Jooniste nimekiri">
+<!ENTITY listoffigures   "Jooniste nimekiri">
+<!ENTITY listoftables    "Tabelite nimekiri">
+<!ENTITY ListofTables    "Tabelite nimekiri">
+<!ENTITY ListofUnknown   "Tundmatute nimekiri">
+<!ENTITY listofunknown   "Tundmatute nimekiri">
+<!ENTITY nav-home        "Koju">
+<!ENTITY nav-next        "J\U-00E4;rgmine">
+<!ENTITY nav-next-sibling "Kiiresti edasi">
+<!ENTITY nav-prev        "Eelmine">
+<!ENTITY nav-prev-sibling "Kiiresti tagasi">
+<!ENTITY nav-up          "\U-00DC;les">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1eu.dsl b/common/dbl1eu.dsl
new file mode 100644 (file)
index 0000000..4d38398
--- /dev/null
@@ -0,0 +1,444 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % eu.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//EU"
+         "dbl1eu.ent">
+%eu.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-eu">
+<style-specification-body>
+
+;; $Id: dbl1eu.dsl,v 1.1 2001/11/14 20:57:53 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (eu-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (eu-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-eu-start-quote%
+                                                      "%t"
+                                                      %gentext-eu-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-eu-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (eu-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (eu-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-eu-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (eu-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-eu-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (eu-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-eu-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-eu-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-eu-intra-label-sep)
+  (list))
+
+(define (eu-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-eu-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-eu-intra-label-sep)))
+        (sep    (assoc name (eu-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-eu-label-title-sep)
+  (list))
+
+(define (eu-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-eu-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-eu-label-title-sep)))
+        (sep    (assoc name (eu-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (eu-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (eu-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (eu-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (eu-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-eu$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (eu-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-eu-start-quote% (dingbat "ldquo"))
+
+(define %gentext-eu-end-quote% (dingbat "rdquo"))
+
+(define %gentext-eu-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-eu-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-eu-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-eu-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-eu-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-eu-page% "")
+
+(define %gentext-eu-and% "&and;")
+
+(define %gentext-eu-listcomma% "&listcomma;")
+
+(define %gentext-eu-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-eu-bibl-pages% "&Pgs;")
+
+(define %gentext-eu-endnotes% "&Notes;")
+
+(define %gentext-eu-table-endnotes% "&TableNotes;:")
+
+(define %gentext-eu-index-see% "&See;")
+
+(define %gentext-eu-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-eu-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-eu-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-eu-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-eu-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-eu-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-eu-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1eu.ent b/common/dbl1eu.ent
new file mode 100644 (file)
index 0000000..522b938
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Laburpena">
+<!ENTITY abstract        "Laburpena">
+<!ENTITY Answer          "E:">
+<!ENTITY answer          "E:">
+<!ENTITY Appendix        "Eranskina">
+<!ENTITY appendix        "eranskina">
+<!ENTITY Article         "Artikulua">
+<!ENTITY article         "Artikulua">
+<!ENTITY Bibliography    "Bibliografia">
+<!ENTITY bibliography    "Bibliografia">
+<!ENTITY Book            "Liburua">
+<!ENTITY book            "Liburua">
+<!ENTITY CAUTION         "KONTUZ">
+<!ENTITY Caution         "Kontuz">
+<!ENTITY caution         "Kontuz">
+<!ENTITY Chapter         "Atala">
+<!ENTITY chapter         "atala">
+<!ENTITY Colophon        "Azken ohar">
+<!ENTITY colophon        "Azken ohar">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Eskaintza">
+<!ENTITY dedication      "Eskaintza">
+<!ENTITY Edition         "Edizioa">
+<!ENTITY edition         "Edizioa">
+<!ENTITY Equation        "Ekuazioa">
+<!ENTITY equation        "Ekuazioa">
+<!ENTITY Example         "Adibidea">
+<!ENTITY example         "Adibidea">
+<!ENTITY Figure          "Irudia">
+<!ENTITY figure          "Irudia">
+<!ENTITY Glossary        "Glosarioa">
+<!ENTITY glossary        "Glosarioa">
+<!ENTITY GlossSee        "Ikus">
+<!ENTITY glosssee        "Ikus">
+<!ENTITY GlossSeeAlso    "Ikus baita ere">
+<!ENTITY glossseealso    "Ikus baita ere">
+<!ENTITY IMPORTANT       "GARRANTZITSUA">
+<!ENTITY important       "Garrantzitsua">
+<!ENTITY Important       "Garrantzitsua">
+<!ENTITY Index           "Indizea">
+<!ENTITY index           "Indizea">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Legezko abisua">
+<!ENTITY legalnotice     "Legezko abisua">
+<!ENTITY MsgAud          "Audientzia">
+<!ENTITY msgaud          "Audientzia">
+<!ENTITY MsgLevel        "Maila">
+<!ENTITY msglevel        "Maila">
+<!ENTITY MsgOrig         "Jatorria">
+<!ENTITY msgorig         "Jatorria">
+<!ENTITY NOTE            "OHARRA">
+<!ENTITY Note            "Oharra">
+<!ENTITY note            "Oharra">
+<!ENTITY Part            "Zatia">
+<!ENTITY part            "Zatia">
+<!ENTITY Preface         "Hitzaurrea">
+<!ENTITY preface         "Hitzaurrea">
+<!ENTITY Procedure       "Prozedura">
+<!ENTITY procedure       "Prozedura">
+<!ENTITY ProductionSet   "Ekoizpena">
+<!ENTITY Published       "Argitaratua">
+<!ENTITY published       "Argitaratua">
+<!ENTITY Question        "Galdera">
+<!ENTITY question        "galdera">
+<!ENTITY RefEntry        "Sarrera">
+<!ENTITY refentry        "Sarrera">
+<!ENTITY Reference       "Erreferentzia">
+<!ENTITY reference       "Erreferentzia">
+<!ENTITY RefName         "Izena">
+<!ENTITY refname         "Izena">
+<!ENTITY RefSection      "Sekzioa">
+<!ENTITY refsection      "sekzioa">
+<!ENTITY RefSynopsisDiv  "Laburpena">
+<!ENTITY refsynopsisdiv  "Laburpena">
+<!ENTITY RevHistory      "Berrikuspenaren historia">
+<!ENTITY revhistory      "Berrikuspenaren historia">
+<!ENTITY revision        "Berrikuspena">
+<!ENTITY Revision        "Berrikuspena">
+<!ENTITY sect1           "Atala">
+<!ENTITY sect2           "Atala">
+<!ENTITY sect3           "Atala">
+<!ENTITY sect4           "Atala">
+<!ENTITY sect5           "Atala">
+<!ENTITY section         "Atala">
+<!ENTITY Section         "Atala">
+<!ENTITY See             "Ikus">
+<!ENTITY see             "Ikus">
+<!ENTITY SeeAlso         "Ikus baita ere">
+<!ENTITY seealso         "Ikus baita ere">
+<!ENTITY Seealso         "Ikus baita ere">
+<!ENTITY set             "Konfiguratu">
+<!ENTITY Set             "Konfiguratu">
+<!ENTITY setindex        "Konfiguratu indizea">
+<!ENTITY SetIndex        "Konfiguratu indizea">
+<!ENTITY Sidebar         "Alboko barra">
+<!ENTITY sidebar         "alboko barra">
+<!ENTITY step            "urratsa">
+<!ENTITY Step            "Urratsa">
+<!ENTITY Table           "Taula">
+<!ENTITY table           "Taula">
+<!ENTITY tip             "Iradokizuna">
+<!ENTITY TIP             "IRADOKIZUNA">
+<!ENTITY Tip             "Iradokizuna">
+<!ENTITY Warning         "Abisua">
+<!ENTITY warning         "Abisua">
+<!ENTITY WARNING         "ABISUA">
+<!ENTITY and             "eta">
+<!ENTITY by              "Honek">
+<!ENTITY Edited          "editatua">
+<!ENTITY edited          "editatua">
+<!ENTITY Editedby        "Honek editatua">
+<!ENTITY editedby        "Honek editatua">
+<!ENTITY in              "non">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "lehendik ez dagoen elementua">
+<!ENTITY notes           "Oharrak">
+<!ENTITY Notes           "Oharrak">
+<!ENTITY Pgs             "Orr.">
+<!ENTITY pgs             "Orr.">
+<!ENTITY Revisedby       "Berrikuspena: ">
+<!ENTITY revisedby       "Berrikuspena: ">
+<!ENTITY TableNotes      "Oharrak">
+<!ENTITY tablenotes      "Oharrak">
+<!ENTITY TableofContents "Edukien aurkibidea">
+<!ENTITY tableofcontents "Edukien aurkibidea">
+<!ENTITY unexpectedelementname "Ustekabeko elemetu-izena">
+<!ENTITY unsupported     "onartzen ez den">
+<!ENTITY xrefto          "xref honi">
+<!ENTITY listofequations "Ekuazioen zerrenda">
+<!ENTITY ListofEquations "Ekuazioen zerrenda">
+<!ENTITY ListofExamples  "Adibideen zerrenda">
+<!ENTITY listofexamples  "Adibideen zerrenda">
+<!ENTITY ListofFigures   "Irudien zerrenda">
+<!ENTITY listoffigures   "Irudien zerrenda">
+<!ENTITY listoftables    "Taulen zerrenda">
+<!ENTITY ListofTables    "Taulen zerrenda">
+<!ENTITY ListofUnknown   "Ezezagunen zerrenda">
+<!ENTITY listofunknown   "Ezazagunen zerrenda">
+<!ENTITY nav-home        "Etxea">
+<!ENTITY nav-next        "Hurrengoa">
+<!ENTITY nav-next-sibling "Aurreratze azkarra">
+<!ENTITY nav-prev        "Aurrekoa">
+<!ENTITY nav-prev-sibling "Atzeratze azkarra">
+<!ENTITY nav-up          "Gora">
+<!ENTITY sectioncalled   "honela deritzon atala">
+<!ENTITY Draft           "Zirriborroa">
+<!ENTITY above           "goian">
+<!ENTITY below           "behean">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1fi.dsl b/common/dbl1fi.dsl
new file mode 100644 (file)
index 0000000..e69031c
--- /dev/null
@@ -0,0 +1,444 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % fi.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//FI"
+         "dbl1fi.ent">
+%fi.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-fi">
+<style-specification-body>
+
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (fi-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (fi-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "%t"))
+       (list (normalize "article")     (string-append %gentext-fi-start-quote%
+                                                      "%t"
+                                                      %gentext-fi-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "%t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "%t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "%t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "%t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "%t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "%t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "%t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "%t"))
+       (list (normalize "sidebar")     "%t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-fi-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (fi-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (fi-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-fi-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (fi-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-fi-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (fi-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-fi-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-fi-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-fi-intra-label-sep)
+  (list))
+
+(define (fi-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-fi-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-fi-intra-label-sep)))
+        (sep    (assoc name (fi-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-fi-label-title-sep)
+  (list))
+
+(define (fi-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-fi-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-fi-label-title-sep)))
+        (sep    (assoc name (fi-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (fi-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (fi-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (fi-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (fi-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-fi$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (fi-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-fi-start-quote% (dingbat "ldquo"))
+
+(define %gentext-fi-end-quote% (dingbat "rdquo"))
+
+(define %gentext-fi-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-fi-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-fi-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-fi-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-fi-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-fi-page% "")
+
+(define %gentext-fi-and% "&and;")
+
+(define %gentext-fi-listcomma% "&listcomma;")
+
+(define %gentext-fi-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-fi-bibl-pages% "&Pgs;")
+
+(define %gentext-fi-endnotes% "&Notes;")
+
+(define %gentext-fi-table-endnotes% "&TableNotes;:")
+
+(define %gentext-fi-index-see% "&See;")
+
+(define %gentext-fi-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-fi-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-fi-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-fi-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-fi-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-fi-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-fi-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1fi.ent b/common/dbl1fi.ent
new file mode 100644 (file)
index 0000000..ab4fc67
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Lyhennelm\U-00E4;">
+<!ENTITY abstract        "Lyhennelm\U-00E4;">
+<!ENTITY Answer          "A:">
+<!ENTITY answer          "A:">
+<!ENTITY Appendix        "Liite">
+<!ENTITY appendix        "liite">
+<!ENTITY Article         "Artikkeli">
+<!ENTITY article         "Artikkeli">
+<!ENTITY Bibliography    "L\U-00E4;hteet">
+<!ENTITY bibliography    "L\U-00E4;hteet">
+<!ENTITY Book            "Kirja">
+<!ENTITY book            "Kirja">
+<!ENTITY CAUTION         "VARO">
+<!ENTITY Caution         "Varo">
+<!ENTITY caution         "Varo">
+<!ENTITY Chapter         "Luku">
+<!ENTITY chapter         "luku">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Omistus">
+<!ENTITY dedication      "Omistus">
+<!ENTITY Edition         "Edition">
+<!ENTITY edition         "Edition">
+<!ENTITY Equation        "Kaava">
+<!ENTITY equation        "Kaava">
+<!ENTITY Example         "Esimerkki">
+<!ENTITY example         "Esimerkki">
+<!ENTITY Figure          "Kuva">
+<!ENTITY figure          "Kuva">
+<!ENTITY Glossary        "Sanasto">
+<!ENTITY glossary        "Sanasto">
+<!ENTITY GlossSee        "Katso">
+<!ENTITY glosssee        "Katso">
+<!ENTITY GlossSeeAlso    "Katso my\U-00F6;s">
+<!ENTITY glossseealso    "Katso my\U-00F6;s">
+<!ENTITY IMPORTANT       "T\U-00C4;RKE\U-00C4;\U-00C4;">
+<!ENTITY Important       "T\U-00E4;rke\U-00E4;\U-00E4;">
+<!ENTITY important       "T\U-00E4;rke\U-00E4;\U-00E4;">
+<!ENTITY Index           "Indeksi">
+<!ENTITY index           "Indeksi">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "">
+<!ENTITY legalnotice     "">
+<!ENTITY MsgAud          "Yleis\U-00F6;">
+<!ENTITY msgaud          "Yleis\U-00F6;">
+<!ENTITY MsgLevel        "Taso">
+<!ENTITY msglevel        "Taso">
+<!ENTITY MsgOrig         "Alkuper\U-00E4;">
+<!ENTITY msgorig         "Alkuper\U-00E4;">
+<!ENTITY NOTE            "HUOMAA">
+<!ENTITY Note            "Huomaa">
+<!ENTITY note            "Huomaa">
+<!ENTITY Part            "Osa">
+<!ENTITY part            "Osa">
+<!ENTITY Preface         "Esipuhe">
+<!ENTITY preface         "Esipuhe">
+<!ENTITY Procedure       "Aliohjelma">
+<!ENTITY procedure       "Aliohjelma">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "Julkaistu">
+<!ENTITY published       "Julkaistu">
+<!ENTITY Question        "Q:">
+<!ENTITY question        "Q:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "L\U-00E4;hdeluettelo">
+<!ENTITY reference       "L\U-00E4;hdeluettelo">
+<!ENTITY RefName         "Nimi">
+<!ENTITY refname         "Nimi">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Synopsis">
+<!ENTITY refsynopsisdiv  "Synopsis">
+<!ENTITY RevHistory      "Versiohistoria">
+<!ENTITY revhistory      "Versiohistoria">
+<!ENTITY Revision        "Versio">
+<!ENTITY revision        "Versio">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "Kohta">
+<!ENTITY section         "kohta">
+<!ENTITY See             "Katso">
+<!ENTITY see             "Katso">
+<!ENTITY SeeAlso         "Katso my\U-00F6;s">
+<!ENTITY Seealso         "Katso my\U-00F6;s">
+<!ENTITY seealso         "Katso my\U-00F6;s">
+<!ENTITY Set             "Kokoelma">
+<!ENTITY set             "Kokoelma">
+<!ENTITY SetIndex        "Kokoelman indeksi">
+<!ENTITY setindex        "Kokoelman indeksi">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "sivupalkki">
+<!ENTITY Step            "Step">
+<!ENTITY step            "step">
+<!ENTITY Table           "Taulu">
+<!ENTITY table           "Taulu">
+<!ENTITY TIP             "VIHJE">
+<!ENTITY Tip             "Vihje">
+<!ENTITY tip             "Vihje">
+<!ENTITY WARNING         "VAROITUS">
+<!ENTITY Warning         "Varoitus">
+<!ENTITY warning         "Varoitus">
+<!ENTITY and             "ja">
+<!ENTITY by              "">
+<!ENTITY Edited          "Toim.">
+<!ENTITY edited          "Toim.">
+<!ENTITY Editedby        "Toimittanut">
+<!ENTITY editedby        "Toimittanut">
+<!ENTITY in              "teoksessa">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "elementti\U-00E4; ei ole olemassa">
+<!ENTITY notes           "">
+<!ENTITY Notes           "">
+<!ENTITY Pgs             "Sivut">
+<!ENTITY pgs             "Sivut">
+<!ENTITY Revisedby       "Revised by: ">
+<!ENTITY revisedby       "Revised by: ">
+<!ENTITY TableNotes      "">
+<!ENTITY tablenotes      "">
+<!ENTITY TableofContents "Sis\U-00E4;llys">
+<!ENTITY tableofcontents "Sis\U-00E4;llys">
+<!ENTITY unexpectedelementname "Odottamaton elementin nimi">
+<!ENTITY unsupported     "ei tueta">
+<!ENTITY xrefto          "xref johonkin">
+<!ENTITY listofequations "Luettelo esimerkeist\U-00E4;">
+<!ENTITY ListofEquations "Luettelo esimerkeist\U-00E4;">
+<!ENTITY ListofExamples  "Luettelo esimerkeist\U-00E4;">
+<!ENTITY listofexamples  "Luettelo esimerkeist\U-00E4;">
+<!ENTITY ListofFigures   "Luettelo kuvista">
+<!ENTITY listoffigures   "Luettelo kuvista">
+<!ENTITY listoftables    "Luettelo tauluista">
+<!ENTITY ListofTables    "Luettelo tauluista">
+<!ENTITY ListofUnknown   "Luettelo tuntemattomista">
+<!ENTITY listofunknown   "Luettelo tuntemattomista">
+<!ENTITY nav-home        "Alkuun">
+<!ENTITY nav-next        "Seuraava">
+<!ENTITY nav-next-sibling "Nopeasti eteenp\U-00E4;in">
+<!ENTITY nav-prev        "Edellinen">
+<!ENTITY nav-prev-sibling "Nopeasti taaksep\U-00E4;in">
+<!ENTITY nav-up          "Yl\U-00F6;s">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1fr.dsl b/common/dbl1fr.dsl
new file mode 100644 (file)
index 0000000..381c099
--- /dev/null
@@ -0,0 +1,436 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % fr.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//FR"
+         "dbl1fr.ent">
+%fr.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-fr">
+<style-specification-body>
+
+;; $Id: dbl1fr.dsl,v 1.3 2002/02/20 16:32:35 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x
+;; keywords.
+;;
+;; Contributors:
+;; Rainer Feuerstein, fire@informatik.uni-wuerzburg.de
+;; Christian Leutloff, leutloff@sundancer.oche.de
+;; Eric Bischoff, e.bischoff@noos.fr
+;; Frederik Fouvry, fouvry@CoLi.Uni-SB.DE
+
+(define (fr-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (fr-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "l'annexe intitul&#233;e %t"))
+       (list (normalize "article")     (string-append %gentext-fr-start-quote%
+                                                      "%t"
+                                                      %gentext-fr-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "le chapitre intitul&#233; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la section intitul&#233;e %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la section intitul&#233;e %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la section intitul&#233;e %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la section intitul&#233;e %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la section intitul&#233;e %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la section intitul&#233;e %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "la section intitul&#233;e %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-fr-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (fr-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (fr-auto-xref-indirect-connector before) 
+  (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-fr-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (fr-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-fr-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (fr-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-fr-element-name : &unexpectedelementname; : "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-fr-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-fr-intra-label-sep)
+  (list))
+
+(define (fr-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-fr-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-fr-intra-label-sep)))
+        (sep    (assoc name (fr-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-fr-label-title-sep)
+  (list))
+
+(define (fr-label-title-sep)
+  (list
+   (list (normalize "abstract")                "\U-00A0;: ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                "\U-00A0;: ")
+   (list (normalize "glossseealso")    "\U-00A0;: ")
+   (list (normalize "important")       "\U-00A0;: ")
+   (list (normalize "note")            "\U-00A0;: ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             "\U-00A0;: ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-fr-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-fr-label-title-sep)))
+        (sep    (assoc name (fr-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (fr-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (fr-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (fr-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (fr-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-fr$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (fr-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;\U-00A0;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+                                                                   ; nbsp;
+(define %gentext-fr-start-quote%  (string-append (dingbat "laquo") "\U-00A0;"))
+
+(define %gentext-fr-end-quote%  (string-append "\U-00A0;" (dingbat "raquo")))
+
+(define %gentext-fr-start-nested-quote%  (string-append (dingbat "lsaquo") "\U-00A0;"))
+
+(define %gentext-fr-end-nested-quote%  (string-append (dingbat "rsaquo") "\U-00A0;"))
+
+(define %gentext-fr-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-fr-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-fr-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-fr-page% "")
+
+(define %gentext-fr-and% "&and;")
+
+(define %gentext-fr-listcomma% "&listcomma;")
+
+(define %gentext-fr-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-fr-bibl-pages% "&Pgs;")
+
+(define %gentext-fr-endnotes% "&Notes;")
+
+(define %gentext-fr-table-endnotes% "&TableNotes;\U-00A0;:")
+
+(define %gentext-fr-index-see% "&See;")
+
+(define %gentext-fr-index-seealso% "&SeeAlso;")
+
+(define (gentext-fr-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-fr-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-fr-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-fr-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-fr-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-fr-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1fr.ent b/common/dbl1fr.ent
new file mode 100644 (file)
index 0000000..c22f22e
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "R\U-00E9;sum\U-00E9;">
+<!ENTITY abstract        "R\U-00E9;sum\U-00E9;">
+<!ENTITY Answer          "R\U-00A0;:">
+<!ENTITY answer          "R\U-00A0;:">
+<!ENTITY Appendix        "Annexe">
+<!ENTITY appendix        "annexe">
+<!ENTITY Article         "Article">
+<!ENTITY article         "Article">
+<!ENTITY Bibliography    "Bibliographie">
+<!ENTITY bibliography    "Bibliographie">
+<!ENTITY Book            "Livre">
+<!ENTITY book            "Livre">
+<!ENTITY Caution         "Attention">
+<!ENTITY caution         "Attention">
+<!ENTITY CAUTION         "ATTENTION">
+<!ENTITY Chapter         "Chapitre">
+<!ENTITY chapter         "chapitre">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "D\U-00E9;dicace">
+<!ENTITY dedication      "D\U-00E9;dicace">
+<!ENTITY Edition         "\U-00C9;dition">
+<!ENTITY edition         "\U-00C9;dition">
+<!ENTITY Equation        "\U-00C9;quation">
+<!ENTITY equation        "\U-00C9;quation">
+<!ENTITY Example         "Exemple">
+<!ENTITY example         "Exemple">
+<!ENTITY Figure          "Figure">
+<!ENTITY figure          "Figure">
+<!ENTITY Glossary        "Glossaire">
+<!ENTITY glossary        "Glossaire">
+<!ENTITY GlossSee        "Voir">
+<!ENTITY glosssee        "Voir">
+<!ENTITY GlossSeeAlso    "Voir aussi">
+<!ENTITY glossseealso    "Voir aussi">
+<!ENTITY IMPORTANT       "IMPORTANT">
+<!ENTITY important       "Important">
+<!ENTITY Important       "Important">
+<!ENTITY Index           "Index">
+<!ENTITY index           "Index">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Note l\U-00E9;gale">
+<!ENTITY legalnotice     "Note l\U-00E9;gale">
+<!ENTITY MsgAud          "Public vis\U-00E9;">
+<!ENTITY msgaud          "Public vis\U-00E9;">
+<!ENTITY MsgLevel        "Niveau">
+<!ENTITY msglevel        "Niveau">
+<!ENTITY MsgOrig         "Origine">
+<!ENTITY msgorig         "Origine">
+<!ENTITY NOTE            "NOTE">
+<!ENTITY Note            "Note">
+<!ENTITY note            "Note">
+<!ENTITY Part            "Partie">
+<!ENTITY part            "Partie">
+<!ENTITY Preface         "Pr\U-00E9;face">
+<!ENTITY preface         "Pr\U-00E9;face">
+<!ENTITY Procedure       "Proc\U-00E9;dure">
+<!ENTITY procedure       "Proc\U-00E9;dure">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY PubDate         "Date de publication">
+<!ENTITY pubdate         "Date de publication">
+<!ENTITY Published       "Publi\U-00E9;">
+<!ENTITY published       "Publi\U-00E9;">
+<!ENTITY Qandadiv        "Q &amp; R">
+<!ENTITY qandadiv        "Q &amp; R">
+<!ENTITY Question        "Q\U-00A0;:">
+<!ENTITY question        "Q\U-00A0;:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "R\U-00E9;f\U-00E9;rence">
+<!ENTITY reference       "R\U-00E9;f\U-00E9;rence">
+<!ENTITY RefName         "Nom">
+<!ENTITY refname         "Nom">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Synopsis">
+<!ENTITY refsynopsisdiv  "Synopsis">
+<!ENTITY RevHistory      "Historique des versions">
+<!ENTITY revhistory      "Historique des versions">
+<!ENTITY Revision        "Version">
+<!ENTITY revision        "Version">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY section         "section">
+<!ENTITY Section         "Section">
+<!ENTITY see             "voir">
+<!ENTITY See             "Voir">
+<!ENTITY seealso         "voir aussi">
+<!ENTITY Seealso         "Voir aussi">
+<!ENTITY SeeAlso         "Voir Aussi">
+<!ENTITY set             "Ensemble">
+<!ENTITY Set             "Ensemble">
+<!ENTITY setindex        "Index">
+<!ENTITY SetIndex        "Index">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "">
+<!ENTITY step            "\U-00E9;tape">
+<!ENTITY Step            "\U-00C9;tape">
+<!ENTITY Table           "Tableau">
+<!ENTITY table           "Tableau">
+<!ENTITY tip             "ASTUCE">
+<!ENTITY TIP             "ASTUCE">
+<!ENTITY Tip             "Astuce">
+<!ENTITY Warning         "Avertissement">
+<!ENTITY WARNING         "AVERTISSEMENT">
+<!ENTITY warning         "AVERTISSEMENT">
+<!ENTITY and             "et">
+<!ENTITY by              "par">
+<!ENTITY called          "intitul\U-00E9;">
+<!ENTITY Edited          "Publi\U-00E9;">
+<!ENTITY edited          "Publi\U-00E9;">
+<!ENTITY Editedby        "Publi\U-00E9; par">
+<!ENTITY editedby        "Publi\U-00E9; par">
+<!ENTITY in              "dans">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "Cet \U-00E9;l\U-00E9;ment n'existe pas">
+<!ENTITY notes           "Notes">
+<!ENTITY Notes           "Notes">
+<!ENTITY Pgs             "Pages">
+<!ENTITY pgs             "Pages">
+<!ENTITY Revisedby       "Revu par\U-00A0;: ">
+<!ENTITY revisedby       "Revu par\U-00A0;: ">
+<!ENTITY TableNotes      "Remarques">
+<!ENTITY tablenotes      "Remarques">
+<!ENTITY TableofContents "Table des mati\U-00E8;res">
+<!ENTITY tableofcontents "Table des mati\U-00E8;res">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "Nom d'\U-00E9;l\U-00E9;ment non attendu">
+<!ENTITY unsupported     "Non reconnu par le syst\U-00E8;me">
+<!ENTITY xrefto          "R\U-00E9;f\U-00E9;rence vers">
+<!ENTITY listofequations "Liste des \U-00E9;quations">
+<!ENTITY ListofEquations "Liste des \U-00E9;quations">
+<!ENTITY ListofExamples  "Liste des exemples">
+<!ENTITY listofexamples  "Liste des exemples">
+<!ENTITY ListofFigures   "Liste des illustrations">
+<!ENTITY listoffigures   "Liste des illustrations">
+<!ENTITY ListofProcedures "Liste des proc\U-00E9;dures">
+<!ENTITY listofprocedures "Liste des proc\U-00E9;dures">
+<!ENTITY listoftables    "Liste des tableaux">
+<!ENTITY ListofTables    "Liste des tableaux">
+<!ENTITY ListofUnknown   "Liste des inconnues">
+<!ENTITY listofunknown   "Liste des inconnues">
+<!ENTITY nav-home        "Sommaire">
+<!ENTITY nav-next        "Suivant">
+<!ENTITY nav-next-sibling "Avance rapide">
+<!ENTITY nav-prev        "Pr\U-00E9;c\U-00E9;dent">
+<!ENTITY nav-prev-sibling "Arri\U-00E8;re rapide">
+<!ENTITY nav-up          "Niveau sup\U-00E9;rieur">
+<!ENTITY nav-toc         "TdM">
+<!ENTITY Draft           "Brouillon">
+<!ENTITY above           "au dessus">
+<!ENTITY below           "au dessous">
+<!ENTITY sectioncalled   "la section intitul\U-00E9;e">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz\U-00E2;\U-00EA;\U-00EE;\U-00F4;\U-00FB;\U-00EB;\U-00EF;\U-00FC;\U-00E0;\U-00E8;\U-00F9;\U-00E9;\U-00E7;\U-00E6;\U-0153;">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ\U-00C2;\U-00CA;\U-00CE;\U-00D4;\U-00DB;\U-00CB;\U-00CF;\U-00DC;\U-00C0;\U-00C8;\U-00D9;\U-00C9;\U-00C7;\U-00C6;\U-0152;">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "2">
+<!ENTITY hyphenation-remain-character-count "2">
diff --git a/common/dbl1hu.dsl b/common/dbl1hu.dsl
new file mode 100644 (file)
index 0000000..180bdb3
--- /dev/null
@@ -0,0 +1,447 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % hu.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//HU"
+         "dbl1hu.ent">
+%hu.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-hu">
+<style-specification-body>
+
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+;; Contributors:
+;; Hojtsy Gabor, hgoba@freemail.c3.hu
+;;
+
+(define (hu-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (hu-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "%n &Appendix;"
+                                           "%t"))
+       (list (normalize "article")     (string-append %gentext-hu-start-quote%
+                                                      "%t"
+                                                      %gentext-hu-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "%n &chapter;"
+                                           "%t"))
+       (list (normalize "equation")    "%n &Equation;")
+       (list (normalize "example")     "%n &Example;")
+       (list (normalize "figure")      "%n &Figure;")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "%n &Part;")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "%n, %t &Procedure; ")
+       (list (normalize "reference")   "%n, %t &Reference; ")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "%n &Section;"
+                                           "%t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "%n &Section;"
+                                           "%t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "%n &Section;"
+                                           "%t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "%n &Section;"
+                                           "%t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "%n &Section;"
+                                           "%t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "%n &Section;"
+                                           "%t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "%n &Section;"
+                                           "%t"))
+       (list (normalize "sidebar")     "%t")
+       (list (normalize "step")        "%n &step;")
+       (list (normalize "table")       "%n &Table;")))
+
+(define (gentext-hu-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (hu-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (hu-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-hu-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (hu-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-hu-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (hu-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-hu-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-hu-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-hu-intra-label-sep)
+  (list))
+
+(define (hu-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-hu-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-hu-intra-label-sep)))
+        (sep    (assoc name (hu-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-hu-label-title-sep)
+  (list))
+
+(define (hu-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-hu-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-hu-label-title-sep)))
+        (sep    (assoc name (hu-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (hu-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (hu-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (hu-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (hu-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-hu$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (hu-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-hu-start-quote% (dingbat "ldquo"))
+
+(define %gentext-hu-end-quote% (dingbat "rdquo"))
+
+(define %gentext-hu-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-hu-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-hu-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-hu-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-hu-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-hu-page% "")
+
+(define %gentext-hu-and% "&and;")
+
+(define %gentext-hu-listcomma% "&listcomma;")
+
+(define %gentext-hu-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-hu-bibl-pages% "&Pgs;")
+
+(define %gentext-hu-endnotes% "&Notes;")
+
+(define %gentext-hu-table-endnotes% "&TableNotes;:")
+
+(define %gentext-hu-index-see% "&See;")
+
+(define %gentext-hu-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-hu-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-hu-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-hu-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-hu-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-hu-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-hu-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1hu.ent b/common/dbl1hu.ent
new file mode 100644 (file)
index 0000000..3eb1e59
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Kivonat">
+<!ENTITY abstract        "kivonat">
+<!ENTITY Answer          "V:">
+<!ENTITY answer          "v:">
+<!ENTITY Appendix        "F\U-00FC;ggel\U-00E9;k">
+<!ENTITY appendix        "f\U-00FC;ggel\U-00E9;k">
+<!ENTITY Article         "Cikk">
+<!ENTITY article         "cikk">
+<!ENTITY Bibliography    "Irodalomjegyz\U-00E9;k">
+<!ENTITY bibliography    "irodalomjegyz\U-00E9;k">
+<!ENTITY Book            "K\U-00F6;nyv">
+<!ENTITY book            "k\U-00F6;nyv">
+<!ENTITY CAUTION         "FIGYELEM">
+<!ENTITY Caution         "Figyelem">
+<!ENTITY caution         "figyelem">
+<!ENTITY Chapter         "Fejezet">
+<!ENTITY chapter         "fejezet">
+<!ENTITY Colophon        "V\U-00E9;gsz\U-00F3;">
+<!ENTITY colophon        "v\U-00E9;gsz\U-00F3;">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "copyright">
+<!ENTITY Dedication      "Aj\U-00E1;nl\U-00E1;s">
+<!ENTITY dedication      "aj\U-00E1;nl\U-00E1;s">
+<!ENTITY Edition         "Kiad\U-00E1;s">
+<!ENTITY edition         "kiad\U-00E1;s">
+<!ENTITY Equation        "Egyenlet">
+<!ENTITY equation        "egyenlet">
+<!ENTITY Example         "P\U-00E9;lda">
+<!ENTITY example         "p\U-00E9;lda">
+<!ENTITY Figure          "\U-00C1;bra">
+<!ENTITY figure          "\U-00E1;bra">
+<!ENTITY Glossary        "Sz\U-00F3;jegyz\U-00E9;k">
+<!ENTITY glossary        "sz\U-00F3;jegyz\U-00E9;k">
+<!ENTITY GlossSee        "L\U-00E1;sd">
+<!ENTITY glosssee        "l\U-00E1;sd">
+<!ENTITY GlossSeeAlso    "L\U-00E1;sd m\U-00E9;g">
+<!ENTITY glossseealso    "l\U-00E1;sd m\U-00E9;g">
+<!ENTITY IMPORTANT       "FONTOS">
+<!ENTITY Important       "Fontos">
+<!ENTITY important       "fontos">
+<!ENTITY Index           "T\U-00E1;rgymutat\U-00F3;">
+<!ENTITY index           "t\U-00E1;rgymutat\U-00F3;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "isbn">
+<!ENTITY LegalNotice     "Jogi k\U-00F6;zlem\U-00E9;ny">
+<!ENTITY legalnotice     "jogi k\U-00F6;zlem\U-00E9;ny">
+<!ENTITY MsgAud          "C\U-00E9;lk\U-00F6;z\U-00F6;ns\U-00E9;g">
+<!ENTITY msgaud          "c\U-00E9;lk\U-00F6;z\U-00F6;ns\U-00E9;g">
+<!ENTITY MsgLevel        "Szint">
+<!ENTITY msglevel        "szint">
+<!ENTITY MsgOrig         "Eredet">
+<!ENTITY msgorig         "eredet">
+<!ENTITY NOTE            "MEGJEGYZ\U-00C9;S">
+<!ENTITY Note            "Megjegyz\U-00E9;s">
+<!ENTITY note            "megjegyz\U-00E9;s">
+<!ENTITY Part            "R\U-00E9;sz">
+<!ENTITY part            "r\U-00E9;sz">
+<!ENTITY Preface         "El\U-0151;sz\U-00F3;">
+<!ENTITY preface         "el\U-0151;sz\U-00F3;">
+<!ENTITY Procedure       "Elj\U-00E1;r\U-00E1;s">
+<!ENTITY procedure       "elj\U-00E1;r\U-00E1;s">
+<!ENTITY ProductionSet   "Elemcsoport">
+<!ENTITY Published       "Megjelent">
+<!ENTITY published       "megjelent">
+<!ENTITY Question        "K:">
+<!ENTITY question        "k:">
+<!ENTITY RefEntry        "Bejegyz\U-00E9;s">
+<!ENTITY refentry        "bejegyz\U-00E9;s">
+<!ENTITY Reference       "Referencia">
+<!ENTITY reference       "referencia">
+<!ENTITY RefName         "N\U-00E9;v">
+<!ENTITY refname         "n\U-00E9;v">
+<!ENTITY RefSection      "Szakasz">
+<!ENTITY refsection      "szakasz">
+<!ENTITY RefSynopsisDiv  "\U-00C1;ttekint\U-00E9;s">
+<!ENTITY refsynopsisdiv  "\U-00E1;ttekint\U-00E9;s">
+<!ENTITY RevHistory      "Verzi\U-00F3;t\U-00F6;rt\U-00E9;net">
+<!ENTITY revhistory      "verzi\U-00F3;t\U-00F6;rt\U-00E9;net">
+<!ENTITY Revision        "Verzi\U-00F3;">
+<!ENTITY revision        "verzi\U-00F3;">
+<!ENTITY sect1           "Szakasz">
+<!ENTITY sect2           "Szakasz">
+<!ENTITY sect3           "Szakasz">
+<!ENTITY sect4           "Szakasz">
+<!ENTITY sect5           "Szakasz">
+<!ENTITY Section         "Szakasz">
+<!ENTITY section         "szakasz">
+<!ENTITY See             "L\U-00E1;sd">
+<!ENTITY see             "l\U-00E1;sd">
+<!ENTITY SeeAlso         "L\U-00E1;sd m\U-00E9;g">
+<!ENTITY Seealso         "L\U-00E1;sd m\U-00E9;g">
+<!ENTITY seealso         "l\U-00E1;sd m\U-00E9;g">
+<!ENTITY Set             "Csoport">
+<!ENTITY set             "csoport">
+<!ENTITY SetIndex        "Csoportmutat\U-00F3;">
+<!ENTITY setindex        "csoportmutat\U-00F3;">
+<!ENTITY Sidebar         "Sz\U-00E9;ljegyzet">
+<!ENTITY sidebar         "sz\U-00E9;ljegyzet">
+<!ENTITY Step            "L\U-00E9;p\U-00E9;s">
+<!ENTITY step            "l\U-00E9;p\U-00E9;s">
+<!ENTITY Table           "T\U-00E1;bl\U-00E1;zat">
+<!ENTITY table           "t\U-00E1;bl\U-00E1;zat">
+<!ENTITY TIP             "TIPP">
+<!ENTITY Tip             "Tipp">
+<!ENTITY tip             "tipp">
+<!ENTITY WARNING         "FIGYELEM">
+<!ENTITY Warning         "Figyelem">
+<!ENTITY warning         "figyelem">
+<!ENTITY and             "\U-00E9;s">
+<!ENTITY by              "">
+<!ENTITY Edited          "Szerk.">
+<!ENTITY edited          "szerk.">
+<!ENTITY Editedby        "Szerkesztette">
+<!ENTITY editedby        "szerkesztette">
+<!ENTITY in              "">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "nem l\U-00E9;tez\U-0151; elem">
+<!ENTITY notes           "megjegyz\U-00E9;sek">
+<!ENTITY Notes           "Megjegyz\U-00E9;sek">
+<!ENTITY Pgs             "Lsz.">
+<!ENTITY pgs             "lsz.">
+<!ENTITY Revisedby       "Megvizsg\U-00E1;lva">
+<!ENTITY revisedby       "megvizsg\U-00E1;lva">
+<!ENTITY TableNotes      "Megjegyz\U-00E9;sek">
+<!ENTITY tablenotes      "megjegyz\U-00E9;sek">
+<!ENTITY TableofContents "Tartalom">
+<!ENTITY tableofcontents "tartalom">
+<!ENTITY unexpectedelementname "nem v\U-00E1;rt elemn\U-00E9;v">
+<!ENTITY unsupported     "nem t\U-00E1;mogatott">
+<!ENTITY xrefto          "keresztref">
+<!ENTITY listofequations "az egyenletek list\U-00E1;ja">
+<!ENTITY ListofEquations "Az egyenletek list\U-00E1;ja">
+<!ENTITY ListofExamples  "A p\U-00E9;ld\U-00E1;k list\U-00E1;ja">
+<!ENTITY listofexamples  "a p\U-00E9;ld\U-00E1;k list\U-00E1;ja">
+<!ENTITY ListofFigures   "Az \U-00E1;br\U-00E1;k list\U-00E1;ja">
+<!ENTITY listoffigures   "az \U-00E1;br\U-00E1;k list\U-00E1;ja">
+<!ENTITY listoftables    "a t\U-00E1;bl\U-00E1;zatok list\U-00E1;ja">
+<!ENTITY ListofTables    "A t\U-00E1;bl\U-00E1;zatok list\U-00E1;ja">
+<!ENTITY ListofUnknown   "Az egy\U-00E9;b elemek list\U-00E1;ja">
+<!ENTITY listofunknown   "az egy\U-00E9;b elemek list\U-00E1;ja">
+<!ENTITY nav-home        "Tartalom">
+<!ENTITY nav-next        "K\U-00F6;vetkez\U-0151;">
+<!ENTITY nav-next-sibling "Gyors el\U-0151;re">
+<!ENTITY nav-prev        "El\U-0151;z\U-0151;">
+<!ENTITY nav-prev-sibling "Gyors vissza">
+<!ENTITY nav-up          "Fel">
+<!ENTITY sectioncalled   "ilyen nev\U-0171; szakasz:">
+<!ENTITY Draft           "V\U-00E1;zlat">
+<!ENTITY above           "fent">
+<!ENTITY below           "lent">
+<!ENTITY lowercase.alpha "a\U-00E1;bcde\U-00E9;fghi\U-00ED;jklmno\U-00F3;\U-00F6;\U-0151;pqrstu\U-00FA;\U-00FC;\U-00AB;vwxyz">
+<!ENTITY uppercase.alpha "A\U-00C1;BCDE\U-00C9;FGHI\U-00CD;JKLMNO\U-00D3;\U-00D6;\U-0150;PQRSTU\U-00DA;\U-00DC;\U-0170;VWXYZ">
diff --git a/common/dbl1id.dsl b/common/dbl1id.dsl
new file mode 100644 (file)
index 0000000..bd70530
--- /dev/null
@@ -0,0 +1,608 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % id.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//IN"
+         "dbl1id.ent">
+%id.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-id">
+<style-specification-body>
+
+;; $Id: dbl1id.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+;; Contributors:
+;; Mohammad DAMT, mdamt@cdl2000.com
+;;
+
+(define (id-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (id-appendix-xref-string gi-or-name)
+  (if %chapter-autolabel%
+      "&Appendix; %n"
+      "&appendix; berjudul %t"))
+
+(define (id-article-xref-string gi-or-name)
+  (string-append %gentext-id-start-quote%
+                "%t"
+                %gentext-id-end-quote%))
+
+(define (id-bibliography-xref-string gi-or-name)
+  "%t")
+
+(define (id-book-xref-string gi-or-name)
+  "%t")
+
+(define (id-chapter-xref-string gi-or-name)
+  (if %chapter-autolabel%
+      "&Chapter; %n"
+      "&chapter; berjudul %t"))
+
+(define (id-equation-xref-string gi-or-name)
+  "&Equation; %n")
+
+(define (id-example-xref-string gi-or-name)
+  "&Example; %n")
+
+(define (id-figure-xref-string gi-or-name)
+  "&Figure; %n")
+
+(define (id-glossary-xref-string gi-or-name)
+  "%t")
+
+(define (id-index-xref-string gi-or-name)
+  "%t")
+
+(define (id-listitem-xref-string gi-or-name)
+  "%n")
+
+(define (id-part-xref-string gi-or-name)
+  "&Part; %n")
+
+(define (id-preface-xref-string gi-or-name)
+  "%t")
+
+(define (id-procedure-xref-string gi-or-name)
+  "&Procedure; %n, %t")
+
+(define (id-reference-xref-string gi-or-name)
+  "&Reference; %n, %t")
+
+(define (id-sectioning-xref-string gi-or-name)
+  (if %section-autolabel% 
+      "&Section; %n" 
+      "&section; berjudul %t"))
+
+(define (id-sect1-xref-string gi-or-name)
+  (id-sectioning-xref-string gi-or-name))
+
+(define (id-sect2-xref-string gi-or-name)
+  (id-sectioning-xref-string gi-or-name))
+
+(define (id-sect3-xref-string gi-or-name)
+  (id-sectioning-xref-string gi-or-name))
+
+(define (id-sect4-xref-string gi-or-name)
+  (id-sectioning-xref-string gi-or-name))
+
+(define (id-sect5-xref-string gi-or-name)
+  (id-sectioning-xref-string gi-or-name))
+
+(define (id-section-xref-string gi-or-name)
+  (id-sectioning-xref-string gi-or-name))
+
+(define (id-sidebar-xref-string gi-or-name)
+  "the &sidebar; %t")
+
+(define (id-step-xref-string gi-or-name)
+  "&step; %n")
+
+(define (id-table-xref-string gi-or-name)
+  "&Table; %n")
+
+(define (id-default-xref-string gi-or-name)
+  (let* ((giname (if (string? gi-or-name) gi-or-name (gi gi-or-name)))
+        (msg    (string-append "[&xrefto; "
+                               (if giname giname "&nonexistantelement;")
+                               " &unsupported;]"))
+        (err    (node-list-error msg (current-node))))
+    msg))
+
+(define (gentext-id-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname)))
+    (cond
+      ((equal? name (normalize "appendix")) (id-appendix-xref-string gind))
+      ((equal? name (normalize "article"))  (id-article-xref-string gind))
+      ((equal? name (normalize "bibliography")) (id-bibliography-xref-string gind))
+      ((equal? name (normalize "book"))     (id-book-xref-string gind))
+      ((equal? name (normalize "chapter"))  (id-chapter-xref-string gind))
+      ((equal? name (normalize "equation")) (id-equation-xref-string gind))
+      ((equal? name (normalize "example"))  (id-example-xref-string gind))
+      ((equal? name (normalize "figure"))   (id-figure-xref-string gind))
+      ((equal? name (normalize "glossary")) (id-glossary-xref-string gind))
+      ((equal? name (normalize "index"))    (id-index-xref-string gind))
+      ((equal? name (normalize "listitem")) (id-listitem-xref-string gind))
+      ((equal? name (normalize "part"))     (id-part-xref-string gind))
+      ((equal? name (normalize "preface"))  (id-preface-xref-string gind))
+      ((equal? name (normalize "procedure")) (id-procedure-xref-string gind))
+      ((equal? name (normalize "reference")) (id-reference-xref-string gind))
+      ((equal? name (normalize "sect1"))    (id-sect1-xref-string gind))
+      ((equal? name (normalize "sect2"))    (id-sect2-xref-string gind))
+      ((equal? name (normalize "sect3"))    (id-sect3-xref-string gind))
+      ((equal? name (normalize "sect4"))    (id-sect4-xref-string gind))
+      ((equal? name (normalize "sect5"))    (id-sect5-xref-string gind))
+      ((equal? name (normalize "section"))  (id-section-xref-string gind))
+      ((equal? name (normalize "simplesect"))  (id-section-xref-string gind))
+      ((equal? name (normalize "sidebar"))  (id-sidebar-xref-string gind))
+      ((equal? name (normalize "step"))     (id-step-xref-string gind))
+      ((equal? name (normalize "table"))    (id-table-xref-string gind))
+      (else (id-default-xref-string gind)))))
+
+(define (id-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-id-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+(define id-abstract-name       "&Abstract;")
+(define id-answer-name         "&Answer;")
+(define id-appendix-name       "&Appendix;")
+(define id-article-name        "&Article;")
+(define id-bibliography-name   "&Bibliography;")
+(define id-book-name           "&Book;")
+(define id-calloutlist-name    "")
+(define id-caution-name        "&Caution;")
+(define id-chapter-name        "&Chapter;")
+(define id-copyright-name      "&Copyright;")
+(define id-dedication-name     "&Dedication;")
+(define id-edition-name        "&Edition;")
+(define id-equation-name       "&Equation;")
+(define id-example-name        "&Example;")
+(define id-figure-name "&Figure;")
+(define id-glossary-name       "&Glossary;")
+(define id-glosssee-name       "&GlossSee;")
+(define id-glossseealso-name   "&GlossSeeAlso;")
+(define id-important-name      "&Important;")
+(define id-index-name          "&Index;")
+(define id-colophon-name       "&Colophon;")
+(define id-setindex-name       "&SetIndex;")
+(define id-isbn-name           "&isbn;")
+(define id-legalnotice-name    "&LegalNotice;")
+(define id-msgaud-name "&MsgAud;")
+(define id-msglevel-name       "&MsgLevel;")
+(define id-msgorig-name        "&MsgOrig;")
+(define id-note-name           "&Note;")
+(define id-part-name           "&Part;")
+(define id-preface-name        "&Preface;")
+(define id-procedure-name      "&Procedure;")
+(define id-pubdate-name        "&Published;")
+(define id-question-name       "&Question;")
+(define id-refentry-name      "&RefEntry;")
+(define id-reference-name      "&Reference;")
+(define id-refname-name        "&RefName;")
+(define id-revhistory-name     "&RevHistory;")
+(define id-refsect1-name      "&RefSection;")
+(define id-refsect2-name      "&RefSection;")
+(define id-refsect3-name      "&RefSection;")
+(define id-refsynopsisdiv-name      "&RefSynopsisDiv;")
+(define id-revision-name       "&Revision;")
+(define id-sect1-name          "&Section;")
+(define id-sect2-name          "&Section;")
+(define id-sect3-name          "&Section;")
+(define id-sect4-name          "&Section;")
+(define id-sect5-name          "&Section;")
+(define id-section-name                "&Section;")
+(define id-simplesect-name     "&Section;")
+(define id-seeie-name          "&See;")
+(define id-seealsoie-name      "&Seealso;")
+(define id-set-name            "&Set;")
+(define id-sidebar-name        "&Sidebar;")
+(define id-step-name           "&step;")
+(define id-table-name          "&Table;")
+(define id-tip-name            "&Tip;")
+(define id-toc-name            "&TableofContents;")
+(define id-warning-name        "&Warning;")
+
+(define (gentext-id-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname)))
+    (cond
+     ((equal? name (normalize "abstract"))     id-abstract-name)
+     ((equal? name (normalize "answer"))       id-answer-name)
+     ((equal? name (normalize "appendix"))     id-appendix-name)
+     ((equal? name (normalize "article"))      id-article-name)
+     ((equal? name (normalize "bibliography")) id-bibliography-name)
+     ((equal? name (normalize "book"))         id-book-name)
+     ((equal? name (normalize "calloutlist"))  id-calloutlist-name)
+     ((equal? name (normalize "caution"))      id-caution-name)
+     ((equal? name (normalize "chapter"))      id-chapter-name)
+     ((equal? name (normalize "copyright"))    id-copyright-name)
+     ((equal? name (normalize "dedication"))   id-dedication-name)
+     ((equal? name (normalize "edition"))      id-edition-name)
+     ((equal? name (normalize "equation"))     id-equation-name)
+     ((equal? name (normalize "example"))      id-example-name)
+     ((equal? name (normalize "figure"))       id-figure-name)
+     ((equal? name (normalize "glossary"))     id-glossary-name)
+     ((equal? name (normalize "glosssee"))     id-glosssee-name)
+     ((equal? name (normalize "glossseealso")) id-glossseealso-name)
+     ((equal? name (normalize "important"))    id-important-name)
+     ((equal? name (normalize "index"))                id-index-name)
+     ((equal? name (normalize "colophon"))     id-colophon-name)
+     ((equal? name (normalize "setindex"))     id-setindex-name)
+     ((equal? name (normalize "isbn"))         id-isbn-name)
+     ((equal? name (normalize "legalnotice"))  id-legalnotice-name)
+     ((equal? name (normalize "msgaud"))       id-msgaud-name)
+     ((equal? name (normalize "msglevel"))     id-msglevel-name)
+     ((equal? name (normalize "msgorig"))      id-msgorig-name)
+     ((equal? name (normalize "note"))         id-note-name)
+     ((equal? name (normalize "part"))         id-part-name)
+     ((equal? name (normalize "preface"))      id-preface-name)
+     ((equal? name (normalize "procedure"))    id-procedure-name)
+     ((equal? name (normalize "pubdate"))      id-pubdate-name)
+     ((equal? name (normalize "question"))     id-question-name)
+     ((equal? name (normalize "refentry"))     id-refentry-name)
+     ((equal? name (normalize "reference"))    id-reference-name)
+     ((equal? name (normalize "refname"))      id-refname-name)
+     ((equal? name (normalize "revhistory"))   id-revhistory-name)
+     ((equal? name (normalize "refsect1"))     id-refsect1-name)
+     ((equal? name (normalize "refsect2"))     id-refsect2-name)
+     ((equal? name (normalize "refsect3"))     id-refsect3-name)
+     ((equal? name (normalize "refsynopsisdiv"))       id-refsynopsisdiv-name)
+     ((equal? name (normalize "revision"))     id-revision-name)
+     ((equal? name (normalize "sect1"))                id-sect1-name)
+     ((equal? name (normalize "sect2"))                id-sect2-name)
+     ((equal? name (normalize "sect3"))                id-sect3-name)
+     ((equal? name (normalize "sect4"))                id-sect4-name)
+     ((equal? name (normalize "sect5"))                id-sect5-name)
+     ((equal? name (normalize "section"))      id-section-name)
+     ((equal? name (normalize "simplesect"))    id-simplesect-name)
+     ((equal? name (normalize "seeie"))                id-seeie-name)
+     ((equal? name (normalize "seealsoie"))    id-seealsoie-name)
+     ((equal? name (normalize "set"))          id-set-name)
+     ((equal? name (normalize "sidebar"))      id-sidebar-name)
+     ((equal? name (normalize "step"))         id-step-name)
+     ((equal? name (normalize "table"))                id-table-name)
+     ((equal? name (normalize "tip"))          id-tip-name)
+     ((equal? name (normalize "toc"))          id-toc-name)
+     ((equal? name (normalize "warning"))      id-warning-name)
+     (else (let* ((msg (string-append "gentext-id-element-name: &unexpectedelementname;: " name))
+                 (err (node-list-error msg (current-node))))
+            msg)))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-id-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define id-equation-intra-label-sep "-")
+(define id-informalequation-intra-label-sep "-")
+(define id-example-intra-label-sep "-")
+(define id-figure-intra-label-sep "-")
+(define id-listitem-intra-label-sep ".")
+(define id-procedure-intra-label-sep ".")
+(define id-refentry-intra-label-sep ".")
+(define id-reference-intra-label-sep ".")
+(define id-refname-intra-label-sep ", ")
+(define id-refsect1-intra-label-sep ".")
+(define id-refsect2-intra-label-sep ".")
+(define id-refsect3-intra-label-sep ".")
+(define id-sect1-intra-label-sep ".")
+(define id-sect2-intra-label-sep ".")
+(define id-sect3-intra-label-sep ".")
+(define id-sect4-intra-label-sep ".")
+(define id-sect5-intra-label-sep ".")
+(define id-section-intra-label-sep ".")
+(define id-simplesect-intra-label-sep ".")
+(define id-step-intra-label-sep ".")
+(define id-table-intra-label-sep "-")
+(define id-_pagenumber-intra-label-sep "-")
+(define id-default-intra-label-sep "")
+
+(define (gentext-id-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname)))
+    (cond
+     ((equal? name (normalize "equation"))     id-equation-intra-label-sep)
+     ((equal? name (normalize "informalequation"))     id-informalequation-intra-label-sep)
+     ((equal? name (normalize "example"))      id-example-intra-label-sep)
+     ((equal? name (normalize "figure"))       id-figure-intra-label-sep)
+     ((equal? name (normalize "listitem"))     id-listitem-intra-label-sep)
+     ((equal? name (normalize "procedure"))    id-procedure-intra-label-sep)
+     ((equal? name (normalize "refentry"))     id-refentry-intra-label-sep)
+     ((equal? name (normalize "reference"))    id-reference-intra-label-sep)
+     ((equal? name (normalize "refname"))      id-refname-intra-label-sep)
+     ((equal? name (normalize "refsect1"))     id-refsect1-intra-label-sep)
+     ((equal? name (normalize "refsect2"))     id-refsect2-intra-label-sep)
+     ((equal? name (normalize "refsect3"))     id-refsect3-intra-label-sep)
+     ((equal? name (normalize "sect1"))                id-sect1-intra-label-sep)
+     ((equal? name (normalize "sect2"))                id-sect2-intra-label-sep)
+     ((equal? name (normalize "sect3"))                id-sect3-intra-label-sep)
+     ((equal? name (normalize "sect4"))                id-sect4-intra-label-sep)
+     ((equal? name (normalize "sect5"))                id-sect5-intra-label-sep)
+     ((equal? name (normalize "section"))      id-section-intra-label-sep)
+     ((equal? name (normalize "simplesect"))   id-simplesect-intra-label-sep)
+     ((equal? name (normalize "step"))         id-step-intra-label-sep)
+     ((equal? name (normalize "table"))                id-table-intra-label-sep)
+     ((equal? name (normalize "_pagenumber"))  id-_pagenumber-intra-label-sep)
+     (else id-default-intra-label-sep))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define id-abstract-label-title-sep ": ")
+(define id-answer-label-title-sep " ")
+(define id-appendix-label-title-sep ". ")
+(define id-caution-label-title-sep "")
+(define id-chapter-label-title-sep ". ")
+(define id-equation-label-title-sep ". ")
+(define id-example-label-title-sep ". ")
+(define id-figure-label-title-sep ". ")
+(define id-footnote-label-title-sep ". ")
+(define id-glosssee-label-title-sep ": ")
+(define id-glossseealso-label-title-sep ": ")
+(define id-important-label-title-sep ": ")
+(define id-note-label-title-sep ": ")
+(define id-orderedlist-label-title-sep ". ")
+(define id-part-label-title-sep ". ")
+(define id-procedure-label-title-sep ". ")
+(define id-prefix-label-title-sep ". ")
+(define id-question-label-title-sep " ")
+(define id-refentry-label-title-sep "")
+(define id-reference-label-title-sep ". ")
+(define id-refsect1-label-title-sep ". ")
+(define id-refsect2-label-title-sep ". ")
+(define id-refsect3-label-title-sep ". ")
+(define id-sect1-label-title-sep ". ")
+(define id-sect2-label-title-sep ". ")
+(define id-sect3-label-title-sep ". ")
+(define id-sect4-label-title-sep ". ")
+(define id-sect5-label-title-sep ". ")
+(define id-section-label-title-sep ". ")
+(define id-simplesect-label-title-sep ". ")
+(define id-seeie-label-title-sep " ")
+(define id-seealsoie-label-title-sep " ")
+(define id-step-label-title-sep ". ")
+(define id-table-label-title-sep ". ")
+(define id-tip-label-title-sep ": ")
+(define id-warning-label-title-sep "")
+(define id-default-label-title-sep "")
+
+(define (gentext-id-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname)))
+    (cond
+     ((equal? name (normalize "abstract")) id-abstract-label-title-sep)
+     ((equal? name (normalize "answer")) id-answer-label-title-sep)
+     ((equal? name (normalize "appendix")) id-appendix-label-title-sep)
+     ((equal? name (normalize "caution")) id-caution-label-title-sep)
+     ((equal? name (normalize "chapter")) id-chapter-label-title-sep)
+     ((equal? name (normalize "equation")) id-equation-label-title-sep)
+     ((equal? name (normalize "example")) id-example-label-title-sep)
+     ((equal? name (normalize "figure")) id-figure-label-title-sep)
+     ((equal? name (normalize "footnote")) id-footnote-label-title-sep)
+     ((equal? name (normalize "glosssee")) id-glosssee-label-title-sep)
+     ((equal? name (normalize "glossseealso")) id-glossseealso-label-title-sep)
+     ((equal? name (normalize "important")) id-important-label-title-sep)
+     ((equal? name (normalize "note")) id-note-label-title-sep)
+     ((equal? name (normalize "orderedlist")) id-orderedlist-label-title-sep)
+     ((equal? name (normalize "part")) id-part-label-title-sep)
+     ((equal? name (normalize "procedure")) id-procedure-label-title-sep)
+     ((equal? name (normalize "prefix")) id-prefix-label-title-sep)
+     ((equal? name (normalize "question")) id-question-label-title-sep)
+     ((equal? name (normalize "refentry")) id-refentry-label-title-sep)
+     ((equal? name (normalize "reference")) id-reference-label-title-sep)
+     ((equal? name (normalize "refsect1")) id-refsect1-label-title-sep)
+     ((equal? name (normalize "refsect2")) id-refsect2-label-title-sep)
+     ((equal? name (normalize "refsect3")) id-refsect3-label-title-sep)
+     ((equal? name (normalize "sect1")) id-sect1-label-title-sep)
+     ((equal? name (normalize "sect2")) id-sect2-label-title-sep)
+     ((equal? name (normalize "sect3")) id-sect3-label-title-sep)
+     ((equal? name (normalize "sect4")) id-sect4-label-title-sep)
+     ((equal? name (normalize "sect5")) id-sect5-label-title-sep)
+     ((equal? name (normalize "section")) id-section-label-title-sep)
+     ((equal? name (normalize "simplesect")) id-simplesect-label-title-sep)
+     ((equal? name (normalize "seeie")) id-seeie-label-title-sep)
+     ((equal? name (normalize "seealsoie")) id-seealsoie-label-title-sep)
+     ((equal? name (normalize "step")) id-step-label-title-sep)
+     ((equal? name (normalize "table")) id-table-label-title-sep)
+     ((equal? name (normalize "tip")) id-tip-label-title-sep)
+     ((equal? name (normalize "warning")) id-warning-label-title-sep)
+     (else id-default-label-title-sep))))
+
+(define (id-set-label-number-format gind) "1")
+(define (id-book-label-number-format gind) "1")
+(define (id-prefix-label-number-format gind) "1")
+(define (id-part-label-number-format gind) "I")
+(define (id-chapter-label-number-format gind) "1")
+(define (id-appendix-label-number-format gind) "A")
+(define (id-reference-label-number-format gind) "I")
+(define (id-example-label-number-format gind) "1")
+(define (id-figure-label-number-format gind) "1")
+(define (id-table-label-number-format gind) "1")
+(define (id-procedure-label-number-format gind) "1")
+(define (id-step-label-number-format gind) "1")
+(define (id-refsect1-label-number-format gind) "1")
+(define (id-refsect2-label-number-format gind) "1")
+(define (id-refsect3-label-number-format gind) "1")
+(define (id-sect1-label-number-format gind) "1")
+(define (id-sect2-label-number-format gind) "1")
+(define (id-sect3-label-number-format gind) "1")
+(define (id-sect4-label-number-format gind) "1")
+(define (id-sect5-label-number-format gind) "1")
+(define (id-section-label-number-format gind) "1")
+(define (id-default-label-number-format gind) "1")
+
+(define (id-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname)))
+    (cond
+     ((equal? name (normalize "set")) (id-set-label-number-format gind))
+     ((equal? name (normalize "book")) (id-book-label-number-format gind))
+     ((equal? name (normalize "prefix")) (id-prefix-label-number-format gind))
+     ((equal? name (normalize "part")) (id-part-label-number-format gind))
+     ((equal? name (normalize "chapter")) (id-chapter-label-number-format gind))
+     ((equal? name (normalize "appendix")) (id-appendix-label-number-format gind))
+     ((equal? name (normalize "reference")) (id-reference-label-number-format gind))
+     ((equal? name (normalize "example")) (id-example-label-number-format gind))
+     ((equal? name (normalize "figure")) (id-figure-label-number-format gind))
+     ((equal? name (normalize "table")) (id-table-label-number-format gind))
+     ((equal? name (normalize "procedure")) (id-procedure-label-number-format gind))
+     ((equal? name (normalize "step")) (id-step-label-number-format gind))
+     ((equal? name (normalize "refsect1")) (id-refsect1-label-number-format gind))
+     ((equal? name (normalize "refsect2")) (id-refsect2-label-number-format gind))
+     ((equal? name (normalize "refsect3")) (id-refsect3-label-number-format gind))
+     ((equal? name (normalize "sect1")) (id-sect1-label-number-format gind))
+     ((equal? name (normalize "sect2")) (id-sect2-label-number-format gind))
+     ((equal? name (normalize "sect3")) (id-sect3-label-number-format gind))
+     ((equal? name (normalize "sect4")) (id-sect4-label-number-format gind))
+     ((equal? name (normalize "sect5")) (id-sect5-label-number-format gind))
+     ((equal? name (normalize "section")) (id-section-label-number-format gind))
+     (else (id-default-label-number-format gind)))))
+
+(define ($lot-title-id$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname)))
+    (cond ((equal? name (normalize "table"))    "&ListofTables;")
+         ((equal? name (normalize "example"))  "&ListofExamples;")
+         ((equal? name (normalize "figure"))   "&ListofFigures;")
+         ((equal? name (normalize "equation")) "&ListofEquations;")
+         (else (let* ((msg (string-append "&ListofUnknown;: " name))
+                      (err (node-list-error msg (current-node))))
+                 msg)))))
+
+(define %gentext-id-start-quote% (dingbat "ldquo"))
+
+(define %gentext-id-end-quote% (dingbat "rdquo"))
+
+(define %gentext-id-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-id-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-id-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-id-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-id-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-id-page% "")
+
+(define %gentext-id-and% "&and;")
+
+(define %gentext-id-listcomma% "&listcomma;")
+
+(define %gentext-id-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-id-bibl-pages% "&Pgs;")
+
+(define %gentext-id-endnotes% "&Notes;")
+
+(define %gentext-id-table-endnotes% "&TableNotes;:")
+
+(define %gentext-id-index-see% "&See;")
+
+(define %gentext-id-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-id-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-id-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-id-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-id-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-id-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-id-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1id.ent b/common/dbl1id.ent
new file mode 100644 (file)
index 0000000..afde4d3
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Abstrak">
+<!ENTITY abstract        "Abstrak">
+<!ENTITY Answer          "Jawab:">
+<!ENTITY answer          "Jawab:">
+<!ENTITY Appendix        "Lampiran">
+<!ENTITY appendix        "lampiran">
+<!ENTITY Article         "Artikel">
+<!ENTITY article         "Artikel">
+<!ENTITY Bibliography    "Bibliografi">
+<!ENTITY bibliography    "Bibliografi">
+<!ENTITY Book            "Buku">
+<!ENTITY book            "Buku">
+<!ENTITY CAUTION         "PERHATIAN">
+<!ENTITY Caution         "Perhatian">
+<!ENTITY caution         "Perhatian">
+<!ENTITY Chapter         "Bab">
+<!ENTITY chapter         "bab">
+<!ENTITY Colophon        "Kolofon">
+<!ENTITY colophon        "Kolofon">
+<!ENTITY Copyright       "Hak Cipta">
+<!ENTITY copyright       "Hak Cipta">
+<!ENTITY Dedication      "Dedikasi">
+<!ENTITY dedication      "Dedikasi">
+<!ENTITY Edition         "Edisi">
+<!ENTITY edition         "Edisi">
+<!ENTITY Equation        "Persamaan">
+<!ENTITY equation        "Persamaan">
+<!ENTITY Example         "Teladan">
+<!ENTITY example         "Teladan">
+<!ENTITY Figure          "Gambar">
+<!ENTITY figure          "Gambar">
+<!ENTITY Glossary        "Daftar Istilah">
+<!ENTITY glossary        "Daftar Istilah">
+<!ENTITY GlossSee        "Lihat">
+<!ENTITY glosssee        "Lihat">
+<!ENTITY GlossSeeAlso    "Lihat Juga">
+<!ENTITY glossseealso    "Lihat Juga">
+<!ENTITY IMPORTANT       "PENTING">
+<!ENTITY Important       "Penting">
+<!ENTITY important       "Penting">
+<!ENTITY Index           "Indeks">
+<!ENTITY index           "Indeks">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Aspek Hukum">
+<!ENTITY legalnotice     "Aspek Hukum">
+<!ENTITY MsgAud          "Pemirsa">
+<!ENTITY msgaud          "Pemirsa">
+<!ENTITY MsgLevel        "Tingkatan">
+<!ENTITY msglevel        "Tingkatan">
+<!ENTITY MsgOrig         "Asal">
+<!ENTITY msgorig         "Asal">
+<!ENTITY NOTE            "CATATAN">
+<!ENTITY Note            "Catatan">
+<!ENTITY note            "Catatan">
+<!ENTITY Part            "Bagian">
+<!ENTITY part            "Bagian">
+<!ENTITY Preface         "Kata Pengantar">
+<!ENTITY preface         "Kata Pengantar">
+<!ENTITY Procedure       "Prosedur">
+<!ENTITY procedure       "Prosedur">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "Diterbitkan">
+<!ENTITY published       "Diterbitkan">
+<!ENTITY Question        "Tanya:">
+<!ENTITY question        "Tanya:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Referensi">
+<!ENTITY reference       "Referensi">
+<!ENTITY RefName         "Nama">
+<!ENTITY refname         "Nama">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Sinopsis">
+<!ENTITY refsynopsisdiv  "Sinopsis">
+<!ENTITY RevHistory      "Catatan Revisi">
+<!ENTITY revhistory      "Catatan Revisi">
+<!ENTITY Revision        "Revisi">
+<!ENTITY revision        "Revisi">
+<!ENTITY sect1           "Bagian">
+<!ENTITY sect2           "Bagian">
+<!ENTITY sect3           "Bagian">
+<!ENTITY sect4           "Bagian">
+<!ENTITY sect5           "Bagian">
+<!ENTITY Section         "Bagian">
+<!ENTITY section         "bagian">
+<!ENTITY See             "Lihat">
+<!ENTITY see             "Lihat">
+<!ENTITY SeeAlso         "Lihat Juga">
+<!ENTITY Seealso         "Lihat juga">
+<!ENTITY seealso         "Lihat Juga">
+<!ENTITY Set             "Set">
+<!ENTITY set             "Set">
+<!ENTITY SetIndex        "Indeks Set">
+<!ENTITY setindex        "Indeks Set">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "sidebar">
+<!ENTITY Step            "Tahap">
+<!ENTITY step            "tahap">
+<!ENTITY Table           "Tabel">
+<!ENTITY table           "Tabel">
+<!ENTITY TIP             "TIP">
+<!ENTITY Tip             "Tip">
+<!ENTITY tip             "Tip">
+<!ENTITY WARNING         "AWAS">
+<!ENTITY Warning         "Awas">
+<!ENTITY warning         "Awas">
+<!ENTITY and             "dan">
+<!ENTITY by              "oleh">
+<!ENTITY Edited          "disunting">
+<!ENTITY edited          "disunting">
+<!ENTITY Editedby        "disunting oleh">
+<!ENTITY editedby        "disunting oleh">
+<!ENTITY in              "di">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "elemen tak tampak">
+<!ENTITY notes           "Catatan">
+<!ENTITY Notes           "Catatan">
+<!ENTITY Pgs             "Hal.">
+<!ENTITY pgs             "Hal.">
+<!ENTITY Revisedby       "Direvisi oleh: ">
+<!ENTITY revisedby       "Direvisi oleh: ">
+<!ENTITY TableNotes      "Catatan">
+<!ENTITY tablenotes      "Catatan">
+<!ENTITY TableofContents "Daftar Isi">
+<!ENTITY tableofcontents "Daftar Isi">
+<!ENTITY unexpectedelementname "Nama Elemen seharusnya tidak ada">
+<!ENTITY unsupported     "tidak didukung">
+<!ENTITY xrefto          "xref ke">
+<!ENTITY listofequations "Daftar Persamaan">
+<!ENTITY ListofEquations "Daftar Persamaan">
+<!ENTITY ListofExamples  "Daftar Teladan">
+<!ENTITY listofexamples  "Daftar Teladan">
+<!ENTITY ListofFigures   "Daftar Gambar">
+<!ENTITY listoffigures   "Daftar Gambar">
+<!ENTITY listoftables    "Daftar Tabel">
+<!ENTITY ListofTables    "Daftar Tabel">
+<!ENTITY ListofUnknown   "Daftar Gaib">
+<!ENTITY listofunknown   "Daftar Gaib">
+<!ENTITY nav-home        "Depan">
+<!ENTITY nav-next        "Lanjut">
+<!ENTITY nav-next-sibling "Lewati">
+<!ENTITY nav-prev        "Kembali">
+<!ENTITY nav-prev-sibling "Sebelumnya">
+<!ENTITY nav-up          "Induk">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1it.dsl b/common/dbl1it.dsl
new file mode 100644 (file)
index 0000000..791eb10
--- /dev/null
@@ -0,0 +1,471 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % it.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//IT"
+         "dbl1it.ent">
+%it.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-it">
+<style-specification-body>
+
+;; $Id: dbl1it.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributors:
+;; camille@mandrakesoft.com
+
+(define (it-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (it-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&appendix; %t"))
+       (list (normalize "article")     (string-append %gentext-it-start-quote%
+                                                      "%t"
+                                                      %gentext-it-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "il &chapter; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "la &Section; %n"
+                                           "la &section; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "la &Section; %n"
+                                           "la &section; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "la &Section; %n"
+                                           "la &section; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "la &Section; %n"
+                                           "la &section; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "la &Section; %n"
+                                           "la &section; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "la &Section; %n"
+                                           "la &section; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "la &Section; %n"
+                                           "la &section; %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-it-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (it-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (it-auto-xref-indirect-connector before) 
+  (cond 
+   ((member (gi before)
+         (list (normalize "part")
+               (normalize "set")
+               (normalize "revision")
+               (normalize "dedication")
+               (normalize "bibliography")
+               (normalize "preface")
+               (normalize "figure")
+               (normalize "procedure")
+               (normalize "sidebar")
+               (normalize "table")
+               (normalize "sect1")
+               (normalize "sect2")
+               (normalize "sect3")
+               (normalize "sect4")
+               (normalize "sect5")
+               (normalize "simplesect")))
+    (literal " nella "))
+   ((member (gi before)
+         (list (normalize "appendix")
+               (normalize "index")
+               (normalize "abstract")
+               (normalize "equation")
+               (normalize "example")
+               (normalize "article")))
+    (literal " nell'"))
+   ((member (gi before)
+         (list (normalize "book")
+               (normalize "chapter")
+               (normalize "step")
+               (normalize "reference")
+               (normalize "glossary")))
+    (literal " nel "))
+;; This is supposed never to be triggered!
+;; I think the above conditions cover all the possible kinds of link
+;; target containers (it's probably a superset, indeed). If they
+;; don't, add the offending element to the correspondant list. 
+   (else
+    (literal "[&unexpectedelementname;]"))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-it-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (it-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-it-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (it-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-it-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-it-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-it-intra-label-sep)
+  (list))
+
+(define (it-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-it-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-it-intra-label-sep)))
+        (sep    (assoc name (it-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-it-label-title-sep)
+  (list))
+
+(define (it-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-it-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-it-label-title-sep)))
+        (sep    (assoc name (it-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (it-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (it-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (it-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (it-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-it$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (it-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-it-start-quote% (dingbat "ldquo"))
+
+(define %gentext-it-end-quote% (dingbat "rdquo"))
+
+(define %gentext-it-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-it-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-it-by% "") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-it-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-it-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-it-page% "")
+
+(define %gentext-it-and% "&and;")
+
+(define %gentext-it-listcomma% "&listcomma;")
+
+(define %gentext-it-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-it-bibl-pages% "&Pgs;")
+
+(define %gentext-it-endnotes% "&Notes;")
+
+(define %gentext-it-table-endnotes% "&TableNotes;:")
+
+(define %gentext-it-index-see% "&See;")
+
+(define %gentext-it-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-it-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-it-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-it-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-it-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-it-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-it-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1it.ent b/common/dbl1it.ent
new file mode 100644 (file)
index 0000000..49937d7
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Estratto">
+<!ENTITY abstract        "Estratto">
+<!ENTITY Answer          "R:">
+<!ENTITY answer          "R:">
+<!ENTITY Appendix        "Appendice">
+<!ENTITY appendix        "appendice">
+<!ENTITY Article         "Articolo">
+<!ENTITY article         "Articolo">
+<!ENTITY Bibliography    "Bibliografia">
+<!ENTITY bibliography    "Bibliografia">
+<!ENTITY Book            "Libro">
+<!ENTITY book            "Libro">
+<!ENTITY CAUTION         "ATTENZIONE">
+<!ENTITY Caution         "Attenzione">
+<!ENTITY caution         "Attenzione">
+<!ENTITY Chapter         "Capitolo">
+<!ENTITY chapter         "capitolo">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Dedica">
+<!ENTITY dedication      "Dedica">
+<!ENTITY Edition         "Edizione">
+<!ENTITY edition         "Edizione">
+<!ENTITY Equation        "Equazione">
+<!ENTITY equation        "Equazione">
+<!ENTITY Example         "Esempio">
+<!ENTITY example         "Esempio">
+<!ENTITY Figure          "Figura">
+<!ENTITY figure          "Figura">
+<!ENTITY Glossary        "Glossario">
+<!ENTITY glossary        "Glossario">
+<!ENTITY GlossSee        "Vedi">
+<!ENTITY glosssee        "Vedi">
+<!ENTITY GlossSeeAlso    "Vedi Anche">
+<!ENTITY glossseealso    "Vedi Anche">
+<!ENTITY IMPORTANT       "IMPORTANTE">
+<!ENTITY important       "Importante">
+<!ENTITY Important       "Importante">
+<!ENTITY Index           "Indice">
+<!ENTITY index           "Indice">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Note Legali">
+<!ENTITY legalnotice     "Note Legali">
+<!ENTITY MsgAud          "Pubblico">
+<!ENTITY msgaud          "Pubblico">
+<!ENTITY MsgLevel        "Livello">
+<!ENTITY msglevel        "Livello">
+<!ENTITY MsgOrig         "Origine">
+<!ENTITY msgorig         "Origine">
+<!ENTITY NOTE            "NOTA">
+<!ENTITY Note            "Nota">
+<!ENTITY note            "Nota">
+<!ENTITY Part            "Parte">
+<!ENTITY part            "Parte">
+<!ENTITY Preface         "Prefazione">
+<!ENTITY preface         "Prefazione">
+<!ENTITY Procedure       "Procedura">
+<!ENTITY procedure       "Procedura">
+<!ENTITY ProductionSet   "Produzione">
+<!ENTITY Published       "Pubblicato">
+<!ENTITY published       "Pubblicato">
+<!ENTITY Question        "D:">
+<!ENTITY question        "D:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Riferimento">
+<!ENTITY reference       "Riferimento">
+<!ENTITY RefName         "Nome">
+<!ENTITY refname         "Nome">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Sinossi">
+<!ENTITY refsynopsisdiv  "Sinossi">
+<!ENTITY RevHistory      "Diario delle Revisioni">
+<!ENTITY revhistory      "Diario delle Revisioni">
+<!ENTITY revision        "Revisione">
+<!ENTITY Revision        "Revisione">
+<!ENTITY sect1           "Sezione">
+<!ENTITY sect2           "Sezione">
+<!ENTITY sect3           "Sezione">
+<!ENTITY sect4           "Sezione">
+<!ENTITY sect5           "Sezione">
+<!ENTITY section         "Sezione">
+<!ENTITY Section         "Sezione">
+<!ENTITY See             "Vd.">
+<!ENTITY see             "Vd.">
+<!ENTITY SeeAlso         "Vd. Anche">
+<!ENTITY seealso         "Vd. Anche">
+<!ENTITY Seealso         "Vd. anche">
+<!ENTITY set             "Raccolta">
+<!ENTITY Set             "Raccolta">
+<!ENTITY setindex        "Indice Raccolta">
+<!ENTITY SetIndex        "Indice Raccolta">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "nota a margine">
+<!ENTITY step            "passo">
+<!ENTITY Step            "Passo">
+<!ENTITY Table           "Tabella">
+<!ENTITY table           "Tabella">
+<!ENTITY tip             "Suggerimento">
+<!ENTITY TIP             "SUGGERIMENTO">
+<!ENTITY Tip             "Suggerimento">
+<!ENTITY Warning         "Avvertimento">
+<!ENTITY warning         "avvertimento">
+<!ENTITY WARNING         "AVVERTIMENTO">
+<!ENTITY and             "e">
+<!ENTITY by              "di">
+<!ENTITY Edited          "A cura">
+<!ENTITY edited          "A cura">
+<!ENTITY Editedby        "A cura di">
+<!ENTITY editedby        "A cura di">
+<!ENTITY in              "in">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "elemento non esistente">
+<!ENTITY notes           "Note">
+<!ENTITY Notes           "Note">
+<!ENTITY Pgs             "pp.">
+<!ENTITY pgs             "pp.">
+<!ENTITY Revisedby       "Revisionato da: ">
+<!ENTITY revisedby       "Revisionato da: ">
+<!ENTITY TableNotes      "Note">
+<!ENTITY tablenotes      "Note">
+<!ENTITY TableofContents "Sommario">
+<!ENTITY tableofcontents "Sommario">
+<!ENTITY unexpectedelementname "Nome elemento inaspettato">
+<!ENTITY unsupported     "non supportato">
+<!ENTITY xrefto          "riferimento a">
+<!ENTITY listofequations "Lista delle Equazioni">
+<!ENTITY ListofEquations "Lista delle Equazioni">
+<!ENTITY ListofExamples  "Lista degli Esempi">
+<!ENTITY listofexamples  "Lista degli Esempi">
+<!ENTITY ListofFigures   "Lista delle Figure">
+<!ENTITY listoffigures   "Lista delle Figure">
+<!ENTITY listoftables    "Lista delle Tabelle">
+<!ENTITY ListofTables    "Lista delle Tabelle">
+<!ENTITY ListofUnknown   "Lista degli Sconosciuti">
+<!ENTITY listofunknown   "Lista degli Sconosciuti">
+<!ENTITY nav-home        "Partenza">
+<!ENTITY nav-next        "Avanti">
+<!ENTITY nav-next-sibling "Salta Avanti">
+<!ENTITY nav-prev        "Indietro">
+<!ENTITY nav-prev-sibling "Salta Indietro">
+<!ENTITY nav-up          "Risali">
+<!ENTITY Draft           "Bozza">
+<!ENTITY above           "sopra">
+<!ENTITY below           "sotto">
+<!ENTITY sectioncalled   "la sezione chiamata">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1ja.dsl b/common/dbl1ja.dsl
new file mode 100644 (file)
index 0000000..6d4acd0
--- /dev/null
@@ -0,0 +1,445 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % ja.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//JA"
+         "dbl1ja.ent">
+%ja.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-ja">
+<style-specification-body>
+
+;; $Id: dbl1ja.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributors:
+;; Karl Critz, kcritz@mathworks.com, contributed the original dbl1ja.ent file
+;; ISHIDA Eri, eri@laser5.co.jp
+;; Ryan Shaw, ryan@silveregg.co.jp
+
+(define (ja-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (ja-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix;%n"
+                                           "%t&appendix;"))
+       (list (normalize "article")     (string-append %gentext-ja-start-quote%
+                                                      "%t"
+                                                      %gentext-ja-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter1;%n&Chapter2;"
+                                           "%t&chapter;"))
+       (list (normalize "equation")    "&Equation;%n")
+       (list (normalize "example")     "&Example;%n")
+       (list (normalize "figure")      "&Figure;%n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part;%n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure;%n, %t")
+       (list (normalize "reference")   "&Reference;%n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section;%n"
+                                           "%t&section;"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section;%n"
+                                           "%t&section;"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section;%n"
+                                           "%t&section;"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section;%n"
+                                           "%t&section;"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section;%n"
+                                           "%t&section;"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section;%n"
+                                           "%t&section;"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section;%n"
+                                           "%t&section;"))
+       (list (normalize "sidebar")     "%t&sidebar;")
+       (list (normalize "step")        "&step;%n")
+       (list (normalize "table")       "&Table;%n")))
+
+(define (gentext-ja-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (ja-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (ja-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal "&in;"))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal "&in;"))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal "&in;"))
+   (else
+    (literal "&in;"))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-ja-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (ja-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter1;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-ja-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (ja-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-ja-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-ja-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-ja-intra-label-sep)
+  (list))
+
+(define (ja-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-ja-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ja-intra-label-sep)))
+        (sep    (assoc name (ja-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-ja-label-title-sep)
+  (list))
+
+(define (ja-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         "&Chapter2;")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-ja-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ja-label-title-sep)))
+        (sep    (assoc name (ja-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (ja-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (ja-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (ja-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (ja-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-ja$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (ja-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-ja-start-quote% (dingbat "ldquo"))
+
+(define %gentext-ja-end-quote% (dingbat "rdquo"))
+
+(define %gentext-ja-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-ja-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-ja-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-ja-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-ja-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-ja-page% "")
+
+(define %gentext-ja-and% "&and;")
+
+(define %gentext-ja-listcomma% "&listcomma;")
+
+(define %gentext-ja-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-ja-bibl-pages% "&Pgs;")
+
+(define %gentext-ja-endnotes% "&Notes;")
+
+(define %gentext-ja-table-endnotes% "&TableNotes;:")
+
+(define %gentext-ja-index-see% "&See;")
+
+(define %gentext-ja-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-ja-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-ja-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-ja-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-ja-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-ja-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-ja-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1ja.ent b/common/dbl1ja.ent
new file mode 100644 (file)
index 0000000..c59b92d
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-6982;\U-8981;">
+<!ENTITY abstract        "\U-6982;\U-8981;">
+<!ENTITY Answer          "\U-7B54;\U-FF1A;">
+<!ENTITY answer          "\U-7B54;\U-FF1A;">
+<!ENTITY Appendix        "\U-4ED8;\U-9332;">
+<!ENTITY appendix        "\U-4ED8;\U-9332;">
+<!ENTITY Article         "\U-9805;\U-76EE;">
+<!ENTITY article         "\U-9805;\U-76EE;">
+<!ENTITY Bibliography    "\U-53C2;\U-8003;\U-6587;\U-732E;">
+<!ENTITY bibliography    "\U-53C2;\U-8003;\U-6587;\U-732E;">
+<!ENTITY Book            "\U-30D6;\U-30C3;\U-30AF;">
+<!ENTITY book            "\U-30D6;\U-30C3;\U-30AF;">
+<!ENTITY Caution         "\U-6CE8;\U-610F;">
+<!ENTITY caution         "\U-6CE8;\U-610F;">
+<!ENTITY CAUTION         "\U-6CE8;\U-610F;">
+<!ENTITY chapter         "\U-7AE0;">
+<!ENTITY Chapter         "\U-7AE0;">
+<!ENTITY chapter1        "\U-7B2C;">
+<!ENTITY Chapter1        "\U-7B2C;">
+<!ENTITY Chapter2        "\U-7AE0;">
+<!ENTITY chapter2        "\U-7AE0;">
+<!ENTITY Colophon        "\U-5965;\U-4ED8;">
+<!ENTITY colophon        "\U-5965;\U-4ED8;">
+<!ENTITY Copyright       "\U-88FD;\U-4F5C;\U-8457;\U-4F5C;">
+<!ENTITY copyright       "\U-88FD;\U-4F5C;\U-8457;\U-4F5C;">
+<!ENTITY Dedication      "\U-8B1D;\U-8F9E;">
+<!ENTITY dedication      "\U-8B1D;\U-8F9E;">
+<!ENTITY Edition         "\U-7DE8;\U-96C6;">
+<!ENTITY edition         "\U-7DE8;\U-96C6;">
+<!ENTITY Equation        "\U-5F0F;">
+<!ENTITY equation        "\U-5F0F;">
+<!ENTITY Example         "\U-4F8B;">
+<!ENTITY example         "\U-4F8B;">
+<!ENTITY Figure          "\U-56F3;">
+<!ENTITY figure          "\U-56F3;">
+<!ENTITY Glossary        "\U-7528;\U-8A9E;\U-96C6;">
+<!ENTITY glossary        "\U-7528;\U-8A9E;\U-96C6;">
+<!ENTITY GlossSee        "\U-53C2;\U-7167;">
+<!ENTITY glosssee        "\U-53C2;\U-7167;">
+<!ENTITY GlossSeeAlso    "\U-53C2;\U-7167;">
+<!ENTITY glossseealso    "\U-53C2;\U-7167;">
+<!ENTITY IMPORTANT       "\U-91CD;\U-8981;\U-9805;\U-76EE;">
+<!ENTITY Important       "\U-91CD;\U-8981;\U-9805;\U-76EE;">
+<!ENTITY important       "\U-91CD;\U-8981;\U-9805;\U-76EE;">
+<!ENTITY Index           "\U-76EE;\U-6B21;">
+<!ENTITY index           "\U-76EE;\U-6B21;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "">
+<!ENTITY legalnotice     "">
+<!ENTITY MsgAud          "\U-5BFE;\U-8C61;\U-8005;">
+<!ENTITY msgaud          "\U-5BFE;\U-8C61;\U-8005;">
+<!ENTITY MsgLevel        "\U-30EC;\U-30D9;\U-30EB;">
+<!ENTITY msglevel        "\U-30EC;\U-30D9;\U-30EB;">
+<!ENTITY MsgOrig         "\U-767A;\U-4FE1;\U-5143;">
+<!ENTITY msgorig         "\U-767A;\U-4FE1;\U-5143;">
+<!ENTITY note            "\U-6CE8;\U-610F;">
+<!ENTITY Note            "\U-6CE8;\U-610F;">
+<!ENTITY NOTE            "\U-6CE8;\U-610F;">
+<!ENTITY Part            "\U-30D1;\U-30FC;\U-30C8;">
+<!ENTITY part            "\U-30D1;\U-30FC;\U-30C8;">
+<!ENTITY Preface         "\U-5E8F;\U-6587;">
+<!ENTITY preface         "\U-5E8F;\U-6587;">
+<!ENTITY Procedure       "\U-624B;\U-9806;">
+<!ENTITY procedure       "\U-624B;\U-9806;">
+<!ENTITY ProductionSet   "\U-30D7;\U-30ED;\U-30C0;\U-30AF;\U-30B7;\U-30E7;\U-30F3;">
+<!ENTITY Published       "\U-767A;\U-884C;">
+<!ENTITY published       "\U-767A;\U-884C;">
+<!ENTITY Question        "\U-554F;\U-FF1A;">
+<!ENTITY question        "\U-554F;\U-FF1A;">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "\U-53C2;\U-7167;">
+<!ENTITY reference       "\U-53C2;\U-7167;">
+<!ENTITY RefName         "\U-540D;\U-524D;">
+<!ENTITY refname         "\U-540D;\U-524D;">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "\U-6982;\U-8981;">
+<!ENTITY refsynopsisdiv  "\U-6982;\U-8981;">
+<!ENTITY RevHistory      "\U-6539;\U-8A02;\U-5C65;\U-6B74;">
+<!ENTITY revhistory      "\U-6539;\U-8A02;\U-5C65;\U-6B74;">
+<!ENTITY revision        "\U-6539;\U-8A02;">
+<!ENTITY Revision        "\U-6539;\U-8A02;">
+<!ENTITY sect1           "\U-9805;">
+<!ENTITY sect2           "\U-9805;">
+<!ENTITY sect3           "\U-9805;">
+<!ENTITY sect4           "\U-9805;">
+<!ENTITY sect5           "\U-9805;">
+<!ENTITY Section         "\U-9805;">
+<!ENTITY section         "\U-9805;">
+<!ENTITY See             "\U-53C2;\U-7167;">
+<!ENTITY see             "\U-53C2;\U-7167;">
+<!ENTITY seealso         "\U-53C2;\U-7167;">
+<!ENTITY SeeAlso         "\U-53C2;\U-7167;">
+<!ENTITY Seealso         "\U-53C2;\U-7167;">
+<!ENTITY Set             "\U-8A2D;\U-5B9A;">
+<!ENTITY set             "\U-8A2D;\U-5B9A;">
+<!ENTITY SetIndex        "\U-76EE;\U-6B21;\U-8A2D;\U-5B9A;">
+<!ENTITY setindex        "\U-76EE;\U-6B21;\U-8A2D;\U-5B9A;">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "\U-30B5;\U-30A4;\U-30C9;\U-30D0;\U-30FC;">
+<!ENTITY step            "\U-30B9;\U-30C6;\U-30C3;\U-30D7;">
+<!ENTITY Step            "\U-30B9;\U-30C6;\U-30C3;\U-30D7;">
+<!ENTITY table           "\U-8868;">
+<!ENTITY Table           "\U-8868;">
+<!ENTITY TIP             "\U-30C6;\U-30A3;\U-30C3;\U-30D7;">
+<!ENTITY Tip             "\U-30C6;\U-30A3;\U-30C3;\U-30D7;">
+<!ENTITY tip             "\U-30C6;\U-30A3;\U-30C3;\U-30D7;">
+<!ENTITY WARNING         "\U-8B66;\U-544A;">
+<!ENTITY Warning         "\U-8B66;\U-544A;">
+<!ENTITY warning         "\U-8B66;\U-544A;">
+<!ENTITY and             "\U-3001;">
+<!ENTITY by              "\U-FF1A;">
+<!ENTITY Edited          "\U-7DE8;\U-8005;">
+<!ENTITY edited          "\U-7DE8;\U-8005;">
+<!ENTITY Editedby        "\U-7DE8;\U-8005;\U-FF1A;">
+<!ENTITY editedby        "\U-7DE8;\U-8005;\U-FF1A;">
+<!ENTITY in              "">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "\U-8981;\U-7D20;\U-304C;\U-5B58;\U-5728;\U-3057;\U-307E;\U-305B;\U-3093;">
+<!ENTITY notes           "\U-6CE8;\U-610F;">
+<!ENTITY Notes           "\U-6CE8;\U-610F;">
+<!ENTITY Pgs             "\U-5067;\U-732E;">
+<!ENTITY pgs             "\U-5067;\U-732E;">
+<!ENTITY Revisedby       "Revised by: ">
+<!ENTITY revisedby       "Revised by: ">
+<!ENTITY TableNotes      "\U-6CE8;\U-610F;">
+<!ENTITY tablenotes      "\U-6CE8;\U-610F;">
+<!ENTITY TableofContents "\U-76EE;\U-6B21;">
+<!ENTITY tableofcontents "\U-76EE;\U-6B21;">
+<!ENTITY unexpectedelementname "\U-4E0D;\U-660E;\U-306A;\U-8981;\U-7D20;\U-540D;">
+<!ENTITY unsupported     "\U-30B5;\U-30DD;\U-30FC;\U-30C8;\U-3057;\U-307E;\U-305B;\U-3093;">
+<!ENTITY xrefto          "xref to">
+<!ENTITY listofequations "\U-5F0F;\U-76EE;\U-6B21;">
+<!ENTITY ListofEquations "\U-5F0F;\U-76EE;\U-6B21;">
+<!ENTITY ListofExamples  "\U-4F8B;\U-76EE;\U-6B21;">
+<!ENTITY listofexamples  "\U-4F8B;\U-76EE;\U-6B21;">
+<!ENTITY ListofFigures   "\U-56F3;\U-76EE;\U-6B21;">
+<!ENTITY listoffigures   "\U-56F3;\U-76EE;\U-6B21;">
+<!ENTITY listoftables    "\U-8868;\U-76EE;\U-6B21;">
+<!ENTITY ListofTables    "\U-8868;\U-76EE;\U-6B21;">
+<!ENTITY ListofUnknown   "\U-4E0D;\U-660E;\U-76EE;\U-6B21;">
+<!ENTITY listofunknown   "\U-4E0D;\U-660E;\U-76EE;\U-6B21;">
+<!ENTITY nav-home        "\U-30DB;\U-30FC;\U-30E0;">
+<!ENTITY nav-next        "\U-6B21;\U-306E;\U-30DA;\U-30FC;\U-30B8;">
+<!ENTITY nav-next-sibling "\U-65E9;\U-9001;\U-308A;">
+<!ENTITY nav-prev        "\U-524D;\U-306E;\U-30DA;\U-30FC;\U-30B8;">
+<!ENTITY nav-prev-sibling "\U-5DFB;\U-623B;\U-3057;">
+<!ENTITY nav-up          "\U-4E0A;\U-306B;\U-623B;\U-308B;">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY sectioncalled   "the section called">
diff --git a/common/dbl1ko.dsl b/common/dbl1ko.dsl
new file mode 100644 (file)
index 0000000..cf80905
--- /dev/null
@@ -0,0 +1,455 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % ko.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//KO"
+         "dbl1ko.ent">
+%ko.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-ko">
+<style-specification-body>
+
+;; 
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributor:
+;;               Park Yong Joo (yongjoo@kldp.org) 2001/01/06
+;;
+
+(define (ko-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, Surname, FirstName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. SurNameFirstName [OtherName], Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+
+
+      ;; Format is "SurNameFirstName" for Korean naming rules.
+        (if has_s (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first s_nl))) "")
+        (if has_f (string-append 
+                   (if (or has_h) " " "")
+                   (data-of (node-list-first f_nl))) "")
+      ;; If you need "SurName FirstName" format,
+      ;; comment out upper 6 lines and use this.
+      ;; (if has_s (string-append 
+      ;;           (if has_h " " "") 
+      ;;           (data-of (node-list-first s_nl))) "")
+      ;; (if has_f (string-append 
+      ;;           (if (or has_h has_s) " " "")
+      ;;           (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_s has_f ) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (ko-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "\U-C81C;\U-BAA9;\U-C774; %t\U-C778; &appendix;"))
+       (list (normalize "article")     (string-append %gentext-ko-start-quote%
+                                                      "%t"
+                                                      %gentext-ko-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "%n\U-C7A5;"
+                                           "`%t' &chapter;"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "%n &Part;")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "%n\U-C808;"
+                                           "`%t' &section;"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "%n\U-C808;"
+                                           "`%t' &section;"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "%n\U-C808;"
+                                           "`%t' &section;"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "%n\U-C808;"
+                                           "`%t' &section;"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "%n\U-C808;"
+                                           "`%t' &section;"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "%n\U-C808;"
+                                           "`%t' &section;"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "%n\U-C808;"
+                                           "`%t' &section;"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-ko-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (ko-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (ko-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal "\U-C758; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal "\U-C758; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal "\U-C758; "))
+   (else
+    (literal "\U-C758; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-ko-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (ko-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&ISBN;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-ko-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (ko-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-ko-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-ko-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-ko-intra-label-sep)
+  (list))
+
+(define (ko-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-ko-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ko-intra-label-sep)))
+        (sep    (assoc name (ko-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-ko-label-title-sep)
+  (list))
+
+(define (ko-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-ko-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ko-label-title-sep)))
+        (sep    (assoc name (ko-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (ko-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (ko-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (ko-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (ko-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-ko$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (ko-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-ko-start-quote% (dingbat "ldquo"))
+
+(define %gentext-ko-end-quote% (dingbat "rdquo"))
+
+(define %gentext-ko-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-ko-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-ko-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-ko-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-ko-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-ko-page% "")
+
+(define %gentext-ko-and% "&and;")
+
+(define %gentext-ko-listcomma% "&listcomma;")
+
+(define %gentext-ko-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-ko-bibl-pages% "&Pgs;")
+
+(define %gentext-ko-endnotes% "&Notes;")
+
+(define %gentext-ko-table-endnotes% "&TableNotes;:")
+
+(define %gentext-ko-index-see% "&See;")
+
+(define %gentext-ko-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-ko-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-ko-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-ko-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-ko-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-ko-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-ko-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1ko.ent b/common/dbl1ko.ent
new file mode 100644 (file)
index 0000000..d23e973
--- /dev/null
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-CD08;\U-B85D;">
+<!ENTITY abstract        "\U-CD08;\U-B85D;">
+<!ENTITY Answer          "\U-B2F5;\U-BCC0;">
+<!ENTITY answer          "\U-B2F5;\U-BCC0;">
+<!ENTITY Appendix        "\U-BD80;\U-B85D;">
+<!ENTITY appendix        "\U-BD80;\U-B85D;">
+<!ENTITY Article         "\U-BB38;\U-C11C;">
+<!ENTITY article         "\U-BB38;\U-C11C;">
+<!ENTITY Bibliography    "\U-C11C;\U-C9C0;\U-C0AC;\U-D56D;">
+<!ENTITY bibliography    "\U-C11C;\U-C9C0;\U-C0AC;\U-D56D;">
+<!ENTITY Book            "\U-CC45;">
+<!ENTITY book            "\U-CC45;">
+<!ENTITY Caution         "\U-ACBD;\U-ACE0;">
+<!ENTITY caution         "\U-ACBD;\U-ACE0;">
+<!ENTITY CAUTION         "[\U-ACBD;\U-ACE0;]">
+<!ENTITY Chapter         "\U-C7A5;">
+<!ENTITY chapter         "\U-C7A5;">
+<!ENTITY Colophon        "\U-D310;\U-AD8C;">
+<!ENTITY colophon        "\U-D310;\U-AD8C;">
+<!ENTITY Copyright       "\U-C800;\U-C791;\U-AD8C;">
+<!ENTITY copyright       "\U-C800;\U-C791;\U-AD8C;">
+<!ENTITY Dedication      "\U-BC14;\U-CE58;\U-B294; \U-AE00;">
+<!ENTITY dedication      "\U-BC14;\U-CE58;\U-B294; \U-AE00;">
+<!ENTITY Edition         "\U-C5EE;\U-C74C;">
+<!ENTITY edition         "\U-C5EE;\U-C74C;">
+<!ENTITY Equation        "\U-C218;\U-C2DD;">
+<!ENTITY equation        "\U-C218;\U-C2DD;">
+<!ENTITY Example         "\U-C608;">
+<!ENTITY example         "\U-C608;">
+<!ENTITY Figure          "\U-ADF8;\U-B9BC;">
+<!ENTITY figure          "\U-ADF8;\U-B9BC;">
+<!ENTITY Glossary        "\U-C6A9;\U-C5B4;\U-D574;\U-C124;">
+<!ENTITY glossary        "\U-C6A9;\U-C5B4;\U-D574;\U-C124;">
+<!ENTITY GlossSee        "\U-C0B4;\U-D3B4;\U-BCFC; \U-B0B4;\U-C6A9;">
+<!ENTITY glosssee        "\U-C0B4;\U-D3B4;\U-BCFC; \U-B0B4;\U-C6A9;">
+<!ENTITY GlossSeeAlso    "\U-B2E4;\U-B978; \U-C0B4;\U-D3B4;\U-BCFC; \U-B0B4;\U-C6A9;">
+<!ENTITY glossseealso    "\U-B2E4;\U-B978; \U-C0B4;\U-D3B4;\U-BCFC; \U-B0B4;\U-C6A9;">
+<!ENTITY Important       "\U-C911;\U-C694;">
+<!ENTITY important       "\U-C911;\U-C694;">
+<!ENTITY IMPORTANT       "[\U-C911;\U-C694;]">
+<!ENTITY Index           "\U-C0C9;\U-C778;">
+<!ENTITY index           "\U-C0C9;\U-C778;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "\U-BC95;\U-C801; \U-ACF5;\U-C9C0;">
+<!ENTITY legalnotice     "\U-BC95;\U-C801; \U-ACF5;\U-C9C0;">
+<!ENTITY MsgAud          "\U-BC1B;\U-B294; \U-C774;">
+<!ENTITY msgaud          "\U-BC1B;\U-B294; \U-C774;">
+<!ENTITY MsgLevel        "\U-C911;\U-C694;\U-B3C4;">
+<!ENTITY msglevel        "\U-C911;\U-C694;\U-B3C4;">
+<!ENTITY MsgOrig         "\U-BCF4;\U-B0B4;\U-B294; \U-C774;">
+<!ENTITY msgorig         "\U-BCF4;\U-B0B4;\U-B294; \U-C774;">
+<!ENTITY Note            "\U-CC38;\U-ACE0;">
+<!ENTITY note            "\U-CC38;\U-ACE0;">
+<!ENTITY NOTE            "[\U-CC38;\U-ACE0;]">
+<!ENTITY Part            "\U-BD80;">
+<!ENTITY part            "\U-BD80;">
+<!ENTITY Preface         "\U-C11C;\U-BB38;">
+<!ENTITY preface         "\U-C11C;\U-BB38;">
+<!ENTITY Procedure       "\U-C808;\U-CC28;">
+<!ENTITY procedure       "\U-C808;\U-CC28;">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "\U-D3B4;\U-B0C4;">
+<!ENTITY published       "\U-D3B4;\U-B0C4;">
+<!ENTITY Question        "\U-C9C8;\U-BB38;">
+<!ENTITY question        "\U-C9C8;\U-BB38;">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "\U-CC38;\U-ACE0;\U-BB38;\U-D5CC;">
+<!ENTITY reference       "\U-CC38;\U-ACE0;\U-BB38;\U-D5CC;">
+<!ENTITY RefName         "\U-C81C;\U-BAA9;">
+<!ENTITY refname         "\U-C81C;\U-BAA9;">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "\U-C694;\U-C57D;">
+<!ENTITY refsynopsisdiv  "\U-C694;\U-C57D;">
+<!ENTITY RevHistory      "\U-ACE0;\U-CE5C; \U-ACFC;\U-C815;">
+<!ENTITY revhistory      "\U-ACE0;\U-CE5C; \U-ACFC;\U-C815;">
+<!ENTITY Revision        "\U-ACE0;\U-CE68;">
+<!ENTITY revision        "\U-ACE0;\U-CE68;">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "\U-C808;">
+<!ENTITY section         "\U-C808;">
+<!ENTITY See             "\U-C0B4;\U-D3B4;\U-BCFC; \U-B0B4;\U-C6A9;">
+<!ENTITY see             "\U-C0B4;\U-D3B4;\U-BCFC; \U-B0B4;\U-C6A9;">
+<!ENTITY Seealso         "\U-C0B4;\U-D3B4;\U-BCFC; \U-B2E4;\U-B978; \U-B0B4;\U-C6A9;">
+<!ENTITY SeeAlso         "[\U-C0B4;\U-D3B4;\U-BCFC; \U-B2E4;\U-B978; \U-B0B4;\U-C6A9;]">
+<!ENTITY seealso         "[\U-C0B4;\U-D3B4;\U-BCFC; \U-B2E4;\U-B978; \U-B0B4;\U-C6A9;]">
+<!ENTITY Set             "\U-C804;\U-C9D1;">
+<!ENTITY set             "\U-C804;\U-C9D1;">
+<!ENTITY SetIndex        "\U-C804;\U-C9D1; \U-C0C9;\U-C778;">
+<!ENTITY setindex        "\U-C804;\U-C9D1; \U-C0C9;\U-C778;">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "\U-B367;\U-BD99;\U-C784;">
+<!ENTITY Step            "\U-B2E8;\U-ACC4;">
+<!ENTITY step            "\U-B2E8;\U-ACC4;">
+<!ENTITY Table           "\U-D45C;">
+<!ENTITY table           "\U-D45C;">
+<!ENTITY Tip             "\U-C791;\U-C740; \U-C815;\U-BCF4;">
+<!ENTITY tip             "\U-C791;\U-C740; \U-C815;\U-BCF4;">
+<!ENTITY TIP             "[\U-C791;\U-C740; \U-C815;\U-BCF4;]">
+<!ENTITY WARNING         "\U-C8FC;\U-C758;!">
+<!ENTITY Warning         "\U-C8FC;\U-C758;">
+<!ENTITY warning         "\U-C8FC;\U-C758;">
+<!ENTITY and             "\U-ADF8;\U-B9AC;\U-ACE0;">
+<!ENTITY by              "\U-C9C0;\U-C740;\U-C774;">
+<!ENTITY Edited          "\U-C5EE;\U-C74C;">
+<!ENTITY edited          "\U-C5EE;\U-C74C;">
+<!ENTITY Editedby        "\U-C5EE;\U-C740;\U-C774;">
+<!ENTITY editedby        "\U-C5EE;\U-C740;\U-C774;">
+<!ENTITY in              "-">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "\U-C874;\U-C7AC;\U-D558;\U-C9C0; \U-C54A;\U-B294; \U-AE30;\U-CD08;\U-C694;\U-C18C;\U-C785;\U-B2C8;\U-B2E4;">
+<!ENTITY notes           "\U-C8FC;\U-C11D;">
+<!ENTITY Notes           "\U-C8FC;\U-C11D;">
+<!ENTITY Pgs             "Pgs.">
+<!ENTITY pgs             "Pgs.">
+<!ENTITY Revisedby       "\U-ACE0;\U-CE5C;\U-C774; ">
+<!ENTITY revisedby       "\U-ACE0;\U-CE5C;\U-C774; ">
+<!ENTITY TableNotes      "\U-CC38;\U-ACE0;">
+<!ENTITY tablenotes      "\U-CC38;\U-ACE0;">
+<!ENTITY TableofContents "\U-CC28;\U-B840;">
+<!ENTITY tableofcontents "\U-CC28;\U-B840;">
+<!ENTITY unexpectedelementname "\U-C54C; \U-C218; \U-C5C6;\U-B294; \U-AE30;\U-CD08;\U-C694;\U-C18C; \U-C774;\U-B984;\U-C785;\U-B2C8;\U-B2E4;">
+<!ENTITY unsupported     "\U-C9C0;\U-C6D0;\U-B418;\U-C9C0; \U-C54A;\U-C2B5;\U-B2C8;\U-B2E4;">
+<!ENTITY xrefto          "\U-C774; \U-ACF3;\U-C744; \U-CC38;\U-C870;\U-D558;\U-C138;\U-C694; : ">
+<!ENTITY listofequations "\U-C218;\U-C2DD; \U-BAA9;\U-B85D;">
+<!ENTITY ListofEquations "\U-C218;\U-C2DD; \U-BAA9;\U-B85D;">
+<!ENTITY ListofExamples  "\U-C608; \U-BAA9;\U-B85D;">
+<!ENTITY listofexamples  "\U-C608; \U-BAA9;\U-B85D;">
+<!ENTITY ListofFigures   "\U-ADF8;\U-B9BC; \U-BAA9;\U-B85D;">
+<!ENTITY listoffigures   "\U-ADF8;\U-B9BC; \U-BAA9;\U-B85D;">
+<!ENTITY listoftables    "\U-D45C; \U-BAA9;\U-B85D;">
+<!ENTITY ListofTables    "\U-D45C; \U-BAA9;\U-B85D;">
+<!ENTITY ListofUnknown   "\U-AE30;\U-D0C0; \U-BAA9;\U-B85D;">
+<!ENTITY listofunknown   "\U-AE30;\U-D0C0; \U-BAA9;\U-B85D;">
+<!ENTITY nav-home        "\U-CC98;\U-C74C;\U-C73C;\U-B85C;">
+<!ENTITY nav-next        "\U-B2E4;\U-C74C;">
+<!ENTITY nav-next-sibling "\U-B2E4;\U-C74C;\U-C73C;\U-B85C; \U-AC74;\U-B108;\U-B700;">
+<!ENTITY nav-prev        "\U-C774;\U-C804;">
+<!ENTITY nav-prev-sibling "\U-C774;\U-C804;\U-C73C;\U-B85C; \U-AC74;\U-B108;\U-B700;">
+<!ENTITY nav-up          "\U-C704;\U-B85C;">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
diff --git a/common/dbl1nl.dsl b/common/dbl1nl.dsl
new file mode 100644 (file)
index 0000000..a8590d1
--- /dev/null
@@ -0,0 +1,440 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % nl.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//NL"
+         "dbl1nl.ent">
+%nl.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-nl">
+<style-specification-body>
+
+;; $Id: dbl1nl.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+;;
+;; This is the Dutch localization
+;;
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributors:
+;; Hugo van der Kooij, hvdkooij@caiw.nl
+;; Frederik Fouvry, fouvry@essex.ac.uk
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (nl-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (nl-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&appendix; %t"))
+       (list (normalize "article")     (string-append %gentext-nl-start-quote%
+                                                      "%t"
+                                                      %gentext-nl-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "&chapter; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-nl-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (nl-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (nl-auto-xref-indirect-connector before)
+  (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-nl-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (nl-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-nl-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (nl-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-nl-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-nl-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-nl-intra-label-sep)
+  (list))
+
+(define (nl-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-nl-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-nl-intra-label-sep)))
+        (sep    (assoc name (nl-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-nl-label-title-sep)
+  (list))
+
+(define (nl-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-nl-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-nl-label-title-sep)))
+        (sep    (assoc name (nl-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (nl-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (nl-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (nl-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (nl-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-nl$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (nl-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-nl-start-quote% (dingbat "ldquo"))
+
+(define %gentext-nl-end-quote% (dingbat "rdquo"))
+
+(define %gentext-nl-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-nl-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-nl-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-nl-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-nl-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-nl-page% "")
+
+(define %gentext-nl-and% "&and;")
+
+(define %gentext-nl-listcomma% "&listcomma;")
+
+(define %gentext-nl-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-nl-bibl-pages% "&Pgs;")
+
+(define %gentext-nl-endnotes% "&Notes;")
+
+(define %gentext-nl-table-endnotes% "&TableNotes;:")
+
+(define %gentext-nl-index-see% "&See;")
+
+(define %gentext-nl-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-nl-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-nl-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-nl-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-nl-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-nl-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-nl-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1nl.ent b/common/dbl1nl.ent
new file mode 100644 (file)
index 0000000..d6d5e03
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Samenvatting">
+<!ENTITY abstract        "Samenvatting">
+<!ENTITY Answer          "Antwoord:">
+<!ENTITY answer          "Antwoord:">
+<!ENTITY Appendix        "Bijlage">
+<!ENTITY appendix        "Bijlage">
+<!ENTITY Article         "Artikel">
+<!ENTITY article         "Artikel">
+<!ENTITY Bibliography    "Literatuurlijst">
+<!ENTITY bibliography    "Literatuurlijst">
+<!ENTITY Book            "Boek">
+<!ENTITY book            "Boek">
+<!ENTITY CAUTION         "LET OP">
+<!ENTITY Caution         "Let op">
+<!ENTITY caution         "Let op">
+<!ENTITY Chapter         "Hoofdstuk">
+<!ENTITY chapter         "hoofdstuk">
+<!ENTITY Colophon        "Colofon">
+<!ENTITY colophon        "Colofon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Opdracht">
+<!ENTITY dedication      "Opdracht">
+<!ENTITY Edition         "Uitgave">
+<!ENTITY edition         "Uitgave">
+<!ENTITY Equation        "Vergelijking">
+<!ENTITY equation        "Vergelijking">
+<!ENTITY Example         "Voorbeeld">
+<!ENTITY example         "Voorbeeld">
+<!ENTITY Figure          "Figuur">
+<!ENTITY figure          "Figuur">
+<!ENTITY Glossary        "Woordenlijst">
+<!ENTITY glossary        "Woordenlijst">
+<!ENTITY GlossSee        "Zie">
+<!ENTITY glosssee        "Zie">
+<!ENTITY GlossSeeAlso    "Zie ook">
+<!ENTITY glossseealso    "Zie ook">
+<!ENTITY IMPORTANT       "BELANGRIJK">
+<!ENTITY Important       "Belangrijk">
+<!ENTITY important       "Belangrijk">
+<!ENTITY Index           "Register">
+<!ENTITY index           "Register">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Bericht">
+<!ENTITY legalnotice     "Bericht">
+<!ENTITY MsgAud          "Doelgroep">
+<!ENTITY msgaud          "Doelgroep">
+<!ENTITY MsgLevel        "Niveau">
+<!ENTITY msglevel        "Niveau">
+<!ENTITY MsgOrig         "Herkomst">
+<!ENTITY msgorig         "Herkomst">
+<!ENTITY NOTE            "OPMERKING">
+<!ENTITY Note            "Opmerking">
+<!ENTITY note            "Opmerking">
+<!ENTITY Part            "Deel">
+<!ENTITY part            "Deel">
+<!ENTITY Preface         "Voorwoord">
+<!ENTITY preface         "Voorwoord">
+<!ENTITY Procedure       "Procedure">
+<!ENTITY procedure       "Procedure">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "Uitgegeven">
+<!ENTITY published       "Uitgegeven">
+<!ENTITY Question        "Vraag:">
+<!ENTITY question        "Vraag:">
+<!ENTITY RefEntry        "Referentielemma">
+<!ENTITY refentry        "Referentielemma">
+<!ENTITY Reference       "Referentie">
+<!ENTITY reference       "Referentie">
+<!ENTITY RefName         "Referentienaam">
+<!ENTITY refname         "Referentienaam">
+<!ENTITY RefSection      "Referentieparagraaf">
+<!ENTITY refsection      "Referentieparagraaf">
+<!ENTITY RefSynopsisDiv  "Referentiesamenvatting">
+<!ENTITY refsynopsisdiv  "Referentiesamenvatting">
+<!ENTITY RevHistory      "Wijzigingen">
+<!ENTITY revhistory      "Wijzigingen">
+<!ENTITY Revision        "Herziening">
+<!ENTITY revision        "Herziening">
+<!ENTITY sect1           "Paragraaf">
+<!ENTITY sect2           "Paragraaf">
+<!ENTITY sect3           "Paragraaf">
+<!ENTITY sect4           "Paragraaf">
+<!ENTITY sect5           "Paragraaf">
+<!ENTITY Section         "Paragraaf">
+<!ENTITY section         "paragraaf">
+<!ENTITY See             "Zie">
+<!ENTITY see             "Zie">
+<!ENTITY SeeAlso         "Zie ook">
+<!ENTITY Seealso         "Zie ook">
+<!ENTITY seealso         "Zie ook">
+<!ENTITY Set             "Verzameling">
+<!ENTITY set             "Verzameling">
+<!ENTITY SetIndex        "Hoofdregister">
+<!ENTITY setindex        "Hoofdregister">
+<!ENTITY Sidebar         "Excursie">
+<!ENTITY sidebar         "excursie">
+<!ENTITY Step            "Stap">
+<!ENTITY step            "stap">
+<!ENTITY Table           "Tabel">
+<!ENTITY table           "Tabel">
+<!ENTITY TIP             "TIP">
+<!ENTITY Tip             "Tip">
+<!ENTITY tip             "Tip">
+<!ENTITY WARNING         "WAARSCHUWING">
+<!ENTITY Warning         "Waarschuwing">
+<!ENTITY warning         "Waarschuwing">
+<!ENTITY and             "en">
+<!ENTITY by              "door">
+<!ENTITY Edited          "Redactie">
+<!ENTITY edited          "Redactie">
+<!ENTITY Editedby        "Redactie door">
+<!ENTITY editedby        "Redactie door">
+<!ENTITY in              "in">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "niet bestaand element">
+<!ENTITY notes           "Noten">
+<!ENTITY Notes           "Noten">
+<!ENTITY Pgs             "blz.">
+<!ENTITY pgs             "blz.">
+<!ENTITY Revisedby       "Herzien door: ">
+<!ENTITY revisedby       "Herzien door: ">
+<!ENTITY TableNotes      "Opmerkingen">
+<!ENTITY tablenotes      "Opmerkingen">
+<!ENTITY TableofContents "Inhoudsopgave">
+<!ENTITY tableofcontents "Inhoudsopgave">
+<!ENTITY unexpectedelementname "ONVERWACHT-ELEMENT">
+<!ENTITY unsupported     "niet ondersteund">
+<!ENTITY xrefto          "verwijzing naar">
+<!ENTITY listofequations "Lijst van vergelijkingen">
+<!ENTITY ListofEquations "Lijst van vergelijkingen">
+<!ENTITY ListofExamples  "Lijst van voorbeelden">
+<!ENTITY listofexamples  "Lijst van voorbeelden">
+<!ENTITY ListofFigures   "Lijst van figuren">
+<!ENTITY listoffigures   "Lijst van figuren">
+<!ENTITY listoftables    "Lijst van tabellen">
+<!ENTITY ListofTables    "Lijst van tabellen">
+<!ENTITY ListofUnknown   "Lijst van ???">
+<!ENTITY listofunknown   "Lijst van ???">
+<!ENTITY nav-home        "Begin">
+<!ENTITY nav-next        "Volgende">
+<!ENTITY nav-next-sibling "Verder vooruit">
+<!ENTITY nav-prev        "Terug">
+<!ENTITY nav-prev-sibling "Verder terug">
+<!ENTITY nav-up          "Omhoog">
+<!ENTITY Draft           "Ontwerp">
+<!ENTITY above           "boven">
+<!ENTITY below           "onder">
+<!ENTITY sectioncalled   "de paragraaf">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz\U-00EB;\U-00EF;\U-00E9;">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ\U-00CB;\U-00CF;\U-00C9;">
diff --git a/common/dbl1nn.dsl b/common/dbl1nn.dsl
new file mode 100644 (file)
index 0000000..e026f98
--- /dev/null
@@ -0,0 +1,445 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % nn.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//NN"
+         "dbl1nn.ent">
+%nn.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-nn">
+<style-specification-body>
+
+;; $Id: dbl1nn.dsl,v 1.1 2001/11/14 20:57:53 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (nn-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (nn-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-nn-start-quote%
+                                                      "%t"
+                                                      %gentext-nn-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-nn-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (nn-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (nn-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-nn-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (nn-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-nn-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (nn-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-nn-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-nn-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-nn-intra-label-sep)
+  (list))
+
+(define (nn-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-nn-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-nn-intra-label-sep)))
+        (sep    (assoc name (nn-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-nn-label-title-sep)
+  (list))
+
+(define (nn-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-nn-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-nn-label-title-sep)))
+        (sep    (assoc name (nn-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (nn-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (nn-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (nn-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (nn-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-nn$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (nn-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-nn-start-quote% (dingbat "ldquo"))
+
+(define %gentext-nn-end-quote% (dingbat "rdquo"))
+
+(define %gentext-nn-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-nn-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-nn-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-nn-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-nn-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-nn-page% "")
+
+(define %gentext-nn-and% "&and;")
+
+(define %gentext-nn-listcomma% "&listcomma;")
+
+(define %gentext-nn-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-nn-bibl-pages% "&Pgs;")
+
+(define %gentext-nn-endnotes% "&Notes;")
+
+(define %gentext-nn-table-endnotes% "&TableNotes;:")
+
+(define %gentext-nn-index-see% "&See;")
+
+(define %gentext-nn-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-nn-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-nn-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-nn-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-nn-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-nn-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-nn-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
+
diff --git a/common/dbl1nn.ent b/common/dbl1nn.ent
new file mode 100644 (file)
index 0000000..f1f449a
--- /dev/null
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Samandrag">
+<!ENTITY abstract        "Samandrag">
+<!ENTITY Answer          "Svar">
+<!ENTITY answer          "svar">
+<!ENTITY Appendix        "Tillegg">
+<!ENTITY appendix        "tillegg">
+<!ENTITY Article         "Artikkel">
+<!ENTITY article         "artikkel">
+<!ENTITY Bibliography    "Bibliografi">
+<!ENTITY bibliography    "bibliografi">
+<!ENTITY Book            "Bok">
+<!ENTITY book            "bok">
+<!ENTITY CAUTION         "OBS">
+<!ENTITY Caution         "Obs">
+<!ENTITY caution         "OBS">
+<!ENTITY caution         "Obs">
+<!ENTITY Chapter         "Kapittel">
+<!ENTITY chapter         "kapittel">
+<!ENTITY Colophon        "Kolofon">
+<!ENTITY colophon        "kolofon">
+<!ENTITY Copyright       "Opphavsrett">
+<!ENTITY copyright       "opphavsrett">
+<!ENTITY Dedication      "Dedikasjon">
+<!ENTITY dedication      "dedikasjon">
+<!ENTITY Edition         "Utg\U-00E5;ve">
+<!ENTITY edition         "utg\U-00E5;ve">
+<!ENTITY Equation        "Formel">
+<!ENTITY equation        "formel">
+<!ENTITY Example         "D\U-00F8;me">
+<!ENTITY example         "d\U-00F8;me">
+<!ENTITY Figure          "Figur">
+<!ENTITY figure          "figur">
+<!ENTITY Glossary        "Ordliste">
+<!ENTITY glossary        "ordliste">
+<!ENTITY GlossSee        "Sj\U-00E5;">
+<!ENTITY glosssee        "sj\U-00E5;">
+<!ENTITY GlossSeeAlso    "Sj\U-00E5; \U-00F2;g">
+<!ENTITY glossseealso    "sj\U-00E5; \U-00F2;g">
+<!ENTITY IMPORTANT       "VIKTIG">
+<!ENTITY Important       "Viktig">
+<!ENTITY important       "viktig">
+<!ENTITY important       "viktig">
+<!ENTITY Index           "Indeks">
+<!ENTITY index           "indeks">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "">
+<!ENTITY legalnotice     "">
+<!ENTITY MsgAud          "Publikum">
+<!ENTITY msgaud          "publikum">
+<!ENTITY MsgLevel        "Niv\U-00E5;">
+<!ENTITY msglevel        "niv\U-00E5;">
+<!ENTITY MsgOrig         "Opphav">
+<!ENTITY msgorig         "Opphav">
+<!ENTITY NOTE            "NOTAT">
+<!ENTITY Note            "Notat">
+<!ENTITY note            "NOTAT">
+<!ENTITY note            "Notat">
+<!ENTITY Part            "Del">
+<!ENTITY part            "del">
+<!ENTITY Preface         "Forord">
+<!ENTITY preface         "forord">
+<!ENTITY Procedure       "Prosedyre">
+<!ENTITY procedure       "prosedyre">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "Utgitt">
+<!ENTITY published       "utgitt">
+<!ENTITY Question        "Sp\U-00F8;rsm\U-00E5;l">
+<!ENTITY question        "sp\U-00F8;rsm\U-00E5;l">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Referanse">
+<!ENTITY reference       "referanse">
+<!ENTITY RefName         "Namn">
+<!ENTITY refname         "namn">
+<!ENTITY RefSection      "Del">
+<!ENTITY refsection      "del">
+<!ENTITY RefSynopsisDiv  "Oversyn">
+<!ENTITY refsynopsisdiv  "oversyn">
+<!ENTITY RevHistory      "Revisjonshistorie">
+<!ENTITY revhistory      "revisjonshistorie">
+<!ENTITY Revision        "Revisjon">
+<!ENTITY revision        "revisjon">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "Del">
+<!ENTITY section         "del">
+<!ENTITY See             "Sj\U-00E5;">
+<!ENTITY see             "sj\U-00E5;">
+<!ENTITY SeeAlso         "Sj\U-00E5; \U-00F2;g">
+<!ENTITY seealso         "sj\U-00E5; \U-00F2;g">
+<!ENTITY Set             "Set">
+<!ENTITY set             "set">
+<!ENTITY SetIndex        "Indeks">
+<!ENTITY setindex        "Indeks">
+<!ENTITY Sidebar         "Sidestolpe">
+<!ENTITY sidebar         "sidestolpe">
+<!ENTITY Step            "Steg">
+<!ENTITY step            "steg">
+<!ENTITY Table           "Tabell">
+<!ENTITY table           "tabell">
+<!ENTITY TIP             "TIPS">
+<!ENTITY Tip             "Tips">
+<!ENTITY tip             "tips">
+<!ENTITY tip             "tips">
+<!ENTITY WARNING         "\U-00C5;TVARING">
+<!ENTITY Warning         "\U-00C5;tvaring">
+<!ENTITY warning         "\U-00E5;tvaring">
+<!ENTITY warning         "\U-00E5;tvaring">
+<!ENTITY Seealso         "Sj\U-00E5; \U-00F2;g">
+<!ENTITY seealso         "sj\U-00E5; \U-00F2;g">
+<!ENTITY TableofContents "Innhald">
+<!ENTITY tableofcontents "Innhald">
+<!ENTITY in              "i">
+<!ENTITY by              "av">
+<!ENTITY Edited          "Redigert">
+<!ENTITY edited          "redigert">
+<!ENTITY Editedby        "Redigert av">
+<!ENTITY editedby        "redigert av">
+<!ENTITY and             "og">
+<!ENTITY listcomma       ",">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY Notes           "Merknader">
+<!ENTITY notes           "merknader">
+<!ENTITY TableNotes      "Merknader">
+<!ENTITY tablenotes      "merknader">
+<!ENTITY nonexistantelement "ikkje-eksisterande element">
+<!ENTITY Pgs             "Sider">
+<!ENTITY pgs             "sider">
+<!ENTITY unsupported     "ikkje st\U-00F8;tta">
+<!ENTITY xrefto          "xref til">
+<!ENTITY unexpectedelementname "UVENTA-ELEMENTNAVN">
+<!ENTITY Revisedby       "Revidert av: ">
+<!ENTITY revisedby       "revidert av: ">
+<!ENTITY ListofTables    "Tabelloversikt">
+<!ENTITY listoftables    "tabelloversikt">
+<!ENTITY ListofExamples  "D\U-00F8;meoversikt">
+<!ENTITY listofexamples  "d\U-00F8;meoversikt">
+<!ENTITY ListofFigures   "Figuroversikt">
+<!ENTITY listoffigures   "figuroversikt">
+<!ENTITY ListofEquations "Formeloversikt">
+<!ENTITY listofequations "formeloversikt">
+<!ENTITY ListofUnknown   "???-oversikt">
+<!ENTITY listofunknown   "???-oversikt">
+<!ENTITY nav-prev        "Att">
+<!ENTITY nav-prev-sibling "Raskt bakover">
+<!ENTITY nav-next-sibling "Raskt framover">
+<!ENTITY nav-next        "Fram">
+<!ENTITY nav-up          "Opp">
+<!ENTITY nav-home        "Heim">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1no.dsl b/common/dbl1no.dsl
new file mode 100644 (file)
index 0000000..4077e74
--- /dev/null
@@ -0,0 +1,437 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % lat1 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN">
+%lat1;
+<!ENTITY % no.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//NO"
+         "dbl1no.ent">
+%no.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-no">
+<style-specification-body>
+
+;; $Id: dbl1no.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; Norsk Bokm\U-00E5;l localization. (a-ring)
+;; Translated by Stig S. Bakken, ssb@guardian.no
+;; Send changes to Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x
+;; keywords.
+;;
+
+(define (no-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (no-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "tillegget kalt %t"))
+       (list (normalize "article")     (string-append %gentext-no-start-quote%
+                                                      "%t"
+                                                      %gentext-no-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "kapittelet kalt %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "seksjonen kalt %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "seksjonen kalt %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "seksjonen kalt %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "seksjonen kalt %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "seksjonen kalt %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "seksjonen kalt %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "seksjonen kalt %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-no-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (no-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (no-auto-xref-indirect-connector before) 
+  (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-no-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (no-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-no-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (no-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-no-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-no-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-no-intra-label-sep)
+  (list))
+
+(define (no-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-no-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-no-intra-label-sep)))
+        (sep    (assoc name (no-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-no-label-title-sep)
+  (list))
+
+(define (no-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-no-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-no-label-title-sep)))
+        (sep    (assoc name (no-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (no-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (no-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (no-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (no-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-no$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (no-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-no-start-quote%  (dingbat "ldquo"))
+
+(define %gentext-no-end-quote%  (dingbat "rdquo"))
+
+(define %gentext-no-start-nested-quote%  (dingbat "lsquo"))
+
+(define %gentext-no-end-nested-quote%  (dingbat "rsquo"))
+
+(define %gentext-no-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-no-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-no-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-no-page% "")
+
+(define %gentext-no-and% "&and;")
+
+(define %gentext-no-listcomma% "&listcomma;")
+
+(define %gentext-no-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-no-bibl-pages% "&Pgs;")
+
+(define %gentext-no-endnotes% "&Notes;")
+
+(define %gentext-no-table-endnotes% "&TableNotes;:")
+
+(define %gentext-no-index-see% "&See;")
+
+(define %gentext-no-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-no-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-no-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-no-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-no-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-no-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-no-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1no.ent b/common/dbl1no.ent
new file mode 100644 (file)
index 0000000..9ef8ad2
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Abstract">
+<!ENTITY abstract        "Abstract">
+<!ENTITY Answer          "A:">
+<!ENTITY answer          "A:">
+<!ENTITY Appendix        "Tillegg">
+<!ENTITY appendix        "Tillegg">
+<!ENTITY Article         "">
+<!ENTITY article         "">
+<!ENTITY Bibliography    "Bibliografi">
+<!ENTITY bibliography    "Bibliografi">
+<!ENTITY Book            "">
+<!ENTITY book            "">
+<!ENTITY CAUTION         "OBS">
+<!ENTITY Caution         "Obs">
+<!ENTITY caution         "Obs">
+<!ENTITY Chapter         "Kapittel">
+<!ENTITY chapter         "Kapittel">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Dedikasjon">
+<!ENTITY dedication      "Dedikasjon">
+<!ENTITY Edition         "">
+<!ENTITY edition         "">
+<!ENTITY Equation        "Formel">
+<!ENTITY equation        "Formel">
+<!ENTITY Example         "Eksempel">
+<!ENTITY example         "Eksempel">
+<!ENTITY Figure          "Figur">
+<!ENTITY figure          "Figur">
+<!ENTITY Glossary        "Ordliste">
+<!ENTITY glossary        "Ordliste">
+<!ENTITY GlossSee        "Se">
+<!ENTITY glosssee        "Se">
+<!ENTITY GlossSeeAlso    "Se Ogs\U-00E5;">
+<!ENTITY glossseealso    "Se Ogs\U-00E5;">
+<!ENTITY IMPORTANT       "VIKTIG">
+<!ENTITY Important       "Viktig">
+<!ENTITY important       "Viktig">
+<!ENTITY Index           "Indeks">
+<!ENTITY index           "Indeks">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "">
+<!ENTITY legalnotice     "">
+<!ENTITY MsgAud          "Publikum">
+<!ENTITY msgaud          "Publikum">
+<!ENTITY MsgLevel        "Niv\U-00E5;">
+<!ENTITY msglevel        "Niv\U-00E5;">
+<!ENTITY MsgOrig         "Opphav">
+<!ENTITY msgorig         "Opphav">
+<!ENTITY NOTE            "NOTAT">
+<!ENTITY Note            "Notat">
+<!ENTITY note            "Notat">
+<!ENTITY Part            "Del">
+<!ENTITY part            "Del">
+<!ENTITY Preface         "Forord">
+<!ENTITY preface         "Forord">
+<!ENTITY Procedure       "Prosedyre">
+<!ENTITY procedure       "Prosedyre">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "">
+<!ENTITY published       "">
+<!ENTITY Question        "Q:">
+<!ENTITY question        "Q:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Referanse">
+<!ENTITY reference       "Referanse">
+<!ENTITY RefName         "Navn">
+<!ENTITY refname         "Navn">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Synopsis">
+<!ENTITY refsynopsisdiv  "Synopsis">
+<!ENTITY RevHistory      "Revisjonshistorie">
+<!ENTITY revhistory      "Revisjonshistorie">
+<!ENTITY Revision        "Revisjon">
+<!ENTITY revision        "Revisjon">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "Seksjon">
+<!ENTITY section         "seksjon">
+<!ENTITY See             "Se">
+<!ENTITY see             "Se">
+<!ENTITY SeeAlso         "Se Ogs\U-00E5;">
+<!ENTITY Seealso         "Se ogs\U-00E5;">
+<!ENTITY seealso         "Se Ogs\U-00E5;">
+<!ENTITY Set             "">
+<!ENTITY set             "">
+<!ENTITY SetIndex        "Indeks">
+<!ENTITY setindex        "Indeks">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "">
+<!ENTITY Step            "Steg">
+<!ENTITY step            "steg">
+<!ENTITY Table           "Tabell">
+<!ENTITY table           "Tabell">
+<!ENTITY TIP             "TIPS">
+<!ENTITY Tip             "Tips">
+<!ENTITY tip             "Tips">
+<!ENTITY WARNING         "ADVARSEL">
+<!ENTITY Warning         "Advarsel">
+<!ENTITY warning         "Advarsel">
+<!ENTITY and             "og">
+<!ENTITY by              "av">
+<!ENTITY Edited          "Redigert">
+<!ENTITY edited          "Redigert">
+<!ENTITY Editedby        "Redigert av">
+<!ENTITY editedby        "Redigert av">
+<!ENTITY in              "i">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "ikke-eksisterende element">
+<!ENTITY notes           "Sluttnotater">
+<!ENTITY Notes           "Sluttnotater">
+<!ENTITY Pgs             "Sdr.">
+<!ENTITY pgs             "Sdr.">
+<!ENTITY Revisedby       "Revised by: ">
+<!ENTITY revisedby       "Revised by: ">
+<!ENTITY TableNotes      "Notater">
+<!ENTITY tablenotes      "Notater">
+<!ENTITY TableofContents "Innholdsfortegnelse">
+<!ENTITY tableofcontents "Innholdsfortegnelse">
+<!ENTITY unexpectedelementname "UVENTET-ELEMENTNAVN">
+<!ENTITY unsupported     "ikke st\U-00F8;ttet">
+<!ENTITY xrefto          "xref til">
+<!ENTITY listofequations "Formeloversikt">
+<!ENTITY ListofEquations "Formeloversikt">
+<!ENTITY ListofExamples  "Eksempeloversikt">
+<!ENTITY listofexamples  "Eksempeloversikt">
+<!ENTITY ListofFigures   "Figuroversikt">
+<!ENTITY listoffigures   "Figuroversikt">
+<!ENTITY listoftables    "Tabelloversikt">
+<!ENTITY ListofTables    "Tabelloversikt">
+<!ENTITY ListofUnknown   "???-oversikt">
+<!ENTITY listofunknown   "???-oversikt">
+<!ENTITY nav-home        "Hjem">
+<!ENTITY nav-next        "Neste">
+<!ENTITY nav-next-sibling "Raskt Fremover">
+<!ENTITY nav-prev        "Forrige">
+<!ENTITY nav-prev-sibling "Raskt Bakover">
+<!ENTITY nav-up          "Opp">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1null.dsl b/common/dbl1null.dsl
new file mode 100644 (file)
index 0000000..d95bbb4
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+]>
+
+<style-sheet>
+<style-specification id="dbl1null">
+<style-specification-body>
+
+;; No definitions...
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1pl.dsl b/common/dbl1pl.dsl
new file mode 100644 (file)
index 0000000..fe73170
--- /dev/null
@@ -0,0 +1,434 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % pl.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//PL"
+         "dbl1pl.ent">
+%pl.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-pl">
+<style-specification-body>
+
+;; $Id: dbl1pl.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; Polish localization.
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributors:
+;; Rafa\263 Kleger-Rudomin, ip011@osi.gda.pl
+
+(define (pl-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (pl-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "dodatek %t"))
+       (list (normalize "article")     (string-append %gentext-pl-start-quote%
+                                                      "%t"
+                                                      %gentext-pl-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "rozdzia&#179; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "sekcja %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "sekcja %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "sekcja %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "sekcja %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "sekcja %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "sekcja %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "sekcja %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-pl-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (pl-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (pl-auto-xref-indirect-connector before) 
+  (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-pl-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (pl-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-pl-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (pl-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-pl-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-pl-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-pl-intra-label-sep)
+  (list))
+
+(define (pl-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-pl-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-pl-intra-label-sep)))
+        (sep    (assoc name (pl-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-pl-label-title-sep)
+  (list))
+
+(define (pl-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-pl-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-pl-label-title-sep)))
+        (sep    (assoc name (pl-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (pl-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (pl-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (pl-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (pl-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-pl$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (pl-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-pl-start-quote%  (dingbat "ldquor"))
+
+(define %gentext-pl-end-quote%  (dingbat "rdquor"))
+
+(define %gentext-pl-start-nested-quote%  (dingbat "lsquo"))
+
+(define %gentext-pl-end-nested-quote%  (dingbat "rsquo"))
+
+(define %gentext-pl-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-pl-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-pl-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-pl-page% "")
+
+(define %gentext-pl-and% "&and;")
+
+(define %gentext-pl-listcomma% "&listcomma;")
+
+(define %gentext-pl-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-pl-bibl-pages% "&Pgs;")
+
+(define %gentext-pl-endnotes% "&Notes;")
+
+(define %gentext-pl-table-endnotes% "&TableNotes;:")
+
+(define %gentext-pl-index-see% "&See;")
+
+(define %gentext-pl-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-pl-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-pl-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-pl-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-pl-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-pl-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-pl-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1pl.ent b/common/dbl1pl.ent
new file mode 100644 (file)
index 0000000..35e015f
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Abstrakt">
+<!ENTITY abstract        "Abstrakt">
+<!ENTITY Answer          "Odp:">
+<!ENTITY answer          "Odp:">
+<!ENTITY Appendix        "Dodatek">
+<!ENTITY appendix        "dodatek">
+<!ENTITY Article         "Artyku\U-0142;">
+<!ENTITY article         "Artyku\U-0142;">
+<!ENTITY Bibliography    "Bibliografia">
+<!ENTITY bibliography    "Bibliografia">
+<!ENTITY Book            "Ksi\U-0105;\U-017C;ka">
+<!ENTITY book            "Ksi\U-0105;\U-017C;ka">
+<!ENTITY CAUTION         "PRZYPADEK">
+<!ENTITY Caution         "Uwaga!">
+<!ENTITY caution         "Uwaga!">
+<!ENTITY Chapter         "Rozdzia\U-0142;">
+<!ENTITY chapter         "rozdzia\U-0142;;">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Dedykacja">
+<!ENTITY dedication      "Dedykacja">
+<!ENTITY Edition         "Wydanie">
+<!ENTITY edition         "Wydanie">
+<!ENTITY Equation        "R\U-00F3;wnanie">
+<!ENTITY equation        "R\U-00F3;wnanie">
+<!ENTITY Example         "Przyk\U-0142;ad">
+<!ENTITY example         "Przyk\U-0142;ad">
+<!ENTITY Figure          "Rysunek">
+<!ENTITY figure          "Rysunek">
+<!ENTITY Glossary        "Glossary">
+<!ENTITY glossary        "Glossary">
+<!ENTITY GlossSee        "Patrz">
+<!ENTITY glosssee        "Patrz">
+<!ENTITY GlossSeeAlso    "Patrz te\U-017C;">
+<!ENTITY glossseealso    "Patrz te\U-017C;">
+<!ENTITY IMPORTANT       "WA\U-017B;NE">
+<!ENTITY Important       "WA\U-017B;NE">
+<!ENTITY important       "WA\U-017B;NE">
+<!ENTITY Index           "Indeks">
+<!ENTITY index           "Indeks">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "">
+<!ENTITY legalnotice     "">
+<!ENTITY MsgAud          "Odbiorcy">
+<!ENTITY msgaud          "Odbiorcy">
+<!ENTITY MsgLevel        "Poziom">
+<!ENTITY msglevel        "Poziom">
+<!ENTITY MsgOrig         "Nadawca">
+<!ENTITY msgorig         "Nadawca">
+<!ENTITY NOTE            "Notatka">
+<!ENTITY Note            "Notatka">
+<!ENTITY note            "Notatka">
+<!ENTITY Part            "Cz\U-0119;\U-015B;\U-0107;">
+<!ENTITY part            "Cz\U-0119;\U-015B;\U-0107;">
+<!ENTITY Preface         "Przedmowa">
+<!ENTITY preface         "Przedmowa">
+<!ENTITY Procedure       "Procedura">
+<!ENTITY procedure       "Procedura">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "Data wydania">
+<!ENTITY published       "Data wydania">
+<!ENTITY question        "Pyt:">
+<!ENTITY Question        "Pyt:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Materia\U-0142;y \U-017A;r\U-00F3;d\U-0142;owe">
+<!ENTITY reference       "Materia\U-0142;y \U-017A;r\U-00F3;d\U-0142;owe">
+<!ENTITY RefName         "Nazwa">
+<!ENTITY refname         "Nazwa">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Synopsis">
+<!ENTITY refsynopsisdiv  "Synopsis">
+<!ENTITY RevHistory      "Historia zmian">
+<!ENTITY revhistory      "Historia zmian">
+<!ENTITY Revision        "Zmiana">
+<!ENTITY revision        "Zmiana">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "Sekcja">
+<!ENTITY section         "sekcja">
+<!ENTITY See             "Patrz">
+<!ENTITY see             "Patrz">
+<!ENTITY SeeAlso         "Patrz te\U-017C;">
+<!ENTITY Seealso         "Patrz te\U-017C;">
+<!ENTITY seealso         "Patrz te\U-017C;">
+<!ENTITY Set             "Set">
+<!ENTITY set             "Set">
+<!ENTITY SetIndex        "Indeks">
+<!ENTITY setindex        "Indeks">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "">
+<!ENTITY Step            "krok">
+<!ENTITY step            "krok">
+<!ENTITY Table           "Tabela">
+<!ENTITY table           "Tabela">
+<!ENTITY TIP             "Podpowied\U-017A;">
+<!ENTITY Tip             "Podpowied\U-017A;">
+<!ENTITY tip             "Podpowied\U-017A;">
+<!ENTITY WARNING         "Ostrze\U-017C;enie">
+<!ENTITY Warning         "Ostrze\U-017C;enie">
+<!ENTITY warning         "Ostrze\U-017C;enie">
+<!ENTITY and             "i">
+<!ENTITY by              "">
+<!ENTITY Edited          "Edited">
+<!ENTITY edited          "Edited">
+<!ENTITY Editedby        "Redakcja: ">
+<!ENTITY editedby        "Redakcja: ">
+<!ENTITY in              "w">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "nie istniej\U-0105;cy element">
+<!ENTITY notes           "Przypisy">
+<!ENTITY Notes           "Przypisy">
+<!ENTITY Pgs             "stron">
+<!ENTITY pgs             "stron">
+<!ENTITY Revisedby       "Revised by: ">
+<!ENTITY revisedby       "Revised by: ">
+<!ENTITY TableNotes      "Przypisy">
+<!ENTITY tablenotes      "Przypisy">
+<!ENTITY TableofContents "Spis tre\U-015B;ci">
+<!ENTITY tableofcontents "Spis tre\U-015B;ci">
+<!ENTITY unexpectedelementname "Unexpected element name">
+<!ENTITY unsupported     "nie wspierany">
+<!ENTITY xrefto          "xref to">
+<!ENTITY listofequations "Spis r\U-00F3;wna\U-0144;">
+<!ENTITY ListofEquations "Spis r\U-00F3;wna\U-0144;">
+<!ENTITY ListofExamples  "Spis przyk\U-0142;ad\U-00F3;w">
+<!ENTITY listofexamples  "Spis przyk\U-0142;ad\U-00F3;w">
+<!ENTITY ListofFigures   "Spis rysunk\U-00F3;w">
+<!ENTITY listoffigures   "Spis rysunk\U-00F3;w">
+<!ENTITY listoftables    "Spis tabel">
+<!ENTITY ListofTables    "Spis tabel">
+<!ENTITY ListofUnknown   "Spis ???">
+<!ENTITY listofunknown   "Spis ???">
+<!ENTITY nav-home        "Spis tre\U-015B;ci">
+<!ENTITY nav-next        "Nast\U-0119;pny">
+<!ENTITY nav-next-sibling "Nast\U-0119;pny rozdzia\U-0142;">
+<!ENTITY nav-prev        "Poprzedni">
+<!ENTITY nav-prev-sibling "Poprzedni rozdzia\U-0142;">
+<!ENTITY nav-up          "Pocz\U-0105;tek rozdzia\U-0142;u">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1pt.dsl b/common/dbl1pt.dsl
new file mode 100644 (file)
index 0000000..34da271
--- /dev/null
@@ -0,0 +1,433 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % pt.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//PT"
+         "dbl1pt.ent">
+%pt.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-pt">
+<style-specification-body>
+
+;; $Id: dbl1pt.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x
+;; keywords.
+;;
+
+(define (pt-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (pt-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "o &appendix; %t"))
+       (list (normalize "article")     (string-append %gentext-pt-start-quote%
+                                                      "%t"
+                                                      %gentext-pt-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "o &chapter; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "o &section; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "o &section; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "o &section; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "o &section; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "o &section; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "o &section; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "o &section; %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-pt-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (pt-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (pt-auto-xref-indirect-connector before) 
+  (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-pt-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (pt-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-pt-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (pt-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-pt-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-pt-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-pt-intra-label-sep)
+  (list))
+
+(define (pt-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-pt-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-pt-intra-label-sep)))
+        (sep    (assoc name (pt-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-pt-label-title-sep)
+  (list))
+
+(define (pt-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-pt-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-pt-label-title-sep)))
+        (sep    (assoc name (pt-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (pt-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (pt-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (pt-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (pt-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-pt$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (pt-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-pt-start-quote% (dingbat "ldquo"))
+
+(define %gentext-pt-end-quote% (dingbat "rdquo"))
+
+(define %gentext-pt-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-pt-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-pt-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-pt-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-pt-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-pt-page% "")
+
+(define %gentext-pt-and% "&and;")
+
+(define %gentext-pt-listcomma% "&listcomma;")
+
+(define %gentext-pt-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-pt-bibl-pages% "&Pgs;")
+
+(define %gentext-pt-endnotes% "&Notes;")
+
+(define %gentext-pt-table-endnotes% "&TableNotes;:")
+
+(define %gentext-pt-index-see% "&See;")
+
+(define %gentext-pt-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-pt-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-pt-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-pt-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-pt-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-pt-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-pt-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1pt.ent b/common/dbl1pt.ent
new file mode 100644 (file)
index 0000000..a73f9b6
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Resumo">
+<!ENTITY abstract        "Resumo">
+<!ENTITY Answer          "R:">
+<!ENTITY answer          "R:">
+<!ENTITY Appendix        "Ap\U-00EA;ndice">
+<!ENTITY appendix        "ap\U-00EA;ndice">
+<!ENTITY Article         "Artigo">
+<!ENTITY article         "Artigo">
+<!ENTITY Bibliography    "Bibliografia">
+<!ENTITY bibliography    "Bibliografia">
+<!ENTITY Book            "Livro">
+<!ENTITY book            "Livro">
+<!ENTITY CAUTION         "CUIDADO">
+<!ENTITY Caution         "Cuidado">
+<!ENTITY caution         "Cuidado">
+<!ENTITY Chapter         "Cap\U-00ED;tulo">
+<!ENTITY chapter         "cap\U-00ED;tulo">
+<!ENTITY Colophon        "Ficha T\U-00E9;cnica">
+<!ENTITY colophon        "Ficha T\U-00E9;cnica">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Dedicat\U-00F3;ria">
+<!ENTITY dedication      "Dedicat\U-00F3;ria">
+<!ENTITY Edition         "Edi\U-00E7;\U-00E3;o">
+<!ENTITY edition         "Edi\U-00E7;\U-00E3;o">
+<!ENTITY Equation        "Equa\U-00E7;\U-00E3;o">
+<!ENTITY equation        "Equa\U-00E7;\U-00E3;o">
+<!ENTITY Example         "Exemplo">
+<!ENTITY example         "Exemplo">
+<!ENTITY Figure          "Figura">
+<!ENTITY figure          "Figura">
+<!ENTITY Glossary        "Gloss\U-00C1;rio">
+<!ENTITY glossary        "Gloss\U-00C1;rio">
+<!ENTITY GlossSee        "Ver">
+<!ENTITY glosssee        "Ver">
+<!ENTITY GlossSeeAlso    "Ver Tamb\U-00E9;m">
+<!ENTITY glossseealso    "Ver Tamb\U-00E9;m">
+<!ENTITY IMPORTANT       "IMPORTANTE">
+<!ENTITY Important       "Importante">
+<!ENTITY important       "Importante">
+<!ENTITY Index           "\U-00CD;ndice Remissivo">
+<!ENTITY index           "\U-00CD;ndice Remissivo">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Aviso Legal">
+<!ENTITY legalnotice     "Aviso Legal">
+<!ENTITY MsgAud          "Audi\U-00EA;ncia">
+<!ENTITY msgaud          "Audi\U-00EA;ncia">
+<!ENTITY MsgLevel        "N\U-00ED;vel">
+<!ENTITY msglevel        "N\U-00ED;vel">
+<!ENTITY MsgOrig         "Origem">
+<!ENTITY msgorig         "Origem">
+<!ENTITY NOTE            "NOTA">
+<!ENTITY Note            "Nota">
+<!ENTITY note            "Nota">
+<!ENTITY Part            "Parte">
+<!ENTITY part            "Parte">
+<!ENTITY Preface         "Pref\U-00E1;cio">
+<!ENTITY preface         "Pref\U-00E1;cio">
+<!ENTITY Procedure       "Procedimento">
+<!ENTITY procedure       "Procedimento">
+<!ENTITY ProductionSet   "Produ\U-00E7;\U-00E3;o">
+<!ENTITY PubDate         "Editado">
+<!ENTITY pubdate         "Editado">
+<!ENTITY Published       "Publicado">
+<!ENTITY published       "Publicado">
+<!ENTITY Qandadiv        "P &amp; R">
+<!ENTITY qandadiv        "P &amp; R">
+<!ENTITY Question        "P:">
+<!ENTITY question        "P:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Refer\U-00EA;ncia">
+<!ENTITY reference       "Refer\U-00EA;ncia">
+<!ENTITY RefName         "Nome">
+<!ENTITY refname         "Nome">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Sinopse">
+<!ENTITY refsynopsisdiv  "Sinopse">
+<!ENTITY RevHistory      "Historial de Revis\U-00F5;es">
+<!ENTITY revhistory      "Historial de Revis\U-00F5;es">
+<!ENTITY Revision        "Revis\U-00E3;o">
+<!ENTITY revision        "Revis\U-00E3;o">
+<!ENTITY sect1           "Sec\U-00E7;\U-00E3;o">
+<!ENTITY sect2           "Sec\U-00E7;\U-00E3;o">
+<!ENTITY sect3           "Sec\U-00E7;\U-00E3;o">
+<!ENTITY sect4           "Sec\U-00E7;\U-00E3;o">
+<!ENTITY sect5           "Sec\U-00E7;\U-00E3;o">
+<!ENTITY Section         "Sec\U-00E7;\U-00E3;o">
+<!ENTITY section         "sec\U-00E7;\U-00E3;o">
+<!ENTITY See             "Ver">
+<!ENTITY see             "Ver">
+<!ENTITY SeeAlso         "Ver Tamb\U-00E9;m">
+<!ENTITY Seealso         "ver tamb\U-00E9;m">
+<!ENTITY seealso         "Ver Tamb\U-00E9;m">
+<!ENTITY Set             "Conjunto">
+<!ENTITY set             "Conjunto">
+<!ENTITY SetIndex        "\U-00CD;ndice de Conjuntos">
+<!ENTITY setindex        "\U-00CD;ndice de Conjuntos">
+<!ENTITY Sidebar         "Barra Lateral">
+<!ENTITY sidebar         "barra lateral">
+<!ENTITY Step            "Passo">
+<!ENTITY step            "passo">
+<!ENTITY Table           "Tabela">
+<!ENTITY table           "Tabela">
+<!ENTITY TIP             "DICA">
+<!ENTITY Tip             "Dica">
+<!ENTITY tip             "Dica">
+<!ENTITY WARNING         "ATEN\U-00C7;\U-00C3;O">
+<!ENTITY Warning         "Aten\U-00E7;\U-00E3;o">
+<!ENTITY warning         "Aten\U-00E7;\U-00E3;o">
+<!ENTITY and             "e">
+<!ENTITY by              "por">
+<!ENTITY called          "chamado">
+<!ENTITY Edited          "Editado">
+<!ENTITY edited          "Editado">
+<!ENTITY Editedby        "Editado por">
+<!ENTITY editedby        "Editado por">
+<!ENTITY in              "">
+<!ENTITY lastlistcomma   "">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "elemento n\U-00E3;o existente">
+<!ENTITY notes           "Notas">
+<!ENTITY Notes           "Notas">
+<!ENTITY Pgs             "P\U-00E1;ginas">
+<!ENTITY pgs             "P\U-00E1;ginas">
+<!ENTITY Revisedby       "Revisto por: ">
+<!ENTITY revisedby       "Revisto por: ">
+<!ENTITY TableNotes      "Notas">
+<!ENTITY tablenotes      "Notas">
+<!ENTITY TableofContents "\U-00CD;ndice">
+<!ENTITY tableofcontents "\U-00CD;ndice">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "Nome de elemento inesperado">
+<!ENTITY unsupported     "n\U-00E3;o suportado">
+<!ENTITY xrefto          "refer\U-00EA;ncia cruzada para">
+<!ENTITY listofequations "Lista de Equa\U-00E7;\U-00F5;es">
+<!ENTITY ListofEquations "Lista de Equa\U-00E7;\U-00F5;es">
+<!ENTITY ListofExamples  "Lista de Exemplos">
+<!ENTITY listofexamples  "Lista de Exemplos">
+<!ENTITY ListofFigures   "Lista de Figuras">
+<!ENTITY listoffigures   "Lista de Figuras">
+<!ENTITY ListofProcedures "Lista de Procedimentos">
+<!ENTITY listofprocedures "Lista de Procedimentos">
+<!ENTITY listoftables    "Lista de Tabelas">
+<!ENTITY ListofTables    "Lista de Tabelas">
+<!ENTITY ListofUnknown   "Lista de Desconhecido">
+<!ENTITY listofunknown   "Lista de Desconhecido">
+<!ENTITY nav-home        "In\U-00ED;cio">
+<!ENTITY nav-next        "Pr\U-00F3;ximo">
+<!ENTITY nav-next-sibling "Pr\U-00F3;xima Parte">
+<!ENTITY nav-prev        "Anterior">
+<!ENTITY nav-prev-sibling "Parte Anterior">
+<!ENTITY nav-up          "Subir">
+<!ENTITY nav-toc         "\U-00CD;ndice">
+<!ENTITY sectioncalled   "a sec\U-00E7;\U-00E3;o chamada">
+<!ENTITY Draft           "Rascunho">
+<!ENTITY above           "acima">
+<!ENTITY below           "abaixo">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "2">
+<!ENTITY hyphenation-remain-character-count "2">
diff --git a/common/dbl1ptbr.dsl b/common/dbl1ptbr.dsl
new file mode 100644 (file)
index 0000000..c711af4
--- /dev/null
@@ -0,0 +1,434 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % ptbr.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//PTBR"
+         "dbl1ptbr.ent">
+%ptbr.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-ptbr">
+<style-specification-body>
+
+;; $Id: dbl1ptbr.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x
+;; keywords.
+;;
+
+(define (ptbr-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (ptbr-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "o &appendix; %t"))
+       (list (normalize "article")     (string-append %gentext-ptbr-start-quote%
+                                                      "%t"
+                                                      %gentext-ptbr-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "o &chapter; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "a &section; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "a &section; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "a &section; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "a &section; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "a &section; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "a &section; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "a &section; %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-ptbr-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (ptbr-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (ptbr-auto-xref-indirect-connector before) 
+  (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-ptbr-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (ptbr-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "notes")           "&Notes;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-ptbr-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (ptbr-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-ptbr-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-ptbr-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-ptbr-intra-label-sep)
+  (list))
+
+(define (ptbr-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-ptbr-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ptbr-intra-label-sep)))
+        (sep    (assoc name (ptbr-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-ptbr-label-title-sep)
+  (list))
+
+(define (ptbr-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-ptbr-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ptbr-label-title-sep)))
+        (sep    (assoc name (ptbr-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (ptbr-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (ptbr-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (ptbr-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (ptbr-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-ptbr$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (ptbr-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-ptbr-start-quote% (dingbat "ldquo"))
+
+(define %gentext-ptbr-end-quote% (dingbat "rdquo"))
+
+(define %gentext-ptbr-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-ptbr-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-ptbr-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-ptbr-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-ptbr-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-ptbr-page% "")
+
+(define %gentext-ptbr-and% "&and;")
+
+(define %gentext-ptbr-listcomma% "&listcomma;")
+
+(define %gentext-ptbr-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-ptbr-bibl-pages% "&Pgs;")
+
+(define %gentext-ptbr-endnotes% "&Notes;")
+
+(define %gentext-ptbr-table-endnotes% "&TableNotes;:")
+
+(define %gentext-ptbr-index-see% "&See;")
+
+(define %gentext-ptbr-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-ptbr-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-ptbr-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-ptbr-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-ptbr-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-ptbr-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-ptbr-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1ptbr.ent b/common/dbl1ptbr.ent
new file mode 100644 (file)
index 0000000..5c5200f
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Resumo">
+<!ENTITY abstract        "Resumo">
+<!ENTITY Answer          "R:">
+<!ENTITY answer          "R:">
+<!ENTITY Appendix        "Ap\U-00EA;ndice">
+<!ENTITY appendix        "ap\U-00EA;ndice">
+<!ENTITY Article         "Artigo">
+<!ENTITY article         "Artigo">
+<!ENTITY Bibliography    "Bibliografia">
+<!ENTITY bibliography    "Bibliografia">
+<!ENTITY Book            "Livro">
+<!ENTITY book            "Livro">
+<!ENTITY CAUTION         "CUIDADO">
+<!ENTITY Caution         "Cuidado">
+<!ENTITY caution         "Cuidado">
+<!ENTITY Chapter         "Cap\U-00ED;tulo">
+<!ENTITY chapter         "cap\U-00ED;tulo">
+<!ENTITY Colophon        "Considera\U-00E7;\U-00F5;es finais">
+<!ENTITY colophon        "Considera\U-00E7;\U-00F5;es finais">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Dedicat\U-00F3;ria">
+<!ENTITY dedication      "Dedicat\U-00F3;ria">
+<!ENTITY Edition         "Edi\U-00E7;\U-00E3;o">
+<!ENTITY edition         "Edi\U-00E7;\U-00E3;o">
+<!ENTITY Equation        "Equa\U-00E7;\U-00E3;o">
+<!ENTITY equation        "Equa\U-00E7;\U-00E3;o">
+<!ENTITY Example         "Exemplo">
+<!ENTITY example         "Exemplo">
+<!ENTITY Figure          "Figura">
+<!ENTITY figure          "Figura">
+<!ENTITY Glossary        "Gloss\U-00E1;rio">
+<!ENTITY glossary        "Gloss\U-00E1;rio">
+<!ENTITY GlossSee        "Ver">
+<!ENTITY glosssee        "Ver">
+<!ENTITY GlossSeeAlso    "Ver Tamb\U-00E9;m">
+<!ENTITY glossseealso    "Ver Tamb\U-00E9;m">
+<!ENTITY IMPORTANT       "IMPORTANTE">
+<!ENTITY Important       "Importante">
+<!ENTITY important       "Importante">
+<!ENTITY Index           "\U-00CD;ndice Remissivo">
+<!ENTITY index           "\U-00CD;ndice Remissivo">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Nota Legal">
+<!ENTITY legalnotice     "Nota Legal">
+<!ENTITY MsgAud          "Audi\U-00EA;ncia">
+<!ENTITY msgaud          "Audi\U-00EA;ncia">
+<!ENTITY MsgLevel        "N\U-00ED;vel">
+<!ENTITY msglevel        "N\U-00ED;vel">
+<!ENTITY MsgOrig         "Origem">
+<!ENTITY msgorig         "Origem">
+<!ENTITY NOTE            "NOTA">
+<!ENTITY Note            "Nota">
+<!ENTITY note            "Nota">
+<!ENTITY Part            "Parte">
+<!ENTITY part            "Parte">
+<!ENTITY Preface         "Pref\U-00E1;cio">
+<!ENTITY preface         "Pref\U-00E1;cio">
+<!ENTITY Procedure       "Procedimento">
+<!ENTITY procedure       "Procedimento">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY PubDate         "Data de Publica\U-00E7;\U-00E3;o">
+<!ENTITY pubdate         "Data de Publica\U-00E7;\U-00E3;o">
+<!ENTITY Published       "Publicado">
+<!ENTITY published       "Publicado">
+<!ENTITY Question        "P:">
+<!ENTITY question        "P:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Refer\U-00EA;ncia">
+<!ENTITY reference       "Refer\U-00EA;ncia">
+<!ENTITY RefName         "Nome">
+<!ENTITY refname         "Nome">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Sinopse">
+<!ENTITY refsynopsisdiv  "Sinopse">
+<!ENTITY RevHistory      "Hist\U-00F3;rico de Revis\U-00F5;es">
+<!ENTITY revhistory      "Hist\U-00F3;rico de Revis\U-00F5;es">
+<!ENTITY Revision        "Revis\U-00E3;o">
+<!ENTITY revision        "Revis\U-00E3;o">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "Se\U-00E7;\U-00E3;o">
+<!ENTITY section         "se\U-00E7;\U-00E3;o">
+<!ENTITY See             "Ver">
+<!ENTITY see             "Ver">
+<!ENTITY SeeAlso         "Ver Tamb\U-00E9;m">
+<!ENTITY Seealso         "ver tamb\U-00E9;m">
+<!ENTITY seealso         "Ver Tamb\U-00E9;m">
+<!ENTITY Set             "Conjunto">
+<!ENTITY set             "Conjunto">
+<!ENTITY SetIndex        "\U-00CD;ndice do Conjunto">
+<!ENTITY setindex        "\U-00CD;ndice do Conjunto">
+<!ENTITY Sidebar         "Quadro Lateral">
+<!ENTITY sidebar         "quadro lateral">
+<!ENTITY Step            "Passo">
+<!ENTITY step            "passo">
+<!ENTITY Table           "Tabela">
+<!ENTITY table           "Tabela">
+<!ENTITY TIP             "DICA">
+<!ENTITY Tip             "Dica">
+<!ENTITY tip             "Dica">
+<!ENTITY WARNING         "ATEN\U-00C7;\U-00C3;O">
+<!ENTITY Warning         "Aten\U-00E7;\U-00E3;o">
+<!ENTITY warning         "Aten\U-00E7;\U-00E3;o">
+<!ENTITY and             "e">
+<!ENTITY by              "por">
+<!ENTITY edited          "Editado">
+<!ENTITY Edited          "Editado">
+<!ENTITY editedby        "Editado por">
+<!ENTITY Editedby        "Editado por">
+<!ENTITY in              "">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "elemento inexistente">
+<!ENTITY Notes           "Notas">
+<!ENTITY notes           "Notas">
+<!ENTITY Pgs             "P\U-00E1;ginas">
+<!ENTITY pgs             "P\U-00E1;ginas">
+<!ENTITY Revisedby       "Revisado por: ">
+<!ENTITY revisedby       "Revisado por: ">
+<!ENTITY tablenotes      "Notas">
+<!ENTITY TableNotes      "Notas">
+<!ENTITY TableofContents "\U-00CD;ndice">
+<!ENTITY tableofcontents "\U-00CD;ndice">
+<!ENTITY unexpectedelementname "Nome de elemento inesperado">
+<!ENTITY unsupported     "n\U-00E3;o suportado">
+<!ENTITY xrefto          "refer\U-00EA;ncia para">
+<!ENTITY listofequations "Lista de Equa\U-00E7;\U-00F5;es">
+<!ENTITY ListofEquations "Lista de Equa\U-00E7;\U-00F5;es">
+<!ENTITY ListofExamples  "Lista de Exemplos">
+<!ENTITY listofexamples  "Lista de Exemplos">
+<!ENTITY ListofFigures   "Lista de Figuras">
+<!ENTITY listoffigures   "Lista de Figuras">
+<!ENTITY listoftables    "Lista de Tabelas">
+<!ENTITY ListofTables    "Lista de Tabelas">
+<!ENTITY ListofUnknown   "Lista de ???">
+<!ENTITY listofunknown   "Lista de ???">
+<!ENTITY nav-home        "Principal">
+<!ENTITY nav-next        "Pr\U-00F3;xima">
+<!ENTITY nav-next-sibling "Fim">
+<!ENTITY nav-prev        "Anterior">
+<!ENTITY nav-prev-sibling "In\U-00ED;cio">
+<!ENTITY nav-up          "Acima">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1ro.dsl b/common/dbl1ro.dsl
new file mode 100644 (file)
index 0000000..81886ba
--- /dev/null
@@ -0,0 +1,434 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % lat1 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN">
+%lat1;
+<!ENTITY % lat2 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN">
+%lat2;
+<!ENTITY % ro.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//RO"
+         "dbl1ro.ent">
+%ro.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-ro">
+<style-specification-body>
+
+;; $Id: dbl1ro.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Provided by Dan N. Pomohaci
+;; Updated by Claudiu Costin
+
+(define (ro-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (ro-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-ro-start-quote%
+                                                      "%t"
+                                                      %gentext-ro-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; numit\U-0103; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; numit\U-0103; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; numit\U-0103; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; numit\U-0103; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; numit\U-0103; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; numit\U-0103; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; numit\U-0103; %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-ro-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (ro-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (ro-auto-xref-indirect-connector before) 
+    (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-ro-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (ro-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-ro-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (ro-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-ro-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-ro-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-ro-intra-label-sep)
+  (list))
+
+(define (ro-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-ro-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ro-intra-label-sep)))
+        (sep    (assoc name (ro-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-ro-label-title-sep)
+  (list))
+
+(define (ro-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-ro-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ro-label-title-sep)))
+        (sep    (assoc name (ro-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (ro-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (ro-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (ro-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (ro-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-ro$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (ro-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-ro-start-quote% (dingbat "ldquo"))
+
+(define %gentext-ro-end-quote% (dingbat "rdquo"))
+
+(define %gentext-ro-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-ro-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-ro-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-ro-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-ro-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-ro-page% "")
+
+(define %gentext-ro-and% "&and;")
+
+(define %gentext-ro-listcomma% "&listcomma;")
+
+(define %gentext-ro-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-ro-bibl-pages% "&Pgs;")
+
+(define %gentext-ro-endnotes% "&Notes;")
+
+(define %gentext-ro-table-endnotes% "&TableNotes;:")
+
+(define %gentext-ro-index-see% "&See;")
+
+(define %gentext-ro-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-ro-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-ro-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-ro-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-ro-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-ro-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-ro-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1ro.ent b/common/dbl1ro.ent
new file mode 100644 (file)
index 0000000..8ddd35b
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Rezumat">
+<!ENTITY abstract        "Rezumat">
+<!ENTITY Answer          "A:">
+<!ENTITY answer          "A:">
+<!ENTITY Appendix        "Anexa">
+<!ENTITY appendix        "anexa">
+<!ENTITY Article         "Articol">
+<!ENTITY article         "Articol">
+<!ENTITY Bibliography    "Bibliografie">
+<!ENTITY bibliography    "Bibliografie">
+<!ENTITY Book            "Carte">
+<!ENTITY book            "Carte">
+<!ENTITY CAUTION         "ATEN\U-00DE;IE">
+<!ENTITY Caution         "Aten\U-00FE;ie">
+<!ENTITY caution         "Aten\U-00FE;ie">
+<!ENTITY Chapter         "Cap.">
+<!ENTITY chapter         "cap.">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Dedica\U-00FE;ie">
+<!ENTITY dedication      "Dedica\U-00FE;ie">
+<!ENTITY Edition         "Edi\U-00FE;ie">
+<!ENTITY edition         "Edi\U-00FE;ie">
+<!ENTITY Equation        "ecua\U-00FE;ia">
+<!ENTITY equation        "ecua\U-00FE;ia">
+<!ENTITY Example         "Exemplu">
+<!ENTITY example         "Exemplu">
+<!ENTITY Figure          "Fig.">
+<!ENTITY figure          "Fig.">
+<!ENTITY Glossary        "Glosar">
+<!ENTITY glossary        "Glosar">
+<!ENTITY GlossSee        "Vezi">
+<!ENTITY glosssee        "Vezi">
+<!ENTITY GlossSeeAlso    "Vezi \U-015F;i">
+<!ENTITY glossseealso    "Vezi \U-015F;i">
+<!ENTITY IMPORTANT       "IMPORTANT">
+<!ENTITY Important       "Important">
+<!ENTITY important       "Important">
+<!ENTITY Index           "Index">
+<!ENTITY index           "Index">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "">
+<!ENTITY legalnotice     "">
+<!ENTITY MsgAud          "">
+<!ENTITY msgaud          "">
+<!ENTITY MsgLevel        "Nivel">
+<!ENTITY msglevel        "Nivel">
+<!ENTITY MsgOrig         "Origine">
+<!ENTITY msgorig         "Origine">
+<!ENTITY NOTE            "NOT\U-00C3;">
+<!ENTITY Note            "Not\U-00E3;">
+<!ENTITY note            "Not\U-00E3;">
+<!ENTITY Part            "Parte">
+<!ENTITY part            "Parte">
+<!ENTITY Preface         "Prefa\U-00FE;\U-00E3;">
+<!ENTITY preface         "Prefa\U-00FE;\U-00E3;">
+<!ENTITY Procedure       "Procedur\U-00E3;">
+<!ENTITY procedure       "Procedur\U-00E3;">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "Publicat">
+<!ENTITY published       "Publicat">
+<!ENTITY Question        "Q:">
+<!ENTITY question        "Q:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Referin\U-00FE;\U-00E3;">
+<!ENTITY reference       "Referin\U-00FE;\U-00E3;">
+<!ENTITY RefName         "Nume">
+<!ENTITY refname         "Nume">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Rezumat">
+<!ENTITY refsynopsisdiv  "Rezumat">
+<!ENTITY RevHistory      "Istoricul versiunilor">
+<!ENTITY revhistory      "Istoricul versiunilor">
+<!ENTITY Revision        "Versiune">
+<!ENTITY revision        "Versiune">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "Sec\U-00FE;iune">
+<!ENTITY section         "sec.">
+<!ENTITY See             "Vezi">
+<!ENTITY see             "Vezi">
+<!ENTITY SeeAlso         "Vezi \U-015F;i">
+<!ENTITY Seealso         "Vezi \U-015F;i">
+<!ENTITY seealso         "Vezi \U-015F;i">
+<!ENTITY Set             "Set">
+<!ENTITY set             "Set">
+<!ENTITY SetIndex        "Index">
+<!ENTITY setindex        "Index">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "sidebar">
+<!ENTITY Step            "Opera\U-00FE;ie">
+<!ENTITY step            "opera\U-00FE;iune">
+<!ENTITY Table           "Tabel">
+<!ENTITY table           "Tabel">
+<!ENTITY TIP             "INDICA\U-00DE;IE">
+<!ENTITY Tip             "Indica\U-00FE;ie">
+<!ENTITY tip             "Indica\U-00FE;ie">
+<!ENTITY WARNING         "AVERTISMENT">
+<!ENTITY Warning         "Avertisment">
+<!ENTITY warning         "Avertisment">
+<!ENTITY and             "\U-015F;i">
+<!ENTITY by              "de">
+<!ENTITY Edited          "Publicat">
+<!ENTITY edited          "Publicat">
+<!ENTITY Editedby        "Publicat de">
+<!ENTITY editedby        "Publicat de">
+<!ENTITY in              "\U-00EE;n">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "element inexistent">
+<!ENTITY notes           "Note">
+<!ENTITY Notes           "Note">
+<!ENTITY Pgs             "Pagini">
+<!ENTITY pgs             "Pagini">
+<!ENTITY Revisedby       "Revised by: ">
+<!ENTITY revisedby       "Revised by: ">
+<!ENTITY TableNotes      "Remarci">
+<!ENTITY tablenotes      "Remarci">
+<!ENTITY TableofContents "Cuprins">
+<!ENTITY tableofcontents "Cuprins">
+<!ENTITY unexpectedelementname "Nume de element nea\U-015F;teptat">
+<!ENTITY unsupported     "nerecunoscut de sisitem">
+<!ENTITY xrefto          "referin\U-00FE;\U-00E3; c\U-00E3;tre">
+<!ENTITY listofequations "List\U-00E3; de ecua\U-00FE;ii">
+<!ENTITY ListofEquations "List\U-00E3; de ecua\U-00FE;ii">
+<!ENTITY ListofExamples  "List\U-00E3; de exemple">
+<!ENTITY listofexamples  "List\U-00E3; de exemple">
+<!ENTITY ListofFigures   "List\U-00E3; de figuri">
+<!ENTITY listoffigures   "List\U-00E3; de figuri">
+<!ENTITY listoftables    "List\U-00E3; de tabele">
+<!ENTITY ListofTables    "List\U-00E3; de tabele">
+<!ENTITY ListofUnknown   "List\U-00E3; de necunoscute">
+<!ENTITY listofunknown   "List\U-00E3; de necunoscute">
+<!ENTITY nav-home        "Acas\U-00E3;">
+<!ENTITY nav-next        "\U-00CE;nainte">
+<!ENTITY nav-next-sibling "Repede \U-00EF;nainte">
+<!ENTITY nav-prev        "\U-00CE;napoi">
+<!ENTITY nav-prev-sibling "Repede \U-00EE;napoi">
+<!ENTITY nav-up          "Sus">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1ru.dsl b/common/dbl1ru.dsl
new file mode 100644 (file)
index 0000000..96746c8
--- /dev/null
@@ -0,0 +1,446 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % cyr1 PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN">
+%cyr1;
+<!ENTITY % ru.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//RU"
+         "dbl1ru.ent">
+%ru.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-ru">
+<style-specification-body>
+
+;; $Id: dbl1ru.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; This is revised Russian Localization version by Norman Walsh, modified by
+;; Ilia V. Kouznetsov, ilia@syntext.com
+
+;; Suggestion of I. Kouznetsov: According to my experience of writing
+;; documentation, Russian Words for cross references had better be
+;; abbreviated (just like it is usually done in Russian documents)
+;; because the ends of not abbreviated cross references may vary from
+;; place to place due to the cases of Russian language. Due to this reason
+;; entities with ".abr" syffix are added.
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x
+;; keywords.
+;;
+
+(define (ru-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (ru-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix.abr; %n"
+                                           "&Appendix.abr; %t"))
+       (list (normalize "article")     (string-append %gentext-ru-start-quote%
+                                                      "%t"
+                                                      %gentext-ru-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter.abr; %n"
+                                           "&Chapter.abr; %t"))
+       (list (normalize "equation")    "&Equation.abr; %n")
+       (list (normalize "example")     "&Example.abr; %n")
+       (list (normalize "figure")      "&Figure.abr; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part.abr; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure.abr; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section.abr; %n"
+                                           "&Section.abr; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section.abr; %n"
+                                           "&Section.abr; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section.abr; %n"
+                                           "&Section.abr; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section.abr; %n"
+                                           "&Section.abr; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section.abr; %n"
+                                           "&Section.abr; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section.abr; %n"
+                                           "&Section.abr; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section.abr; %n"
+                                           "&Section.abr; %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table.abr; %n")))
+
+(define (gentext-ru-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (ru-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (ru-auto-xref-indirect-connector before) 
+  (literal " &in; "))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-ru-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (ru-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-ru-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (ru-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-ru-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-ru-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-ru-intra-label-sep)
+  (list))
+
+(define (ru-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-ru-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ru-intra-label-sep)))
+        (sep    (assoc name (ru-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-ru-label-title-sep)
+  (list))
+
+(define (ru-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-ru-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-ru-label-title-sep)))
+        (sep    (assoc name (ru-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (ru-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (ru-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (ru-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (ru-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-ru$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (ru-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-ru-start-quote% (dingbat "ldquo"))
+
+(define %gentext-ru-end-quote% (dingbat "rdquo"))
+
+(define %gentext-ru-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-ru-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-ru-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-ru-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-ru-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-ru-page% "")
+
+(define %gentext-ru-and% "&and;")
+
+(define %gentext-ru-listcomma% "&listcomma;")
+
+(define %gentext-ru-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-ru-bibl-pages% "&Pgs;")
+
+(define %gentext-ru-endnotes% "&Notes;")
+
+(define %gentext-ru-table-endnotes% "&TableNotes;:")
+
+(define %gentext-ru-index-see% "&See;")
+
+(define %gentext-ru-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-ru-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-ru-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-ru-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-ru-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-ru-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-ru-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1ru.ent b/common/dbl1ru.ent
new file mode 100644 (file)
index 0000000..055846b
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-0410;\U-043D;\U-043D;\U-043E;\U-0442;\U-0430;\U-0446;\U-0438;\U-044F;">
+<!ENTITY abstract        "\U-0410;\U-043D;\U-043D;\U-043E;\U-0442;\U-0430;\U-0446;\U-0438;\U-044F;">
+<!ENTITY Answer          "\U-041E;:">
+<!ENTITY answer          "\U-041E;:">
+<!ENTITY Appendix        "\U-041F;\U-0440;\U-0438;\U-043B;\U-043E;\U-0436;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY appendix        "\U-043F;\U-0440;\U-0438;\U-043B;\U-043E;\U-0436;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Appendix.abr    "\U-041F;\U-0440;\U-0438;\U-043B;.">
+<!ENTITY appendix.abr    "\U-041F;\U-0440;\U-0438;\U-043B;.">
+<!ENTITY Article         "\U-0421;\U-0442;\U-0430;\U-0442;\U-044C;\U-044F;">
+<!ENTITY article         "\U-0421;\U-0442;\U-0430;\U-0442;\U-044C;\U-044F;">
+<!ENTITY Audience        "\U-0410;\U-0443;\U-0434;\U-0438;\U-0442;\U-043E;\U-0440;\U-0438;\U-044F;">
+<!ENTITY audience        "\U-0410;\U-0443;\U-0434;\U-0438;\U-0442;\U-043E;\U-0440;\U-0438;\U-044F;">
+<!ENTITY Bibliography    "\U-041B;\U-0438;\U-0442;\U-0435;\U-0440;\U-0430;\U-0442;\U-0443;\U-0440;\U-0430;">
+<!ENTITY bibliography    "\U-041B;\U-0438;\U-0442;\U-0435;\U-0440;\U-0430;\U-0442;\U-0443;\U-0440;\U-0430;">
+<!ENTITY Book            "\U-041A;\U-043D;\U-0438;\U-0433;\U-0430;">
+<!ENTITY book            "\U-041A;\U-043D;\U-0438;\U-0433;\U-0430;">
+<!ENTITY CAUTION         "\U-041F;\U-0420;\U-0415;\U-0414;\U-041E;\U-0421;\U-0422;\U-0415;\U-0420;\U-0415;\U-0416;\U-0415;\U-041D;\U-0418;\U-0415;">
+<!ENTITY Caution         "\U-041F;\U-0440;\U-0435;\U-0434;\U-043E;\U-0441;\U-0442;\U-0435;\U-0440;\U-0435;\U-0436;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY caution         "\U-041F;\U-0440;\U-0435;\U-0434;\U-043E;\U-0441;\U-0442;\U-0435;\U-0440;\U-0435;\U-0436;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Chapter         "\U-0413;\U-043B;\U-0430;\U-0432;\U-0430;">
+<!ENTITY chapter         "\U-0433;\U-043B;\U-0430;\U-0432;\U-0430;">
+<!ENTITY Chapter.abr     "\U-0413;\U-043B;.">
+<!ENTITY chapter.abr     "\U-0413;\U-043B;.">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "\U-041F;\U-043E;\U-0441;\U-0432;\U-044F;\U-0449;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY dedication      "\U-041F;\U-043E;\U-0441;\U-0432;\U-044F;\U-0449;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Edition         "\U-0420;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0438;\U-044F;">
+<!ENTITY edition         "\U-0420;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0438;\U-044F;">
+<!ENTITY Equation        "\U-0424;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;\U-0430;">
+<!ENTITY equation        "\U-0424;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;\U-0430;">
+<!ENTITY Equation.abr    "\U-0424;.">
+<!ENTITY equation.abr    "\U-0424;.">
+<!ENTITY Example         "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;">
+<!ENTITY example         "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;">
+<!ENTITY Example.abr     "\U-041F;\U-0440;\U-0438;\U-043C;.">
+<!ENTITY example.abr     "\U-041F;\U-0440;\U-0438;\U-043C;.">
+<!ENTITY Figure          "\U-0420;\U-0438;\U-0441;\U-0443;\U-043D;\U-043E;\U-043A;">
+<!ENTITY figure          "\U-0420;\U-0438;\U-0441;\U-0443;\U-043D;\U-043E;\U-043A;">
+<!ENTITY Figure.abr      "\U-0420;\U-0438;\U-0441;.">
+<!ENTITY figure.abr      "\U-0420;\U-0438;\U-0441;.">
+<!ENTITY Glossary        "\U-0413;\U-043B;\U-043E;\U-0441;\U-0441;\U-0430;\U-0440;\U-0438;\U-0439;">
+<!ENTITY glossary        "\U-0413;\U-043B;\U-043E;\U-0441;\U-0441;\U-0430;\U-0440;\U-0438;\U-0439;">
+<!ENTITY GlossSee        "\U-0421;\U-043C;.">
+<!ENTITY glosssee        "\U-0421;\U-043C;.">
+<!ENTITY GlossSeeAlso    "\U-0421;\U-043C;. \U-0442;\U-0430;\U-043A;\U-0436;\U-0435;">
+<!ENTITY glossseealso    "\U-0421;\U-043C;. \U-0442;\U-0430;\U-043A;\U-0436;\U-0435;">
+<!ENTITY IMPORTANT       "\U-0412;\U-0410;\U-0416;\U-041D;\U-041E;">
+<!ENTITY Important       "\U-0412;\U-0430;\U-0436;\U-043D;\U-043E;">
+<!ENTITY important       "\U-0412;\U-0430;\U-0436;\U-043D;\U-043E;">
+<!ENTITY Index           "\U-041F;\U-0440;\U-0435;\U-0434;\U-043C;\U-0435;\U-0442;\U-043D;\U-044B;\U-0439; \U-0443;\U-043A;\U-0430;\U-0437;\U-0430;\U-0442;\U-0435;\U-043B;\U-044C;">
+<!ENTITY index           "\U-041F;\U-0440;\U-0435;\U-0434;\U-043C;\U-0435;\U-0442;\U-043D;\U-044B;\U-0439; \U-0443;\U-043A;\U-0430;\U-0437;\U-0430;\U-0442;\U-0435;\U-043B;\U-044C;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "\U-0410;\U-0432;\U-0442;\U-043E;\U-0440;\U-0441;\U-043A;\U-0438;\U-0435; \U-043F;\U-0440;\U-0430;\U-0432;\U-0430;">
+<!ENTITY legalnotice     "\U-0410;\U-0432;\U-0442;\U-043E;\U-0440;\U-0441;\U-043A;\U-0438;\U-0435; \U-043F;\U-0440;\U-0430;\U-0432;\U-0430;">
+<!ENTITY Level           "\U-0423;\U-0440;\U-043E;\U-0432;\U-0435;\U-043D;\U-044C;">
+<!ENTITY level           "\U-0423;\U-0440;\U-043E;\U-0432;\U-0435;\U-043D;\U-044C;">
+<!ENTITY MsgAud          "Audience">
+<!ENTITY msgaud          "Audience">
+<!ENTITY MsgLevel        "Level">
+<!ENTITY msglevel        "Level">
+<!ENTITY MsgOrig         "Origin">
+<!ENTITY msgorig         "Origin">
+<!ENTITY Name            "\U-0418;\U-043C;\U-044F;">
+<!ENTITY name            "\U-0418;\U-043C;\U-044F;">
+<!ENTITY NOTE            "\U-0417;\U-0410;\U-041C;\U-0415;\U-0427;\U-0410;\U-041D;\U-0418;\U-0415;">
+<!ENTITY Note            "\U-0417;\U-0430;\U-043C;\U-0435;\U-0447;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY note            "\U-0417;\U-0430;\U-043C;\U-0435;\U-0447;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Origin          "\U-0418;\U-0441;\U-0442;\U-043E;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY origin          "\U-0418;\U-0441;\U-0442;\U-043E;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY Part            "\U-0427;\U-0430;\U-0441;\U-0442;\U-044C;">
+<!ENTITY part            "\U-0427;\U-0430;\U-0441;\U-0442;\U-044C;">
+<!ENTITY Part.abr        "\U-0427;.">
+<!ENTITY part.abr        "\U-0427;.">
+<!ENTITY Preface         "\U-041F;\U-0440;\U-0435;\U-0434;\U-0438;\U-0441;\U-043B;\U-043E;\U-0432;\U-0438;\U-0435;">
+<!ENTITY preface         "\U-041F;\U-0440;\U-0435;\U-0434;\U-0438;\U-0441;\U-043B;\U-043E;\U-0432;\U-0438;\U-0435;">
+<!ENTITY Procedure       "\U-041F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY procedure       "\U-041F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY Procedure.abr   "\U-041F;\U-0440;\U-043E;\U-0446;.">
+<!ENTITY procedure.abr   "\U-041F;\U-0440;\U-043E;\U-0446;.">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "\U-041E;\U-043F;\U-0443;\U-0431;\U-043B;\U-0438;\U-043A;\U-043E;\U-0432;\U-0430;\U-043D;\U-043E;">
+<!ENTITY published       "\U-041E;\U-043F;\U-0443;\U-0431;\U-043B;\U-0438;\U-043A;\U-043E;\U-0432;\U-0430;\U-043D;\U-043E;">
+<!ENTITY Question        "\U-0412;:">
+<!ENTITY question        "\U-0412;:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "\U-0421;\U-0441;\U-044B;\U-043B;\U-043A;\U-0430;">
+<!ENTITY reference       "\U-0421;\U-0441;\U-044B;\U-043B;\U-043A;\U-0430;">
+<!ENTITY RefName         "\U-041D;\U-0430;\U-0437;\U-0432;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY refname         "\U-041D;\U-0430;\U-0437;\U-0432;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "\U-0421;\U-0438;\U-043D;\U-0442;\U-0430;\U-043A;\U-0441;\U-0438;\U-0441;">
+<!ENTITY refsynopsisdiv  "\U-0421;\U-0438;\U-043D;\U-0442;\U-0430;\U-043A;\U-0441;\U-0438;\U-0441;">
+<!ENTITY RevHistory      "\U-0418;\U-0441;\U-0442;\U-043E;\U-0440;\U-0438;\U-044F; \U-043F;\U-0435;\U-0440;\U-0435;\U-0438;\U-0437;\U-0434;\U-0430;\U-043D;\U-0438;\U-044F;">
+<!ENTITY revhistory      "\U-0418;\U-0441;\U-0442;\U-043E;\U-0440;\U-0438;\U-044F; \U-043F;\U-0435;\U-0440;\U-0435;\U-0438;\U-0437;\U-0434;\U-0430;\U-043D;\U-0438;\U-044F;">
+<!ENTITY Revision        "\U-0418;\U-0437;\U-0434;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY revision        "\U-0418;\U-0437;\U-0434;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY sect1           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY sect2           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY sect3           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY sect4           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY sect5           "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY Section         "\U-0420;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY section         "\U-0440;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY Section.abr     "\U-0420;\U-0430;\U-0437;\U-0434;.">
+<!ENTITY section.abr     "\U-0420;\U-0430;\U-0437;\U-0434;.">
+<!ENTITY See             "\U-0421;\U-043C;.">
+<!ENTITY see             "\U-0421;\U-043C;.">
+<!ENTITY SeeAlso         "\U-0421;\U-043C;. \U-0442;\U-0430;\U-043A;\U-0436;\U-0435;">
+<!ENTITY Seealso         "\U-0421;\U-043C;. \U-0442;\U-0430;\U-043A;\U-0436;\U-0435;">
+<!ENTITY seealso         "\U-0421;\U-043C;. \U-0442;\U-0430;\U-043A;\U-0436;\U-0435;">
+<!ENTITY Set             "\U-041F;\U-043E;\U-0434;\U-0431;\U-043E;\U-0440;\U-043A;\U-0430;">
+<!ENTITY set             "\U-041F;\U-043E;\U-0434;\U-0431;\U-043E;\U-0440;\U-043A;\U-0430;">
+<!ENTITY SetIndex        "\U-0418;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441; \U-043F;\U-043E;\U-0434;\U-0431;\U-043E;\U-0440;\U-043A;\U-0438;">
+<!ENTITY setindex        "\U-0418;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441; \U-043F;\U-043E;\U-0434;\U-0431;\U-043E;\U-0440;\U-043A;\U-0438;">
+<!ENTITY Sidebar         "\U-0412;\U-044B;\U-0434;\U-0435;\U-043B;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY sidebar         "\U-0432;\U-044B;\U-0434;\U-0435;\U-043B;\U-0435;\U-043D;\U-0438;\U-0435;">
+<!ENTITY Step            "\U-0428;\U-0430;\U-0433;">
+<!ENTITY step            "\U-0448;\U-0430;\U-0433;">
+<!ENTITY Table           "\U-0422;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;\U-0430;">
+<!ENTITY table           "\U-0422;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;\U-0430;">
+<!ENTITY Table.abr       "\U-0422;\U-0430;\U-0431;\U-043B;.">
+<!ENTITY table.abr       "\U-0422;\U-0430;\U-0431;\U-043B;.">
+<!ENTITY TIP             "\U-041F;\U-041E;\U-0414;\U-0421;\U-041A;\U-0410;\U-0417;\U-041A;\U-0410;">
+<!ENTITY Tip             "\U-041F;\U-043E;\U-0434;\U-0441;\U-043A;\U-0430;\U-0437;\U-043A;\U-0430;">
+<!ENTITY tip             "\U-041F;\U-043E;\U-0434;\U-0441;\U-043A;\U-0430;\U-0437;\U-043A;\U-0430;">
+<!ENTITY WARNING         "\U-0412;\U-041D;\U-0418;\U-041C;\U-0410;\U-041D;\U-0418;\U-0415;">
+<!ENTITY Warning         "\U-0412;\U-043D;\U-0438;\U-043C;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY warning         "\U-0412;\U-043D;\U-0438;\U-043C;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY and             "">
+<!ENTITY by              "">
+<!ENTITY called          "">
+<!ENTITY edited          "\U-041F;\U-043E;\U-0434; \U-0440;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0438;\U-0435;\U-0439;">
+<!ENTITY Edited          "\U-041F;\U-043E;\U-0434; \U-0440;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0438;\U-0435;\U-0439;">
+<!ENTITY Editedby        "\U-041F;\U-043E;\U-0434; \U-0440;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0438;\U-0435;\U-0439;">
+<!ENTITY editedby        "\U-041F;\U-043E;\U-0434; \U-0440;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0438;\U-0435;\U-0439;">
+<!ENTITY in              "\U-0432;">
+<!ENTITY TableofContents "\U-0421;\U-043E;\U-0434;\U-0435;\U-0440;\U-0436;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY tableofcontents "\U-0421;\U-043E;\U-0434;\U-0435;\U-0440;\U-0436;\U-0430;\U-043D;\U-0438;\U-0435;">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY Notes           "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0447;\U-0430;\U-043D;\U-0438;\U-044F;">
+<!ENTITY notes           "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0447;\U-0430;\U-043D;\U-0438;\U-044F;">
+<!ENTITY TableNotes      "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0447;\U-0430;\U-043D;\U-0438;\U-044F;">
+<!ENTITY tablenotes      "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0447;\U-0430;\U-043D;\U-0438;\U-044F;">
+<!ENTITY nonexistantelement "non-existant element">
+<!ENTITY pgs             "\U-0421;\U-0442;\U-0440;.">
+<!ENTITY Pgs             "\U-0421;\U-0442;\U-0440;.">
+<!ENTITY Revisedby       "Revised by: ">
+<!ENTITY revisedby       "Revised by: ">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "unexpected element name">
+<!ENTITY unsupported     "unsupported">
+<!ENTITY xrefto          "xref to">
+<!ENTITY listofequations "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0444;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;">
+<!ENTITY ListofEquations "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0444;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;">
+<!ENTITY ListofExamples  "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;\U-043E;\U-0432;">
+<!ENTITY listofexamples  "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;\U-043E;\U-0432;">
+<!ENTITY ListofFigures   "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0438;\U-043B;\U-043B;\U-044E;\U-0441;\U-0442;\U-0440;\U-0430;\U-0446;\U-0438;\U-0439;">
+<!ENTITY listoffigures   "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0438;\U-043B;\U-043B;\U-044E;\U-0441;\U-0442;\U-0440;\U-0430;\U-0446;\U-0438;\U-0439;">
+<!ENTITY listoftables    "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0442;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;">
+<!ENTITY ListofTables    "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0442;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;">
+<!ENTITY ListofUnknown   "\U-041D;\U-0435;\U-043E;\U-043F;\U-0440;\U-0435;\U-0434;\U-0435;\U-043B;\U-0435;\U-043D;\U-043D;\U-044B;\U-0439; \U-0441;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A;">
+<!ENTITY listofunknown   "\U-041D;\U-0435;\U-043E;\U-043F;\U-0440;\U-0435;\U-0434;\U-0435;\U-043B;\U-0435;\U-043D;\U-043D;\U-044B;\U-0439; \U-0441;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A;">
+<!ENTITY nav-next        "\U-0421;\U-043B;\U-0435;\U-0434;.">
+<!ENTITY nav-next-sibling "\U-0421;\U-043B;\U-0435;\U-0434;. \U-043F;\U-043E;\U-0434;\U-0440;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY nav-prev        "\U-041F;\U-0440;\U-0435;\U-0434;.">
+<!ENTITY nav-prev-sibling "\U-041F;\U-0440;\U-0435;\U-0434;. \U-043F;\U-043E;\U-0434;\U-0440;\U-0430;\U-0437;\U-0434;\U-0435;\U-043B;">
+<!ENTITY x-nav-next      "\U-0421;\U-043B;\U-0435;\U-0434;.">
+<!ENTITY nav-home        "\U-041D;\U-0430;\U-0447;\U-0430;\U-043B;\U-043E;">
+<!ENTITY nav-up          "\U-0423;\U-0440;\U-043E;\U-0432;\U-0435;\U-043D;\U-044C; \U-0432;\U-044B;\U-0448;\U-0435;">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "\U-0427;\U-0435;\U-0440;\U-043D;\U-043E;\U-0432;\U-0438;\U-043A;">
+<!ENTITY above           "\U-0432;\U-044B;\U-0448;\U-0435;">
+<!ENTITY below           "\U-043D;\U-0438;\U-0436;\U-0435;">
+<!ENTITY lowercase.alpha "\U-0430;\U-0431;\U-0432;\U-0433;\U-0434;\U-0435;\U-0451;\U-0436;\U-0437;\U-0438;\U-0439;\U-043A;\U-043B;\U-043C;\U-043D;\U-043E;\U-043F;\U-0440;\U-0441;\U-0442;\U-0443;\U-0444;\U-0445;\U-0446;\U-0447;\U-0448;\U-0449;\U-044A;\U-044B;\U-044C;\U-044D;\U-044E;\U-044F;">
+<!ENTITY uppercase.alpha "\U-0410;\U-0411;\U-0412;\U-0413;\U-0414;\U-0415;\U-0401;\U-0416;\U-0417;\U-0418;\U-0419;\U-041A;\U-041B;\U-041C;\U-041D;\U-041E;\U-041F;\U-0420;\U-0421;\U-0422;\U-0423;\U-0424;\U-0425;\U-0426;\U-0427;\U-0428;\U-0429;\U-042A;\U-042B;\U-042C;\U-042D;\U-042E;\U-042F;">
diff --git a/common/dbl1sk.dsl b/common/dbl1sk.dsl
new file mode 100644 (file)
index 0000000..60fb9b3
--- /dev/null
@@ -0,0 +1,442 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % sk.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//SK"
+         "dbl1sk.ent">
+%sk.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-sk">
+<style-specification-body>
+
+;; $Id: dbl1sk.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Contributors:
+;; Ralf Schleitzer, ralf.schleitzer@ixos.de
+
+(define (sk-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (sk-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&appendix; nazvan\U-00E1; %t"))
+       (list (normalize "article")     (string-append %gentext-sk-start-quote%
+                                                      "%t"
+                                                      %gentext-sk-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "&chapter; nazvan\U-00E1; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; nazvan\U-00E1; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; nazvan\U-00E1; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; nazvan\U-00E1; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; nazvan\U-00E1; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; nazvan\U-00E1; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; nazvan\U-00E1; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&section; nazvan\U-00E1; %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-sk-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (sk-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (sk-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-sk-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (sk-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-sk-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (sk-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-sk-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-sk-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-sk-intra-label-sep)
+  (list))
+
+(define (sk-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-sk-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-sk-intra-label-sep)))
+        (sep    (assoc name (sk-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-sk-label-title-sep)
+  (list))
+
+(define (sk-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-sk-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-sk-label-title-sep)))
+        (sep    (assoc name (sk-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (sk-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (sk-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (sk-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (sk-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-sk$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (sk-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-sk-start-quote% "\U-201E;")
+
+(define %gentext-sk-end-quote% "\U-201C;")
+
+(define %gentext-sk-start-nested-quote% "\U-201A;")
+
+(define %gentext-sk-end-nested-quote% "\U-2018;")
+
+(define %gentext-sk-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-sk-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-sk-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-sk-page% "")
+
+(define %gentext-sk-and% "&and;")
+
+(define %gentext-sk-listcomma% "&listcomma;")
+
+(define %gentext-sk-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-sk-bibl-pages% "&Pgs;")
+
+(define %gentext-sk-endnotes% "&Notes;")
+
+(define %gentext-sk-table-endnotes% "&TableNotes;:")
+
+(define %gentext-sk-index-see% "&See;")
+
+(define %gentext-sk-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-sk-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-sk-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-sk-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-sk-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-sk-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-sk-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1sk.ent b/common/dbl1sk.ent
new file mode 100644 (file)
index 0000000..1d1fd30
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Abstrakt">
+<!ENTITY abstract        "Abstrakt">
+<!ENTITY Answer          "A:">
+<!ENTITY answer          "A:">
+<!ENTITY Appendix        "Dodatok">
+<!ENTITY appendix        "dodatok">
+<!ENTITY Article         "\U-010C;l\U-00E1;nok">
+<!ENTITY article         "\U-010C;l\U-00E1;nok">
+<!ENTITY Bibliography    "Bibliografia">
+<!ENTITY bibliography    "Bibliografia">
+<!ENTITY Book            "Kniha">
+<!ENTITY book            "Kniha">
+<!ENTITY CAUTION         "V\U-00DD;STRAHA">
+<!ENTITY Caution         "V\U-00FD;straha">
+<!ENTITY caution         "V\U-00FD;straha">
+<!ENTITY Chapter         "Kapitola">
+<!ENTITY chapter         "kapitola">
+<!ENTITY Colophon        "Tir\U-00E1;\U-017E;">
+<!ENTITY colophon        "Tir\U-00E1;\U-017E;">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Venovanie">
+<!ENTITY dedication      "Venovanie">
+<!ENTITY Edition         "Vydanie">
+<!ENTITY edition         "Vydanie">
+<!ENTITY Equation        "Rovnica">
+<!ENTITY equation        "Rovnica">
+<!ENTITY Example         "Pr\U-00ED;klad">
+<!ENTITY example         "Pr\U-00ED;klad">
+<!ENTITY Figure          "Obr\U-00E1;zok">
+<!ENTITY figure          "Obr\U-00E1;zok">
+<!ENTITY Glossary        "Slovn\U-00ED;k">
+<!ENTITY glossary        "Slovn\U-00ED;k">
+<!ENTITY GlossSee        "Pozri">
+<!ENTITY glosssee        "Pozri">
+<!ENTITY GlossSeeAlso    "Pozri tie\U-017E;">
+<!ENTITY glossseealso    "Pozri tie\U-017E;">
+<!ENTITY IMPORTANT       "D\U-00D4;LE\U-017D;IT\U-00C9;">
+<!ENTITY Important       "D\U-00F4;le\U-017E;it\U-00E9;">
+<!ENTITY important       "D\U-00F4;le\U-017E;it\U-00E9;">
+<!ENTITY Index           "Zoznam">
+<!ENTITY index           "Zoznam">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Pr\U-00E1;vna pozn\U-00E1;mka">
+<!ENTITY legalnotice     "Pr\U-00E1;vna pozn\U-00E1;mka">
+<!ENTITY MsgAud          "Publikum">
+<!ENTITY msgaud          "Publikum">
+<!ENTITY MsgLevel        "\U-00DA;rove\U-0148;">
+<!ENTITY msglevel        "\U-00DA;rove\U-0148;">
+<!ENTITY MsgOrig         "P\U-00F4;vod">
+<!ENTITY msgorig         "P\U-00F4;vod">
+<!ENTITY NOTE            "POZN\U-00C1;MKA">
+<!ENTITY Note            "Pozn\U-00E1;mka">
+<!ENTITY note            "Pozn\U-00E1;mka">
+<!ENTITY Part            "\U-010C;as\U-0165;">
+<!ENTITY part            "\U-010C;as\U-0165;">
+<!ENTITY Preface         "\U-00DA;vod">
+<!ENTITY preface         "\U-00DA;vod">
+<!ENTITY Procedure       "Postup">
+<!ENTITY procedure       "Postup">
+<!ENTITY ProductionSet   "Produkcia">
+<!ENTITY Published       "Vydan\U-00E9;">
+<!ENTITY published       "Vydan\U-00E9;">
+<!ENTITY Question        "Q:">
+<!ENTITY question        "Q:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Odkaz">
+<!ENTITY reference       "Odkaz">
+<!ENTITY RefName         "Meno">
+<!ENTITY refname         "Meno">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Preh\U-013E;ad">
+<!ENTITY refsynopsisdiv  "Preh\U-013E;ad">
+<!ENTITY RevHistory      "Preh\U-013E;ad rev\U-00ED;zi\U-00ED;">
+<!ENTITY revhistory      "Preh\U-013E;ad rev\U-00ED;zi\U-00ED;">
+<!ENTITY Revision        "Rev\U-00ED;zia">
+<!ENTITY revision        "Rev\U-00ED;zia">
+<!ENTITY sect1           "Oddiel">
+<!ENTITY sect2           "Oddiel">
+<!ENTITY sect3           "Oddiel">
+<!ENTITY sect4           "Oddiel">
+<!ENTITY sect5           "Oddiel">
+<!ENTITY Section         "Oddiel">
+<!ENTITY section         "oddiel">
+<!ENTITY See             "Pozri">
+<!ENTITY see             "Pozri">
+<!ENTITY SeeAlso         "Pozri tie\U-017E;">
+<!ENTITY Seealso         "Pozri tie\U-017E;">
+<!ENTITY seealso         "Pozri tie\U-017E;">
+<!ENTITY Set             "Nastavi\U-0165;">
+<!ENTITY set             "Nastavi\U-0165;">
+<!ENTITY SetIndex        "Nastavi\U-0165; index">
+<!ENTITY setindex        "nastavi\U-0165; index">
+<!ENTITY Sidebar         "Margin\U-00E1;lia">
+<!ENTITY sidebar         "margin\U-00E1;lia">
+<!ENTITY Step            "Krok">
+<!ENTITY step            "krok">
+<!ENTITY Table           "Tabu\U-013E;ka">
+<!ENTITY table           "Tabu\U-013E;ka">
+<!ENTITY TIP             "TIP">
+<!ENTITY Tip             "Tip">
+<!ENTITY tip             "Tip">
+<!ENTITY WARNING         "VAROVANIE">
+<!ENTITY Warning         "Varovanie">
+<!ENTITY warning         "Varovanie">
+<!ENTITY and             "a">
+<!ENTITY by              "">
+<!ENTITY Edited          "Vydan\U-00E9;">
+<!ENTITY edited          "Vydan\U-00E9;">
+<!ENTITY Editedby        "Zostavil: ">
+<!ENTITY editedby        "Zostavil: ">
+<!ENTITY in              "v">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "neexistuj\U-00FA;ci prvok">
+<!ENTITY notes           "Pozn\U-00E1;mky">
+<!ENTITY Notes           "Pozn\U-00E1;mky">
+<!ENTITY Pgs             "Str.">
+<!ENTITY pgs             "Str.">
+<!ENTITY Revisedby       "Revidoval: ">
+<!ENTITY revisedby       "Revidoval: ">
+<!ENTITY TableNotes      "Pozn\U-00E1;mky">
+<!ENTITY tablenotes      "Pozn\U-00E1;mky">
+<!ENTITY TableofContents "Obsah">
+<!ENTITY tableofcontents "Obsah">
+<!ENTITY unexpectedelementname "Neo\U-010D;ak\U-00E1;van\U-00E9; meno prvku">
+<!ENTITY unsupported     "nepodporovan\U-00FD;">
+<!ENTITY xrefto          "xref k">
+<!ENTITY listofequations "Zoznam rovn\U-00ED;c">
+<!ENTITY ListofEquations "Zoznam rovn\U-00ED;c">
+<!ENTITY ListofExamples  "Zoznam pr\U-00ED;kladov">
+<!ENTITY listofexamples  "Zoznam pr\U-00ED;kladov">
+<!ENTITY ListofFigures   "Zoznam obr\U-00E1;zkov">
+<!ENTITY listoffigures   "Zoznam obr\U-00E1;zkov">
+<!ENTITY listoftables    "Zoznam tabuliek">
+<!ENTITY ListofTables    "Zoznam tabuliek">
+<!ENTITY ListofUnknown   "Zoznam nezn\U-00E1;meho">
+<!ENTITY listofunknown   "Zoznam nezn\U-00E1;meho">
+<!ENTITY nav-home        "Domov">
+<!ENTITY nav-next        "Nasleduj\U-00FA;ci">
+<!ENTITY nav-next-sibling "R\U-00FD;chlo dopredu">
+<!ENTITY nav-prev        "Predch\U-00E1;dzaj\U-00FA;ci">
+<!ENTITY nav-prev-sibling "R\U-00FD;chlo nazp\U-00E4;t">
+<!ENTITY nav-up          "Hore">
+<!ENTITY sectioncalled   "oddiel nazvan\U-00FD;">
+<!ENTITY Draft           "Koncept">
+<!ENTITY above           "nad">
+<!ENTITY below           "pod">
+<!ENTITY lowercase.alpha "a\U-00E1;\U-00E4;bc\U-010D;d\U-010F;e\U-00E9;fghi\U-00ED;jkl\U-013A;\U-013E;mn\U-0148;o\U-00F3;\U-00F4;pqr\U-0155;s\U-0161;t\U-0165;u\U-00FA;vwxy\U-00FD;z\U-017E;">
+<!ENTITY uppercase.alpha "A\U-00C1;\U-00C4;BC\U-010C;D\U-010E;E\U-00C9;FGHI\U-00CD;JKL\U-0139;\U-013D;MN\U-0147;O\U-00D3;\U-00D4;PQR\U-0154;S\U-0160;T\U-0164;U\U-00DA;VWXY\U-00DD;Z\U-017D;">
diff --git a/common/dbl1sl.dsl b/common/dbl1sl.dsl
new file mode 100644 (file)
index 0000000..aee1071
--- /dev/null
@@ -0,0 +1,446 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % lat2 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN">
+%lat2;
+<!ENTITY % sl.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//SL"
+         "dbl1sl.ent">
+%sl.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-sl">
+<style-specification-body>
+
+;; $Id: dbl1sl.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (sl-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (sl-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-sl-start-quote%
+                                                      "%t"
+                                                      %gentext-sl-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-sl-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (sl-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (sl-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-sl-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (sl-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-sl-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (sl-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-sl-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-sl-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-sl-intra-label-sep)
+  (list))
+
+(define (sl-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-sl-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-sl-intra-label-sep)))
+        (sep    (assoc name (sl-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-sl-label-title-sep)
+  (list))
+
+(define (sl-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-sl-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-sl-label-title-sep)))
+        (sep    (assoc name (sl-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (sl-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (sl-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (sl-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (sl-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-sl$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (sl-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-sl-start-quote% (dingbat "ldquo"))
+
+(define %gentext-sl-end-quote% (dingbat "rdquo"))
+
+(define %gentext-sl-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-sl-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-sl-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-sl-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-sl-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-sl-page% "")
+
+(define %gentext-sl-and% "&and;")
+
+(define %gentext-sl-listcomma% "&listcomma;")
+
+(define %gentext-sl-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-sl-bibl-pages% "&Pgs;")
+
+(define %gentext-sl-endnotes% "&Notes;")
+
+(define %gentext-sl-table-endnotes% "&TableNotes;:")
+
+(define %gentext-sl-index-see% "&See;")
+
+(define %gentext-sl-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-sl-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-sl-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-sl-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-sl-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-sl-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-sl-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1sl.ent b/common/dbl1sl.ent
new file mode 100644 (file)
index 0000000..18d61f8
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Povzetek">
+<!ENTITY abstract        "Povzetek">
+<!ENTITY Answer          "O:">
+<!ENTITY answer          "O:">
+<!ENTITY Appendix        "Dodatek">
+<!ENTITY appendix        "dodatek">
+<!ENTITY Article         "\U-010C;lanek">
+<!ENTITY article         "\U-010C;lanek">
+<!ENTITY Bibliography    "Literatura">
+<!ENTITY bibliography    "Literatura">
+<!ENTITY Book            "Knjiga">
+<!ENTITY book            "Knjiga">
+<!ENTITY Caution         "Opozorilo">
+<!ENTITY caution         "Opozorilo">
+<!ENTITY CAUTION         "OPOZORILO">
+<!ENTITY Chapter         "Poglavje">
+<!ENTITY chapter         "poglavje">
+<!ENTITY Colophon        "Kolofon">
+<!ENTITY colophon        "Kolofon">
+<!ENTITY Copyright       "Pravna za\U-0161;\U-010D;ita">
+<!ENTITY copyright       "Pravna za\U-0161;\U-010D;ita">
+<!ENTITY Dedication      "Posvetilo">
+<!ENTITY dedication      "Posvetilo">
+<!ENTITY Edition         "Izdaja">
+<!ENTITY edition         "Izdaja">
+<!ENTITY Equation        "Ena\U-010D;ba">
+<!ENTITY equation        "Ena\U-010D;ba">
+<!ENTITY Example         "Primer">
+<!ENTITY example         "Primer">
+<!ENTITY Figure          "Slika">
+<!ENTITY figure          "Slika">
+<!ENTITY Glossary        "Slovar\U-010D;ek">
+<!ENTITY glossary        "Slovar\U-010D;ek">
+<!ENTITY GlossSee        "glej">
+<!ENTITY glosssee        "glej">
+<!ENTITY GlossSeeAlso    "glej tudi">
+<!ENTITY glossseealso    "glej tudi">
+<!ENTITY IMPORTANT       "POMEMBNO">
+<!ENTITY Important       "Pomembno">
+<!ENTITY important       "Pomembno">
+<!ENTITY Index           "Stvarno kazalo">
+<!ENTITY index           "Stvarno kazalo">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Pravno sporo\U-010D;ilo">
+<!ENTITY legalnotice     "Pravno sporo\U-010D;ilo">
+<!ENTITY MsgAud          "Ob\U-010D;instvo">
+<!ENTITY msgaud          "Ob\U-010D;instvo">
+<!ENTITY MsgLevel        "Raven">
+<!ENTITY msglevel        "Raven">
+<!ENTITY MsgOrig         "Izvor">
+<!ENTITY msgorig         "Izvor">
+<!ENTITY note            "Opomba">
+<!ENTITY NOTE            "OPOMBA">
+<!ENTITY Note            "Opomba">
+<!ENTITY Part            "Del">
+<!ENTITY part            "Del">
+<!ENTITY Preface         "Predgovor">
+<!ENTITY preface         "Predgovor">
+<!ENTITY Procedure       "Postopek">
+<!ENTITY procedure       "Postopek">
+<!ENTITY ProductionSet   "Izdelava">
+<!ENTITY Published       "Izdano">
+<!ENTITY published       "Izdano">
+<!ENTITY Question        "V:">
+<!ENTITY question        "V:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Sklic">
+<!ENTITY reference       "Sklic">
+<!ENTITY RefName         "Ime">
+<!ENTITY refname         "Ime">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Sinopsis">
+<!ENTITY refsynopsisdiv  "Sinopsis">
+<!ENTITY RevHistory      "Zgodovina razli\U-010D;ic">
+<!ENTITY revhistory      "Zgodovina razli\U-010D;ic">
+<!ENTITY Revision        "Razli\U-010D;ica">
+<!ENTITY revision        "Razli\U-010D;ica">
+<!ENTITY sect1           "Razdelek">
+<!ENTITY sect2           "Razdelek">
+<!ENTITY sect3           "Razdelek">
+<!ENTITY sect4           "Razdelek">
+<!ENTITY sect5           "Razdelek">
+<!ENTITY Section         "Razdelek">
+<!ENTITY section         "razdelek">
+<!ENTITY see             "glej">
+<!ENTITY See             "glej">
+<!ENTITY Seealso         "Glej tudi">
+<!ENTITY seealso         "glej tudi">
+<!ENTITY SeeAlso         "glej tudi">
+<!ENTITY Set             "Postavi">
+<!ENTITY set             "Postavi">
+<!ENTITY SetIndex        "Postavi stvarno kazalo">
+<!ENTITY setindex        "Postavi stvarno kazalo">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "sidebar">
+<!ENTITY step            "korak">
+<!ENTITY Step            "Korak">
+<!ENTITY table           "Tabela">
+<!ENTITY Table           "Tabela">
+<!ENTITY TIP             "NAMIG">
+<!ENTITY Tip             "Namig">
+<!ENTITY tip             "Namig">
+<!ENTITY WARNING         "POZOR">
+<!ENTITY Warning         "Pozor">
+<!ENTITY warning         "Pozor">
+<!ENTITY and             "in">
+<!ENTITY by              "od">
+<!ENTITY Edited          "Urejeno">
+<!ENTITY edited          "Urejeno">
+<!ENTITY Editedby        "Uredil">
+<!ENTITY editedby        "Uredil">
+<!ENTITY in              "v">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "neobstoje\U-010D;i element">
+<!ENTITY Notes           "Notes">
+<!ENTITY notes           "Notes">
+<!ENTITY Pgs             "Str.">
+<!ENTITY pgs             "Str.">
+<!ENTITY Revisedby       "Pregledal: ">
+<!ENTITY revisedby       "Pregledal: ">
+<!ENTITY TableNotes      "Notes">
+<!ENTITY tablenotes      "Notes">
+<!ENTITY TableofContents "Kazalo">
+<!ENTITY tableofcontents "Kazalo">
+<!ENTITY unexpectedelementname "Nepri\U-010D;akovano ime elementa">
+<!ENTITY unsupported     "nepodprto">
+<!ENTITY xrefto          "xref na">
+<!ENTITY listofequations "Seznam ena\U-010D;b">
+<!ENTITY ListofEquations "Seznam ena\U-010D;b">
+<!ENTITY ListofExamples  "Seznam primerov">
+<!ENTITY listofexamples  "Seznam primerov">
+<!ENTITY ListofFigures   "Seznam slik">
+<!ENTITY listoffigures   "Seznam slik">
+<!ENTITY listoftables    "Seznam tabel">
+<!ENTITY ListofTables    "Seznam tabel">
+<!ENTITY ListofUnknown   "Seznam neznanih stvari">
+<!ENTITY listofunknown   "Seznam neznanih stvari">
+<!ENTITY nav-home        "Domov">
+<!ENTITY nav-next        "Naprej">
+<!ENTITY nav-next-sibling "Hitro naprej">
+<!ENTITY nav-prev        "Nazaj">
+<!ENTITY nav-prev-sibling "Hitro nazaj">
+<!ENTITY nav-up          "Gor">
+<!ENTITY sectioncalled   "razdelek, imenovan">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abc\U-010D;defghijklmnopqrs\U-0161;tuvwxyz\U-017E;">
+<!ENTITY uppercase.alpha "ABC\U-010C;DEFGHIJKLMNOPQRS\U-0160;TUVWXYZ\U-017D;">
diff --git a/common/dbl1sr.dsl b/common/dbl1sr.dsl
new file mode 100644 (file)
index 0000000..8879bf7
--- /dev/null
@@ -0,0 +1,446 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % lat2 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN">
+%lat2;
+<!ENTITY % sr.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//SR"
+         "dbl1sr.ent">
+%sr.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-sr">
+<style-specification-body>
+
+;; $Id: dbl1sr.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (sr-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (sr-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-sr-start-quote%
+                                                      "%t"
+                                                      %gentext-sr-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-sr-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (sr-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (sr-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-sr-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (sr-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&ISBN;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-sr-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (sr-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-sr-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-sr-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-sr-intra-label-sep)
+  (list))
+
+(define (sr-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-sr-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-sr-intra-label-sep)))
+        (sep    (assoc name (sr-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-sr-label-title-sep)
+  (list))
+
+(define (sr-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-sr-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-sr-label-title-sep)))
+        (sep    (assoc name (sr-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (sr-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (sr-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (sr-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (sr-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-sr$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (sr-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-sr-start-quote% (dingbat "ldquo"))
+
+(define %gentext-sr-end-quote% (dingbat "rdquo"))
+
+(define %gentext-sr-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-sr-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-sr-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-sr-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-sr-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-sr-page% "")
+
+(define %gentext-sr-and% "&and;")
+
+(define %gentext-sr-listcomma% "&listcomma;")
+
+(define %gentext-sr-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-sr-bibl-pages% "&Pgs;")
+
+(define %gentext-sr-endnotes% "&Notes;")
+
+(define %gentext-sr-table-endnotes% "&TableNotes;:")
+
+(define %gentext-sr-index-see% "&See;")
+
+(define %gentext-sr-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-sr-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-sr-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-sr-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-sr-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-sr-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-sr-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1sr.ent b/common/dbl1sr.ent
new file mode 100644 (file)
index 0000000..0a24815
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-041F;\U-0440;\U-0435;\U-0433;\U-043B;\U-0435;\U-0434;">
+<!ENTITY abstract        "\U-043F;\U-0440;\U-0435;\U-0433;\U-043B;\U-0435;\U-0434;">
+<!ENTITY Answer          "\U-041E;:">
+<!ENTITY answer          "\U-043E;:">
+<!ENTITY Appendix        "\U-0414;\U-043E;\U-0434;\U-0430;\U-0442;\U-0430;\U-043A;">
+<!ENTITY appendix        "\U-0434;\U-043E;\U-0434;\U-0430;\U-0442;\U-0430;\U-043A;">
+<!ENTITY Article         "\U-0427;\U-043B;\U-0430;\U-043D;\U-0430;\U-043A;">
+<!ENTITY article         "\U-0447;\U-043B;\U-0430;\U-043D;\U-0430;\U-043A;">
+<!ENTITY Bibliography    "\U-041B;\U-0438;\U-0442;\U-0435;\U-0440;\U-0430;\U-0442;\U-0443;\U-0440;\U-0430;">
+<!ENTITY bibliography    "\U-043B;\U-0438;\U-0442;\U-0435;\U-0440;\U-0430;\U-0442;\U-0443;\U-0440;\U-0430;">
+<!ENTITY Book            "\U-041A;\U-045A;\U-0438;\U-0433;\U-0430;">
+<!ENTITY book            "\U-043A;\U-045A;\U-0438;\U-0433;\U-0430;">
+<!ENTITY CAUTION         "\U-0423;\U-041F;\U-041E;\U-0417;\U-041E;\U-0420;\U-0415;\U-040A;\U-0415;">
+<!ENTITY Caution         "\U-0423;\U-043F;\U-043E;\U-0437;\U-043E;\U-0440;\U-0435;\U-045A;\U-0435;">
+<!ENTITY caution         "\U-0443;\U-043F;\U-043E;\U-0437;\U-043E;\U-0440;\U-0435;\U-045A;\U-0435;">
+<!ENTITY Chapter         "\U-041F;\U-043E;\U-0433;\U-043B;\U-0430;\U-0432;\U-0459;\U-0435;">
+<!ENTITY chapter         "\U-043F;\U-043E;\U-0433;\U-043B;\U-0430;\U-0432;\U-0459;\U-0435;">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "\U-041F;\U-043E;\U-0441;\U-0432;\U-0435;\U-0442;\U-0430;">
+<!ENTITY dedication      "\U-043F;\U-043E;\U-0441;\U-0432;\U-0435;\U-0442;\U-0430;">
+<!ENTITY Edition         "\U-0418;\U-0437;\U-0434;\U-0430;\U-045A;\U-0435;">
+<!ENTITY edition         "\U-0438;\U-0437;\U-0434;\U-0430;\U-045A;\U-0435;">
+<!ENTITY Equation        "\U-0408;\U-0435;\U-0434;\U-043D;\U-0430;\U-0447;\U-0438;\U-043D;\U-0430;">
+<!ENTITY equation        "\U-0458;\U-0435;\U-0434;\U-043D;\U-0430;\U-0447;\U-0438;\U-043D;\U-0430;">
+<!ENTITY Example         "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;">
+<!ENTITY example         "\U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;">
+<!ENTITY Figure          "\U-0424;\U-0438;\U-0433;\U-0443;\U-0440;\U-0430;">
+<!ENTITY figure          "\U-0444;\U-0438;\U-0433;\U-0443;\U-0440;\U-0430;">
+<!ENTITY Glossary        "\U-0420;\U-0435;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY glossary        "\U-0440;\U-0435;\U-0447;\U-043D;\U-0438;\U-043A;">
+<!ENTITY GlossSee        "\U-0412;\U-0438;\U-0434;\U-0438;">
+<!ENTITY glosssee        "\U-0432;\U-0438;\U-0434;\U-0438;">
+<!ENTITY GlossSeeAlso    "\U-0412;\U-0438;\U-0434;\U-0438;  \U-0442;\U-0430;\U-043A;\U-043E;\U-0452;\U-0435;">
+<!ENTITY glossseealso    "\U-0432;\U-0438;\U-0434;\U-0438;  \U-0442;\U-0430;\U-043A;\U-043E;\U-0452;\U-0435;">
+<!ENTITY IMPORTANT       "\U-0412;\U-0410;\U-0416;\U-041D;\U-041E;">
+<!ENTITY important       "\U-0432;\U-0430;\U-0436;\U-043D;\U-043E;">
+<!ENTITY Important       "\U-0412;\U-0430;\U-0436;\U-043D;\U-043E;">
+<!ENTITY Index           "\U-0418;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441;">
+<!ENTITY index           "\U-0438;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Legal Notice">
+<!ENTITY legalnotice     "Legal Notice">
+<!ENTITY MsgAud          "\U-041F;\U-0443;\U-0431;\U-043B;\U-0438;\U-043A;\U-0430;">
+<!ENTITY msgaud          "\U-043F;\U-0443;\U-0431;\U-043B;\U-0438;\U-043A;\U-0430;">
+<!ENTITY MsgLevel        "\U-041D;\U-0438;\U-0432;\U-043E;">
+<!ENTITY msglevel        "\U-043D;\U-0438;\U-0432;\U-043E;">
+<!ENTITY MsgOrig         "\U-0418;\U-0437;\U-0432;\U-043E;\U-0440;">
+<!ENTITY msgorig         "\U-0438;\U-0437;\U-0432;\U-043E;\U-0440;">
+<!ENTITY NOTE            "\U-041F;\U-0420;\U-0418;\U-041C;\U-0415;\U-0414;\U-0411;\U-0410;">
+<!ENTITY Note            "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0434;\U-0431;\U-0430;">
+<!ENTITY note            "\U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0434;\U-0431;\U-0430;">
+<!ENTITY Part            "\U-0414;\U-0435;\U-043E;">
+<!ENTITY part            "\U-0434;\U-0435;\U-043E;">
+<!ENTITY Preface         "\U-041F;\U-0440;\U-0435;\U-0434;\U-0433;\U-043E;\U-0432;\U-043E;\U-0440;">
+<!ENTITY preface         "\U-043F;\U-0440;\U-0435;\U-0434;\U-0433;\U-043E;\U-0432;\U-043E;\U-0440;">
+<!ENTITY Procedure       "\U-041F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY procedure       "\U-043F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY PubDate         "\U-0414;\U-0430;\U-0442;\U-0443;\U-043C;  \U-0438;\U-0437;\U-0434;\U-0430;\U-0432;\U-0430;\U-045A;\U-0430;">
+<!ENTITY pubdate         "\U-0434;\U-0430;\U-0442;\U-0443;\U-043C;  \U-0438;\U-0437;\U-0434;\U-0430;\U-0432;\U-0430;\U-045A;\U-0430;">
+<!ENTITY Published       "\U-0418;\U-0437;\U-0434;\U-0430;\U-043D;\U-043E;">
+<!ENTITY published       "\U-0438;\U-0437;\U-0434;\U-0430;\U-043D;\U-043E;">
+<!ENTITY Qandadiv        "\U-041F; \U-0438; \U-041E;">
+<!ENTITY qandadiv        "\U-043F; \U-0438; \U-043E;">
+<!ENTITY Question        "\U-041F;:">
+<!ENTITY question        "\U-043F;:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "\U-0420;\U-0435;\U-0444;\U-0435;\U-0440;\U-0435;\U-043D;\U-0446;\U-0430;">
+<!ENTITY reference       "\U-0440;\U-0435;\U-0444;\U-0435;\U-0440;\U-0435;\U-043D;\U-0446;\U-0430;">
+<!ENTITY RefName         "\U-0418;\U-043C;\U-0435;">
+<!ENTITY refname         "\U-0438;\U-043C;\U-0435;">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "\U-041A;\U-0440;\U-0430;\U-0442;\U-0430;\U-043A;  \U-0441;\U-0430;\U-0434;\U-0440;\U-0436;\U-0430;\U-0458;">
+<!ENTITY refsynopsisdiv  "\U-043A;\U-0440;\U-0430;\U-0442;\U-0430;\U-043A;  \U-0441;\U-0430;\U-0434;\U-0440;\U-0436;\U-0430;\U-0458;">
+<!ENTITY RevHistory      "\U-0418;\U-0441;\U-0442;\U-043E;\U-0440;\U-0438;\U-0458;\U-0430;  \U-0440;\U-0435;\U-0432;\U-0438;\U-0437;\U-0438;\U-0458;\U-0430;">
+<!ENTITY revhistory      "\U-0438;\U-0441;\U-0442;\U-043E;\U-0440;\U-0438;\U-0458;\U-0430;  \U-0440;\U-0435;\U-0432;\U-0438;\U-0437;\U-0438;\U-0458;\U-0430;">
+<!ENTITY revision        "\U-0440;\U-0435;\U-0432;\U-0438;\U-0437;\U-0438;\U-0458;\U-0430;">
+<!ENTITY Revision        "\U-0420;\U-0435;\U-0432;\U-0438;\U-0437;\U-0438;\U-0458;\U-0430;">
+<!ENTITY sect1           "\U-041E;\U-0434;\U-0435;\U-0459;\U-0430;\U-043A;">
+<!ENTITY sect2           "\U-041E;\U-0434;\U-0435;\U-0459;\U-0430;\U-043A;">
+<!ENTITY sect3           "\U-041E;\U-0434;\U-0435;\U-0459;\U-0430;\U-043A;">
+<!ENTITY sect4           "\U-041E;\U-0434;\U-0435;\U-0459;\U-0430;\U-043A;">
+<!ENTITY sect5           "\U-041E;\U-0434;\U-0435;\U-0459;\U-0430;\U-043A;">
+<!ENTITY section         "\U-041E;\U-0434;\U-0435;\U-0459;\U-0430;\U-043A;">
+<!ENTITY Section         "\U-041E;\U-0434;\U-0435;\U-0459;\U-0430;\U-043A;">
+<!ENTITY see             "\U-0432;\U-0438;\U-0434;\U-0438;">
+<!ENTITY See             "\U-0412;\U-0438;\U-0434;\U-0438;">
+<!ENTITY seealso         "\U-0432;\U-0438;\U-0434;\U-0438;  \U-0442;\U-0430;\U-043A;\U-043E;\U-0452;\U-0435;">
+<!ENTITY Seealso         "\U-0412;\U-0438;\U-0434;\U-0438;  \U-0442;\U-0430;\U-043A;\U-043E;\U-0452;\U-0435;">
+<!ENTITY SeeAlso         "\U-0412;\U-0438;\U-0434;\U-0438;  \U-0442;\U-0430;\U-043A;\U-043E;\U-0452;\U-0435;">
+<!ENTITY set             "\U-0441;\U-043A;\U-0443;\U-043F;">
+<!ENTITY Set             "\U-0421;\U-043A;\U-0443;\U-043F;">
+<!ENTITY setindex        "\U-0418;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441;  \U-0441;\U-043A;\U-0443;\U-043F;\U-0430;">
+<!ENTITY SetIndex        "\U-0418;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441;  \U-0441;\U-043A;\U-0443;\U-043F;\U-0430;">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "\U-043F;\U-043E;\U-0432;\U-0440;\U-0448;  \U-043F;\U-043E;\U-0441;\U-0442;\U-0440;\U-0430;\U-043D;\U-0446;\U-0435;">
+<!ENTITY step            "\U-043A;\U-043E;\U-0440;\U-0430;\U-043A;">
+<!ENTITY Step            "\U-041A;\U-043E;\U-0440;\U-0430;\U-043A;">
+<!ENTITY Table           "\U-0422;\U-0430;\U-0431;\U-0435;\U-043B;\U-0430;">
+<!ENTITY table           "\U-0442;\U-0430;\U-0431;\U-0435;\U-043B;\U-0430;">
+<!ENTITY tip             "\U-0441;\U-0430;\U-0432;\U-0435;\U-0442;">
+<!ENTITY TIP             "\U-0421;\U-0410;\U-0412;\U-0415;\U-0422;">
+<!ENTITY Tip             "\U-0421;\U-0430;\U-0432;\U-0435;\U-0442;">
+<!ENTITY Warning         "\U-0423;\U-043F;\U-043E;\U-0437;\U-043E;\U-0440;\U-0435;\U-045A;\U-0435;">
+<!ENTITY warning         "\U-0443;\U-043F;\U-043E;\U-0437;\U-043E;\U-0440;\U-0435;\U-045A;\U-0435;">
+<!ENTITY WARNING         "\U-0423;\U-041F;\U-041E;\U-0417;\U-041E;\U-0420;\U-0415;\U-040A;\U-0415;">
+<!ENTITY and             "\U-0438;">
+<!ENTITY by              "\U-043E;\U-0434;">
+<!ENTITY called          "\U-043F;\U-043E;\U-0434;  \U-0438;\U-043C;\U-0435;\U-043D;\U-043E;\U-043C;">
+<!ENTITY Edited          "\U-0423;\U-0440;\U-0435;\U-0452;\U-0435;\U-043D;\U-043E;">
+<!ENTITY edited          "\U-0443;\U-0440;\U-0435;\U-0452;\U-0435;\U-043D;\U-043E;">
+<!ENTITY Editedby        "\U-0423;\U-0440;\U-0435;\U-0434;\U-0438;\U-043E;(\U-043B;\U-0430;)">
+<!ENTITY editedby        "\U-0423;\U-0440;\U-0435;\U-0434;\U-0438;\U-043E;(\U-043B;\U-0430;)">
+<!ENTITY in              "\U-0443;">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "\U-043D;\U-0435;\U-043F;\U-043E;\U-0441;\U-0442;\U-043E;\U-0458;\U-0435;\U-045B;\U-0438;  \U-0435;\U-043B;\U-0435;\U-043C;\U-0435;\U-043D;\U-0442;">
+<!ENTITY notes           "\U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0434;\U-0431;\U-0435;">
+<!ENTITY Notes           "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0434;\U-0431;\U-0435;">
+<!ENTITY Pgs             "\U-0421;\U-0442;\U-0440;.">
+<!ENTITY pgs             "\U-0441;\U-0442;\U-0440;.">
+<!ENTITY Revisedby       "\U-041F;\U-0440;\U-0435;\U-0433;\U-043B;\U-0435;\U-0434;\U-0430;\U-043E;(\U-043B;\U-0430;):  ">
+<!ENTITY revisedby       "\U-043F;\U-0440;\U-0435;\U-0433;\U-043B;\U-0435;\U-0434;\U-0430;\U-043E;(\U-043B;\U-0430;):  ">
+<!ENTITY TableNotes      "\U-041F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0434;\U-0431;\U-0435;">
+<!ENTITY tablenotes      "\U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0434;\U-0431;\U-0435;">
+<!ENTITY TableofContents "\U-0421;\U-0430;\U-0434;\U-0440;\U-0436;\U-0430;\U-0458;">
+<!ENTITY tableofcontents "\U-0441;\U-0430;\U-0434;\U-0440;\U-0436;\U-0430;\U-0458;">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "\U-043D;\U-0435;\U-043E;\U-0447;\U-0435;\U-043A;\U-0438;\U-0432;\U-0430;\U-043D;\U-043E;  \U-0438;\U-043C;\U-0435;  \U-0435;\U-043B;\U-0435;\U-043C;\U-0435;\U-043D;\U-0442;\U-0430;">
+<!ENTITY unsupported     "\U-043D;\U-0438;\U-0458;\U-0435;  \U-043F;\U-043E;\U-0434;\U-0440;\U-0436;\U-0430;\U-043D;\U-043E;">
+<!ENTITY xrefto          "\U-0443;\U-043D;\U-0430;\U-043A;\U-0440;\U-0441;\U-043D;\U-0430;  \U-0440;\U-0435;\U-0444;\U-0435;\U-0440;\U-0435;\U-043D;\U-0446;\U-0430;  \U-043D;\U-0430;">
+<!ENTITY listofequations "\U-043B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-0458;\U-0435;\U-0434;\U-043D;\U-0430;\U-0447;\U-0438;\U-043D;\U-0430;">
+<!ENTITY ListofEquations "\U-041B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-0458;\U-0435;\U-0434;\U-043D;\U-0430;\U-0447;\U-0438;\U-043D;\U-0430;">
+<!ENTITY ListofExamples  "\U-041B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;\U-0430;">
+<!ENTITY listofexamples  "\U-043B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-043F;\U-0440;\U-0438;\U-043C;\U-0435;\U-0440;\U-0430;">
+<!ENTITY ListofFigures   "\U-041B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-0444;\U-0438;\U-0433;\U-0443;\U-0440;\U-0430;">
+<!ENTITY listoffigures   "\U-043B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-0444;\U-0438;\U-0433;\U-0443;\U-0440;\U-0430;">
+<!ENTITY ListofProcedures "\U-041B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-043F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY listofprocedures "\U-043B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-043F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY listoftables    "\U-043B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-0442;\U-0430;\U-0431;\U-0435;\U-043B;\U-0430;">
+<!ENTITY ListofTables    "\U-041B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-0442;\U-0430;\U-0431;\U-0435;\U-043B;\U-0430;">
+<!ENTITY ListofUnknown   "\U-041B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-043D;\U-0435;\U-043F;\U-043E;\U-0437;\U-043D;\U-0430;\U-0442;\U-0438;\U-0445;">
+<!ENTITY listofunknown   "\U-043B;\U-0438;\U-0441;\U-0442;\U-0430;  \U-043D;\U-0435;\U-043F;\U-043E;\U-0437;\U-043D;\U-0430;\U-0442;\U-0438;\U-0445;">
+<!ENTITY nav-home        "\U-041F;\U-043E;\U-0447;\U-0435;\U-0442;\U-0430;\U-043A;">
+<!ENTITY nav-next        "\U-0421;\U-043B;\U-0435;\U-0434;\U-0435;\U-045B;\U-0435;">
+<!ENTITY nav-next-sibling "\U-0411;\U-0440;\U-0437;\U-043E;  \U-043D;\U-0430;\U-043F;\U-0440;\U-0435;\U-0434;">
+<!ENTITY nav-prev        "\U-041F;\U-0440;\U-0435;\U-0442;\U-0445;\U-043E;\U-0434;\U-043D;\U-043E;">
+<!ENTITY nav-prev-sibling "\U-0411;\U-0440;\U-0437;\U-043E;  \U-043D;\U-0430;\U-0437;\U-0430;\U-0434;">
+<!ENTITY nav-up          "\U-0412;\U-0440;\U-0445;">
+<!ENTITY nav-toc         "\U-0421;\U-0430;\U-0434;\U-0440;.">
+<!ENTITY Draft           "\U-041D;\U-0430;\U-0446;\U-0440;\U-0442;">
+<!ENTITY above           "\U-0438;\U-0437;\U-043D;\U-0430;\U-0434;">
+<!ENTITY below           "\U-0438;\U-0441;\U-043F;\U-043E;\U-0434;">
+<!ENTITY sectioncalled   "\U-043E;\U-0434;\U-0435;\U-0459;\U-0430;\U-043A; \U-043F;\U-043E;\U-0434;  \U-0438;\U-043C;\U-0435;\U-043D;\U-043E;\U-043C;">
+<!ENTITY lowercase.alpha "\U-0430;\U-0431;\U-0432;\U-0433;\U-0434;\U-0452;\U-0435;\U-0436;\U-0437;\U-0438;\U-0458;\U-043A;\U-043B;\U-0459;\U-043C;\U-043D;\U-045A;\U-043E;\U-043F;\U-0440;\U-0441;\U-0442;\U-045B;\U-0443;\U-0444;\U-0445;\U-0446;\U-0447;\U-045F;\U-0448;">
+<!ENTITY uppercase.alpha "\U-0410;\U-0411;\U-0412;\U-0413;\U-0414;\U-0402;\U-0415;\U-0416;\U-0417;\U-0418;\U-0408;\U-041A;\U-041B;\U-0409;\U-041C;\U-041D;\U-040A;\U-041E;\U-041F;\U-0420;\U-0421;\U-0422;\U-040B;\U-0423;\U-0424;\U-0425;\U-0426;\U-0427;\U-040F;\U-0428;">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "2">
+<!ENTITY hyphenation-remain-character-count "2">
diff --git a/common/dbl1sv.dsl b/common/dbl1sv.dsl
new file mode 100644 (file)
index 0000000..cb5df12
--- /dev/null
@@ -0,0 +1,448 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % sv.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//SV"
+         "dbl1sv.ent">
+%sv.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-sv">
+<style-specification-body>
+
+;; $Id: dbl1sv.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+;; Contributors:
+;; Marcus Better, marcus@dactylis.se
+;;
+
+(define (sv-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (sv-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "&Appendix; som &called; %t"))
+       (list (normalize "article")     (string-append %gentext-sv-start-quote%
+                                                      "%t"
+                                                      %gentext-sv-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "&Chapter; som &called; %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; som &called; %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; som &called; %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; som &called; %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; som &called; %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; som &called; %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; som &called; %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "&Section; som &called; %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-sv-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (sv-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (sv-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " in "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " in "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " in "))
+   (else
+    (literal " in "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-sv-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (sv-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-sv-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (sv-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-sv-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-sv-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-sv-intra-label-sep)
+  (list))
+
+(define (sv-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-sv-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-sv-intra-label-sep)))
+        (sep    (assoc name (sv-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-sv-label-title-sep)
+  (list))
+
+(define (sv-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-sv-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-sv-label-title-sep)))
+        (sep    (assoc name (sv-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (sv-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (sv-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (sv-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (sv-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-sv$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (sv-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-sv-start-quote% (dingbat "ldquo"))
+
+(define %gentext-sv-end-quote% (dingbat "rdquo"))
+
+(define %gentext-sv-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-sv-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-sv-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-sv-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-sv-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-sv-page% "")
+
+(define %gentext-sv-and% "&and;")
+
+(define %gentext-sv-listcomma% "&listcomma;")
+
+(define %gentext-sv-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-sv-bibl-pages% "&Pgs;")
+
+(define %gentext-sv-endnotes% "&Notes;")
+
+(define %gentext-sv-table-endnotes% "&TableNotes;:")
+
+(define %gentext-sv-index-see% "&See;")
+
+(define %gentext-sv-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-sv-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-sv-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-sv-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-sv-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-sv-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-sv-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1sv.ent b/common/dbl1sv.ent
new file mode 100644 (file)
index 0000000..16232b6
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Sammanfattning">
+<!ENTITY abstract        "Sammanfattning">
+<!ENTITY Answer          "A:">
+<!ENTITY answer          "A:">
+<!ENTITY Appendix        "Appendix">
+<!ENTITY appendix        "appendix">
+<!ENTITY Article         "Artikel">
+<!ENTITY article         "Artikel">
+<!ENTITY Bibliography    "Bibliografi">
+<!ENTITY bibliography    "Bibliografi">
+<!ENTITY Book            "Bok">
+<!ENTITY book            "Bok">
+<!ENTITY CAUTION         "OBSERVERA">
+<!ENTITY Caution         "Observera">
+<!ENTITY caution         "Observera">
+<!ENTITY Chapter         "Kapitel">
+<!ENTITY chapter         "kapitel">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "Copyright">
+<!ENTITY copyright       "Copyright">
+<!ENTITY Dedication      "Dedikation">
+<!ENTITY dedication      "Dedikation">
+<!ENTITY Edition         "Utg\U-00E5;va">
+<!ENTITY edition         "Utg\U-00E5;va">
+<!ENTITY Equation        "Ekvation">
+<!ENTITY equation        "Ekvation">
+<!ENTITY Example         "Exempel">
+<!ENTITY example         "Exempel">
+<!ENTITY Figure          "Figur">
+<!ENTITY figure          "Figur">
+<!ENTITY Glossary        "Gloslista">
+<!ENTITY glossary        "Gloslista">
+<!ENTITY GlossSee        "Se">
+<!ENTITY glosssee        "Se">
+<!ENTITY GlossSeeAlso    "Se \U-00C4;ven">
+<!ENTITY glossseealso    "Se \U-00C4;ven">
+<!ENTITY IMPORTANT       "VIKTIGT">
+<!ENTITY Important       "Viktigt">
+<!ENTITY important       "Viktigt">
+<!ENTITY Index           "Index">
+<!ENTITY index           "Index">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Legal Notice">
+<!ENTITY legalnotice     "Legal Notice">
+<!ENTITY MsgAud          "M\U-00E5;lgrupp">
+<!ENTITY msgaud          "M\U-00E5;lgrupp">
+<!ENTITY MsgLevel        "Niv\U-00E5;">
+<!ENTITY msglevel        "Niv\U-00E5;">
+<!ENTITY MsgOrig         "Ursprung">
+<!ENTITY msgorig         "Ursprung">
+<!ENTITY NOTE            "NOTERA">
+<!ENTITY Note            "Notera">
+<!ENTITY note            "Notera">
+<!ENTITY Part            "Del">
+<!ENTITY part            "Del">
+<!ENTITY Preface         "F\U-00F6;retal">
+<!ENTITY preface         "F\U-00F6;retal">
+<!ENTITY Procedure       "Procedur">
+<!ENTITY procedure       "Procedur">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "Publicerad">
+<!ENTITY published       "Publicerad">
+<!ENTITY Question        "Fr\U-00E5;ga:">
+<!ENTITY question        "Fr\U-00E5;ga:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Referens">
+<!ENTITY reference       "Referens">
+<!ENTITY RefName         "Namn">
+<!ENTITY refname         "Namn">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Synopsis">
+<!ENTITY refsynopsisdiv  "Synopsis">
+<!ENTITY RevHistory      "Revisionshistorik">
+<!ENTITY revhistory      "Revisionshistorik">
+<!ENTITY Revision        "Revision">
+<!ENTITY revision        "Revision">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "Avsnitt">
+<!ENTITY section         "avsnitt">
+<!ENTITY See             "Se">
+<!ENTITY see             "se">
+<!ENTITY SeeAlso         "Se \U-00C4;ven">
+<!ENTITY seealso         "se \U-00E4;ven">
+<!ENTITY Seealso         "Se \U-00E4;ven">
+<!ENTITY Set             "Set">
+<!ENTITY set             "Set">
+<!ENTITY SetIndex        "Set Index">
+<!ENTITY setindex        "Set Index">
+<!ENTITY Sidebar         "Sidebar">
+<!ENTITY sidebar         "sidebar">
+<!ENTITY Step            "Steg">
+<!ENTITY step            "steg">
+<!ENTITY Table           "Tabell">
+<!ENTITY table           "Tabell">
+<!ENTITY TIP             "TIPS">
+<!ENTITY Tip             "Tips">
+<!ENTITY tip             "Tips">
+<!ENTITY WARNING         "VARNING">
+<!ENTITY Warning         "Varning">
+<!ENTITY warning         "Varning">
+<!ENTITY and             "och">
+<!ENTITY by              "av">
+<!ENTITY called          "kallas">
+<!ENTITY Edited          "Redigerad">
+<!ENTITY edited          "Redigerad">
+<!ENTITY Editedby        "Redigerad av">
+<!ENTITY editedby        "Redigerad av">
+<!ENTITY in              "i">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "icke-existerande element">
+<!ENTITY Notes           "Noter">
+<!ENTITY notes           "Noter">
+<!ENTITY Pgs             "Sid.">
+<!ENTITY pgs             "Sid.">
+<!ENTITY Revisedby       "Reviderad av: ">
+<!ENTITY revisedby       "Reviderad av: ">
+<!ENTITY TableNotes      "Noter">
+<!ENTITY tablenotes      "Noter">
+<!ENTITY TableofContents "Inneh\U-00E5;llsf\U-00F6;rteckning">
+<!ENTITY tableofcontents "Inneh\U-00E5;llsf\U-00F6;rteckning">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "Ov\U-00E4;ntat elementnamn">
+<!ENTITY unsupported     "unsupported">
+<!ENTITY xrefto          "korsreferens till">
+<!ENTITY ListofEquations "Ekvationsf\U-00F6;rteckning">
+<!ENTITY listofequations "Ekvationsf\U-00F6;rteckning">
+<!ENTITY ListofExamples  "Exempelf\U-00F6;rteckning">
+<!ENTITY listofexamples  "Exempelf\U-00F6;rteckning">
+<!ENTITY ListofFigures   "Figurf\U-00F6;rteckning">
+<!ENTITY listoffigures   "Figurf\U-00F6;rteckning">
+<!ENTITY ListofTables    "Tabellf\U-00F6;rteckning">
+<!ENTITY listoftables    "Tabellf\U-00F6;rteckning">
+<!ENTITY ListofUnknown   "F\U-00F6;rteckning av ok\U-00E4;nda">
+<!ENTITY listofunknown   "F\U-00F6;rteckning av ok\U-00E4;nda">
+<!ENTITY nav-home        "Hem">
+<!ENTITY nav-next        "N\U-00E4;sta">
+<!ENTITY nav-next-sibling "Snabbt fram\U-00E5;t">
+<!ENTITY nav-prev        "F\U-00F6;reg\U-00E5;ende">
+<!ENTITY nav-prev-sibling "Snabbt bak\U-00E5;t">
+<!ENTITY nav-up          "Upp">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1th.ent b/common/dbl1th.ent
new file mode 100644 (file)
index 0000000..54d5ad2
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-0E1A;\U-0E17;\U-0E04;\U-0E31;\U-0E14;\U-0E22;\U-0E48;\U-0E2D;">
+<!ENTITY abstract        "\U-0E1A;\U-0E17;\U-0E04;\U-0E31;\U-0E14;\U-0E22;\U-0E48;\U-0E2D;">
+<!ENTITY Answer          "\U-0E15;\U-0E2D;\U-0E1A;:">
+<!ENTITY answer          "\U-0E15;\U-0E2D;\U-0E1A;:">
+<!ENTITY Appendix        "\U-0E20;\U-0E32;\U-0E04;\U-0E1C;\U-0E19;\U-0E27;\U-0E01;">
+<!ENTITY appendix        "\U-0E20;\U-0E32;\U-0E04;\U-0E1C;\U-0E19;\U-0E27;\U-0E01;">
+<!ENTITY Article         "\U-0E1A;\U-0E17;\U-0E04;\U-0E27;\U-0E32;\U-0E21;">
+<!ENTITY article         "\U-0E1A;\U-0E17;\U-0E04;\U-0E27;\U-0E32;\U-0E21;">
+<!ENTITY Bibliography    "\U-0E1A;\U-0E23;\U-0E23;\U-0E13;\U-0E32;\U-0E19;\U-0E38;\U-0E01;\U-0E23;\U-0E21;">
+<!ENTITY bibliography    "\U-0E1A;\U-0E23;\U-0E23;\U-0E13;\U-0E32;\U-0E19;\U-0E38;\U-0E01;\U-0E23;\U-0E21;">
+<!ENTITY Book            "\U-0E2B;\U-0E19;\U-0E31;\U-0E07;\U-0E2A;\U-0E37;\U-0E2D;">
+<!ENTITY book            "\U-0E2B;\U-0E19;\U-0E31;\U-0E07;\U-0E2A;\U-0E37;\U-0E2D;">
+<!ENTITY CAUTION         "\U-0E04;\U-0E33;\U-0E40;\U-0E15;\U-0E37;\U-0E2D;\U-0E19;">
+<!ENTITY Caution         "\U-0E04;\U-0E33;\U-0E40;\U-0E15;\U-0E37;\U-0E2D;\U-0E19;">
+<!ENTITY caution         "\U-0E04;\U-0E33;\U-0E40;\U-0E15;\U-0E37;\U-0E2D;\U-0E19;">
+<!ENTITY Chapter         "\U-0E1A;\U-0E17;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY chapter         "\U-0E1A;\U-0E17;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY Colophon        "\U-0E40;\U-0E1A;\U-0E37;\U-0E49;\U-0E2D;\U-0E07;\U-0E2B;\U-0E25;\U-0E31;\U-0E07;">
+<!ENTITY colophon        "\U-0E40;\U-0E1A;\U-0E37;\U-0E49;\U-0E2D;\U-0E07;\U-0E2B;\U-0E25;\U-0E31;\U-0E07;">
+<!ENTITY Copyright       "\U-0E2A;\U-0E07;\U-0E27;\U-0E19;\U-0E2A;\U-0E34;\U-0E02;\U-0E2A;\U-0E34;\U-0E17;\U-0E18;\U-0E34;\U-0E4C;">
+<!ENTITY copyright       "\U-0E2A;\U-0E07;\U-0E27;\U-0E19;\U-0E2A;\U-0E34;\U-0E02;\U-0E2A;\U-0E34;\U-0E17;\U-0E18;\U-0E34;\U-0E4C;">
+<!ENTITY Dedication      "\U-0E04;\U-0E33;\U-0E2D;\U-0E38;\U-0E17;\U-0E34;\U-0E28;">
+<!ENTITY dedication      "\U-0E04;\U-0E33;\U-0E2D;\U-0E38;\U-0E17;\U-0E34;\U-0E28;">
+<!ENTITY Edition         "\U-0E09;\U-0E1A;\U-0E31;\U-0E1A;">
+<!ENTITY edition         "\U-0E09;\U-0E1A;\U-0E31;\U-0E1A;">
+<!ENTITY Equation        "\U-0E2A;\U-0E21;\U-0E01;\U-0E32;\U-0E23;">
+<!ENTITY equation        "\U-0E2A;\U-0E21;\U-0E01;\U-0E32;\U-0E23;">
+<!ENTITY Example         "\U-0E15;\U-0E31;\U-0E27;\U-0E2D;\U-0E22;\U-0E48;\U-0E32;\U-0E07;">
+<!ENTITY example         "\U-0E15;\U-0E31;\U-0E27;\U-0E2D;\U-0E22;\U-0E48;\U-0E32;\U-0E07;">
+<!ENTITY Figure          "\U-0E23;\U-0E39;\U-0E1B;">
+<!ENTITY figure          "\U-0E23;\U-0E39;\U-0E1B;">
+<!ENTITY Glossary        "\U-0E2D;\U-0E20;\U-0E34;\U-0E17;\U-0E32;\U-0E19;\U-0E28;\U-0E31;\U-0E1E;\U-0E17;\U-0E4C;">
+<!ENTITY glossary        "\U-0E2D;\U-0E20;\U-0E34;\U-0E17;\U-0E32;\U-0E19;\U-0E28;\U-0E31;\U-0E1E;\U-0E17;\U-0E4C;">
+<!ENTITY GlossSee        "\U-0E14;\U-0E39;">
+<!ENTITY glosssee        "\U-0E14;\U-0E39;">
+<!ENTITY GlossSeeAlso    "\U-0E14;\U-0E39;\U-0E40;\U-0E1E;\U-0E34;\U-0E48;\U-0E21;\U-0E40;\U-0E15;\U-0E34;\U-0E21;">
+<!ENTITY glossseealso    "\U-0E14;\U-0E39;\U-0E40;\U-0E1E;\U-0E34;\U-0E48;\U-0E21;\U-0E40;\U-0E15;\U-0E34;\U-0E21;">
+<!ENTITY IMPORTANT       "\U-0E02;\U-0E49;\U-0E2D;\U-0E04;\U-0E27;\U-0E23;\U-0E08;\U-0E33;">
+<!ENTITY important       "\U-0E02;\U-0E49;\U-0E2D;\U-0E04;\U-0E27;\U-0E23;\U-0E08;\U-0E33;">
+<!ENTITY Important       "\U-0E02;\U-0E49;\U-0E2D;\U-0E04;\U-0E27;\U-0E23;\U-0E08;\U-0E33;">
+<!ENTITY Index           "\U-0E14;\U-0E23;\U-0E23;\U-0E0A;\U-0E19;\U-0E35;">
+<!ENTITY index           "\U-0E14;\U-0E23;\U-0E23;\U-0E0A;\U-0E19;\U-0E35;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "\U-0E02;\U-0E49;\U-0E2D;\U-0E1C;\U-0E39;\U-0E01;\U-0E1E;\U-0E31;\U-0E19;\U-0E15;\U-0E32;\U-0E21;\U-0E01;\U-0E0E;\U-0E2B;\U-0E21;\U-0E32;\U-0E22;">
+<!ENTITY legalnotice     "\U-0E02;\U-0E49;\U-0E2D;\U-0E1C;\U-0E39;\U-0E01;\U-0E1E;\U-0E31;\U-0E19;\U-0E15;\U-0E32;\U-0E21;\U-0E01;\U-0E0E;\U-0E2B;\U-0E21;\U-0E32;\U-0E22;">
+<!ENTITY MsgAud          "\U-0E1C;\U-0E39;\U-0E49;\U-0E2D;\U-0E48;\U-0E32;\U-0E19;">
+<!ENTITY msgaud          "\U-0E1C;\U-0E39;\U-0E49;\U-0E2D;\U-0E48;\U-0E32;\U-0E19;">
+<!ENTITY MsgLevel        "\U-0E23;\U-0E30;\U-0E14;\U-0E31;\U-0E1A;">
+<!ENTITY msglevel        "\U-0E23;\U-0E30;\U-0E14;\U-0E31;\U-0E1A;">
+<!ENTITY MsgOrig         "\U-0E17;\U-0E35;\U-0E48;\U-0E21;\U-0E32;">
+<!ENTITY msgorig         "\U-0E17;\U-0E35;\U-0E48;\U-0E21;\U-0E32;">
+<!ENTITY NOTE            "\U-0E2B;\U-0E21;\U-0E32;\U-0E22;\U-0E40;\U-0E2B;\U-0E15;\U-0E38;">
+<!ENTITY Note            "\U-0E2B;\U-0E21;\U-0E32;\U-0E22;\U-0E40;\U-0E2B;\U-0E15;\U-0E38;">
+<!ENTITY note            "\U-0E2B;\U-0E21;\U-0E32;\U-0E22;\U-0E40;\U-0E2B;\U-0E15;\U-0E38;">
+<!ENTITY Part            "\U-0E20;\U-0E32;\U-0E04;">
+<!ENTITY part            "\U-0E20;\U-0E32;\U-0E04;">
+<!ENTITY Preface         "\U-0E04;\U-0E33;\U-0E19;\U-0E33;">
+<!ENTITY preface         "\U-0E04;\U-0E33;\U-0E19;\U-0E33;">
+<!ENTITY Procedure       "\U-0E23;\U-0E30;\U-0E40;\U-0E1A;\U-0E35;\U-0E22;\U-0E1A;\U-0E01;\U-0E32;\U-0E23;">
+<!ENTITY procedure       "\U-0E23;\U-0E30;\U-0E40;\U-0E1A;\U-0E35;\U-0E22;\U-0E1A;\U-0E01;\U-0E32;\U-0E23;">
+<!ENTITY ProductionSet   "\U-0E1C;\U-0E25;\U-0E34;\U-0E15;">
+<!ENTITY Published       "\U-0E15;\U-0E35;\U-0E1E;\U-0E34;\U-0E21;\U-0E1E;\U-0E4C;">
+<!ENTITY published       "\U-0E15;\U-0E35;\U-0E1E;\U-0E34;\U-0E21;\U-0E1E;\U-0E4C;">
+<!ENTITY Question        "\U-0E16;\U-0E32;\U-0E21;:">
+<!ENTITY question        "\U-0E16;\U-0E32;\U-0E21;:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "\U-0E2B;\U-0E19;\U-0E31;\U-0E07;\U-0E2A;\U-0E37;\U-0E2D;\U-0E2D;\U-0E49;\U-0E32;\U-0E07;\U-0E2D;\U-0E34;\U-0E07;">
+<!ENTITY reference       "\U-0E2B;\U-0E19;\U-0E31;\U-0E07;\U-0E2A;\U-0E37;\U-0E2D;\U-0E2D;\U-0E49;\U-0E32;\U-0E07;\U-0E2D;\U-0E34;\U-0E07;">
+<!ENTITY RefName         "\U-0E0A;\U-0E37;\U-0E48;\U-0E2D;">
+<!ENTITY refname         "\U-0E0A;\U-0E37;\U-0E48;\U-0E2D;">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "\U-0E2A;\U-0E32;\U-0E23;\U-0E30;\U-0E2A;\U-0E33;\U-0E04;\U-0E31;\U-0E0D;">
+<!ENTITY refsynopsisdiv  "\U-0E2A;\U-0E32;\U-0E23;\U-0E30;\U-0E2A;\U-0E33;\U-0E04;\U-0E31;\U-0E0D;">
+<!ENTITY RevHistory      "\U-0E1A;\U-0E31;\U-0E19;\U-0E17;\U-0E36;\U-0E01;\U-0E23;\U-0E38;\U-0E48;\U-0E19;">
+<!ENTITY revhistory      "\U-0E1A;\U-0E31;\U-0E19;\U-0E17;\U-0E36;\U-0E01;\U-0E23;\U-0E38;\U-0E48;\U-0E19;">
+<!ENTITY revision        "\U-0E23;\U-0E38;\U-0E48;\U-0E19;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY Revision        "\U-0E23;\U-0E38;\U-0E48;\U-0E19;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY sect1           "\U-0E15;\U-0E2D;\U-0E19;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY sect2           "\U-0E15;\U-0E2D;\U-0E19;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY sect3           "\U-0E15;\U-0E2D;\U-0E19;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY sect4           "\U-0E15;\U-0E2D;\U-0E19;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY sect5           "\U-0E15;\U-0E2D;\U-0E19;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY section         "\U-0E15;\U-0E2D;\U-0E19;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY Section         "\U-0E15;\U-0E2D;\U-0E19;\U-0E17;\U-0E35;\U-0E48;">
+<!ENTITY See             "\U-0E14;\U-0E39;">
+<!ENTITY see             "\U-0E14;\U-0E39;">
+<!ENTITY SeeAlso         "\U-0E14;\U-0E39;\U-0E40;\U-0E1E;\U-0E34;\U-0E48;\U-0E21;\U-0E40;\U-0E15;\U-0E34;\U-0E21;">
+<!ENTITY seealso         "\U-0E14;\U-0E39;\U-0E40;\U-0E1E;\U-0E34;\U-0E48;\U-0E21;\U-0E40;\U-0E15;\U-0E34;\U-0E21;">
+<!ENTITY Seealso         "\U-0E14;\U-0E39;\U-0E40;\U-0E1E;\U-0E34;\U-0E48;\U-0E21;\U-0E40;\U-0E15;\U-0E34;\U-0E21;">
+<!ENTITY set             "\U-0E0A;\U-0E38;\U-0E14;">
+<!ENTITY Set             "\U-0E0A;\U-0E38;\U-0E14;">
+<!ENTITY setindex        "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E0A;\U-0E38;\U-0E14;">
+<!ENTITY SetIndex        "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E0A;\U-0E38;\U-0E14;">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "sidebar">
+<!ENTITY step            "\U-0E25;\U-0E33;\U-0E14;\U-0E31;\U-0E1A;">
+<!ENTITY Step            "\U-0E25;\U-0E33;\U-0E14;\U-0E31;\U-0E1A;">
+<!ENTITY Table           "\U-0E15;\U-0E32;\U-0E23;\U-0E32;\U-0E07;">
+<!ENTITY table           "\U-0E15;\U-0E32;\U-0E23;\U-0E32;\U-0E07;">
+<!ENTITY tip             "\U-0E04;\U-0E33;\U-0E41;\U-0E19;\U-0E30;\U-0E19;\U-0E33;">
+<!ENTITY TIP             "\U-0E04;\U-0E33;\U-0E41;\U-0E19;\U-0E30;\U-0E19;\U-0E33;">
+<!ENTITY Tip             "\U-0E04;\U-0E33;\U-0E41;\U-0E19;\U-0E30;\U-0E19;\U-0E33;">
+<!ENTITY Warning         "\U-0E42;\U-0E1B;\U-0E23;\U-0E14;\U-0E23;\U-0E30;\U-0E27;\U-0E31;\U-0E07;">
+<!ENTITY warning         "\U-0E42;\U-0E1B;\U-0E23;\U-0E14;\U-0E23;\U-0E30;\U-0E27;\U-0E31;\U-0E07;">
+<!ENTITY WARNING         "\U-0E42;\U-0E1B;\U-0E23;\U-0E14;\U-0E23;\U-0E30;\U-0E27;\U-0E31;\U-0E07;">
+<!ENTITY and             "\U-0E41;\U-0E25;\U-0E30;">
+<!ENTITY by              "\U-0E42;\U-0E14;\U-0E22;">
+<!ENTITY Edited          "\U-0E40;\U-0E23;\U-0E35;\U-0E22;\U-0E1A;\U-0E40;\U-0E23;\U-0E35;\U-0E22;\U-0E07;">
+<!ENTITY edited          "\U-0E40;\U-0E23;\U-0E35;\U-0E22;\U-0E1A;\U-0E40;\U-0E23;\U-0E35;\U-0E22;\U-0E07;">
+<!ENTITY Editedby        "\U-0E40;\U-0E23;\U-0E35;\U-0E22;\U-0E1A;\U-0E40;\U-0E23;\U-0E35;\U-0E22;\U-0E07;\U-0E42;\U-0E14;\U-0E1A;">
+<!ENTITY editedby        "\U-0E40;\U-0E23;\U-0E35;\U-0E22;\U-0E1A;\U-0E40;\U-0E23;\U-0E35;\U-0E22;\U-0E07;\U-0E42;\U-0E14;\U-0E1A;">
+<!ENTITY in              "\U-0E43;\U-0E19;">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "\U-0E44;\U-0E21;\U-0E48;\U-0E1E;\U-0E1A;\U-0E2A;\U-0E48;\U-0E27;\U-0E19;\U-0E17;\U-0E35;\U-0E48;\U-0E15;\U-0E49;\U-0E2D;\U-0E07;\U-0E01;\U-0E32;\U-0E23;">
+<!ENTITY notes           "\U-0E2B;\U-0E21;\U-0E32;\U-0E22;\U-0E40;\U-0E2B;\U-0E15;\U-0E38;">
+<!ENTITY Notes           "\U-0E2B;\U-0E21;\U-0E32;\U-0E22;\U-0E40;\U-0E2B;\U-0E15;\U-0E38;">
+<!ENTITY Pgs             "\U-0E2B;\U-0E19;\U-0E49;\U-0E32;">
+<!ENTITY pgs             "\U-0E2B;\U-0E19;\U-0E49;\U-0E32;">
+<!ENTITY Revisedby       "\U-0E41;\U-0E01;\U-0E49;\U-0E44;\U-0E02;\U-0E1B;\U-0E23;\U-0E31;\U-0E1A;\U-0E1B;\U-0E23;\U-0E38;\U-0E07;\U-0E42;\U-0E14;\U-0E22;: ">
+<!ENTITY revisedby       "\U-0E41;\U-0E01;\U-0E49;\U-0E44;\U-0E02;\U-0E1B;\U-0E23;\U-0E31;\U-0E1A;\U-0E1B;\U-0E23;\U-0E38;\U-0E07;\U-0E42;\U-0E14;\U-0E22;: ">
+<!ENTITY TableNotes      "\U-0E2B;\U-0E21;\U-0E32;\U-0E22;\U-0E40;\U-0E2B;\U-0E15;\U-0E38;">
+<!ENTITY tablenotes      "\U-0E2B;\U-0E21;\U-0E32;\U-0E22;\U-0E40;\U-0E2B;\U-0E15;\U-0E38;">
+<!ENTITY TableofContents "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;">
+<!ENTITY tableofcontents "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;">
+<!ENTITY unexpectedelementname "\U-0E1E;\U-0E1A;\U-0E2A;\U-0E48;\U-0E27;\U-0E19;\U-0E17;\U-0E35;\U-0E48;\U-0E44;\U-0E21;\U-0E48;\U-0E15;\U-0E49;\U-0E2D;\U-0E07;\U-0E01;\U-0E32;\U-0E23;">
+<!ENTITY unsupported     "\U-0E44;\U-0E21;\U-0E48;\U-0E2A;\U-0E19;\U-0E31;\U-0E1A;\U-0E2A;\U-0E19;\U-0E38;\U-0E19;">
+<!ENTITY xrefto          "xref to">
+<!ENTITY listofequations "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E2A;\U-0E21;\U-0E01;\U-0E32;\U-0E23;">
+<!ENTITY ListofEquations "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E2A;\U-0E21;\U-0E01;\U-0E32;\U-0E23;">
+<!ENTITY ListofExamples  "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E15;\U-0E31;\U-0E27;\U-0E2D;\U-0E22;\U-0E48;\U-0E32;\U-0E07;">
+<!ENTITY listofexamples  "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E15;\U-0E31;\U-0E27;\U-0E2D;\U-0E22;\U-0E48;\U-0E32;\U-0E07;">
+<!ENTITY ListofFigures   "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E23;\U-0E39;\U-0E1B;">
+<!ENTITY listoffigures   "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E23;\U-0E39;\U-0E1B;">
+<!ENTITY listoftables    "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E15;\U-0E32;\U-0E23;\U-0E32;\U-0E07;">
+<!ENTITY ListofTables    "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E15;\U-0E32;\U-0E23;\U-0E32;\U-0E07;">
+<!ENTITY ListofUnknown   "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E2D;\U-0E37;\U-0E48;\U-0E19; \U-0E46;">
+<!ENTITY listofunknown   "\U-0E2A;\U-0E32;\U-0E23;\U-0E1A;\U-0E31;\U-0E0D;\U-0E2D;\U-0E37;\U-0E48;\U-0E19; \U-0E46;">
+<!ENTITY nav-home        "\U-0E2B;\U-0E19;\U-0E49;\U-0E32;\U-0E41;\U-0E23;\U-0E01;">
+<!ENTITY nav-next        "\U-0E15;\U-0E48;\U-0E2D;\U-0E44;\U-0E1B;">
+<!ENTITY nav-next-sibling "\U-0E15;\U-0E48;\U-0E2D;\U-0E44;\U-0E1B;">
+<!ENTITY nav-prev        "\U-0E01;\U-0E48;\U-0E2D;\U-0E19;\U-0E2B;\U-0E19;\U-0E49;\U-0E32;">
+<!ENTITY nav-prev-sibling "\U-0E01;\U-0E48;\U-0E2D;\U-0E19;\U-0E2B;\U-0E19;\U-0E49;\U-0E32;">
+<!ENTITY nav-up          "\U-0E01;\U-0E25;\U-0E31;\U-0E1A;">
+<!ENTITY sectioncalled   "\U-0E15;\U-0E2D;\U-0E19;\U-0E19;\U-0E35;\U-0E49;\U-0E40;\U-0E49;\U-0E23;\U-0E35;\U-0E22;\U-0E01;\U-0E27;\U-0E48;\U-0E32;">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1tr.dsl b/common/dbl1tr.dsl
new file mode 100644 (file)
index 0000000..8351218
--- /dev/null
@@ -0,0 +1,443 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % tr.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//TR"
+         "dbl1tr.ent">
+%tr.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-tr">
+<style-specification-body>
+
+;; $Id: dbl1tr.dsl,v 1.2 2002/06/06 13:19:30 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; Modified for Turkish by Baurjan Ismagulov, ibr@gantek.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (tr-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (tr-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-tr-start-quote%
+                                                      "%t"
+                                                      %gentext-tr-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-tr-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (tr-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (tr-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-tr-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (tr-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&ISBN;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-tr-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (tr-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-tr-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-tr-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the separator to be inserted
+;; between multiple occurrences of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-tr-intra-label-sep)
+  (list))
+
+(define (tr-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-tr-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-tr-intra-label-sep)))
+        (sep    (assoc name (tr-intra-label-sep))))
+    (if lsep
+       (car (cdr lsep))
+       (if sep
+           (car (cdr sep))
+           ""))))
+
+;; gentext-label-title-sep returns the separator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-tr-label-title-sep)
+  (list))
+
+(define (tr-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-tr-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (sep    (assoc name (tr-label-title-sep))))
+    (if sep
+       (car (cdr sep))
+       "")))
+
+(define (tr-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (tr-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (tr-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (tr-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-tr$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (tr-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-tr-start-quote% (dingbat "ldquo"))
+
+(define %gentext-tr-end-quote% (dingbat "rdquo"))
+
+(define %gentext-tr-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-tr-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-tr-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-tr-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-tr-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-tr-page% "")
+
+(define %gentext-tr-and% "&and;")
+
+(define %gentext-tr-listcomma% "&listcomma;")
+
+(define %gentext-tr-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-tr-bibl-pages% "&Pgs;")
+
+(define %gentext-tr-endnotes% "&Notes;")
+
+(define %gentext-tr-table-endnotes% "&TableNotes;:")
+
+(define %gentext-tr-index-see% "&See;")
+
+(define %gentext-tr-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-tr-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-tr-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-tr-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-tr-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-tr-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-tr-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1tr.ent b/common/dbl1tr.ent
new file mode 100644 (file)
index 0000000..a8c79f8
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-00D6;zet">
+<!ENTITY abstract        "\U-00D6;zet">
+<!ENTITY Answer          "Cevap:">
+<!ENTITY answer          "Cevap:">
+<!ENTITY Appendix        "Ek">
+<!ENTITY appendix        "ek">
+<!ENTITY Article         "Makale">
+<!ENTITY article         "Makale">
+<!ENTITY Bibliography    "Kaynak\U-00E7;a">
+<!ENTITY bibliography    "Kaynak\U-00E7;a">
+<!ENTITY Book            "Kitap">
+<!ENTITY book            "Kitap">
+<!ENTITY CAUTION         "D\U-0130;KKAT">
+<!ENTITY Caution         "Dikkat">
+<!ENTITY caution         "Dikkat">
+<!ENTITY Chapter         "B\U-00F6;l\U-00FC;m">
+<!ENTITY chapter         "b\U-00F6;l\U-00FC;m">
+<!ENTITY Colophon        "Kitap hakk\U-0131;nda">
+<!ENTITY colophon        "Kitap hakk\U-0131;nda">
+<!ENTITY Copyright       "Telif Hakk\U-0131;">
+<!ENTITY copyright       "Telif Hakk\U-0131;">
+<!ENTITY Dedication      "\U-0130;thaf">
+<!ENTITY dedication      "\U-0130;thaf">
+<!ENTITY Edition         "Bask\U-0131;">
+<!ENTITY edition         "Bask\U-0131;">
+<!ENTITY Equation        "Denklem">
+<!ENTITY equation        "Denklem">
+<!ENTITY Example         "\U-00D6;rnek">
+<!ENTITY example         "\U-00D6;rnek">
+<!ENTITY Figure          "\U-015E;ekil">
+<!ENTITY figure          "\U-015E;ekil">
+<!ENTITY Glossary        "S\U-00F6;zl\U-00FC;k">
+<!ENTITY glossary        "S\U-00F6;zl\U-00FC;k">
+<!ENTITY GlossSee        "Bkz.">
+<!ENTITY glosssee        "Bkz.">
+<!ENTITY GlossSeeAlso    "Bkz.">
+<!ENTITY glossseealso    "Bkz.">
+<!ENTITY IMPORTANT       "\U-00D6;NEML\U-0130;">
+<!ENTITY important       "\U-00D6;nemli">
+<!ENTITY Important       "\U-00D6;nemli">
+<!ENTITY Index           "Dizin">
+<!ENTITY index           "Dizin">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "Yasal Uyar\U-0131;">
+<!ENTITY legalnotice     "Yasal Uyar\U-0131;">
+<!ENTITY MsgAud          "Hedef Okuyucu">
+<!ENTITY msgaud          "Hedef Okuyucu">
+<!ENTITY MsgLevel        "Level">
+<!ENTITY msglevel        "D\U-00FC;zey">
+<!ENTITY MsgOrig         "D\U-00FC;zey">
+<!ENTITY msgorig         "Kaynak">
+<!ENTITY NOTE            "NOT">
+<!ENTITY Note            "Not">
+<!ENTITY note            "Not">
+<!ENTITY Part            "K\U-0131;s\U-0131;m">
+<!ENTITY part            "K\U-0131;s\U-0131;m">
+<!ENTITY Preface         "\U-00D6;ns\U-00F6;z">
+<!ENTITY preface         "\U-00D6;ns\U-00F6;z">
+<!ENTITY Procedure       "Y\U-00F6;nerge">
+<!ENTITY procedure       "Y\U-00F6;nerge">
+<!ENTITY ProductionSet   "Prod\U-00FC;ksiyon">
+<!ENTITY PubDate         "Yay\U-0131;mlanma Tarihi">
+<!ENTITY pubdate         "Yay\U-0131;mlanma Tarihi">
+<!ENTITY Published       "Yay\U-0131;mlanma">
+<!ENTITY published       "Yay\U-0131;mlanma">
+<!ENTITY Qandadiv        "S ve C">
+<!ENTITY qandadiv        "S ve C">
+<!ENTITY Question        "Soru:">
+<!ENTITY question        "Soru:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Referans">
+<!ENTITY reference       "Referans">
+<!ENTITY RefName         "Referans Ad\U-0131;">
+<!ENTITY refname         "Referans Ad\U-0131;">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Synopsis">
+<!ENTITY refsynopsisdiv  "Synopsis">
+<!ENTITY RevHistory      "Bask\U-0131; Tarih\U-00E7;esi">
+<!ENTITY revhistory      "Bask\U-0131; Tarih\U-00E7;esi">
+<!ENTITY revision        "Bask\U-0131;">
+<!ENTITY Revision        "Bask\U-0131;">
+<!ENTITY sect1           "K\U-0131;s\U-0131;m">
+<!ENTITY sect2           "K\U-0131;s\U-0131;m">
+<!ENTITY sect3           "K\U-0131;s\U-0131;m">
+<!ENTITY sect4           "K\U-0131;s\U-0131;m">
+<!ENTITY sect5           "K\U-0131;s\U-0131;m">
+<!ENTITY section         "K\U-0131;s\U-0131;m">
+<!ENTITY Section         "K\U-0131;s\U-0131;m">
+<!ENTITY see             "Bkz.">
+<!ENTITY See             "Bkz.">
+<!ENTITY seealso         "Bkz.">
+<!ENTITY Seealso         "Bak\U-0131;n\U-0131;z">
+<!ENTITY SeeAlso         "Bak\U-0131;n\U-0131;z">
+<!ENTITY set             "Tak\U-0131;m">
+<!ENTITY Set             "Tak\U-0131;m">
+<!ENTITY setindex        "Tak\U-0131;m Dizini">
+<!ENTITY SetIndex        "Tak\U-0131;m Dizini">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "">
+<!ENTITY step            "ad\U-0131;m">
+<!ENTITY Step            "Ad\U-0131;m">
+<!ENTITY Table           "Tablo">
+<!ENTITY table           "Tablo">
+<!ENTITY tip             "\U-0130;pucu">
+<!ENTITY TIP             "\U-0130;PUCU">
+<!ENTITY Tip             "\U-0130;pucu">
+<!ENTITY Warning         "Uyar\U-0131;">
+<!ENTITY warning         "Uyar\U-0131;">
+<!ENTITY WARNING         "UYARI">
+<!ENTITY and             "ve">
+<!ENTITY by              "">
+<!ENTITY called          "">
+<!ENTITY Edited          "Yay\U-0131;na haz\U-0131;rlayan">
+<!ENTITY edited          "yay\U-0131;na haz\U-0131;rlayan">
+<!ENTITY Editedby        "Yay\U-0131;na haz\U-0131;rlayan">
+<!ENTITY editedby        "yay\U-0131;na haz\U-0131;rlayan">
+<!ENTITY in              "">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "varolmayan eleman">
+<!ENTITY notes           "Notlar">
+<!ENTITY Notes           "Notlar">
+<!ENTITY Pgs             "Sayfa">
+<!ENTITY pgs             "Sayfa">
+<!ENTITY Revisedby       "D\U-00FC;zeltmeler: ">
+<!ENTITY revisedby       "D\U-00FC;zeltmeler: ">
+<!ENTITY TableNotes      "Notlar">
+<!ENTITY tablenotes      "Notlar">
+<!ENTITY the             "">
+<!ENTITY TableofContents "\U-0130;\U-00E7;indekiler">
+<!ENTITY tableofcontents "\U-0130;\U-00E7;indekiler">
+<!ENTITY unexpectedelementname "Beklenmeyen eleman ad\U-0131;">
+<!ENTITY unsupported     "desteklenmiyor">
+<!ENTITY xrefto          "">
+<!ENTITY listofequations "Denklemler">
+<!ENTITY ListofEquations "Denklemler">
+<!ENTITY ListofExamples  "\U-00D6;rnekler">
+<!ENTITY listofexamples  "\U-00D6;rnekler">
+<!ENTITY ListofFigures   "\U-015E;ekiller">
+<!ENTITY listoffigures   "\U-015E;ekiller">
+<!ENTITY listoftables    "Tablolar">
+<!ENTITY ListofTables    "Tablolar">
+<!ENTITY ListofProcedures "Y\U-00F6;nergeler">
+<!ENTITY listofprocedures "Y\U-00F6;nergeler">
+<!ENTITY ListofUnknown   "Bilinmeyenler">
+<!ENTITY listofunknown   "Bilinmeyenler">
+<!ENTITY nav-home        "Ba\U-015F;lang\U-0131;\U-00E7;">
+<!ENTITY nav-next        "Sonraki">
+<!ENTITY nav-next-sibling "Sonraki B\U-00F6;l\U-00FC;m">
+<!ENTITY nav-prev        "\U-00D6;nceki">
+<!ENTITY nav-prev-sibling "\U-00D6;nceki B\U-00F6;l\U-00FC;m">
+<!ENTITY nav-up          "Yukar\U-0131;">
+<!ENTITY nav-toc         "\U-0130;\U-00E7;indekiler">
+<!ENTITY sectioncalled   "">
+<!ENTITY Draft           "Taslak">
+<!ENTITY above           "\U-00FC;st\U-00FC;nde">
+<!ENTITY below           "alt\U-0131;nda">
+<!ENTITY lowercase.alpha "abc\U-00E7;defg\U-011F;h\U-0131;ijklmno\U-00F6;prs\U-015F;tu\U-00FC;vyz">
+<!ENTITY uppercase.alpha "ABC\U-00C7;DEFG\U-011E;HI\U-0130;JKLMNO\U-00D6;PRS\U-015E;TU\U-00DC;VYZ">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "3">
+<!ENTITY hyphenation-remain-character-count "2">
diff --git a/common/dbl1uk.dsl b/common/dbl1uk.dsl
new file mode 100644 (file)
index 0000000..2c92f2c
--- /dev/null
@@ -0,0 +1,444 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % uk.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//UK"
+         "dbl1uk.ent">
+%uk.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-uk">
+<style-specification-body>
+
+;; $Id: dbl1uk.dsl,v 1.1 2001/11/14 20:57:53 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (uk-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (uk-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-uk-start-quote%
+                                                      "%t"
+                                                      %gentext-uk-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-uk-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (uk-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (uk-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-uk-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (uk-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-uk-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (uk-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-uk-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-uk-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-uk-intra-label-sep)
+  (list))
+
+(define (uk-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-uk-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-uk-intra-label-sep)))
+        (sep    (assoc name (uk-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-uk-label-title-sep)
+  (list))
+
+(define (uk-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-uk-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-uk-label-title-sep)))
+        (sep    (assoc name (uk-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (uk-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (uk-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (uk-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (uk-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-uk$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (uk-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-uk-start-quote% (dingbat "ldquo"))
+
+(define %gentext-uk-end-quote% (dingbat "rdquo"))
+
+(define %gentext-uk-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-uk-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-uk-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-uk-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-uk-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-uk-page% "")
+
+(define %gentext-uk-and% "&and;")
+
+(define %gentext-uk-listcomma% "&listcomma;")
+
+(define %gentext-uk-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-uk-bibl-pages% "&Pgs;")
+
+(define %gentext-uk-endnotes% "&Notes;")
+
+(define %gentext-uk-table-endnotes% "&TableNotes;:")
+
+(define %gentext-uk-index-see% "&See;")
+
+(define %gentext-uk-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-uk-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-uk-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-uk-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-uk-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-uk-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-uk-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1uk.ent b/common/dbl1uk.ent
new file mode 100644 (file)
index 0000000..330357e
--- /dev/null
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-0410;\U-043D;\U-043E;\U-0442;\U-0430;\U-0446;\U-0456;\U-044F;">
+<!ENTITY abstract        "\U-0410;\U-043D;\U-043E;\U-0442;\U-0430;\U-0446;\U-0456;\U-044F;">
+<!ENTITY Answer          "\U-0412;:">
+<!ENTITY answer          "\U-0432;:">
+<!ENTITY Appendix        "\U-0414;\U-043E;\U-0434;\U-0430;\U-0442;\U-043E;\U-043A;">
+<!ENTITY appendix        "\U-0434;\U-043E;\U-0434;\U-0430;\U-0442;\U-043E;\U-043A;">
+<!ENTITY Appendix.abr    "\U-0414;\U-043E;\U-0434;.">
+<!ENTITY appendix.abr    "\U-0434;\U-043E;\U-0434;.">
+<!ENTITY Article         "\U-0421;\U-0442;\U-0430;\U-0442;\U-0442;\U-044F;">
+<!ENTITY article         "\U-0441;\U-0442;\U-0430;\U-0442;\U-0442;\U-044F;">
+<!ENTITY Audience        "\U-0410;\U-0443;\U-0434;\U-0438;\U-0442;\U-043E;\U-0440;\U-0456;\U-044F;">
+<!ENTITY audience        "\U-0410;\U-0443;\U-0434;\U-0438;\U-0442;\U-043E;\U-0440;\U-0456;\U-044F;">
+<!ENTITY Bibliography    "\U-041B;\U-0438;\U-0442;\U-0435;\U-0440;\U-0430;\U-0442;\U-0443;\U-0440;\U-0430;">
+<!ENTITY bibliography    "\U-043B;\U-0438;\U-0442;\U-0435;\U-0440;\U-0430;\U-0442;\U-0443;\U-0440;\U-0430;">
+<!ENTITY Book            "\U-041A;\U-043D;\U-0438;\U-0433;\U-0430;">
+<!ENTITY book            "\U-043A;\U-043D;\U-0438;\U-0433;\U-0430;">
+<!ENTITY CAUTION         "\U-0417;\U-0410;\U-0421;\U-0422;\U-0415;\U-0420;\U-0415;\U-0416;\U-0415;\U-041D;\U-041D;\U-042F;">
+<!ENTITY Caution         "\U-0417;\U-0430;\U-0441;\U-0442;\U-0435;\U-0440;\U-0435;\U-0436;\U-0435;\U-043D;\U-043D;\U-044F;">
+<!ENTITY caution         "\U-0437;\U-0430;\U-0441;\U-0442;\U-0435;\U-0440;\U-0435;\U-0436;\U-0435;\U-043D;\U-043D;\U-044F;">
+<!ENTITY Chapter         "\U-0420;\U-043E;\U-0437;\U-0434;\U-0456;\U-043B;">
+<!ENTITY chapter         "\U-0440;\U-043E;\U-0437;\U-0434;\U-0456;\U-043B;">
+<!ENTITY Chapter.abr     "\U-0420;\U-043E;\U-0437;\U-0434;.">
+<!ENTITY chapter.abr     "\U-0440;\U-043E;\U-0437;\U-0434;.">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "\U-0410;\U-0432;\U-0442;\U-043E;\U-0440;\U-0441;\U-044C;\U-043A;\U-0435; \U-043F;\U-0440;\U-0430;\U-0432;\U-043E;">
+<!ENTITY copyright       "\U-0430;\U-0432;\U-0442;\U-043E;\U-0440;\U-0441;\U-044C;\U-043A;\U-0435; \U-043F;\U-0440;\U-0430;\U-0432;\U-043E;">
+<!ENTITY Dedication      "\U-041F;\U-0440;\U-0438;\U-0441;\U-0432;\U-044F;\U-0447;\U-0435;\U-043D;\U-043D;\U-044F;">
+<!ENTITY dedication      "\U-043F;\U-0440;\U-0438;\U-0441;\U-0432;\U-044F;\U-0447;\U-0435;\U-043D;\U-043D;\U-044F;">
+<!ENTITY Edition         "\U-0412;\U-0438;\U-0434;\U-0430;\U-043D;\U-043D;\U-044F;">
+<!ENTITY edition         "\U-0432;\U-0438;\U-0434;\U-0430;\U-043D;\U-043D;\U-044F;">
+<!ENTITY Equation        "\U-0424;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;\U-0430;">
+<!ENTITY equation        "\U-0424;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;\U-0430;">
+<!ENTITY Equation.abr    "\U-0424;.">
+<!ENTITY equation.abr    "\U-0424;.">
+<!ENTITY Example         "\U-041F;\U-0440;\U-0438;\U-043A;\U-043B;\U-0430;\U-0434;">
+<!ENTITY example         "\U-043F;\U-0440;\U-0438;\U-043A;\U-043B;\U-0430;\U-0434;">
+<!ENTITY Example.abr     "\U-041F;\U-0440;\U-0438;\U-043A;\U-043B;.">
+<!ENTITY example.abr     "\U-043F;\U-0440;\U-0438;\U-043A;\U-043B;.">
+<!ENTITY Figure          "\U-0420;\U-0438;\U-0441;\U-0443;\U-043D;\U-043E;\U-043A;">
+<!ENTITY figure          "\U-0420;\U-0438;\U-0441;\U-0443;\U-043D;\U-043E;\U-043A;">
+<!ENTITY Figure.abr      "\U-0420;\U-0438;\U-0441;.">
+<!ENTITY figure.abr      "\U-0420;\U-0438;\U-0441;.">
+<!ENTITY Glossary        "\U-0413;\U-043B;\U-043E;\U-0441;\U-0430;\U-0440;\U-0456;\U-0439;">
+<!ENTITY glossary        "\U-0433;\U-043B;\U-043E;\U-0441;\U-0430;\U-0440;\U-0456;\U-0439;">
+<!ENTITY GlossSee        "\U-0414;\U-0438;\U-0432;.">
+<!ENTITY glosssee        "\U-0434;\U-0438;\U-0432;.">
+<!ENTITY GlossSeeAlso    "\U-0414;\U-0438;\U-0432;. \U-0442;\U-0430;\U-043A;\U-043E;\U-0436;">
+<!ENTITY glossSeeAlso    "\U-0434;\U-0438;\U-0432;. \U-0442;\U-0430;\U-043A;\U-043E;\U-0436;">
+<!ENTITY glossseealso    "\U-0434;\U-0438;\U-0432;. \U-0442;\U-0430;\U-043A;\U-043E;\U-0436;">
+<!ENTITY IMPORTANT       "\U-0412;\U-0410;\U-0416;\U-041B;\U-0418;\U-0412;\U-041E;">
+<!ENTITY Important       "\U-0412;\U-0430;\U-0436;\U-043B;\U-0438;\U-0432;\U-043E;">
+<!ENTITY important       "\U-0432;\U-0430;\U-0436;\U-043B;\U-0438;\U-0432;\U-043E;">
+<!ENTITY Index           "\U-041F;\U-0440;\U-0435;\U-0434;\U-043C;\U-0435;\U-0442;\U-043D;\U-044B;\U-0439; \U-043F;\U-043E;\U-043A;\U-0430;\U-0436;chcy;\U-0438;\U-043A;">
+<!ENTITY index           "\U-043F;\U-0440;\U-0435;\U-0434;\U-043C;\U-0435;\U-0442;\U-043D;\U-044B;\U-0439; \U-043F;\U-043E;\U-043A;\U-0430;\U-0436;chcy;\U-0438;\U-043A;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "\U-041F;\U-0440;\U-0430;\U-0432;\U-043E;\U-0432;\U-0430; \U-043F;\U-0440;\U-0438;\U-043C;\U-0456;\U-0442;\U-043A;\U-0430;">
+<!ENTITY legalnotice     "\U-043F;\U-0440;\U-0430;\U-0432;\U-043E;\U-0432;\U-0430; \U-043F;\U-0440;\U-0438;\U-043C;\U-0456;\U-0442;\U-043A;\U-0430;">
+<!ENTITY Level           "\U-0420;\U-0456;\U-0432;\U-0435;\U-043D;\U-044C;">
+<!ENTITY level           "\U-0440;\U-0456;\U-0432;\U-0435;\U-043D;\U-044C;">
+<!ENTITY MsgAud          "\U-0410;\U-0443;\U-0434;\U-0438;\U-0442;\U-043E;\U-0440;\U-0456;\U-044F;">
+<!ENTITY msgaud          "\U-0430;\U-0443;\U-0434;\U-0438;\U-0442;\U-043E;\U-0440;\U-0456;\U-044F;">
+<!ENTITY MsgLevel        "\U-0420;\U-0456;\U-0432;\U-0435;\U-043D;\U-044C;">
+<!ENTITY msglevel        "\U-0440;\U-0456;\U-0432;\U-0435;\U-043D;\U-044C;">
+<!ENTITY MsgOrig         "\U-0414;\U-0436;\U-0435;\U-0440;\U-0435;\U-043B;\U-043E;">
+<!ENTITY msgorig         "\U-0434;\U-0436;\U-0435;\U-0440;\U-0435;\U-043B;\U-043E;">
+<!ENTITY Name            "\U-0406;\U-043C;';\U-044F;">
+<!ENTITY name            "\U-0456;\U-043C;';\U-044F;">
+<!ENTITY NOTE            "\U-041F;\U-0420;\U-0418;\U-041C;\U-0406;\U-0422;\U-041A;\U-0410;">
+<!ENTITY Note            "\U-041F;\U-0440;\U-0438;\U-043C;\U-0456;\U-0442;\U-043A;\U-0430;">
+<!ENTITY note            "\U-043F;\U-0440;\U-0438;\U-043C;\U-0456;\U-0442;\U-043A;\U-0430;">
+<!ENTITY Origin          "\U-0414;\U-0436;\U-0435;\U-0440;\U-0435;\U-043B;\U-043E;">
+<!ENTITY origin          "\U-0434;\U-0436;\U-0435;\U-0440;\U-0435;\U-043B;\U-043E;">
+<!ENTITY Part            "\U-0427;\U-0430;\U-0441;\U-0442;\U-0438;\U-043D;\U-0430;">
+<!ENTITY part            "\U-0447;\U-0430;\U-0441;\U-0442;\U-0438;\U-043D;\U-0430;">
+<!ENTITY Part.abr        "\U-0427;.">
+<!ENTITY part.abr        "\U-0427;.">
+<!ENTITY Preface         "\U-041F;\U-0435;\U-0440;\U-0435;\U-0434;\U-043C;\U-043E;\U-0432;\U-0430;">
+<!ENTITY preface         "\U-043F;\U-0435;\U-0440;\U-0435;\U-0434;\U-043C;\U-043E;\U-0432;\U-0430;">
+<!ENTITY Procedure       "\U-041F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY procedure       "\U-041F;\U-0440;\U-043E;\U-0446;\U-0435;\U-0434;\U-0443;\U-0440;\U-0430;">
+<!ENTITY Procedure.abr   "\U-041F;\U-0440;\U-043E;\U-0446;.">
+<!ENTITY procedure.abr   "\U-041F;\U-0440;\U-043E;\U-0446;.">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "\U-041E;\U-043F;\U-0443;\U-0431;\U-043B;\U-0456;\U-043A;\U-043E;\U-0432;\U-0430;\U-043D;\U-043E;">
+<!ENTITY published       "\U-043E;\U-043F;\U-0443;\U-0431;\U-043B;\U-0456;\U-043A;\U-043E;\U-0432;\U-0430;\U-043D;\U-043E;">
+<!ENTITY Question        "\U-041F;">
+<!ENTITY question        "\U-043F;">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "\U-041F;\U-043E;\U-0441;\U-0438;\U-043B;\U-0430;\U-043D;\U-043D;\U-044F;">
+<!ENTITY reference       "\U-043F;\U-043E;\U-0441;\U-0438;\U-043B;\U-0430;\U-043D;\U-043D;\U-044F;">
+<!ENTITY RefName         "Name">
+<!ENTITY refname         "Name">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "\U-041A;\U-043E;\U-0440;\U-043E;\U-0442;\U-043A;\U-0438;\U-0439; \U-043E;\U-0433;\U-043B;\U-044F;\U-0434;">
+<!ENTITY refsynopsisdiv  "\U-043A;\U-043E;\U-0440;\U-043E;\U-0442;\U-043A;\U-0438;\U-0439; \U-043E;\U-0433;\U-043B;\U-044F;\U-0434;">
+<!ENTITY RevHistory      "\U-041E;\U-043F;\U-0438;\U-0441; zcy;\U-043C;\U-0456;\U-043D;">
+<!ENTITY revhistory      "\U-043E;\U-043F;\U-0438;\U-0441; zcy;\U-043C;\U-0456;\U-043D;">
+<!ENTITY Revision        "\U-041F;\U-0435;\U-0440;\U-0435;\U-0433;\U-043B;\U-044F;\U-0434;">
+<!ENTITY revision        "\U-043F;\U-0435;\U-0440;\U-0435;\U-0433;\U-043B;\U-044F;\U-0434;">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "\U-041F;\U-0430;\U-0440;\U-0430;\U-0433;\U-0440;\U-0430;\U-0444;">
+<!ENTITY section         "\U-043F;\U-0430;\U-0440;\U-0430;\U-0433;\U-0440;\U-0430;\U-0444;">
+<!ENTITY Section.abr     "\U-041F;\U-0430;\U-0440;.">
+<!ENTITY section.abr     "\U-043F;\U-0430;\U-0440;.">
+<!ENTITY See             "\U-0414;\U-0438;\U-0432;.">
+<!ENTITY see             "\U-0434;\U-0438;\U-0432;.">
+<!ENTITY SeeAlso         "\U-0414;\U-0438;\U-0432;. tcy;\U-0430;\U-043A;\U-043E;\U-0436;">
+<!ENTITY Seealso         "\U-0414;\U-0438;\U-0432;. tcy;\U-0430;\U-043A;\U-043E;\U-0436;">
+<!ENTITY seealso         "\U-0441;\U-0438;\U-0432;. tcy;\U-0430;\U-043A;\U-043E;\U-0436;">
+<!ENTITY Set             "\U-0412;\U-0438;\U-0431;\U-0456;\U-0440;\U-043A;\U-0430;">
+<!ENTITY set             "\U-0432;\U-0438;\U-0431;\U-0456;\U-0440;\U-043A;\U-0430;">
+<!ENTITY SetIndex        "\U-0418;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441; \U-0432;\U-0438;\U-0431;\U-0456;\U-0440;\U-043A;\U-0438;">
+<!ENTITY setindex        "\U-0438;\U-043D;\U-0434;\U-0435;\U-043A;\U-0441; \U-0432;\U-0438;\U-0431;\U-0456;\U-0440;\U-043A;\U-0438;">
+<!ENTITY Sidebar         "\U-0412;\U-044B;\U-0434;\U-0456;\U-043B;\U-0435;\U-043D;\U-043D;\U-044F;">
+<!ENTITY sidebar         "\U-0432;\U-044B;\U-0434;\U-0456;\U-043B;\U-0435;\U-043D;\U-043D;\U-044F;">
+<!ENTITY Step            "\U-041A;\U-0440;\U-043E;\U-043A;">
+<!ENTITY step            "\U-043A;\U-0440;\U-043E;\U-043A;">
+<!ENTITY Table           "\U-0422;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;\U-044F;">
+<!ENTITY table           "\U-0442;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;\U-044F;">
+<!ENTITY Table.abr       "\U-0422;\U-0430;\U-0431;\U-043B;.">
+<!ENTITY table.abr       "\U-0442;\U-0430;\U-0431;\U-043B;.">
+<!ENTITY TIP             "\U-041F;\U-0406;\U-0414;\U-041A;\U-0410;\U-0417;\U-041A;\U-0410;">
+<!ENTITY Tip             "\U-041F;\U-0456;\U-0434;\U-043A;\U-0430;\U-0437;\U-043A;\U-0430;">
+<!ENTITY tip             "\U-043F;\U-0456;\U-0434;\U-043A;\U-0430;\U-0437;\U-043A;\U-0430;">
+<!ENTITY WARNING         "\U-0417;\U-0410;\U-0421;\U-0422;\U-0415;\U-0420;\U-0415;\U-0416;\U-0415;\U-041D;\U-041D;\U-042F;">
+<!ENTITY Warning         "\U-0417;\U-0430;\U-0441;\U-0442;\U-0435;\U-0440;\U-0435;\U-0436;\U-0435;\U-043D;\U-043D;\U-044F;">
+<!ENTITY warning         "\U-0437;\U-0430;\U-0441;\U-0442;\U-0435;\U-0440;\U-0435;\U-0436;\U-0435;\U-043D;\U-043D;\U-044F;">
+<!ENTITY and             "">
+<!ENTITY by              "">
+<!ENTITY called          "">
+<!ENTITY edited          "\U-043F;\U-0438;\U-0434; \U-0440;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0456;\U-0454;\U-044E;">
+<!ENTITY Edited          "\U-041F;\U-0438;\U-0434; \U-0440;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0456;\U-0454;\U-044E;">
+<!ENTITY Editedby        "\U-041F;\U-0438;\U-0434; \U-0440;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0456;\U-0454;\U-044E;">
+<!ENTITY editedby        "\U-043F;\U-0438;\U-0434; \U-0440;\U-0435;\U-0434;\U-0430;\U-043A;\U-0446;\U-0456;\U-0454;\U-044E;">
+<!ENTITY in              "\U-0432;">
+<!ENTITY TableofContents "\U-0417;\U-043C;\U-0456;\U-0441;\U-0442;">
+<!ENTITY tableofcontents "\U-0437;\U-043C;\U-0456;\U-0441;\U-0442;">
+<!ENTITY lastlistcomma   ".">
+<!ENTITY listcomma       ",">
+<!ENTITY Notes           "\U-041F;\U-0440;\U-0438;\U-043C;\U-0456;\U-0442;\U-043A;\U-0438;">
+<!ENTITY notes           "\U-043F;\U-0440;\U-0438;\U-043C;\U-0456;\U-0442;\U-043A;\U-0438;">
+<!ENTITY TableNotes      "\U-041F;\U-0440;\U-0438;\U-043C;\U-0456;\U-0442;\U-043A;\U-0438;">
+<!ENTITY tablenotes      "\U-043F;\U-0440;\U-0438;\U-043C;\U-0456;\U-0442;\U-043A;\U-0438;">
+<!ENTITY nonexistantelement "non-existant element">
+<!ENTITY pgs             "\U-0441;\U-0442;\U-043E;\U-0440;.">
+<!ENTITY Pgs             "\U-0421;\U-0442;\U-043E;\U-0440;.">
+<!ENTITY Revisedby       "\U-041A;\U-043E;\U-0440;\U-0435;\U-043A;\U-0442;\U-0443;\U-0440;\U-0430;:;">
+<!ENTITY revisedby       "\U-043A;\U-043E;\U-0440;\U-0435;\U-043A;\U-0442;\U-0443;\U-0440;\U-0430;:;">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "unexpected element name">
+<!ENTITY unsupported     "unsupported">
+<!ENTITY xrefto          "xref to">
+<!ENTITY listofequations "\U-0441;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0444;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;">
+<!ENTITY ListofEquations "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0444;\U-043E;\U-0440;\U-043C;\U-0443;\U-043B;">
+<!ENTITY ListofExamples  "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-043F;\U-0440;\U-0438;\U-043A;\U-043B;\U-0430;\U-0434;\U-0456;\U-0432;">
+<!ENTITY listofexamples  "\U-0441;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-043F;\U-0440;\U-0438;\U-043A;\U-043B;\U-0430;\U-0434;\U-0456;\U-0432;">
+<!ENTITY ListofFigures   "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0456;\U-043B;\U-044E;\U-0441;\U-0442;\U-0440;\U-0430;\U-0446;\U-0456;\U-0439;">
+<!ENTITY listoffigures   "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0456;\U-043B;\U-044E;\U-0441;\U-0442;\U-0440;\U-0430;\U-0446;\U-0456;\U-0439;">
+<!ENTITY listoftables    "\U-0441;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0442;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;\U-044C;">
+<!ENTITY ListofTables    "\U-0421;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A; \U-0442;\U-0430;\U-0431;\U-043B;\U-0438;\U-0446;;\U-044C;">
+<!ENTITY ListofUnknown   "\U-041D;\U-0435;\U-0432;\U-0438;\U-0437;\U-043D;\U-0430;\U-0447;\U-0435;\U-043D;\U-0438;\U-0439; \U-0441;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A;">
+<!ENTITY listofunknown   "\U-043D;\U-0435;\U-0432;\U-0438;\U-0437;\U-043D;\U-0430;\U-0447;\U-0435;\U-043D;\U-0438;\U-0439; \U-0441;\U-043F;\U-0438;\U-0441;\U-043E;\U-043A;">
+<!ENTITY nav-next        "\U-0434;\U-0430;\U-043B;\U-0456;">
+<!ENTITY nav-next-sibling "\U-0434;\U-0430;\U-043B;\U-0456; \U-043F;\U-043E; \U-0440;\U-0456;\U-0432;\U-043D;\U-044E;">
+<!ENTITY nav-prev        "\U-043D;\U-0430;\U-0437;\U-0430;\U-0434;">
+<!ENTITY nav-prev-sibling "\U-043D;\U-0430;\U-0437;\U-0430;\U-0434; \U-043F;\U-043E; \U-0440;\U-0456;\U-0432;\U-043D;\U-044E;">
+<!ENTITY x-nav-next      "\U-0434;\U-0430;\U-043B;\U-0456;">
+<!ENTITY nav-home        "\U-041F;\U-043E;\U-0447;\U-0430;\U-0442;\U-043E;\U-043A;">
+<!ENTITY nav-up          "\U-0414;\U-043E;\U-0433;\U-043E;\U-0440;\U-0438;">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1xh.dsl b/common/dbl1xh.dsl
new file mode 100644 (file)
index 0000000..7a77b66
--- /dev/null
@@ -0,0 +1,444 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % xh.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//XH"
+         "dbl1xh.ent">
+%xh.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-xh">
+<style-specification-body>
+
+;; $Id: dbl1xh.dsl,v 1.1 2001/11/14 20:57:53 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+
+(define (xh-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (xh-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-xh-start-quote%
+                                                      "%t"
+                                                      %gentext-xh-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&Chapter; %n"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&Part; %n")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&Section; %n"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "the &sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-xh-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (xh-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (xh-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-xh-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (xh-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-xh-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (xh-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-xh-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-xh-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-xh-intra-label-sep)
+  (list))
+
+(define (xh-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-xh-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-xh-intra-label-sep)))
+        (sep    (assoc name (xh-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-xh-label-title-sep)
+  (list))
+
+(define (xh-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-xh-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-xh-label-title-sep)))
+        (sep    (assoc name (xh-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (xh-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (xh-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (xh-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (xh-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-xh$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (xh-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-xh-start-quote% (dingbat "ldquo"))
+
+(define %gentext-xh-end-quote% (dingbat "rdquo"))
+
+(define %gentext-xh-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-xh-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-xh-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-xh-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-xh-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-xh-page% "")
+
+(define %gentext-xh-and% "&and;")
+
+(define %gentext-xh-listcomma% "&listcomma;")
+
+(define %gentext-xh-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-xh-bibl-pages% "&Pgs;")
+
+(define %gentext-xh-endnotes% "&Notes;")
+
+(define %gentext-xh-table-endnotes% "&TableNotes;:")
+
+(define %gentext-xh-index-see% "&See;")
+
+(define %gentext-xh-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-xh-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-xh-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-xh-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-xh-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-xh-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-xh-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1xh.ent b/common/dbl1xh.ent
new file mode 100644 (file)
index 0000000..e26c10c
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "Isiqalo">
+<!ENTITY abstract        "Isiqalo">
+<!ENTITY Answer          "I:">
+<!ENTITY answer          "I:">
+<!ENTITY Appendix        "Isivalo">
+<!ENTITY appendix        "isivalo">
+<!ENTITY Article         "Umba">
+<!ENTITY article         "Umba">
+<!ENTITY Bibliography    "Ezobunzululwazi">
+<!ENTITY bibliography    "Ezobunzululwazi">
+<!ENTITY Book            "Incwadi">
+<!ENTITY book            "Incwadi">
+<!ENTITY CAUTION         "ISILUMKISO">
+<!ENTITY Caution         "Isilumkiso">
+<!ENTITY caution         "Isilumkiso">
+<!ENTITY Chapter         "Isiqendu">
+<!ENTITY chapter         "isiqendu">
+<!ENTITY Colophon        "Ikolophon">
+<!ENTITY colophon        "Ikolophon">
+<!ENTITY Copyright       "Ushicilelo olusemthethweni">
+<!ENTITY copyright       "Ushicilelo olusemthethweni">
+<!ENTITY Dedication      "Ulwaziso">
+<!ENTITY dedication      "Ulwaziso">
+<!ENTITY Edition         "Uhlelo">
+<!ENTITY edition         "Uhlelo">
+<!ENTITY Equation        "Ulinganiselo">
+<!ENTITY equation        "Ulinganiselo">
+<!ENTITY Example         "Umzekelo">
+<!ENTITY example         "Umzekelo">
+<!ENTITY Figure          "Ulungu">
+<!ENTITY figure          "Ulungu">
+<!ENTITY Glossary        "Inkcazelo yamagama">
+<!ENTITY glossary        "Inkcazelo yamagama">
+<!ENTITY GlossSee        "Bona">
+<!ENTITY glosssee        "Bona">
+<!ENTITY GlossSeeAlso    "Bona Kwakhona">
+<!ENTITY glossseealso    "Bona Kwakhona">
+<!ENTITY IMPORTANT       "IBALULEKILE">
+<!ENTITY important       "Ibalulekile">
+<!ENTITY Important       "Ibalulekile">
+<!ENTITY Index           "Isalathiso">
+<!ENTITY index           "Isalathiso">
+<!ENTITY ISBN            "iISBN">
+<!ENTITY isbn            "iISBN">
+<!ENTITY LegalNotice     "Isaziso Esesimthethweni">
+<!ENTITY legalnotice     "Isaziso Esesimthethweni">
+<!ENTITY MsgAud          "Ababhali">
+<!ENTITY msgaud          "Ababhali">
+<!ENTITY MsgLevel        "Umphakamo">
+<!ENTITY msglevel        "Umphakamo">
+<!ENTITY MsgOrig         "Uqobo">
+<!ENTITY msgorig         "Uqobo">
+<!ENTITY NOTE            "QAPHELA">
+<!ENTITY Note            "Qaphela">
+<!ENTITY note            "Qaphela">
+<!ENTITY Part            "Inxenye">
+<!ENTITY part            "Inxenye">
+<!ENTITY Preface         "Isihloko">
+<!ENTITY preface         "Isihloko">
+<!ENTITY Procedure       "Inkqubo">
+<!ENTITY procedure       "Inkqubo">
+<!ENTITY ProductionSet   "Imveliso">
+<!ENTITY Published       "Ipapashwe">
+<!ENTITY published       "Ipapashwe">
+<!ENTITY Question        "U:">
+<!ENTITY question        "U:">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "Uthelekiso">
+<!ENTITY reference       "Uthelekiso">
+<!ENTITY RefName         "Igama lothelekiso">
+<!ENTITY refname         "Igama lothelekiso">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "Isinopsisi">
+<!ENTITY refsynopsisdiv  "Isinopsisi">
+<!ENTITY RevHistory      "Imbali yophindo">
+<!ENTITY revhistory      "Imbali yophindo">
+<!ENTITY revision        "Iphindo">
+<!ENTITY Revision        "Iphindo">
+<!ENTITY sect1           "Icandelo">
+<!ENTITY sect2           "Icandelo">
+<!ENTITY sect3           "Icandelo">
+<!ENTITY sect4           "Icandelo">
+<!ENTITY sect5           "Icandelo">
+<!ENTITY section         "Icandelo">
+<!ENTITY Section         "Icandelo">
+<!ENTITY See             "Bona">
+<!ENTITY see             "Bona">
+<!ENTITY SeeAlso         "Bona Kwakhona">
+<!ENTITY seealso         "Bona Kwakhona">
+<!ENTITY Seealso         "Bona Kwakhona">
+<!ENTITY set             "Cwangcisa">
+<!ENTITY Set             "Cwangcisa">
+<!ENTITY setindex        "Cwangcisa Isalathiso">
+<!ENTITY SetIndex        "Cwangcisa Isalathiso">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "ibar esecaleni">
+<!ENTITY step            "inqwanqwa">
+<!ENTITY Step            "Inqwanqwa">
+<!ENTITY Table           "Indlela Yokwenza Imigca">
+<!ENTITY table           "Indlela Yokwenza Imigca">
+<!ENTITY tip             "Incam">
+<!ENTITY TIP             "INCAM">
+<!ENTITY Tip             "Incam">
+<!ENTITY Warning         "Isilumkiso">
+<!ENTITY warning         "Isilumkiso">
+<!ENTITY WARNING         "ISILUMKISO">
+<!ENTITY and             "no">
+<!ENTITY by              "by">
+<!ENTITY Edited          "Ihleliwe">
+<!ENTITY edited          "Ihleliwe">
+<!ENTITY Editedby        "Ihlelwe">
+<!ENTITY editedby        "Ihlelwe">
+<!ENTITY in              "in">
+<!ENTITY lastlistcomma   ", ">
+<!ENTITY listcomma       ", ">
+<!ENTITY nonexistantelement "isiqalelo esingekhayo">
+<!ENTITY notes           "Iziqaphelo">
+<!ENTITY Notes           "Iziqaphelo">
+<!ENTITY Pgs             "Amaphepha">
+<!ENTITY pgs             "Amaphepha">
+<!ENTITY Revisedby       "Iphindwe ngu: ">
+<!ENTITY revisedby       "Iphindwe ngu:">
+<!ENTITY TableNotes      "Iziqaphelo">
+<!ENTITY tablenotes      "Iziqaphelo">
+<!ENTITY TableofContents "Imigca Yemixholo">
+<!ENTITY tableofcontents "Imigca Yemixholo">
+<!ENTITY unexpectedelementname "Igama lesiqalelo esingalindelwanga">
+<!ENTITY unsupported     "ayixhaswanga">
+<!ENTITY xrefto          "thelekiso ku">
+<!ENTITY listofequations "Uluhlu Lemilinganiselo">
+<!ENTITY ListofEquations "Uluhlu Lemilinganiselo">
+<!ENTITY ListofExamples  "Uluhlu Lemizekelo">
+<!ENTITY listofexamples  "Uluhlu Lemizekelo">
+<!ENTITY ListofFigures   "Uluhlu Lamalungu">
+<!ENTITY listoffigures   "Uluhlu Lamalungu">
+<!ENTITY listoftables    "Uluhlu Lendlela Yokwenza Imigca">
+<!ENTITY ListofTables    "Uluhlu Lendlela Yokwenza Imigca">
+<!ENTITY ListofUnknown   "Uluhlu Lokungaziwayo">
+<!ENTITY listofunknown   "Uluhlu Lokungaziwayo">
+<!ENTITY nav-home        "Ikhaya">
+<!ENTITY nav-next        "Elandelayo">
+<!ENTITY nav-next-sibling "Yisa Phambili">
+<!ENTITY nav-prev        "Edlulileyo">
+<!ENTITY nav-prev-sibling "Yisa Emva">
+<!ENTITY nav-up          "Phezulu">
+<!ENTITY sectioncalled   "icandelo libizwa ngokuba">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
diff --git a/common/dbl1zhcn.dsl b/common/dbl1zhcn.dsl
new file mode 100644 (file)
index 0000000..1c57574
--- /dev/null
@@ -0,0 +1,447 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % zhcn.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//ZHCN"
+         "dbl1zhcn.ent">
+%zhcn.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-zhcn">
+<style-specification-body>
+
+;; $Id: dbl1zhcn.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+;; Contributors:
+;; Frederik Fouvry
+;;
+
+(define (zhcn-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (zhcn-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-zhcn-start-quote%
+                                                      "%t"
+                                                      %gentext-zhcn-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&#181;&#218; %n &Chapter;"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&#181;&#218; %n &Part;")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-zhcn-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (zhcn-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (zhcn-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-zhcn-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (zhcn-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-zhcn-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (zhcn-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-zhcn-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-zhcn-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-zhcn-intra-label-sep)
+  (list))
+
+(define (zhcn-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-zhcn-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-zhcn-intra-label-sep)))
+        (sep    (assoc name (zhcn-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-zhcn-label-title-sep)
+  (list))
+
+(define (zhcn-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-zhcn-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-zhcn-label-title-sep)))
+        (sep    (assoc name (zhcn-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (zhcn-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (zhcn-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (zhcn-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (zhcn-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-zhcn$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (zhcn-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-zhcn-start-quote% (dingbat "ldquo"))
+
+(define %gentext-zhcn-end-quote% (dingbat "rdquo"))
+
+(define %gentext-zhcn-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-zhcn-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-zhcn-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-zhcn-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-zhcn-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-zhcn-page% "")
+
+(define %gentext-zhcn-and% "&and;")
+
+(define %gentext-zhcn-listcomma% "&listcomma;")
+
+(define %gentext-zhcn-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-zhcn-bibl-pages% "&Pgs;")
+
+(define %gentext-zhcn-endnotes% "&Notes;")
+
+(define %gentext-zhcn-table-endnotes% "&TableNotes;:")
+
+(define %gentext-zhcn-index-see% "&See;")
+
+(define %gentext-zhcn-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-zhcn-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-zhcn-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-zhcn-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-zhcn-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-zhcn-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-zhcn-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/common/dbl1zhcn.ent b/common/dbl1zhcn.ent
new file mode 100644 (file)
index 0000000..c2742db
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-6458;\U-8981;">
+<!ENTITY abstract        "\U-6458;\U-8981;">
+<!ENTITY Answer          "\U-7B54;\U-FF1A;">
+<!ENTITY answer          "\U-7B54;\U-FF1A;">
+<!ENTITY Appendix        "\U-9644;\U-5F55;">
+<!ENTITY appendix        "\U-9644;\U-5F55;">
+<!ENTITY Article         "\U-6587;\U-7AE0;">
+<!ENTITY article         "\U-6587;\U-7AE0;">
+<!ENTITY Bibliography    "\U-53C2;\U-8003;\U-4E66;\U-76EE;">
+<!ENTITY bibliography    "\U-53C2;\U-8003;\U-4E66;\U-76EE;">
+<!ENTITY Book            "\U-4E66;">
+<!ENTITY book            "\U-4E66;">
+<!ENTITY CAUTION         "\U-5C0F;\U-5FC3;">
+<!ENTITY Caution         "\U-5C0F;\U-5FC3;">
+<!ENTITY caution         "\U-5C0F;\U-5FC3;">
+<!ENTITY Chapter         "\U-7AE0;">
+<!ENTITY chapter         "\U-7AE0;">
+<!ENTITY Colophon        "Colophon">
+<!ENTITY colophon        "Colophon">
+<!ENTITY Copyright       "\U-7248;\U-6743;">
+<!ENTITY copyright       "\U-7248;\U-6743;">
+<!ENTITY Dedication      "\U-9898;\U-8BCD;">
+<!ENTITY dedication      "\U-9898;\U-8BCD;">
+<!ENTITY Edition         "\U-7248;">
+<!ENTITY edition         "\U-7248;">
+<!ENTITY Equation        "\U-516C;\U-5F0F;">
+<!ENTITY equation        "\U-516C;\U-5F0F;">
+<!ENTITY Example         "\U-4F8B;">
+<!ENTITY example         "\U-4F8B;">
+<!ENTITY Figure          "\U-56FE;">
+<!ENTITY figure          "\U-56FE;">
+<!ENTITY Glossary        "\U-672F;\U-8BED;\U-8868;">
+<!ENTITY glossary        "\U-672F;\U-8BED;\U-8868;">
+<!ENTITY GlossSee        "\U-89C1;">
+<!ENTITY glosssee        "\U-89C1;">
+<!ENTITY GlossSeeAlso    "\U-53C2;\U-89C1;">
+<!ENTITY glossseealso    "\U-53C2;\U-89C1;">
+<!ENTITY IMPORTANT       "\U-91CD;\U-8981;">
+<!ENTITY important       "\U-91CD;\U-8981;">
+<!ENTITY Important       "\U-91CD;\U-8981;">
+<!ENTITY Index           "\U-7D22;\U-5F15;">
+<!ENTITY index           "\U-7D22;\U-5F15;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "\U-6CD5;\U-5F8B;\U-901A;\U-544A;">
+<!ENTITY legalnotice     "\U-6CD5;\U-5F8B;\U-901A;\U-544A;">
+<!ENTITY MsgAud          "\U-53D7;\U-4F17;">
+<!ENTITY msgaud          "\U-53D7;\U-4F17;">
+<!ENTITY MsgLevel        "\U-7EA7;\U-522B;">
+<!ENTITY msglevel        "\U-7EA7;\U-522B;">
+<!ENTITY MsgOrig         "\U-51FA;\U-5904;">
+<!ENTITY msgorig         "\U-51FA;\U-5904;">
+<!ENTITY NOTE            "\U-6CE8;\U-610F;">
+<!ENTITY Note            "\U-6CE8;\U-610F;">
+<!ENTITY note            "\U-6CE8;\U-610F;">
+<!ENTITY Part            "\U-90E8;\U-5206;">
+<!ENTITY part            "\U-90E8;\U-5206;">
+<!ENTITY Preface         "\U-524D;\U-8A00;">
+<!ENTITY preface         "\U-524D;\U-8A00;">
+<!ENTITY Procedure       "\U-8FC7;\U-7A0B;">
+<!ENTITY procedure       "\U-8FC7;\U-7A0B;">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY PubDate         "\U-51FA;\U-7248;\U-65E5;\U-671F;">
+<!ENTITY pubdate         "\U-51FA;\U-7248;\U-65E5;\U-671F;">
+<!ENTITY Published       "\U-51FA;\U-7248;\U-65B9;">
+<!ENTITY published       "\U-51FA;\U-7248;\U-65B9;">
+<!ENTITY Qandadiv        "\U-8D28;\U-4FDD;">
+<!ENTITY qandadiv        "\U-8D28;\U-4FDD;">
+<!ENTITY Question        "\U-95EE;\U-FF1A;">
+<!ENTITY question        "\U-95EE;\U-FF1A;">
+<!ENTITY RefEntry        "">
+<!ENTITY refentry        "">
+<!ENTITY Reference       "\U-53C2;\U-8003;">
+<!ENTITY reference       "\U-53C2;\U-8003;">
+<!ENTITY RefName         "\U-540D;\U-79F0;">
+<!ENTITY refname         "\U-540D;\U-79F0;">
+<!ENTITY RefSection      "">
+<!ENTITY refsection      "">
+<!ENTITY RefSynopsisDiv  "\U-5927;\U-7EB2;">
+<!ENTITY refsynopsisdiv  "\U-5927;\U-7EB2;">
+<!ENTITY RevHistory      "\U-4FEE;\U-8BA2;\U-5386;\U-53F2;">
+<!ENTITY revhistory      "\U-4FEE;\U-8BA2;\U-5386;\U-53F2;">
+<!ENTITY revision        "\U-4FEE;\U-8BA2;">
+<!ENTITY Revision        "\U-4FEE;\U-8BA2;">
+<!ENTITY sect1           "\U-8282;">
+<!ENTITY sect2           "\U-8282;">
+<!ENTITY sect3           "\U-8282;">
+<!ENTITY sect4           "\U-8282;">
+<!ENTITY sect5           "\U-8282;">
+<!ENTITY section         "\U-8282;">
+<!ENTITY Section         "\U-8282;">
+<!ENTITY see             "\U-89C1;">
+<!ENTITY See             "\U-89C1;">
+<!ENTITY seealso         "\U-53C2;\U-89C1;">
+<!ENTITY Seealso         "\U-53C2;\U-89C1;">
+<!ENTITY SeeAlso         "\U-53C2;\U-89C1;">
+<!ENTITY set             "Set">
+<!ENTITY Set             "Set">
+<!ENTITY setindex        "Set Index">
+<!ENTITY SetIndex        "Set Index">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "sidebar">
+<!ENTITY step            "\U-6B65;\U-9AA4;">
+<!ENTITY Step            "\U-6B65;\U-9AA4;">
+<!ENTITY Table           "\U-8868;">
+<!ENTITY table           "\U-8868;">
+<!ENTITY tip             "\U-63D0;\U-793A;">
+<!ENTITY TIP             "\U-63D0;\U-793A;">
+<!ENTITY Tip             "\U-63D0;\U-793A;">
+<!ENTITY Warning         "\U-8B66;\U-544A;">
+<!ENTITY warning         "\U-8B66;\U-544A;">
+<!ENTITY WARNING         "\U-8B66;\U-544A;">
+<!ENTITY and             "\U-548C;">
+<!ENTITY by              "\U-7531;">
+<!ENTITY called          "\U-79F0;\U-4E3A;">
+<!ENTITY Edited          "\U-7F16;\U-8F91;\U-65F6;\U-95F4;">
+<!ENTITY edited          "\U-7F16;\U-8F91;\U-65F6;\U-95F4;">
+<!ENTITY Editedby        "\U-7F16;\U-8F91;\U-8005;">
+<!ENTITY editedby        "\U-7F16;\U-8F91;\U-8005;">
+<!ENTITY in              "\U-4E8E;">
+<!ENTITY lastlistcomma   "">
+<!ENTITY listcomma       "\U-3001;">
+<!ENTITY nonexistantelement "\U-4E0D;\U-5B58;\U-5728;\U-7684;\U-5143;\U-7D20;">
+<!ENTITY notes           "\U-5907;\U-6CE8;">
+<!ENTITY Notes           "\U-5907;\U-6CE8;">
+<!ENTITY Pgs             "\U-9875;">
+<!ENTITY pgs             "\U-9875;">
+<!ENTITY Revisedby       "\U-4FEE;\U-8BA2;\U-8005;\U-FF1A;">
+<!ENTITY revisedby       "\U-4FEE;\U-8BA2;\U-8005;\U-FF1A;">
+<!ENTITY TableNotes      "\U-8868;\U-6CE8;">
+<!ENTITY tablenotes      "\U-8868;\U-6CE8;">
+<!ENTITY TableofContents "\U-76EE;\U-5F55;">
+<!ENTITY tableofcontents "\U-76EE;\U-5F55;">
+<!ENTITY the             "">
+<!ENTITY unexpectedelementname "\U-672A;\U-9884;\U-671F;\U-7684;\U-540D;\U-79F0;">
+<!ENTITY unsupported     "\U-4E0D;\U-652F;\U-6301;">
+<!ENTITY xrefto          "xref to">
+<!ENTITY listofequations "\U-516C;\U-5F0F;\U-6E05;\U-5355;">
+<!ENTITY ListofEquations "\U-516C;\U-5F0F;\U-6E05;\U-5355;">
+<!ENTITY ListofExamples  "\U-8303;\U-4F8B;\U-6E05;\U-5355;">
+<!ENTITY listofexamples  "\U-8303;\U-4F8B;\U-6E05;\U-5355;">
+<!ENTITY ListofFigures   "\U-63D2;\U-56FE;\U-6E05;\U-5355;">
+<!ENTITY listoffigures   "\U-63D2;\U-56FE;\U-6E05;\U-5355;">
+<!ENTITY ListofProcedures "\U-8FC7;\U-7A0B;\U-6E05;\U-5355;">
+<!ENTITY listofprocedures "\U-8FC7;\U-7A0B;\U-6E05;\U-5355;">
+<!ENTITY listoftables    "\U-8868;\U-683C;\U-6E05;\U-5355;">
+<!ENTITY ListofTables    "\U-8868;\U-683C;\U-6E05;\U-5355;">
+<!ENTITY ListofUnknown   "\U-672A;\U-77E5;\U-6E05;\U-5355;">
+<!ENTITY listofunknown   "\U-672A;\U-77E5;\U-6E05;\U-5355;">
+<!ENTITY nav-home        "\U-8D77;\U-59CB;\U-9875;">
+<!ENTITY nav-next        "\U-4E0B;\U-4E00;\U-9875;">
+<!ENTITY nav-next-sibling "\U-5FEB;\U-8FDB;">
+<!ENTITY nav-prev        "\U-4E0A;\U-4E00;\U-9875;">
+<!ENTITY nav-prev-sibling "\U-5FEB;\U-9000;">
+<!ENTITY nav-up          "\U-4E0A;\U-4E00;\U-7EA7;">
+<!ENTITY nav-toc         "\U-76EE;\U-5F55;">
+<!ENTITY Draft           "\U-8349;\U-7A3F;">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
+<!ENTITY sectioncalled   "\U-4E00;\U-8282;">
+<!ENTITY lowercase.alpha "abcdefghijklmnopqrstuvwxyz">
+<!ENTITY uppercase.alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
+<!ENTITY hyphenation-character "-">
+<!ENTITY hyphenation-push-character-count "2">
+<!ENTITY hyphenation-remain-character-count "2">
diff --git a/common/dbl1zhtw.dsl b/common/dbl1zhtw.dsl
new file mode 100644 (file)
index 0000000..1b49250
--- /dev/null
@@ -0,0 +1,447 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % zhtw.words
+  PUBLIC "-//Norman Walsh//ENTITIES DocBook Stylesheet Localization//ZHTW"
+         "dbl1zhtw.ent">
+%zhtw.words;
+]>
+
+<style-sheet>
+<style-specification id="docbook-l10n-zhtw">
+<style-specification-body>
+
+;; $Id: dbl1zhtw.dsl,v 1.2 2001/06/20 12:50:47 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ----------------------------- Localization -----------------------------
+
+;; If you create a new version of this file, please send it to
+;; Norman Walsh, ndw@nwalsh.com
+
+;; The generated text for cross references to elements.  See dblink.dsl
+;; for a discussion of how substitution is performed on the %x 
+;; keywords.
+;;
+;; Contributors:
+;; Frederik Fouvry
+;;
+
+(define (zhtw-author-string #!optional (author (current-node)))
+  ;; Return a formatted string representation of the contents of:
+  ;; AUTHOR:
+  ;;   Handles Honorific, FirstName, SurName, and Lineage.
+  ;;     If %author-othername-in-middle% is #t, also OtherName
+  ;;   Handles *only* the first of each.
+  ;;   Format is "Honorific. FirstName [OtherName] SurName, Lineage"
+  ;; CORPAUTHOR:
+  ;;   returns (data corpauthor)
+  (let* ((h_nl (select-elements (descendants author) (normalize "honorific")))
+        (f_nl (select-elements (descendants author) (normalize "firstname")))
+        (o_nl (select-elements (descendants author) (normalize "othername")))
+        (s_nl (select-elements (descendants author) (normalize "surname")))
+        (l_nl (select-elements (descendants author) (normalize "lineage")))
+        (has_h (not (node-list-empty? h_nl)))
+        (has_f (not (node-list-empty? f_nl)))
+        (has_o (and %author-othername-in-middle%
+                    (not (node-list-empty? o_nl))))
+        (has_s (not (node-list-empty? s_nl)))
+        (has_l (not (node-list-empty? l_nl))))
+    (if (or (equal? (gi author) (normalize "author"))
+           (equal? (gi author) (normalize "editor"))
+           (equal? (gi author) (normalize "othercredit")))
+       (string-append
+        (if has_h (string-append (data-of (node-list-first h_nl)) 
+                                 %honorific-punctuation%) "")
+        (if has_f (string-append 
+                   (if has_h " " "") 
+                   (data-of (node-list-first f_nl))) "")
+        (if has_o (string-append
+                   (if (or has_h has_f) " " "")
+                   (data-of (node-list-first o_nl))) "")
+        (if has_s (string-append 
+                   (if (or has_h has_f has_o) " " "")
+                   (data-of (node-list-first s_nl))) "")
+        (if has_l (string-append ", " (data-of (node-list-first l_nl))) ""))
+       (data-of author))))
+
+(define (zhtw-xref-strings)
+  (list (list (normalize "appendix")    (if %chapter-autolabel%
+                                           "&Appendix; %n"
+                                           "the &appendix; called %t"))
+       (list (normalize "article")     (string-append %gentext-zhtw-start-quote%
+                                                      "%t"
+                                                      %gentext-zhtw-end-quote%))
+       (list (normalize "bibliography") "%t")
+       (list (normalize "book")        "%t")
+       (list (normalize "chapter")     (if %chapter-autolabel%
+                                           "&#181;&#218; %n &Chapter;"
+                                           "the &chapter; called %t"))
+       (list (normalize "equation")    "&Equation; %n")
+       (list (normalize "example")     "&Example; %n")
+       (list (normalize "figure")      "&Figure; %n")
+       (list (normalize "glossary")    "%t")
+       (list (normalize "index")       "%t")
+       (list (normalize "listitem")    "%n")
+       (list (normalize "part")        "&#181;&#218; %n &Part;")
+       (list (normalize "preface")     "%t")
+       (list (normalize "procedure")   "&Procedure; %n, %t")
+       (list (normalize "reference")   "&Reference; %n, %t")
+       (list (normalize "section")     (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect1")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect2")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect3")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect4")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sect5")       (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "simplesect")  (if %section-autolabel%
+                                           "&#181;&#218; %n &section;"
+                                           "the &section; called %t"))
+       (list (normalize "sidebar")     "&sidebar; %t")
+       (list (normalize "step")        "&step; %n")
+       (list (normalize "table")       "&Table; %n")))
+
+(define (gentext-zhtw-xref-strings gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (xref   (assoc name (zhtw-xref-strings))))
+    (if xref
+       (car (cdr xref))
+       (let* ((msg    (string-append "[&xrefto; "
+                                     (if giname giname "&nonexistantelement;")
+                                     " &unsupported;]"))
+              (err    (node-list-error msg (current-node))))
+         msg))))
+
+(define (zhtw-auto-xref-indirect-connector before) 
+  ;; In English, the (cond) is unnecessary since the word is always the
+  ;; same, but in other languages, that's not the case.  I've set this
+  ;; one up with the (cond) so it stands as an example.
+  (cond 
+   ((equal? (gi before) (normalize "book"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "chapter"))
+    (literal " &in; "))
+   ((equal? (gi before) (normalize "sect1"))
+    (literal " &in; "))
+   (else
+    (literal " &in; "))))
+
+;; Should the TOC come first or last?
+;;
+(define %generate-zhtw-toc-in-front% #t)
+
+;; gentext-element-name returns the generated text that should be 
+;; used to make reference to the selected element.
+;;
+
+(define (zhtw-element-name)
+  (list
+   (list (normalize "abstract")                "&Abstract;")
+   (list (normalize "answer")          "&Answer;")
+   (list (normalize "appendix")                "&Appendix;")
+   (list (normalize "article")         "&Article;")
+   (list (normalize "bibliography")    "&Bibliography;")
+   (list (normalize "book")            "&Book;")
+   (list (normalize "calloutlist")     "")
+   (list (normalize "caution")         "&Caution;")
+   (list (normalize "chapter")         "&Chapter;")
+   (list (normalize "copyright")       "&Copyright;")
+   (list (normalize "dedication")      "&Dedication;")
+   (list (normalize "edition")         "&Edition;")
+   (list (normalize "equation")                "&Equation;")
+   (list (normalize "example")         "&Example;")
+   (list (normalize "figure")          "&Figure;")
+   (list (normalize "glossary")                "&Glossary;")
+   (list (normalize "glosssee")                "&GlossSee;")
+   (list (normalize "glossseealso")    "&GlossSeeAlso;")
+   (list (normalize "important")       "&Important;")
+   (list (normalize "index")           "&Index;")
+   (list (normalize "colophon")                "&Colophon;")
+   (list (normalize "setindex")                "&SetIndex;")
+   (list (normalize "isbn")            "&isbn;")
+   (list (normalize "legalnotice")     "&LegalNotice;")
+   (list (normalize "msgaud")          "&MsgAud;")
+   (list (normalize "msglevel")                "&MsgLevel;")
+   (list (normalize "msgorig")         "&MsgOrig;")
+   (list (normalize "note")            "&Note;")
+   (list (normalize "part")            "&Part;")
+   (list (normalize "preface")         "&Preface;")
+   (list (normalize "procedure")       "&Procedure;")
+   (list (normalize "pubdate")         "&Published;")
+   (list (normalize "question")                "&Question;")
+   (list (normalize "refentry")                "&RefEntry;")
+   (list (normalize "reference")       "&Reference;")
+   (list (normalize "refname")         "&RefName;")
+   (list (normalize "revhistory")      "&RevHistory;")
+   (list (normalize "refsect1")                "&RefSection;")
+   (list (normalize "refsect2")                "&RefSection;")
+   (list (normalize "refsect3")                "&RefSection;")
+   (list (normalize "refsynopsisdiv")  "&RefSynopsisDiv;")
+   (list (normalize "revision")                "&Revision;")
+   (list (normalize "sect1")           "&Section;")
+   (list (normalize "sect2")           "&Section;")
+   (list (normalize "sect3")           "&Section;")
+   (list (normalize "sect4")           "&Section;")
+   (list (normalize "sect5")           "&Section;")
+   (list (normalize "section")         "&Section;")
+   (list (normalize "simplesect")      "&Section;")
+   (list (normalize "seeie")           "&See;")
+   (list (normalize "seealsoie")       "&Seealso;")
+   (list (normalize "set")             "&Set;")
+   (list (normalize "sidebar")         "&Sidebar;")
+   (list (normalize "step")            "&step;")
+   (list (normalize "table")           "&Table;")
+   (list (normalize "tip")             "&Tip;")
+   (list (normalize "toc")             "&TableofContents;")
+   (list (normalize "warning")         "&Warning;")
+   ))
+
+(define (gentext-zhtw-element-name gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (pname  (assoc name (zhtw-element-name))))
+    (if pname
+       (car (cdr pname))
+       (let* ((msg (string-append 
+                    "gentext-zhtw-element-name: &unexpectedelementname;: "
+                    name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+;; gentext-element-name-space returns gentext-element-name with a 
+;; trailing space, if gentext-element-name isn't "".
+;;
+(define (gentext-zhtw-element-name-space giname)
+  (string-with-space (gentext-element-name giname)))
+
+;; gentext-intra-label-sep returns the seperator to be inserted
+;; between multiple occurances of a label (or parts of a label)
+;; for the specified element.  Most of these are for enumerated
+;; labels like "Figure 2-4", but this function is used elsewhere
+;; (e.g. REFNAME) with a little abuse.
+;;
+
+(define (local-zhtw-intra-label-sep)
+  (list))
+
+(define (zhtw-intra-label-sep)
+  (list
+   (list (normalize "equation")                "-")
+   (list (normalize "informalequation")        "-")
+   (list (normalize "example")         "-")
+   (list (normalize "figure")          "-")
+   (list (normalize "listitem")                ".")
+   (list (normalize "procedure")       ".")
+   (list (normalize "refentry")                ".")
+   (list (normalize "reference")       ".")
+   (list (normalize "refname")         ", ")
+   (list (normalize "refsect1")                ".")
+   (list (normalize "refsect2")                ".")
+   (list (normalize "refsect3")                ".")
+   (list (normalize "sect1")           ".")
+   (list (normalize "sect2")           ".")
+   (list (normalize "sect3")           ".")
+   (list (normalize "sect4")           ".")
+   (list (normalize "sect5")           ".")
+   (list (normalize "section")         ".")
+   (list (normalize "simplesect")      ".")
+   (list (normalize "step")            ".")
+   (list (normalize "table")           "-")
+   (list (normalize "_pagenumber")     "-")
+   ))
+
+(define (gentext-zhtw-intra-label-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-zhtw-intra-label-sep)))
+        (sep    (assoc name (zhtw-intra-label-sep))))
+    (if lsep
+        (car (cdr lsep))
+        (if sep
+            (car (cdr sep))
+            ""))))
+
+;; gentext-label-title-sep returns the seperator to be inserted
+;; between a label and the text following the label for the
+;; specified element.  Most of these are for use between
+;; enumerated labels and titles like "1. Chapter One Title", but
+;; this function is used elsewhere (e.g. NOTE) with a little
+;; abuse.
+;;
+
+(define (local-zhtw-label-title-sep)
+  (list))
+
+(define (zhtw-label-title-sep)
+  (list
+   (list (normalize "abstract")                ": ")
+   (list (normalize "answer")          " ")
+   (list (normalize "appendix")                ". ")
+   (list (normalize "caution")         "")
+   (list (normalize "chapter")         ". ")
+   (list (normalize "equation")                ". ")
+   (list (normalize "example")         ". ")
+   (list (normalize "figure")          ". ")
+   (list (normalize "footnote")                ". ")
+   (list (normalize "glosssee")                ": ")
+   (list (normalize "glossseealso")    ": ")
+   (list (normalize "important")       ": ")
+   (list (normalize "note")            ": ")
+   (list (normalize "orderedlist")     ". ")
+   (list (normalize "part")            ". ")
+   (list (normalize "procedure")       ". ")
+   (list (normalize "prefix")          ". ")
+   (list (normalize "question")                " ")
+   (list (normalize "refentry")                "")
+   (list (normalize "reference")       ". ")
+   (list (normalize "refsect1")                ". ")
+   (list (normalize "refsect2")                ". ")
+   (list (normalize "refsect3")                ". ")
+   (list (normalize "sect1")           ". ")
+   (list (normalize "sect2")           ". ")
+   (list (normalize "sect3")           ". ")
+   (list (normalize "sect4")           ". ")
+   (list (normalize "sect5")           ". ")
+   (list (normalize "section")         ". ")
+   (list (normalize "simplesect")      ". ")
+   (list (normalize "seeie")           " ")
+   (list (normalize "seealsoie")       " ")
+   (list (normalize "step")            ". ")
+   (list (normalize "table")           ". ")
+   (list (normalize "tip")             ": ")
+   (list (normalize "warning")         "")
+   ))
+
+(define (gentext-zhtw-label-title-sep gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (lsep   (assoc name (local-zhtw-label-title-sep)))
+        (sep    (assoc name (zhtw-label-title-sep))))
+    (if lsep
+      (car (cdr lsep))
+      (if sep
+         (car (cdr sep))
+         ""))))
+
+(define (zhtw-label-number-format-list)
+  (list
+   (list (normalize "set")             "1")
+   (list (normalize "book")            "1")
+   (list (normalize "prefix")          "1")
+   (list (normalize "part")            "I")
+   (list (normalize "chapter")         "1")
+   (list (normalize "appendix")                "A")
+   (list (normalize "reference")       "I")
+   (list (normalize "example")         "1")
+   (list (normalize "figure")          "1")
+   (list (normalize "table")           "1")
+   (list (normalize "procedure")       "1")
+   (list (normalize "step")            "1")
+   (list (normalize "refsect1")                "1")
+   (list (normalize "refsect2")                "1")
+   (list (normalize "refsect3")                "1")
+   (list (normalize "sect1")           "1")
+   (list (normalize "sect2")           "1")
+   (list (normalize "sect3")           "1")
+   (list (normalize "sect4")           "1")
+   (list (normalize "sect5")           "1")
+   (list (normalize "section")         "1")
+   ))
+
+(define (zhtw-label-number-format gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (format (assoc name (zhtw-label-number-format-list))))
+    (if format
+       (car (cdr format))
+       "1")))
+
+(define (zhtw-lot-title)
+  (list
+   (list (normalize "table")           "&ListofTables;")
+   (list (normalize "example")         "&ListofExamples;")
+   (list (normalize "figure")          "&ListofFigures;")
+   (list (normalize "equation")                "&ListofEquations;")
+   ))
+
+(define ($lot-title-zhtw$ gind)
+  (let* ((giname (if (string? gind) gind (gi gind)))
+        (name   (normalize giname))
+        (title  (assoc name (zhtw-lot-title))))
+    (if title
+       (car (cdr title))
+       (let* ((msg (string-append "&ListofUnknown;: " name))
+              (err (node-list-error msg (current-node))))
+         msg))))
+
+(define %gentext-zhtw-start-quote% (dingbat "ldquo"))
+
+(define %gentext-zhtw-end-quote% (dingbat "rdquo"))
+
+(define %gentext-zhtw-start-nested-quote% (dingbat "lsquo"))
+
+(define %gentext-zhtw-end-nested-quote% (dingbat "rsquo"))
+
+(define %gentext-zhtw-by% "&by;") ;; e.g. Copyright 1997 "by" A. Nonymous
+                           ;; Authored "by" Jane Doe
+
+(define %gentext-zhtw-edited-by% "&Editedby;")
+                           ;; "Edited by" Jane Doe
+
+(define %gentext-zhtw-revised-by% "&Revisedby;")
+                           ;; "Revised by" Jane Doe
+
+(define %gentext-zhtw-page% "")
+
+(define %gentext-zhtw-and% "&and;")
+
+(define %gentext-zhtw-listcomma% "&listcomma;")
+
+(define %gentext-zhtw-lastlistcomma% "&lastlistcomma;")
+
+(define %gentext-zhtw-bibl-pages% "&Pgs;")
+
+(define %gentext-zhtw-endnotes% "&Notes;")
+
+(define %gentext-zhtw-table-endnotes% "&TableNotes;:")
+
+(define %gentext-zhtw-index-see% "&See;")
+
+(define %gentext-zhtw-index-seealso% "&SeeAlso;")
+
+
+(define (gentext-zhtw-nav-prev prev) 
+  (make sequence (literal "&nav-prev;")))
+
+(define (gentext-zhtw-nav-prev-sibling prevsib) 
+  (make sequence (literal "&nav-prev-sibling;")))
+
+(define (gentext-zhtw-nav-next-sibling nextsib)
+  (make sequence (literal "&nav-next-sibling;")))
+
+(define (gentext-zhtw-nav-next next)
+  (make sequence (literal "&nav-next;")))
+
+(define (gentext-zhtw-nav-up up)
+  (make sequence (literal "&nav-up;")))
+
+(define (gentext-zhtw-nav-home home)
+  (make sequence (literal "&nav-home;")))
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
+
diff --git a/common/dbl1zhtw.ent b/common/dbl1zhtw.ent
new file mode 100644 (file)
index 0000000..3bfaee1
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+<!ENTITY Abstract        "\U-6458;\U-8981;">
+<!ENTITY abstract        "\U-6458;\U-8981;">
+<!ENTITY Answer          "\U-7B54;\U-FF1A;">
+<!ENTITY answer          "\U-7B54;\U-FF1A;">
+<!ENTITY Appendix        "\U-9644;\U-9304;">
+<!ENTITY appendix        "\U-9644;\U-9304;">
+<!ENTITY Article         "\U-6587;\U-7AE0;">
+<!ENTITY article         "\U-6587;\U-7AE0;">
+<!ENTITY Bibliography    "\U-53C3;\U-8003;\U-6587;\U-737B;">
+<!ENTITY bibliography    "\U-53C3;\U-8003;\U-6587;\U-737B;">
+<!ENTITY Book            "\U-66F8;\U-76EE;">
+<!ENTITY book            "\U-66F8;\U-76EE;">
+<!ENTITY CAUTION         "\U-6CE8;\U-610F;">
+<!ENTITY Caution         "\U-6CE8;\U-610F;">
+<!ENTITY caution         "\U-6CE8;\U-610F;">
+<!ENTITY Chapter         "\U-7AE0;">
+<!ENTITY chapter         "\U-7AE0;">
+<!ENTITY Colophon        "\U-7248;\U-672C;\U-8A18;\U-9304;">
+<!ENTITY colophon        "\U-7248;\U-672C;\U-8A18;\U-9304;">
+<!ENTITY Copyright       "\U-7248;\U-6B0A;">
+<!ENTITY copyright       "\U-7248;\U-6B0A;">
+<!ENTITY Dedication      "\U-5949;\U-737B;">
+<!ENTITY dedication      "\U-5949;\U-737B;">
+<!ENTITY Edition         "\U-7248;">
+<!ENTITY edition         "\U-7248;">
+<!ENTITY Equation        "\U-65B9;\U-7A0B;\U-5F0F;">
+<!ENTITY equation        "\U-65B9;\U-7A0B;\U-5F0F;">
+<!ENTITY Example         "\U-7BC4;\U-4F8B;">
+<!ENTITY example         "\U-7BC4;\U-4F8B;">
+<!ENTITY Figure          "\U-5716;\U-5F62;">
+<!ENTITY figure          "\U-5716;\U-5F62;">
+<!ENTITY Glossary        "\U-5C0F;\U-8FAD;\U-5F59;">
+<!ENTITY glossary        "\U-5C0F;\U-8FAD;\U-5F59;">
+<!ENTITY GlossSee        "\U-53C3;\U-898B;">
+<!ENTITY glosssee        "\U-53C3;\U-898B;">
+<!ENTITY GlossSeeAlso    "\U-53E6;\U-53C3;\U-898B;">
+<!ENTITY glossseealso    "\U-53E6;\U-53C3;\U-898B;">
+<!ENTITY IMPORTANT       "\U-91CD;\U-8981;">
+<!ENTITY Important       "\U-91CD;\U-8981;">
+<!ENTITY important       "\U-91CD;\U-8981;">
+<!ENTITY Index           "\U-7D22;\U-5F15;">
+<!ENTITY index           "\U-7D22;\U-5F15;">
+<!ENTITY ISBN            "ISBN">
+<!ENTITY isbn            "ISBN">
+<!ENTITY LegalNotice     "\U-6CD5;\U-5F8B;\U-8072;\U-660E;">
+<!ENTITY legalnotice     "\U-6CD5;\U-5F8B;\U-8072;\U-660E;">
+<!ENTITY MsgAud          "\U-8B80;\U-8005;">
+<!ENTITY msgaud          "\U-8B80;\U-8005;">
+<!ENTITY MsgLevel        "\U-7A0B;\U-5EA6;">
+<!ENTITY msglevel        "\U-7A0B;\U-5EA6;">
+<!ENTITY MsgOrig         "\U-51FA;\U-8655;">
+<!ENTITY msgorig         "\U-51FA;\U-8655;">
+<!ENTITY NOTE            "\U-6CE8;">
+<!ENTITY Note            "\U-6CE8;">
+<!ENTITY note            "\U-6CE8;">
+<!ENTITY Part            "\U-90E8;">
+<!ENTITY part            "\U-90E8;">
+<!ENTITY Preface         "\U-5E8F;\U-8A00;">
+<!ENTITY preface         "\U-5E8F;\U-8A00;">
+<!ENTITY Procedure       "\U-904E;\U-7A0B;">
+<!ENTITY procedure       "\U-904E;\U-7A0B;">
+<!ENTITY ProductionSet   "Production">
+<!ENTITY Published       "\U-51FA;\U-7248;">
+<!ENTITY published       "\U-51FA;\U-7248;">
+<!ENTITY Question        "\U-554F;\U-FF1A;">
+<!ENTITY question        "\U-554F;\U-FF1A;">
+<!ENTITY RefEntry        "\U-53C3;\U-7167;\U-9805;\U-76EE;">
+<!ENTITY refentry        "\U-53C3;\U-7167;\U-9805;\U-76EE;">
+<!ENTITY Reference       "\U-53C3;\U-8003;">
+<!ENTITY reference       "\U-53C3;\U-8003;">
+<!ENTITY RefName         "\U-53C3;\U-8003;\U-540D;">
+<!ENTITY refname         "\U-53C3;\U-8003;\U-540D;">
+<!ENTITY RefSection      "\U-53C3;\U-7167;\U-7AE0;\U-7BC0;">
+<!ENTITY refsection      "\U-53C3;\U-7167;\U-7AE0;\U-7BC0;">
+<!ENTITY RefSynopsisDiv  "\U-5927;\U-7DB1;">
+<!ENTITY refsynopsisdiv  "\U-5927;\U-7DB1;">
+<!ENTITY RevHistory      "\U-4FEE;\U-8A02;\U-8A18;\U-9304;">
+<!ENTITY revhistory      "\U-4FEE;\U-8A02;\U-8A18;\U-9304;">
+<!ENTITY Revision        "\U-4FEE;\U-8A02;">
+<!ENTITY revision        "\U-4FEE;\U-8A02;">
+<!ENTITY sect1           "Section">
+<!ENTITY sect2           "Section">
+<!ENTITY sect3           "Section">
+<!ENTITY sect4           "Section">
+<!ENTITY sect5           "Section">
+<!ENTITY Section         "\U-7BC0;">
+<!ENTITY section         "\U-7BC0;">
+<!ENTITY See             "\U-898B;">
+<!ENTITY see             "\U-898B;">
+<!ENTITY SeeAlso         "\U-53E6;\U-898B;">
+<!ENTITY Seealso         "\U-53E6;\U-898B;">
+<!ENTITY seealso         "\U-53E6;\U-898B;">
+<!ENTITY Set             "Set">
+<!ENTITY set             "Set">
+<!ENTITY SetIndex        "Set Index">
+<!ENTITY setindex        "Set Index">
+<!ENTITY Sidebar         "">
+<!ENTITY sidebar         "">
+<!ENTITY Step            "\U-6B65;\U-9A5F;">
+<!ENTITY step            "\U-6B65;\U-9A5F;">
+<!ENTITY Table           "\U-8868;\U-683C;">
+<!ENTITY table           "\U-8868;\U-683C;">
+<!ENTITY TIP             "\U-63D0;\U-793A;">
+<!ENTITY Tip             "\U-63D0;\U-793A;">
+<!ENTITY tip             "\U-63D0;\U-793A;">
+<!ENTITY WARNING         "\U-8B66;\U-544A;">
+<!ENTITY Warning         "\U-8B66;\U-544A;">
+<!ENTITY warning         "\U-8B66;\U-544A;">
+<!ENTITY edited          "\U-7DE8;\U-8F2F;">
+<!ENTITY Edited          "\U-7DE8;\U-8F2F;">
+<!ENTITY editedby        "\U-7DE8;\U-8F2F;">
+<!ENTITY Editedby        "\U-7DE8;\U-8F2F;">
+<!ENTITY Notes           "\U-6CE8;">
+<!ENTITY notes           "\U-6CE8;">
+<!ENTITY Pgs             "\U-9801;">
+<!ENTITY pgs             "\U-9801;">
+<!ENTITY Revisedby       "\U-4FEE;\U-8A02;">
+<!ENTITY revisedby       "\U-4FEE;\U-8A02;">
+<!ENTITY TableNotes      "\U-6CE8;\U-91CB;">
+<!ENTITY tablenotes      "\U-6CE8;\U-91CB;">
+<!ENTITY TableofContents "\U-5167;\U-5BB9;\U-76EE;\U-9304;">
+<!ENTITY tableofcontents "\U-5167;\U-5BB9;\U-76EE;\U-9304;">
+<!ENTITY and             "\U-4E14;">
+<!ENTITY by              "\U-7531;">
+<!ENTITY in              "\U-5728;">
+<!ENTITY lastlistcomma   ",">
+<!ENTITY listcomma       ",">
+<!ENTITY nonexistantelement "\U-4E0D;\U-5B58;\U-5728;\U-7684;\U-5143;\U-7D20;">
+<!ENTITY page.citation   "\U-9801;">
+<!ENTITY unexpectedelementname "\U-975E;\U-9810;\U-671F;\U-7684;\U-5143;\U-7D20;\U-540D;">
+<!ENTITY unsupported     "\U-672A;\U-652F;\U-63F4;">
+<!ENTITY xrefto          "\U-53C3;\U-7167;">
+<!ENTITY ListofEquations "\U-516C;\U-5F0F;\U-76EE;\U-9304;">
+<!ENTITY listofequations "\U-516C;\U-5F0F;\U-76EE;\U-9304;">
+<!ENTITY ListofExamples  "\U-7BC4;\U-4F8B;\U-76EE;\U-9304;">
+<!ENTITY listofexamples  "\U-7BC4;\U-4F8B;\U-76EE;\U-9304;">
+<!ENTITY ListofFigures   "\U-9644;\U-5716;\U-76EE;\U-9304;">
+<!ENTITY listoffigures   "\U-9644;\U-5716;\U-76EE;\U-9304;">
+<!ENTITY ListofTables    "\U-9644;\U-8868;\U-76EE;\U-9304;">
+<!ENTITY listoftables    "\U-9644;\U-8868;\U-76EE;\U-9304;">
+<!ENTITY ListofUnknown   "\U-5176;\U-5B83;\U-5167;\U-5BB9;\U-76EE;\U-9304;">
+<!ENTITY listofunknown   "\U-5176;\U-5B83;\U-5167;\U-5BB9;\U-76EE;\U-9304;">
+<!ENTITY nav-home        "\U-5167;\U-5BB9;">
+<!ENTITY nav-next        "\U-4E0B;\U-4E00;\U-9801;">
+<!ENTITY nav-next-sibling "\U-5FEB;\U-901F;\U-5411;\U-5F8C;">
+<!ENTITY nav-prev        "\U-524D;\U-4E00;\U-9801;">
+<!ENTITY nav-prev-sibling "\U-5FEB;\U-901F;\U-5411;\U-524D;">
+<!ENTITY nav-up          "\U-4E0A;\U-4E00;\U-5C64;">
+<!ENTITY sectioncalled   "the section called">
+<!ENTITY Draft           "Draft">
+<!ENTITY above           "above">
+<!ENTITY below           "below">
diff --git a/common/dbtable.dsl b/common/dbtable.dsl
new file mode 100644 (file)
index 0000000..ca9fcbc
--- /dev/null
@@ -0,0 +1,244 @@
+;; $Id: dbtable.dsl,v 1.1 2001/04/02 21:40:27 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+;; This file contains table functions common to both print and HTML
+;; versions of the DocBook stylesheets.
+;;
+
+;; If **ANY** change is made to this file, you _MUST_ alter the
+;; following definition:
+
+(define %docbook-common-table-version%
+  "Modular DocBook Stylesheet Common Table Functions")
+
+;; == Table Support =====================================================
+
+;; ----------------------------------------------------------------------
+;; Functions for finding/retrieving table attributes
+
+(define (tgroup-align tgroup)
+  (attribute-string (normalize "align") tgroup))
+
+(define (tgroup-colsep tgroup)
+  (attribute-string (normalize "colsep") tgroup))
+
+(define (tgroup-rowsep tgroup)
+  (attribute-string (normalize "rowsep") tgroup))
+
+;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+(define (find-tgroup #!optional (nd (current-node)))
+  ;; for our purposes, an entrytbl functions as a tgroup.
+  ;; ENTRYTBL IS ONLY SUPPORTED IN THE HTML BACKEND!!!
+  (if (or (equal? (gi nd) (normalize "tgroup"))
+         (equal? (gi nd) (normalize "entrytbl")))
+      nd
+      (if (node-list-empty? (ancestor (normalize "entrytbl") nd))
+         (ancestor (normalize "tgroup") nd)
+         (ancestor (normalize "entrytbl") nd))))
+
+(define (find-colspec colname)
+  (let* ((tgroup (find-tgroup))
+        (colspecs (select-elements (descendants tgroup)
+                                   (normalize "colspec"))))
+    (let loop ((nl colspecs))
+       (if (node-list-empty? nl)
+           ;; we've run out of places to look, stop looking...
+           (error (string-append "Could not find COLSPEC named " colname))
+           (if (equal? colname
+                       (attribute-string (normalize "colname") 
+                                         (node-list-first nl)))
+               (node-list-first nl)
+               (loop (node-list-rest nl)))))))
+
+(define (find-colspec-by-number colnum)
+  (let* ((tgroup (find-tgroup))
+        (colspecs (select-elements (children tgroup) (normalize "colspec"))))
+    (let loop ((nl colspecs))
+      (if (node-list-empty? nl)
+         ;; we've run out of places to look, stop looking...
+         (empty-node-list)
+         (if (equal? (colspec-colnum (node-list-first nl)) colnum)
+             (node-list-first nl)
+             (loop (node-list-rest nl)))))))
+
+(define (colspec-align colspec)
+  (attribute-string (normalize "align") colspec))
+
+(define (colspec-char colspec)
+  (attribute-string (normalize "char") colspec))
+
+(define (colspec-charoff colspec)
+  (let ((charoff (attribute-string (normalize "charoff") colspec)))
+    (if charoff
+       (string->number charoff)
+       #f)))
+
+(define (colspec-colnum colspec)
+  ;; returns the column number of the associated colspec...which is 
+  ;; either the value of COLNUM or obtained by counting
+  (let* ((tgroup (find-tgroup colspec))
+        (colspecs (select-elements (children tgroup) (normalize "colspec"))))
+    (if (attribute-string (normalize "colnum") colspec)
+       (string->number (attribute-string (normalize "colnum") colspec))
+       (let loop ((nl colspecs) (curcol 1))
+         (let ((colnum (attribute-string (normalize "colnum") (node-list-first nl))))
+           (if (node-list=? (node-list-first nl) colspec)
+               curcol
+               (if colnum
+                   (loop (node-list-rest nl) (+ (string->number colnum) 1))
+                   (loop (node-list-rest nl) (+ curcol 1)))))))))
+
+(define (colspec-colname colspec)
+  (attribute-string (normalize "colname") colspec))
+
+(define (colspec-colsep colspec)
+  (attribute-string (normalize "colsep") colspec))
+
+(define (colspec-colwidth colspec)
+  (if (attribute-string (normalize "colwidth") colspec)
+      (attribute-string (normalize "colwidth") colspec)
+      "1*"))
+
+(define (colspec-rowsep colspec)
+  (attribute-string (normalize "rowsep") colspec))
+
+;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+(define (find-spanspec spanname)
+  (let* ((tgroup (find-tgroup))
+        (spanspecs (select-elements (descendants tgroup) 
+                                    (normalize (normalize "spanspec")))))
+    (let loop ((nl spanspecs))
+      (if (node-list-empty? nl)
+         (error (string-append "Could not find SPANSPEC named " spanname))
+         (if (equal? spanname 
+                     (attribute-string (normalize "spanname")
+                                       (node-list-first nl)))
+             (node-list-first nl)
+             (loop (node-list-rest nl)))))))
+
+(define (spanspec-align spanspec)
+  (attribute-string (normalize "align") spanspec))
+
+(define (spanspec-char spanspec)
+  (attribute-string (normalize "char") spanspec))
+
+(define (spanspec-charoff spanspec)
+  (let ((charoff (attribute-string (normalize "charoff") spanspec)))
+    (if charoff
+       (string->number charoff)
+       #f)))
+
+(define (spanspec-colsep spanspec)
+  (attribute-string (normalize "colsep") spanspec))
+
+(define (spanspec-nameend spanspec)
+  (attribute-string (normalize "nameend") spanspec))
+
+(define (spanspec-namest spanspec)
+  (attribute-string (normalize "namest") spanspec))
+
+(define (spanspec-rowsep spanspec)
+  (attribute-string (normalize "rowsep") spanspec))
+
+(define (spanspec-spanname spanspec)
+  (attribute-string (normalize "spanname") spanspec))
+
+;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+;; Calculate spans
+
+(define (hspan entry)
+  ;; Returns the horizontal span of an entry
+  (let* ((spanname (attribute-string (normalize "spanname") entry))
+        (namest   (if spanname
+                      (spanspec-namest (find-spanspec spanname))
+                      (attribute-string (normalize "namest") entry)))
+        (nameend  (if spanname
+                      (spanspec-nameend (find-spanspec spanname))
+                      (attribute-string (normalize "nameend") entry)))
+        (colst    (if namest
+                      (colspec-colnum (find-colspec namest))
+                      #f))
+        (colend   (if nameend
+                      (colspec-colnum (find-colspec nameend))
+                      #f)))
+    (if (and namest nameend)
+       (+ (- colend colst) 1)
+       1)))
+
+(define (vspan entry)
+  ;; Returns the vertical span of an entry.  Note that this is one more
+  ;; than the specified MOREROWS attribute.
+  (let* ((morerows (attribute-string (normalize "morerows") entry)))
+    (if morerows
+       (+ (string->number morerows) 1)
+       1)))
+
+;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+;; Update the "overhang" list
+
+(define (adjust-overhang overhang oldoverhang entry)
+  (let* ((colst    (cell-column-number entry oldoverhang))
+        (span     (hspan entry)))
+    (if (> (vspan entry) 1)
+       (list-put overhang colst (- (vspan entry) 1) span)
+       overhang)))
+
+(define (overhang-skip overhang startcol)
+  (if (> startcol (length overhang))
+      ;; this is a _broken_ table.  should I output a debug message!?
+      startcol
+      (let loop ((overtail (list-tail overhang (- startcol 1))) (col startcol))
+       (if (null? overtail)
+           col
+           (if (equal? (car overtail) 0)
+               col
+               (loop (cdr overtail) (+ col 1)))))))
+
+(define (update-overhang row oldoverhang)
+  (let loop ((overhang (decrement-list-members oldoverhang))
+            (entries  (node-list-filter-out-pis (children row))))
+    (if (node-list-empty? entries)
+       overhang
+       (loop (adjust-overhang overhang oldoverhang 
+                              (node-list-first entries))
+             (node-list-rest entries)))))
+
+;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+;; Calculate information about cells
+
+(define (cell-prev-cell entry)
+  ;; Return the cell which precedes entry in the current row.
+  (let loop ((nd (ipreced entry)))
+    (if (node-list-empty? nd)
+       nd
+       (if (equal? (node-property 'class-name nd) 'element)
+           nd
+           (loop (ipreced nd))))))
+
+(define (cell-column-number entry overhang)
+  (let* ((entry     (ancestor-member entry (list (normalize "entry") (normalize "entrytbl"))))
+        (row       (ancestor (normalize "row") entry))
+        (preventry (cell-prev-cell entry))
+        (prevspan  (if (node-list-empty? preventry) 1 (hspan preventry)))
+        (colname   (attribute-string (normalize "colname") entry))
+        (namest    (attribute-string (normalize "namest") entry))
+        (nameend   (attribute-string (normalize "nameend") entry))
+        (spanname  (attribute-string (normalize "spanname") entry)))
+    (if colname
+       (colspec-colnum (find-colspec colname))
+       (if spanname
+           (colspec-colnum (find-colspec 
+                            (spanspec-namest (find-spanspec spanname))))
+           (if namest
+               (colspec-colnum (find-colspec namest))
+               (if (node-list-empty? preventry)
+                   (overhang-skip overhang 1)
+                   (overhang-skip overhang 
+                                  (+ (cell-column-number preventry overhang) 
+                                  prevspan))))))))
+
+;; ======================================================================
diff --git a/contrib/html/ChangeLog b/contrib/html/ChangeLog
new file mode 100644 (file)
index 0000000..e33fa27
--- /dev/null
@@ -0,0 +1,4 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * short-biblioentry.dsl: New file.
+
diff --git a/contrib/html/short-biblioentry.dsl b/contrib/html/short-biblioentry.dsl
new file mode 100644 (file)
index 0000000..87d1b10
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification id="docbook-plain" use="docbook">
+<style-specification-body>
+
+(define (biblioentry-inline-elements)
+  (list (normalize "abbrev")
+       (normalize "title")
+       (normalize "subtitle")
+       (normalize "author")
+       (normalize "authorgroup")
+       (normalize "copyright")
+       (normalize "date")
+       (normalize "edition")
+       (normalize "pagenums")
+       (normalize "pubdate")
+       (normalize "publisher")))
+
+(define (biblioentry-block-elements)
+  '())
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/contrib/imagemap/ChangeLog b/contrib/imagemap/ChangeLog
new file mode 100644 (file)
index 0000000..f659572
--- /dev/null
@@ -0,0 +1,4 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * imagemap.dsl, testdoc.sgm, testimg.jpg: New file.
+
diff --git a/contrib/imagemap/imagemap.dsl b/contrib/imagemap/imagemap.dsl
new file mode 100644 (file)
index 0000000..d5bb4d8
--- /dev/null
@@ -0,0 +1,77 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification id="docbook-plain" use="docbook">
+<style-specification-body>
+
+(element (graphicco areaspec)
+  (make element gi: "MAP"
+       attributes: (list (list "NAME" (element-id)))
+       (let loop ((nl (select-elements (descendants (current-node)) 
+                                       (normalize "area"))))
+         (if (node-list-empty? nl)
+             (empty-sosofo)
+             (make sequence
+               (make-html-area (node-list-first nl))
+               (loop (node-list-rest nl)))))))
+
+(define ($graphic$ fileref 
+                  #!optional (format #f) (alt #f) (align #f))
+  (let* ((csim?  (equal? (gi (parent (current-node)))
+                        (normalize "graphicco")))
+        (ismap  (if csim?
+                    '(("ISMAP" "ISMAP"))
+                    '()))
+        (usemap (if csim?
+                    (let* ((graphicco (parent (current-node)))
+                           (areaspec  (select-elements 
+                                       (children graphicco)
+                                       (normalize "areaspec"))))
+                      (list (list "USEMAP"
+                                  (string-append "#"
+                                                 (attribute-string 
+                                                  (normalize "id")
+                                                  areaspec)))))
+                    '()))
+        (border (if csim? '(("BORDER" "0")) '()))
+        (img-attr  (append
+                    (list     (list "SRC" (graphic-file fileref)))
+                    (if align (list (list "ALIGN" align)) '())
+                    (if image-library (graphic-attrs fileref alt) '())
+                    ismap
+                    usemap
+                    border)))
+    (make empty-element gi: "IMG"
+         attributes: img-attr)))
+
+(define (make-html-area area)
+  (let* ((shape  (attribute-string (normalize "otherunits") area))
+        (coords (attribute-string (normalize "coords") area))
+        (idrefs (attribute-string (normalize "linkends") area))
+        (idlist (if idrefs 
+                    (split idrefs)
+                    '()))
+        (target (if idrefs
+                    (element-with-id (car idlist))
+                    (empty-node-list)))
+        (href   (attribute-string (normalize "label") area)))
+    (if (node-list-empty? target)
+       (process-children)
+       (if idrefs
+           (make empty-element gi: "AREA"
+                 attributes: (list (list "SHAPE" shape)
+                                   (list "COORDS" coords)
+                                   (list "HREF" (href-to target))))
+           (make empty-element gi: "AREA"
+                 attributes: (list (list "SHAPE" shape)
+                                   (list "COORDS" coords)
+                                   (list "HREF" href)))))))
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/contrib/imagemap/testdoc.sgm b/contrib/imagemap/testdoc.sgm
new file mode 100644 (file)
index 0000000..27a833b
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
+<chapter>
+<?dbhtml filename="index.html">
+<title>Test Chapter</title>
+
+<para>First para</para>
+
+<graphicco>
+<areaspec id="clientsidemap">
+   <area id="foo" otherunits="rect" coords="8,13,141,37" label="http://nwalsh.com/">
+   <area id="bar" otherunits="rect" COORDS="165,16,282,37" linkends="sfoo">
+   <area id="baz" otherunits="rect" COORDS="13,55,276,81" label="http://www.oasis-open.org/docbook/">
+</areaspec>
+<graphic fileref="testimg.jpg"></graphic>
+</graphicco>
+
+<para>Second para</para>
+
+<sect1><title>test1</title>
+<para>test1</para>
+</sect1>
+<sect1 id=sfoo><title>test2</title>
+<para>test2</para>
+</sect1>
+<sect1 id=sbar><title>test3</title>
+<para>test3</para>
+</sect1>
+
+</chapter>
diff --git a/contrib/imagemap/testimg.jpg b/contrib/imagemap/testimg.jpg
new file mode 100644 (file)
index 0000000..16b0e92
Binary files /dev/null and b/contrib/imagemap/testimg.jpg differ
diff --git a/contrib/print/ChangeLog b/contrib/print/ChangeLog
new file mode 100644 (file)
index 0000000..e33fa27
--- /dev/null
@@ -0,0 +1,4 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * short-biblioentry.dsl: New file.
+
diff --git a/contrib/print/short-biblioentry.dsl b/contrib/print/short-biblioentry.dsl
new file mode 100644 (file)
index 0000000..131b86b
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification id="docbook-plain" use="docbook">
+<style-specification-body>
+
+(define (biblioentry-inline-elements)
+  (list (normalize "abbrev")
+       (normalize "title")
+       (normalize "subtitle")
+       (normalize "author")
+       (normalize "authorgroup")
+       (normalize "copyright")
+       (normalize "date")
+       (normalize "edition")
+       (normalize "pagenums")
+       (normalize "pubdate")
+       (normalize "publisher")))
+
+(define (biblioentry-block-elements)
+  '())
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/contrib/renumberinpart/ChangeLog b/contrib/renumberinpart/ChangeLog
new file mode 100644 (file)
index 0000000..ab93b29
--- /dev/null
@@ -0,0 +1,4 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * renumberinpart.dsl, test.sgm: New file.
+
diff --git a/contrib/renumberinpart/renumberinpart.dsl b/contrib/renumberinpart/renumberinpart.dsl
new file mode 100644 (file)
index 0000000..a6eb52e
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % html "IGNORE">
+<![%html;[
+<!ENTITY % print "IGNORE">
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
+]]>
+<!ENTITY % print "INCLUDE">
+<![%print;[
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
+]]>
+]>
+
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+(define (chapter-number-restart-list cmp)   (list (normalize "book")
+                                                  (normalize "part")))
+(define (appendix-number-restart-list cmp)  (list (normalize "book")
+                                                  (normalize "part")
+                                                 (normalize "article")))
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/contrib/renumberinpart/test.sgm b/contrib/renumberinpart/test.sgm
new file mode 100644 (file)
index 0000000..41ad428
--- /dev/null
@@ -0,0 +1,19 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
+<book><title>test book</title>
+<part><title>test part I</title>
+<chapter><title>first chapter in part I</title>
+<para>para</para>
+</chapter>
+<chapter><title>second chapter in part I</title>
+<para>para</para>
+</chapter>
+</part>
+<part><title>test part II</title>
+<chapter><title>first chapter in part II</title>
+<para>para</para>
+</chapter>
+<chapter><title>second chapter in part II</title>
+<para>para</para>
+</chapter>
+</part>
+</book>
diff --git a/contrib/subdoc/ChangeLog b/contrib/subdoc/ChangeLog
new file mode 100644 (file)
index 0000000..12e9222
--- /dev/null
@@ -0,0 +1,5 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * book.sgm, subdoc.dsl, subdoc.dtd, subdoc1.sgm, subdoc2.sgm, subdocbc.mod: 
+       New file.
+
diff --git a/contrib/subdoc/book.sgm b/contrib/subdoc/book.sgm
new file mode 100644 (file)
index 0000000..654770a
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE book SYSTEM "subdoc.dtd" [
+<!ENTITY subdoc1 SYSTEM "subdoc1.sgm" NDATA SGML>
+<!ENTITY subdoc2 SYSTEM "subdoc2.sgm" NDATA SGML>
+]>
+<book><title>Book Title</title>
+<chapter><title>Chapter Title</title>
+<para>
+This is a test.
+</para>
+<subdocsection subdoc=subdoc1>
+<subdocsection subdoc=subdoc2>
+</chapter>
+</book>
diff --git a/contrib/subdoc/subdoc.dsl b/contrib/subdoc/subdoc.dsl
new file mode 100644 (file)
index 0000000..e9e7268
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+<!-- Notes:
+
+1. If you use subdocs, you can't enumerate any of the elements that
+   you include by subdoc reference.  There's no way to figure out
+   what the right numbers would be because the stylesheet can't
+   see back past the subdoc reference into the original grove to
+   count.  This is either a Jade or DSSSL bug, I don't recall which.
+
+2. If anything that occurs in a subdoc should appear in the TOC, you'll
+   have to modify the TOC code to find it.
+
+-->
+
+(element subdocsection
+  (let* ((subdoc    (attribute-string (normalize "subdoc")))
+        (targfile  (entity-generated-system-id subdoc))
+        (targdoc   (sgml-parse targfile))
+        (targroot  (node-property 'document-element targdoc)))
+    (process-node-list targroot)))
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
+
diff --git a/contrib/subdoc/subdoc.dtd b/contrib/subdoc/subdoc.dtd
new file mode 100644 (file)
index 0000000..81a4521
--- /dev/null
@@ -0,0 +1,22 @@
+<!-- Make sure that subdocbc.mod gets included at the right place... -->
+<!ENTITY % intermod.redecl.module "INCLUDE">
+<!ENTITY % rdbmods SYSTEM "subdocbc.mod">
+
+<!ENTITY % section.element "IGNORE">
+
+<!ENTITY % docbook PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
+%docbook;
+
+<!ELEMENT Section - - (SectionInfo?,
+                       (%sect.title.content;),
+                       (%nav.class;)*,
+                       (((%divcomponent.mix;)+,
+                         ((%refentry.class;)*|Section*|SubdocSection*))
+                        | (%refentry.class;)+|Section+|SubdocSection+),
+                       (%nav.class;)*)
+                       +(%ubiq.mix;)>
+
+<!ELEMENT SubdocSection - O EMPTY>
+<!ATTLIST SubdocSection
+       Subdoc  ENTITY  #REQUIRED
+>
diff --git a/contrib/subdoc/subdoc1.sgm b/contrib/subdoc/subdoc1.sgm
new file mode 100644 (file)
index 0000000..e625d11
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
+<section><title>A SubDoc Section</title>
+<para>
+This was included as a subdoc.
+</para>
+</section>
diff --git a/contrib/subdoc/subdoc2.sgm b/contrib/subdoc/subdoc2.sgm
new file mode 100644 (file)
index 0000000..64298e1
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
+<section><title>Another SubDoc Section</title>
+<para>
+This was also included as a subdoc.
+</para>
+</section>
diff --git a/contrib/subdoc/subdocbc.mod b/contrib/subdoc/subdocbc.mod
new file mode 100644 (file)
index 0000000..dd1d57e
--- /dev/null
@@ -0,0 +1,29 @@
+<!-- Define entities we'll need for bookcomponent.content -->
+<!ENTITY % local.divcomponent.mix "">
+<!ENTITY % divcomponent.mix
+               "%list.class;           |%admon.class;
+               |%linespecific.class;   |%synop.class;
+               |%para.class;           |%informal.class;
+               |%formal.class;         |%compound.class;
+               |%genobj.class;         |%descobj.class;
+               |%ndxterm.class;
+               %local.divcomponent.mix;">
+
+<!ENTITY % local.refentry.class "">
+<!ENTITY % refentry.class      "RefEntry %local.refentry.class;">
+
+<!ENTITY % bookcomponent.title.content
+       "DocInfo?, Title, Subtitle?, TitleAbbrev?">
+
+<!ENTITY % sect.title.content
+       "Title, Subtitle?, TitleAbbrev?">
+
+<!ENTITY % refsect.title.content
+       "Title, Subtitle?, TitleAbbrev?">
+
+<!-- This modification allows SubdocSection in place of Sections -->
+<!ENTITY % bookcomponent.content
+       "((%divcomponent.mix;)+, 
+       (Sect1*|(%refentry.class;)*|SimpleSect*|Section*|SubdocSection*))
+       | (Sect1+|(%refentry.class;)+|SimpleSect+|Section+|SubdocSection+)">
+
diff --git a/dtds/dbdsssl/ChangeLog b/dtds/dbdsssl/ChangeLog
new file mode 100644 (file)
index 0000000..ddf4754
--- /dev/null
@@ -0,0 +1,4 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbdsssl.dtd: New file.
+
diff --git a/dtds/dbdsssl/dbdsssl.dtd b/dtds/dbdsssl/dbdsssl.dtd
new file mode 100644 (file)
index 0000000..171d857
--- /dev/null
@@ -0,0 +1,147 @@
+<!-- ================================================================= -->
+<!-- A DTD for DSSSL Programming with DocBook.  
+
+     Copyright (C) 1998 Norman Walsh
+     This DTD may be distributed under the same terms as the
+     Modular DocBook Stylesheets (http://nwalsh.com/docbook/dsssl/)
+
+     This DTD is an extension to DocBook that conforms to the DSSSL
+     architecture.  This means that instances of this DTD can be
+     legal DSSSL stylesheets and (almost) legal DocBook documents
+     simultaneously.
+
+     This DTD as DSSSL:
+
+     Instances of this DTD conform to the DSSSL architecture if and
+     only if they contain a BOOK and that BOOK contains one or more
+     PROGRAMLISTINGS.  An EXTERNAL-SPECIFICATION, if required, must
+     be provided in the SETINFO element.
+
+     This DTD as DocBook:
+
+     Instances of this DTD are extensions of DocBook in the following
+     small ways:
+     - SETs may consist of only a single BOOK.
+     - SETINFO may include EXTERNAL-SPECIFICATION.
+     - EXTERNAL-SPECIFICATION is new.
+     - BOOK has two additional attributes, DSSSL (#FIXED) and USE to
+       point to EXTERNAL-SPECIFICATIONs.
+     - PROGRAMLISTING has an additional attribute, DSSSL (#FIXED).
+
+     A typical invocation:
+     <!DOCTYPE book PUBLIC 
+       "+//IDN nwalsh.com//DTD DocBook DSSSL Architecture V1.0//EN">
+-->
+<!-- ================================================================= -->
+
+<!-- =================== Declare the DSSSL Architecture ============== -->
+
+<?IS10744 ArcBase DSSSL>
+<!NOTATION DSSSL   PUBLIC "ISO/IEC 10179:1996//NOTATION
+                   DSSSL Architecture Definition Document//EN"
+                -- A document architecture conforming to the
+                   Architectural Form Definition Requirements of
+                   ISO/IEC 10744.     --
+>
+
+<!ATTLIST #NOTATION DSSSL
+                            -- Support attributes for all architectures --
+  ArcQuant CDATA #FIXED "NAMELEN 64"
+  ArcDTD CDATA #FIXED "%DSSSLDTD"
+  ArcDocF NAME #FIXED dsssl-specification
+  ArcDataF NAME #FIXED dsssl-specification
+>
+
+<!ENTITY % DSSSLDTD PUBLIC
+ "ISO/IEC 10179:1996//DTD DSSSL Architecture//EN"
+>
+
+<!-- ============================ Load DocBook ======================= -->
+
+<!ENTITY % set.module "IGNORE">
+<!ENTITY % setinfo.module "IGNORE">
+<!ENTITY % book.module "IGNORE">
+<!ENTITY % programlisting.module "IGNORE">
+
+<!ENTITY % docbook PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
+%docbook;
+                  
+<!-- ============ Adjust DocBook to fit the DSSSL Architecture ======== -->
+
+<!ENTITY % local.set.attrib "">
+<!ENTITY % set.role.attrib "%role.attrib;">
+<!ELEMENT Set - O ((%div.title.content;)?, SetInfo?, ToC?,
+               (%book.class;)+, SetIndex?)
+               +(%ubiq.mix;)>
+<!ATTLIST Set
+               --
+               FPI: SGML formal public identifier
+               --
+               FPI             CDATA           #IMPLIED
+               %status.attrib;
+               %common.attrib;
+               %set.role.attrib;
+               %local.set.attrib;
+>
+
+<!ENTITY % local.setinfo.attrib "">
+<!ENTITY % setinfo.role.attrib "%role.attrib;">
+<!ELEMENT SetInfo - - ((Graphic | LegalNotice | ModeSpec | SubjectSet 
+       | KeywordSet | ITermSet | %bibliocomponent.mix; 
+       | external-specification)+)
+       -(BeginPage)>
+<!ATTLIST SetInfo
+               --
+               Contents: IDs of the ToC, Books, and SetIndex that comprise 
+               the set, in the order of their appearance
+               --
+               Contents        IDREFS          #IMPLIED
+               %common.attrib;
+               %setinfo.role.attrib;
+               %local.setinfo.attrib;
+>
+
+<!ENTITY % local.book.attrib "">
+<!ENTITY % book.role.attrib "%role.attrib;">
+<!ELEMENT Book - O ((%div.title.content;)?, BookInfo?, Dedication?, ToC?, LoT*, 
+               (Glossary|Bibliography|Preface)*,
+               (((%chapter.class;)+, Reference*) | Part+ 
+               | Reference+ | (%article.class;)+), 
+               (%appendix.class;)*, (Glossary|Bibliography)*, 
+               (%index.class;)*, LoT*, ToC?)
+               +(%ubiq.mix;)>
+<!ATTLIST Book 
+               --
+               FPI: SGML formal public identifier
+               --
+               FPI             CDATA           #IMPLIED
+               %label.attrib;
+               %status.attrib;
+               %common.attrib;
+               %book.role.attrib;
+               %local.book.attrib;
+                DSSSL NAME #FIXED style-specification
+               USE IDREFS #IMPLIED
+>
+
+<!ENTITY % local.programlisting.attrib "">
+<!ENTITY % programlisting.role.attrib "%role.attrib;">
+<!ELEMENT ProgramListing - - ((%programlisting.content;)+)>
+<!ATTLIST ProgramListing
+               %width.attrib;
+               %linespecific.attrib;
+               %common.attrib;
+               %programlisting.role.attrib;
+               %local.programlisting.attrib;
+               DSSSL NAME #FIXED style-specification-body
+>
+
+<!ELEMENT external-specification - o empty>
+<!ATTLIST external-specification
+               ID              ID      #REQUIRED
+               Document        ENTITY  #REQUIRED
+               SpecId          NAME    #IMPLIED
+>
+
+<!-- ================================================================= -->
diff --git a/dtds/decls/ChangeLog b/dtds/decls/ChangeLog
new file mode 100644 (file)
index 0000000..3134eba
--- /dev/null
@@ -0,0 +1,4 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * docbook.dcl, xml.dcl: New file.
+
diff --git a/dtds/decls/docbook.dcl b/dtds/decls/docbook.dcl
new file mode 100644 (file)
index 0000000..bb3a754
--- /dev/null
@@ -0,0 +1,106 @@
+<!SGML  "ISO 8879:1986"
+  -- ...................................................................... --
+  -- DocBook SGML declaration V3.0 ........................................ --
+  -- file docbook.dcl ..................................................... --
+
+CHARSET
+
+       BASESET
+  "ISO 646:1983//CHARSET International Reference Version (IRV)//ESC 2/5 4/0"
+       DESCSET
+                    0   9   UNUSED
+                    9   2     9
+                   11   2   UNUSED
+                   13   1    13
+                   14  18   UNUSED
+                   32  95    32
+                  127   1   UNUSED
+
+       BASESET 
+  "ISO Registration Number 100//CHARSET ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1"
+       DESCSET  
+                  128  32   UNUSED
+                  160  96   32
+
+CAPACITY SGMLREF
+
+       TOTALCAP 99000000
+       ATTCAP    1000000
+       ATTCHCAP  1000000
+       AVGRPCAP  1000000
+       ELEMCAP   1000000
+       ENTCAP    1000000
+       ENTCHCAP  1000000
+       GRPCAP    1000000
+       IDCAP    32000000
+       IDREFCAP 32000000
+  
+SCOPE DOCUMENT
+
+SYNTAX
+
+       SHUNCHAR  CONTROLS   0   1   2   3   4   5   6   7   8   9
+                            10  11  12  13  14  15  16  17  18  19
+                            20  21  22  23  24  25  26  27  28  29
+                            30  31                     127 128 129
+                           130 131 132 133 134 135 136 137 138 139
+                           140 141 142 143 144 145 146 147 148 149
+                           150 151 152 153 154 155 156 157 158 159
+
+       BASESET
+  "ISO 646:1983//CHARSET International Reference Version (IRV)//ESC 2/5 4/0"
+       DESCSET
+                  0   128   0
+
+       FUNCTION
+               RE          13
+               RS          10
+               SPACE       32
+               TAB SEPCHAR  9
+
+       NAMING
+               LCNMSTRT ""
+               UCNMSTRT ""
+               LCNMCHAR ".-"
+               UCNMCHAR ".-"
+               NAMECASE
+                       GENERAL YES
+                       ENTITY  NO
+
+       DELIM
+               GENERAL  SGMLREF
+               SHORTREF SGMLREF
+
+       NAMES SGMLREF
+
+       QUANTITY SGMLREF
+               ATTCNT    256
+               GRPCNT    253
+               GRPGTCNT  253
+               LITLEN   8092
+               NAMELEN    44
+               TAGLVL    100
+
+FEATURES
+
+         MINIMIZE
+                  DATATAG  NO
+                  OMITTAG  NO
+                  RANK     NO
+                  SHORTTAG YES 
+
+         LINK
+                  SIMPLE   NO
+                  IMPLICIT NO
+                  EXPLICIT NO
+
+         OTHER
+                  CONCUR   NO
+                  SUBDOC   NO
+                  FORMAL   YES
+
+APPINFO NONE
+
+  -- End of DocBook SGML declaration V3.0 ................................. --
+  -- ...................................................................... --
+>
diff --git a/dtds/decls/xml.dcl b/dtds/decls/xml.dcl
new file mode 100644 (file)
index 0000000..fed2103
--- /dev/null
@@ -0,0 +1,179 @@
+<!SGML -- SGML Declaration for valid XML documents --
+     "ISO 8879:1986 (WWW)"
+
+     CHARSET
+         BASESET
+             "ISO Registration Number 176//CHARSET
+             ISO/IEC 10646-1:1993 UCS-4 with implementation 
+             level 3//ESC 2/5 2/15 4/6"
+         DESCSET
+                0       9       UNUSED
+                9       2       9
+                11      2       UNUSED
+                13      1       13
+                14      18      UNUSED
+                32      95      32
+                127     1       UNUSED
+                128     32      UNUSED
+             -- use this instead of the official declaration because SP only
+                supports 16-bit characters --
+                160     65374   160
+                65534   2       UNUSED 
+             -- 55296   2048    UNUSED
+                57344   8190    57344
+                65534   2       UNUSED
+                65536   1048576 65536 --
+     CAPACITY NONE
+
+     SCOPE DOCUMENT
+
+     SYNTAX
+         SHUNCHAR NONE
+         BASESET "ISO Registration Number 176//CHARSET
+                 ISO/IEC 10646-1:1993 UCS-4 with implementation 
+                 level 3//ESC 2/5 2/15 4/6"
+         DESCSET
+             0 1114112 0
+         FUNCTION
+             RE    13
+             RS    10
+             SPACE 32
+             TAB   SEPCHAR 9
+
+         NAMING
+             LCNMSTRT ""
+             UCNMSTRT ""
+             NAMESTRT
+                 58 95 192-214 216-246 248-305 308-318 321-328
+                 330-382 384-451 461-496 500-501 506-535 592-680
+                 699-705 902 904-906 908 910-929 931-974 976-982
+                 986 988 990 992 994-1011 1025-1036 1038-1103
+                 1105-1116 1118-1153 1168-1220 1223-1224
+                 1227-1228 1232-1259 1262-1269 1272-1273
+                 1329-1366 1369 1377-1414 1488-1514 1520-1522
+                 1569-1594 1601-1610 1649-1719 1722-1726
+                 1728-1742 1744-1747 1749 1765-1766 2309-2361
+                 2365 2392-2401 2437-2444 2447-2448 2451-2472
+                 2474-2480 2482 2486-2489 2524-2525 2527-2529
+                 2544-2545 2565-2570 2575-2576 2579-2600
+                 2602-2608 2610-2611 2613-2614 2616-2617
+                 2649-2652 2654 2674-2676 2693-2699 2701
+                 2703-2705 2707-2728 2730-2736 2738-2739
+                 2741-2745 2749 2784 2821-2828 2831-2832
+                 2835-2856 2858-2864 2866-2867 2870-2873 2877
+                 2908-2909 2911-2913 2949-2954 2958-2960
+                 2962-2965 2969-2970 2972 2974-2975 2979-2980
+                 2984-2986 2990-2997 2999-3001 3077-3084
+                 3086-3088 3090-3112 3114-3123 3125-3129
+                 3168-3169 3205-3212 3214-3216 3218-3240
+                 3242-3251 3253-3257 3294 3296-3297 3333-3340
+                 3342-3344 3346-3368 3370-3385 3424-3425
+                 3585-3630 3632 3634-3635 3648-3653 3713-3714
+                 3716 3719-3720 3722 3725 3732-3735 3737-3743
+                 3745-3747 3749 3751 3754-3755 3757-3758 3760
+                 3762-3763 3773 3776-3780 3904-3911 3913-3945
+                 4256-4293 4304-4342 4352 4354-4355 4357-4359
+                 4361 4363-4364 4366-4370 4412 4414 4416 4428
+                 4430 4432 4436-4437 4441 4447-4449 4451 4453
+                 4455 4457 4461-4462 4466-4467 4469 4510 4520
+                 4523 4526-4527 4535-4536 4538 4540-4546 4587
+                 4592 4601 7680-7835 7840-7929 7936-7957
+                 7960-7965 7968-8005 8008-8013 8016-8023 8025
+                 8027 8029 8031-8061 8064-8116 8118-8124 8126
+                 8130-8132 8134-8140 8144-8147 8150-8155
+                 8160-8172 8178-8180 8182-8188 8486 8490-8491
+                 8494 8576-8578 12295 12321-12329 12353-12436
+                 12449-12538 12549-12588 19968-40869 44032-55203
+
+             LCNMCHAR ""
+             UCNMCHAR ""
+             NAMECHAR
+                 45-46 183 720-721 768-837 864-865 903 1155-1158
+                 1425-1441 1443-1465 1467-1469 1471 1473-1474
+                 1476 1600 1611-1618 1632-1641 1648 1750-1764
+                 1767-1768 1770-1773 1776-1785 2305-2307 2364
+                 2366-2381 2385-2388 2402-2403 2406-2415
+                 2433-2435 2492 2494-2500 2503-2504 2507-2509
+                 2519 2530-2531 2534-2543 2562 2620 2622-2626
+                 2631-2632 2635-2637 2662-2673 2689-2691 2748
+                 2750-2757 2759-2761 2763-2765 2790-2799
+                 2817-2819 2876 2878-2883 2887-2888 2891-2893
+                 2902-2903 2918-2927 2946-2947 3006-3010
+                 3014-3016 3018-3021 3031 3047-3055 3073-3075
+                 3134-3140 3142-3144 3146-3149 3157-3158
+                 3174-3183 3202-3203 3262-3268 3270-3272
+                 3274-3277 3285-3286 3302-3311 3330-3331
+                 3390-3395 3398-3400 3402-3405 3415 3430-3439
+                 3633 3636-3642 3654-3662 3664-3673 3761
+                 3764-3769 3771-3772 3782 3784-3789 3792-3801
+                 3864-3865 3872-3881 3893 3895 3897 3902-3903
+                 3953-3972 3974-3979 3984-3989 3991 3993-4013
+                 4017-4023 4025 8400-8412 8417 12293 12330-12335
+                 12337-12341 12441-12442 12445-12446 12540-12542
+
+             NAMECASE
+                 GENERAL NO
+                 ENTITY  NO
+
+         DELIM
+             GENERAL SGMLREF
+             HCRO "&#38;#x" -- 38 is the number for ampersand --
+             NESTC "/"
+             NET ">"
+             PIC "?>"
+             SHORTREF NONE
+
+         NAMES
+             SGMLREF
+
+         QUANTITY NONE
+
+         ENTITIES
+             "amp" 38
+             "lt" 60
+             "gt" 62
+             "quot" 34
+             "apos" 39
+
+     FEATURES
+         MINIMIZE
+             DATATAG NO
+             OMITTAG NO
+             RANK NO
+             SHORTTAG
+                 STARTTAG
+                     EMPTY NO
+                     UNCLOSED NO 
+                     NETENABL IMMEDNET
+                 ENDTAG
+                     EMPTY NO 
+                     UNCLOSED NO
+                 ATTRIB
+                     DEFAULT YES
+                     OMITNAME NO
+                     VALUE NO
+             EMPTYNRM YES
+             IMPLYDEF
+                 ATTLIST NO
+                 DOCTYPE NO
+                 ELEMENT NO
+                 ENTITY NO
+                 NOTATION NO
+         LINK
+             SIMPLE NO
+             IMPLICIT NO
+             EXPLICIT NO
+         OTHER
+             CONCUR NO
+             SUBDOC NO
+             FORMAL NO
+             URN NO
+             KEEPRSRE YES
+             VALIDITY TYPE
+             ENTITIES
+                 REF ANY
+                 INTEGRAL YES
+     APPINFO NONE
+     SEEALSO "ISO 8879:1986//NOTATION
+             Extensible Markup Language (XML) 1.0//EN"
+>
diff --git a/dtds/html/ChangeLog b/dtds/html/ChangeLog
new file mode 100644 (file)
index 0000000..fb1c4f0
--- /dev/null
@@ -0,0 +1,5 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * ISOlat1.gml, catalog, dbhtml.dcl, dbhtml.dtd, test.htm: 
+       New file.
+
diff --git a/dtds/html/ISOlat1.gml b/dtds/html/ISOlat1.gml
new file mode 100644 (file)
index 0000000..88ad6f2
--- /dev/null
@@ -0,0 +1,74 @@
+<!-- (C) International Organization for Standardization 1986
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % ISOlat1 PUBLIC
+       "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
+     %ISOlat1;
+-->
+<!--   Modified for use in HTML
+       $Id: ISOlat1.gml,v 1.1 2001/04/02 21:40:27 nwalsh Exp $ -->
+<!ENTITY AElig  CDATA "&#198;" -- capital AE diphthong (ligature) -->
+<!ENTITY Aacute CDATA "&#193;" -- capital A, acute accent -->
+<!ENTITY Acirc  CDATA "&#194;" -- capital A, circumflex accent -->
+<!ENTITY Agrave CDATA "&#192;" -- capital A, grave accent -->
+<!ENTITY Aring  CDATA "&#197;" -- capital A, ring -->
+<!ENTITY Atilde CDATA "&#195;" -- capital A, tilde -->
+<!ENTITY Auml   CDATA "&#196;" -- capital A, dieresis or umlaut mark -->
+<!ENTITY Ccedil CDATA "&#199;" -- capital C, cedilla -->
+<!ENTITY ETH    CDATA "&#208;" -- capital Eth, Icelandic -->
+<!ENTITY Eacute CDATA "&#201;" -- capital E, acute accent -->
+<!ENTITY Ecirc  CDATA "&#202;" -- capital E, circumflex accent -->
+<!ENTITY Egrave CDATA "&#200;" -- capital E, grave accent -->
+<!ENTITY Euml   CDATA "&#203;" -- capital E, dieresis or umlaut mark -->
+<!ENTITY Iacute CDATA "&#205;" -- capital I, acute accent -->
+<!ENTITY Icirc  CDATA "&#206;" -- capital I, circumflex accent -->
+<!ENTITY Igrave CDATA "&#204;" -- capital I, grave accent -->
+<!ENTITY Iuml   CDATA "&#207;" -- capital I, dieresis or umlaut mark -->
+<!ENTITY Ntilde CDATA "&#209;" -- capital N, tilde -->
+<!ENTITY Oacute CDATA "&#211;" -- capital O, acute accent -->
+<!ENTITY Ocirc  CDATA "&#212;" -- capital O, circumflex accent -->
+<!ENTITY Ograve CDATA "&#210;" -- capital O, grave accent -->
+<!ENTITY Oslash CDATA "&#216;" -- capital O, slash -->
+<!ENTITY Otilde CDATA "&#213;" -- capital O, tilde -->
+<!ENTITY Ouml   CDATA "&#214;" -- capital O, dieresis or umlaut mark -->
+<!ENTITY THORN  CDATA "&#222;" -- capital THORN, Icelandic -->
+<!ENTITY Uacute CDATA "&#218;" -- capital U, acute accent -->
+<!ENTITY Ucirc  CDATA "&#219;" -- capital U, circumflex accent -->
+<!ENTITY Ugrave CDATA "&#217;" -- capital U, grave accent -->
+<!ENTITY Uuml   CDATA "&#220;" -- capital U, dieresis or umlaut mark -->
+<!ENTITY Yacute CDATA "&#221;" -- capital Y, acute accent -->
+<!ENTITY aacute CDATA "&#225;" -- small a, acute accent -->
+<!ENTITY acirc  CDATA "&#226;" -- small a, circumflex accent -->
+<!ENTITY aelig  CDATA "&#230;" -- small ae diphthong (ligature) -->
+<!ENTITY agrave CDATA "&#224;" -- small a, grave accent -->
+<!ENTITY aring  CDATA "&#229;" -- small a, ring -->
+<!ENTITY atilde CDATA "&#227;" -- small a, tilde -->
+<!ENTITY auml   CDATA "&#228;" -- small a, dieresis or umlaut mark -->
+<!ENTITY ccedil CDATA "&#231;" -- small c, cedilla -->
+<!ENTITY eacute CDATA "&#233;" -- small e, acute accent -->
+<!ENTITY ecirc  CDATA "&#234;" -- small e, circumflex accent -->
+<!ENTITY egrave CDATA "&#232;" -- small e, grave accent -->
+<!ENTITY eth    CDATA "&#240;" -- small eth, Icelandic -->
+<!ENTITY euml   CDATA "&#235;" -- small e, dieresis or umlaut mark -->
+<!ENTITY iacute CDATA "&#237;" -- small i, acute accent -->
+<!ENTITY icirc  CDATA "&#238;" -- small i, circumflex accent -->
+<!ENTITY igrave CDATA "&#236;" -- small i, grave accent -->
+<!ENTITY iuml   CDATA "&#239;" -- small i, dieresis or umlaut mark -->
+<!ENTITY ntilde CDATA "&#241;" -- small n, tilde -->
+<!ENTITY oacute CDATA "&#243;" -- small o, acute accent -->
+<!ENTITY ocirc  CDATA "&#244;" -- small o, circumflex accent -->
+<!ENTITY ograve CDATA "&#242;" -- small o, grave accent -->
+<!ENTITY oslash CDATA "&#248;" -- small o, slash -->
+<!ENTITY otilde CDATA "&#245;" -- small o, tilde -->
+<!ENTITY ouml   CDATA "&#246;" -- small o, dieresis or umlaut mark -->
+<!ENTITY szlig  CDATA "&#223;" -- small sharp s, German (sz ligature) -->
+<!ENTITY thorn  CDATA "&#254;" -- small thorn, Icelandic -->
+<!ENTITY uacute CDATA "&#250;" -- small u, acute accent -->
+<!ENTITY ucirc  CDATA "&#251;" -- small u, circumflex accent -->
+<!ENTITY ugrave CDATA "&#249;" -- small u, grave accent -->
+<!ENTITY uuml   CDATA "&#252;" -- small u, dieresis or umlaut mark -->
+<!ENTITY yacute CDATA "&#253;" -- small y, acute accent -->
+<!ENTITY yuml   CDATA "&#255;" -- small y, dieresis or umlaut mark -->
diff --git a/dtds/html/catalog b/dtds/html/catalog
new file mode 100644 (file)
index 0000000..9edf124
--- /dev/null
@@ -0,0 +1,3 @@
+PUBLIC   "-//Norman Walsh//DTD DocBook HTML 1.0//EN"       dbhtml.dtd
+PUBLIC   "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML" ISOlat1.gml
+SGMLDECL dbhtml.dcl
diff --git a/dtds/html/dbhtml.dcl b/dtds/html/dbhtml.dcl
new file mode 100644 (file)
index 0000000..95eaf2a
--- /dev/null
@@ -0,0 +1,76 @@
+<!SGML  "ISO 8879:1986"
+
+CHARSET
+         BASESET  "ISO 646:1983//CHARSET
+                   International Reference Version
+                   (IRV)//ESC 2/5 4/0"
+         DESCSET  0   9   UNUSED
+                  9   2   9
+                  11  2   UNUSED
+                  13  1   13
+                  14  18  UNUSED
+                  32  95  32
+                  127 1   UNUSED
+     BASESET   "ISO Registration Number 100//CHARSET
+                ECMA-94 Right Part of
+                Latin Alphabet Nr. 1//ESC 2/13 4/1"
+
+         DESCSET  128  32   32
+                  160  96   32
+
+CAPACITY        SGMLREF
+                TOTALCAP        150000
+                GRPCAP          150000
+                ENTCAP          150000
+  
+SCOPE    DOCUMENT
+SYNTAX   
+         SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+                 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 127
+         BASESET  "ISO 646:1983//CHARSET
+                   International Reference Version
+                   (IRV)//ESC 2/5 4/0"
+         DESCSET  0 128 0
+         FUNCTION
+                  RE          13
+                  RS          10
+                  SPACE       32
+                  TAB SEPCHAR  9
+        
+
+         NAMING   LCNMSTRT ""
+                  UCNMSTRT ""
+                  LCNMCHAR ".-"
+                  UCNMCHAR ".-"
+                  NAMECASE GENERAL YES
+                           ENTITY  NO
+         DELIM    GENERAL  SGMLREF
+                  SHORTREF SGMLREF
+         NAMES    SGMLREF
+         QUANTITY SGMLREF
+                  ATTSPLEN 2100
+                  LITLEN   1024
+                  NAMELEN  72    -- somewhat arbitrary; taken from
+                                internet line length conventions --
+                  PILEN    1024
+                  TAGLVL   100
+                  TAGLEN   2100
+                  GRPGTCNT 150
+                  GRPCNT   64                   
+
+FEATURES
+  MINIMIZE
+    DATATAG  NO
+    OMITTAG  YES
+    RANK     NO
+    SHORTTAG YES
+  LINK
+    SIMPLE   NO
+    IMPLICIT NO
+    EXPLICIT NO
+  OTHER
+    CONCUR   NO
+    SUBDOC   NO
+    FORMAL   YES
+  APPINFO    "SDA"  -- conforming SGML Document Access application
+                    -- >
diff --git a/dtds/html/dbhtml.dtd b/dtds/html/dbhtml.dtd
new file mode 100644 (file)
index 0000000..c9ccc61
--- /dev/null
@@ -0,0 +1,604 @@
+<!-- $Id: dbhtml.dtd,v 1.1 2001/04/02 21:40:27 nwalsh Exp $
+
+     DTD for the HTML produced by the DocBook Modular Stylesheets.
+     Derived from W3C HTML 3.2.
+
+     Common declaration:
+   
+     <!DOCTYPE html PUBLIC "-//Norman Walsh//DTD DocBook HTML 1.0//EN">
+
+-->
+
+<!ENTITY % HTML.Version
+        "-//Norman Walsh//DTD DocBook HTML 1.0//EN"
+        >
+
+<!ENTITY % version.attr "VERSION CDATA #FIXED '%HTML.Version;'">
+
+<!--================== Additions ==========================================-->
+
+<!ENTITY % common.atts
+       "CLASS          CDATA   #IMPLIED
+        STYLE          CDATA   #IMPLIED">
+
+<!--================== Imported Names =====================================-->
+
+<!ENTITY % Content-Type "CDATA"
+        -- meaning a MIME content type, as per RFC1521
+        -->
+
+<!ENTITY % HTTP-Method "GET | POST"
+        -- as per HTTP specification
+        -->
+
+<!ENTITY % URL "CDATA"
+        -- The term URL means a CDATA attribute
+           whose value is a Uniform Resource Locator,
+           See RFC1808 (June 95) and RFC1738 (Dec 94).
+        -->
+
+<!-- Parameter Entities -->
+
+<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK" -- repeatable head elements -->
+
+<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
+
+<!ENTITY % list "UL | OL">
+
+<!ENTITY % preformatted "PRE">
+
+<!--================ Character mnemonic entities ==========================-->
+
+<!ENTITY % ISOlat1 PUBLIC
+       "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
+%ISOlat1;
+
+<!--================ Entities for special symbols =========================-->
+<!-- &trade &shy and &cbsp are not widely deployed and so not included here -->
+
+<!ENTITY copy   CDATA "&#169"   -- copyright sign     -->
+<!ENTITY reg    CDATA "&#174"   -- registered sign    -->
+<!ENTITY amp    CDATA "&#38;"   -- ampersand          -->
+<!ENTITY gt     CDATA "&#62;"   -- greater than       -->
+<!ENTITY lt     CDATA "&#60;"   -- less than          -->
+<!ENTITY quot   CDATA "&#34;"   -- double quote       -->
+<!ENTITY nbsp   CDATA "&#160;"  -- non breaking space -->
+
+<!ENTITY mdash  CDATA "&#150;"  -- em dash -->
+<!ENTITY ndash  CDATA "&#151;"  -- en dash -->
+<!ENTITY trade  CDATA "&#153;"  -- trademark -->
+
+<!--=================== Text Markup =======================================-->
+
+<!ENTITY % font "TT | I | B  | U | STRIKE | SUB | SUP">
+
+<!ENTITY % phrase "EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | SPAN">
+
+<!ENTITY % special "A | IMG | APPLET | FONT | BR | SCRIPT | MAP">
+
+<!ENTITY % form "INPUT | SELECT | TEXTAREA">
+
+<!ENTITY % text "#PCDATA | %font | %phrase | %special | %form">
+
+<!ELEMENT (%font|%phrase) - - (%text)*>
+<!ATTLIST (%font|%phrase)
+    %common.atts;
+    >
+
+<!-- there are also 16 widely known color names although
+  the resulting colors are implementation dependent:
+
+   aqua, black, blue, fuchsia, gray, green, lime, maroon,
+   navy, olive, purple, red, silver, teal, white, and yellow
+
+ These colors were originally picked as being the standard
+ 16 colors supported with the Windows VGA palette.
+ -->
+
+<!ELEMENT FONT - - (%text)*     -- local change to font -->
+<!ATTLIST FONT
+    %common.atts;
+    size    CDATA   #IMPLIED    -- [+]nn e.g. size="+1", size=4 --
+    color   CDATA   #IMPLIED    -- #RRGGBB in hex, e.g. red: color="#FF0000" --
+    >
+
+<!ELEMENT BR    - O EMPTY    -- forced line break -->
+<!ATTLIST BR
+    %common.atts;
+    clear (left|all|right|none) none -- control of text flow --
+    >
+
+<!--================== HTML content models ================================-->
+<!--
+    HTML has three basic content models:
+
+        %text       character level elements and text strings
+        %flow       block-like elements e.g. paragraphs and lists
+        %bodytext   as (b) plus headers and ADDRESS
+-->
+
+<!ENTITY % block
+     "P | %list | %preformatted | DL | DIV | 
+      BLOCKQUOTE | FORM | HR | TABLE">
+
+<!-- %flow is used for DD and LI -->
+
+<!ENTITY % flow "(%text | %block)*">
+
+<!--=================== Document Body =====================================-->
+
+<!ENTITY % body.content "(%heading | %text | %block | ADDRESS)*">
+
+<!ENTITY % color "CDATA" -- a color specification: #HHHHHH @@ details? -->
+
+<!ENTITY % body-color-attrs "
+        bgcolor %color #IMPLIED
+        text %color #IMPLIED
+        link %color #IMPLIED
+        vlink %color #IMPLIED
+        alink %color #IMPLIED
+        ">
+
+<!ELEMENT BODY O O  %body.content>
+<!ATTLIST BODY
+    %common.atts;
+    background %URL #IMPLIED  -- texture tile for document background --
+    %body-color-attrs;  -- bgcolor, text, link, vlink, alink --
+    >
+
+<!ENTITY % address.content "((%text;) | P)*">
+
+<!ELEMENT ADDRESS - - %address.content>
+<!ATTLIST ADDRESS
+    %common.atts;
+    >
+
+<!ELEMENT DIV - - %body.content>
+<!ATTLIST DIV
+    %common.atts;
+    align   (left|center|right) #IMPLIED -- alignment of following text --
+    >
+
+<!--================== The Anchor Element =================================-->
+
+<!ELEMENT A - - (%text)* -(A)>
+<!ATTLIST A
+    %common.atts;
+    name    CDATA   #IMPLIED    -- named link end --
+    href    %URL    #IMPLIED    -- URL for linked resource --
+    rel     CDATA   #IMPLIED    -- forward link types --
+    rev     CDATA   #IMPLIED    -- reverse link types --
+    title   CDATA   #IMPLIED    -- advisory title string --
+    target  CDATA   #IMPLIED    -- target of HREF (frame) --
+    >
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+     separate document although this isn't yet widely supported -->
+
+<!ENTITY % SHAPE "(rect|circle|poly|default)">
+<!ENTITY % COORDS "CDATA" -- comma separated list of numbers -->
+
+<!ELEMENT MAP - - (AREA)*>
+<!ATTLIST MAP
+    %common.atts;
+    name    CDATA   #IMPLIED
+    >
+
+<!ELEMENT AREA - O EMPTY>
+<!ATTLIST AREA
+    %common.atts;
+    shape   %SHAPE  rect
+    coords  %COORDS #IMPLIED  -- always needed except for shape=default --
+    href    %URL    #IMPLIED  -- this region acts as hypertext link --
+    nohref (nohref) #IMPLIED  -- this region has no action --
+    alt     CDATA   #REQUIRED
+    >
+
+<!--================== The LINK Element ==================================-->
+
+<!ENTITY % Types "CDATA"
+        -- See Internet Draft: draft-ietf-html-relrev-00.txt
+           LINK has been part of HTML since the early days
+           although few browsers as yet take advantage of it.
+
+           Relationship values can be used in principle:
+
+                a) for document specific toolbars/menus when used
+                   with the LINK element in document head:
+                b) to link to a separate style sheet (rel=stylesheet)
+                c) to make a link to a script (rel=script)
+                d) by stylesheets to control how collections of
+                   html nodes are rendered into printed documents
+                e) to make a link to a printable version of this document
+                   e.g. a postscript or pdf version (rel=print)
+-->
+
+<!ELEMENT LINK - O EMPTY>
+<!ATTLIST LINK
+    %common.atts;
+    type    CDATA   #IMPLIED    -- What type of link is this? --
+    href    %URL    #IMPLIED    -- URL for linked resource --
+    rel     %Types  #IMPLIED    -- forward link types --
+    rev     %Types  #IMPLIED    -- reverse link types --
+    title   CDATA   #IMPLIED    -- advisory title string --
+    >
+
+<!--=================== Images ============================================-->
+
+<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
+<!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
+
+<!-- Suggested widths are used for negotiating image size
+     with the module responsible for painting the image.
+     align=left or right cause image to float to margin
+     and for subsequent text to wrap around image -->
+
+<!ENTITY % IAlign "(top|middle|bottom|left|right)">
+
+<!ELEMENT IMG    - O EMPTY --  Embedded image -->
+<!ATTLIST IMG
+    %common.atts;
+    src     %URL     #REQUIRED  -- URL of image to embed --
+    alt     CDATA    #IMPLIED   -- for display in place of image --
+    align   %IAlign  #IMPLIED   -- vertical or horizontal alignment --
+    height  %Pixels  #IMPLIED   -- suggested height in pixels --
+    width   %Pixels  #IMPLIED   -- suggested width in pixels --
+    border  %Pixels  #IMPLIED   -- suggested link border width --
+    hspace  %Pixels  #IMPLIED   -- suggested horizontal gutter --
+    vspace  %Pixels  #IMPLIED   -- suggested vertical gutter --
+    usemap  %URL     #IMPLIED   -- use client-side image map --
+    ismap   (ismap)  #IMPLIED   -- use server image map --
+    >
+
+<!-- USEMAP points to a MAP element which may be in this document
+  or an external document, although the latter is not widely supported -->
+
+<!--=================== Java APPLET tag ===================================-->
+<!--
+  This tag is supported by all java enabled browsers. Applet resources
+  (including their classes) are normally loaded relative to the document
+  URL (or <BASE> element if it is defined). The CODEBASE attribute is used
+  to change this default behavior. If the CODEBASE attribute is defined then
+  it specifies a different location to find applet resources. The value
+  can be an absolute URL or a relative URL. The absolute URL is used as is
+  without modification and is not effected by the documents <BASE> element.
+  When the codebase attribute is relative, then it is relative to the
+  document URL (or <BASE> tag if defined).
+-->
+<!ELEMENT APPLET - - (%text)* +(PARAM)>
+<!ATTLIST APPLET
+    %common.atts;
+    codebase %URL     #IMPLIED   -- code base --
+    code     CDATA    #REQUIRED  -- class file --
+    alt      CDATA    #IMPLIED   -- for display in place of applet --
+    name     CDATA    #IMPLIED   -- applet name --
+    width    %Pixels  #REQUIRED  -- suggested width in pixels --
+    height   %Pixels  #REQUIRED  -- suggested height in pixels --
+    align    %IAlign  #IMPLIED   -- vertical or horizontal alignment --
+    hspace   %Pixels  #IMPLIED   -- suggested horizontal gutter --
+    vspace   %Pixels  #IMPLIED   -- suggested vertical gutter --
+    >
+
+<!ELEMENT PARAM - O EMPTY>
+<!ATTLIST PARAM
+    %common.atts;
+    name    NAME      #REQUIRED  -- The name of the parameter --
+    value   CDATA     #IMPLIED   -- The value of the parameter --
+    >
+
+<!--
+Here is an example:
+
+    <applet codebase="applets/NervousText"
+        code=NervousText.class
+        width=300
+        height=50>
+    <param name=text value="Java is Cool!">
+    <img src=sorry.gif alt="This looks better with Java support">
+    </applet>
+-->
+
+<!--=================== Horizontal Rule ===================================-->
+
+<!ELEMENT HR    - O EMPTY>
+<!ATTLIST HR
+    %common.atts;
+    align (left|right|center) #IMPLIED
+    noshade (noshade) #IMPLIED
+    size  %Pixels #IMPLIED
+    width %Length #IMPLIED
+    >
+<!--=================== Paragraphs=========================================-->
+
+<!ELEMENT P     - O (%block|%text)*>
+<!ATTLIST P
+    %common.atts;
+    align  (left|center|right) #IMPLIED
+    >
+
+<!--=================== Headings ==========================================-->
+
+<!--
+  There are six levels of headers from H1 (the most important)
+  to H6 (the least important).
+-->
+
+<!ELEMENT ( %heading )  - -  (%text;)*>
+<!ATTLIST ( %heading )
+    %common.atts;
+    align  (left|center|right) #IMPLIED
+    >
+
+<!--=================== Preformatted Text =================================-->
+
+<!-- excludes images and changes in font size -->
+
+<!ENTITY % pre.exclusion "IMG|SUB|SUP|FONT">
+
+<!ELEMENT PRE - - (%text)* -(%pre.exclusion)>
+<!ATTLIST PRE
+    %common.atts;
+    width NUMBER #implied -- is this widely supported? --
+    >
+
+<!--=================== Block-like Quotes =================================-->
+
+<!ELEMENT BLOCKQUOTE - - %body.content>
+<!ATTLIST BLOCKQUOTE
+    %common.atts;
+    >
+
+<!--=================== Lists =============================================-->
+
+<!--
+    HTML 3.2 allows you to control the sequence number for ordered lists.
+    You can set the sequence number with the START and VALUE attributes.
+    The TYPE attribute may be used to specify the rendering of ordered
+    and unordered lists.
+-->
+
+<!-- definition lists - DT for term, DD for its definition -->
+
+<!ELEMENT DL    - -  (DT|DD)*>
+<!ATTLIST DL
+    %common.atts;
+    compact (compact) #IMPLIED -- more compact style --
+    >
+
+<!ELEMENT DT - O  (%text)*>
+<!ATTLIST DT
+    %common.atts;
+    >
+
+<!ELEMENT DD O O  %flow;>
+<!ATTLIST DD
+    %common.atts;
+    >
+
+<!-- Ordered lists OL, and unordered lists UL -->
+<!ELEMENT (OL|UL) - -  (LI)*>
+
+<!--
+       Numbering style
+    1   arablic numbers     1, 2, 3, ...
+    a   lower alpha         a, b, c, ...
+    A   upper alpha         A, B, C, ...
+    i   lower roman         i, ii, iii, ...
+    I   upper roman         I, II, III, ...
+
+    The style is applied to the sequence number which by default
+    is reset to 1 for the first list item in an ordered list.
+
+    This can't be expressed directly in SGML due to case folding.
+-->
+
+<!ENTITY % OLStyle "CDATA" -- constrained to: [1|a|A|i|I] -->
+
+<!ATTLIST OL -- ordered lists --
+    %common.atts;
+    type      %OLStyle   #IMPLIED   -- numbering style --
+    start     NUMBER     #IMPLIED   -- starting sequence number --
+    compact  (compact)   #IMPLIED   -- reduced interitem spacing --
+    >
+
+<!-- bullet styles -->
+
+<!ENTITY % ULStyle "disc|square|circle">
+
+<!ATTLIST UL -- unordered lists --
+    %common.atts;
+    type    (%ULStyle)   #IMPLIED   -- bullet style --
+    compact (compact)    #IMPLIED   -- reduced interitem spacing --
+    >
+
+<!-- The type attribute can be used to change the bullet style
+     in unordered lists and the numbering style in ordered lists -->
+
+<!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle|%OLStyle)" -->
+
+<!ELEMENT LI - O %flow -- list item -->
+<!ATTLIST LI
+    %common.atts;
+    type    %LIStyle     #IMPLIED   -- list item style --
+    value    NUMBER      #IMPLIED   -- reset sequence number --
+    >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT FORM - - %body.content -(FORM)>
+<!ATTLIST FORM
+    %common.atts;
+    action %URL #IMPLIED  -- server-side form handler --
+    method (%HTTP-Method) GET -- see HTTP specification --
+    enctype %Content-Type; "application/x-www-form-urlencoded"
+    >
+
+<!ENTITY % InputType
+        "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT
+            | RESET | FILE | HIDDEN | IMAGE)">
+
+<!ELEMENT INPUT - O EMPTY>
+<!ATTLIST INPUT
+    %common.atts;
+    type %InputType TEXT     -- what kind of widget is needed --
+    name  CDATA #IMPLIED     -- required for all but submit and reset --
+    value CDATA #IMPLIED     -- required for radio and checkboxes --
+    checked (checked) #IMPLIED -- for radio buttons and check boxes --
+    size CDATA  #IMPLIED     -- specific to each type of field --
+    maxlength NUMBER #IMPLIED
+    src   %URL  #IMPLIED     -- for fields with background images --
+    align  (top|middle|bottom|left|right) top -- image alignment --
+    >
+
+<!ELEMENT SELECT - - (OPTION+)>
+<!ATTLIST SELECT
+    %common.atts;
+    name CDATA #REQUIRED
+    size NUMBER #IMPLIED
+    multiple (multiple) #IMPLIED
+    >
+
+<!ELEMENT OPTION - O (#PCDATA)*>
+<!ATTLIST OPTION
+    %common.atts;
+    selected (selected) #IMPLIED
+    value  CDATA  #IMPLIED -- defaults to element content --
+    >
+
+<!-- Multi-line text input field. -->
+
+<!ELEMENT TEXTAREA - - (#PCDATA)*>
+<!ATTLIST TEXTAREA
+    %common.atts;
+    name CDATA #REQUIRED
+    rows NUMBER #REQUIRED
+    cols NUMBER #REQUIRED
+    >
+
+<!--======================= Tables ========================================-->
+
+<!-- Widely deployed subset of the full table standard, see RFC 1942
+     e.g. at http://www.ics.uci.edu/pub/ietf/html/rfc1942.txt -->
+
+<!-- horizontal placement of table relative to window -->
+<!ENTITY % Where "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents -->
+<!ENTITY % cell.halign
+        "align  (left|center|right) #IMPLIED"
+        >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cell.valign
+        "valign  (top|middle|bottom|baseline)  #IMPLIED"
+        >
+
+<!ELEMENT table - - (caption?, tr+)>
+<!ATTLIST table                       -- table element --
+    %common.atts;
+    align     %Where;   #IMPLIED  -- table position relative to window --
+    width     %Length   #IMPLIED  -- table width relative to window --
+    border    %Pixels   #IMPLIED  -- controls frame width around table --
+    dummy     (border)  #IMPLIED  -- fixes SGML error for border w/o value --
+    cellspacing %Pixels #IMPLIED  -- spacing between cells --
+    cellpadding %Pixels #IMPLIED  -- spacing within cells --
+    >
+
+<!ELEMENT tr - O (th|td)*>
+<!ATTLIST tr                       -- table row --
+    %common.atts;
+    %cell.halign;              -- horizontal alignment in cells --
+    %cell.valign;              -- vertical alignment in cells --
+    >
+
+<!ELEMENT (th|td) - O %body.content>
+<!ATTLIST (th|td)                  -- header or data cell --
+    %common.atts;
+    nowrap (nowrap)  #IMPLIED  -- suppress word wrap --
+    rowspan NUMBER   1         -- number of rows spanned by cell --
+    colspan NUMBER   1         -- number of cols spanned by cell --
+    %cell.halign;              -- horizontal alignment in cell --
+    %cell.valign;              -- vertical alignment in cell --
+    width   %Pixels  #IMPLIED  -- suggested width for cell --
+    height  %Pixels  #IMPLIED  -- suggested height for cell --
+    >
+
+<!ELEMENT CAPTION - - (%text;)* -- table or figure caption -->
+<!ATTLIST CAPTION
+    %common.atts;
+    align (top|bottom) #IMPLIED
+    >
+
+<!--================ Document Head ========================================-->
+
+<!-- %head.misc defined earlier on as "SCRIPT|STYLE|META|LINK" -->
+
+<!ENTITY % head.content "TITLE & BASE?">
+
+<!ELEMENT HEAD O O  (%head.content) +(%head.misc)>
+<!ATTLIST HEAD
+    %common.atts;
+    >
+
+<!ELEMENT TITLE - -  (#PCDATA)* -(%head.misc)
+          -- The TITLE element is not considered part of the flow of text.
+             It should be displayed, for example as the page header or
+             window title.
+          -->
+<!ATTLIST TITLE
+    %common.atts;
+    >
+
+<!--
+    The BASE element gives an absolute URL for dereferencing relative
+    URLs, e.g.
+
+         <BASE href="http://foo.com/index.html">
+         ...
+         <IMG SRC="images/bar.gif">
+
+    The image is deferenced to
+
+         http://foo.com/images/bar.gif
+
+   In the absence of a BASE element the document URL should be used.
+   Note that this is not necessarily the same as the URL used to
+   request the document, as the base URL may be overridden by an HTTP
+   header accompanying the document.
+-->
+
+<!ELEMENT BASE - O EMPTY>
+<!ATTLIST BASE
+    %common.atts;
+    href %URL  #REQUIRED
+    >
+
+<!ELEMENT META - O EMPTY -- Generic Metainformation -->
+<!ATTLIST META
+    %common.atts;
+    http-equiv  NAME    #IMPLIED  -- HTTP response header name  --
+    name        NAME    #IMPLIED  -- metainformation name       --
+    content     CDATA   #REQUIRED -- associated information     --
+    >
+
+<!-- SCRIPT/STYLE are place holders for transition to next version of HTML -->
+
+<!ELEMENT STYLE  - - (#PCDATA)*  -(%head.misc) -- style info -->
+<!ATTLIST STYLE
+    %common.atts;
+    >
+
+<!ELEMENT SCRIPT - - (#PCDATA)*  -(%head.misc) -- script statements -->
+<!ATTLIST SCRIPT
+    %common.atts;
+    >
+
+<!--================ Document Structure ===================================-->
+
+<!ELEMENT HTML O O  (HEAD, BODY)>
+<!ATTLIST HTML
+    %common.atts;
+    %version.attr;
+    >
diff --git a/dtds/html/test.htm b/dtds/html/test.htm
new file mode 100644 (file)
index 0000000..a350dbf
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML SYSTEM "dbhtml.dtd">
+<html>
+<head>
+<title>Title</title>
+</head>
+<body>
+<h1>Foo!</h1>
+<p>Para
+<ol><li>Bar!
+</ol>
+</p>
+</body>
+</html>
diff --git a/dtds/imagelib/ChangeLog b/dtds/imagelib/ChangeLog
new file mode 100644 (file)
index 0000000..d84499a
--- /dev/null
@@ -0,0 +1,4 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * imagelib.dtd: New file.
+
diff --git a/dtds/imagelib/imagelib.dtd b/dtds/imagelib/imagelib.dtd
new file mode 100644 (file)
index 0000000..d2c9329
--- /dev/null
@@ -0,0 +1,62 @@
+<!-- $Id: imagelib.dtd,v 1.1 2001/04/02 21:40:27 nwalsh Exp $
+
+     DTD for the image-library files used by the Modular DocBook
+     Stylesheets.
+
+     Common declaration:
+   
+     <?xml version='1.0'?>
+     <!DOCTYPE image-library 
+               PUBLIC "-//Norman Walsh//DTD Image Library 1.0//EN" "">
+
+     Instances of this DTD are usually XML.
+-->
+
+<!-- An image-library is a collection of images -->
+<!ELEMENT image-library        (image+)>
+
+<!-- Each image has some number of properties and may have a short -->
+<!-- text description and a long test description -->
+<!ELEMENT image                (properties?, alttext?, altdesc?)>
+
+<!-- The stylesheets resolve the requested graphic to a filename -->
+<!-- and search for an image with that filename in the image -->
+<!-- library. Images may refer to each other with 'id' and -->
+<!-- 'sameas' attributes. -->
+<!ATTLIST image
+       filename        CDATA   #REQUIRED
+       id              ID      #IMPLIED
+       sameas          IDREFS  #IMPLIED
+>
+
+<!-- A few image properties are universal, the rest are stored -->
+<!-- in HTML-style 'meta' elements. -->
+<!ELEMENT properties   (meta*)>
+<!ATTLIST properties
+       format          (gif|jpeg|png|other)    #IMPLIED
+       otherformat     CDATA   #IMPLIED
+       width           CDATA   #IMPLIED
+       height          CDATA   #IMPLIED
+>
+
+<!-- Any additional properties that specify 'imgattr="yes"', -->
+<!-- will automatically be copied to the attribute list of -->
+<!-- the HTML IMG tag. -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+       name            CDATA   #REQUIRED
+       content         CDATA   #REQUIRED
+       imgattr         (yes|no)        "no"
+>
+
+<!-- The content of this element will be used as the HTML -->
+<!-- 'ALT' text, unless the alt text can be found in the -->
+<!-- instance. -->
+<!ELEMENT alttext      (#PCDATA)>
+
+<!-- The 'altdesc' is a longer description of the image. -->
+<!-- It is not used at this time. -->
+<!ELEMENT altdesc      (para+)>
+<!ELEMENT para         (#PCDATA)>
+
+<!--EOF-->
diff --git a/dtds/olink/ChangeLog b/dtds/olink/ChangeLog
new file mode 100644 (file)
index 0000000..437e797
--- /dev/null
@@ -0,0 +1,4 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * olinksum.dtd: New file.
+
diff --git a/dtds/olink/olinksum.dtd b/dtds/olink/olinksum.dtd
new file mode 100644 (file)
index 0000000..46d83d9
--- /dev/null
@@ -0,0 +1,36 @@
+<!-- $Id: olinksum.dtd,v 1.1 2001/04/02 21:40:27 nwalsh Exp $
+
+     DTD for OLINK Summary Information
+
+     Common declaration:
+
+     <!DOCTYPE div 
+               PUBLIC "-//Norman Walsh//DTD DocBook OLink Summary V1.1//EN">
+-->
+
+<!ENTITY % commonatts 
+"      type            CDATA   #IMPLIED
+       name            CDATA   #IMPLIED
+       href            CDATA   #IMPLIED
+       id              ID      #IMPLIED
+       label           CDATA   #IMPLIED
+       arch            CDATA   #IMPLIED
+       conformance     CDATA   #IMPLIED
+       os              CDATA   #IMPLIED
+       revision        CDATA   #IMPLIED
+       userlevel       CDATA   #IMPLIED
+       vendor          CDATA   #IMPLIED">
+
+<!ELEMENT div - - (ttl, obj*, div*)>
+<!ATTLIST div %commonatts;>
+
+<!ELEMENT obj - - (ttl)>
+<!ATTLIST obj %commonatts;>
+
+<!ELEMENT ttl - - (#PCDATA|tt|it|sub|sup|qt)*>
+
+<!ELEMENT tt - - (#PCDATA)>   <!-- typewriter (courier) -->
+<!ELEMENT it - - (#PCDATA)>   <!-- italics -->
+<!ELEMENT sub - - (#PCDATA)>  <!-- subscript -->
+<!ELEMENT sup - - (#PCDATA)>  <!-- superscript -->
+<!ELEMENT qt - - (#PCDATA)>   <!-- quote -->
diff --git a/frames/ChangeLog b/frames/ChangeLog
new file mode 100644 (file)
index 0000000..bace2af
--- /dev/null
@@ -0,0 +1,5 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * README, docbook.css, docbook.js, frames.dsl, frames.htm, navbar.htm: 
+       New file.
+
diff --git a/frames/README b/frames/README
new file mode 100644 (file)
index 0000000..81a0096
--- /dev/null
@@ -0,0 +1,76 @@
+README for the DocBook Stylesheets Frame Support
+
+Introduction
+------------
+
+Support for frames is a common request.  Supporting frames with
+a stylesheet that builds a frames-only version of a document has
+never been very appealing to me, so I haven't bothered. (The
+main problem is that this approach doesn't help solve the
+difficult problem of the navigation frame.)
+
+Recent changes to the stylesheets have made another approach
+practical.  The files in this directory provide frames support
+using a set of techniques that require almost no modification
+to the HTML.  The single required change is a link to a CSS
+stylesheet.
+
+One benefit of this technique is that I can imaging framed and
+non-framed versions of a document using exactly the same files
+(with symbolic links, or something).  The only difference
+between the two versions would be the CSS stylesheet applied.
+
+The downside to this technique is that it requires a fairly modern
+browser.  In order for this to work, your browser must support:
+
+ - Frames
+ - Dynamic HTML
+ - CSS
+
+At present, only IE 4.01SP1 (or later, presumably) is supported.
+In particular, Netscape is not supported.
+
+  *************************************************************
+  * I tried for several days to make this implementation work *
+  * in Netscape.  As near as I can tell, Netscape through     *
+  * version 4.5 simply does not have enough power in its      *
+  * object model to make this practical.  If you can make it  *
+  * work, I'd be delighted to include support for Netscape,   *
+  * but I'm not going to spend anymore time on it in the near *
+  * future.                                                  *
+  *************************************************************
+
+I'm really disappointed that I can't get this working under some
+browser other than IE.
+
+Installation
+------------
+
+1. Create a directory to hold your framed document
+2. Copy docbook.css, docbook.js, *.htm, and the ../images/toc-*.gif images
+   into that directory.
+3. Process your document with the frames.dsl stylesheet (or an extension
+   thereof).
+4. Fire up your browser and point it at frames.htm.  If your document isn't
+   a "<book>", you'll have to edit frames.htm to make the body frame load
+   correctly the first time.
+
+Warranty
+--------
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT.  IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Contacting the Author
+---------------------
+
+These stylesheets are maintained by Norman Walsh, <ndw@nwalsh.com>.
+
+The best way to reach norm is by email.  You will find additional
+contact information at http://nwalsh.com/~ndw/
diff --git a/frames/docbook.css b/frames/docbook.css
new file mode 100644 (file)
index 0000000..0f90516
--- /dev/null
@@ -0,0 +1,12 @@
+.NAVHEADER { display: none }
+.NAVFOOTER { display: none }
+.TOC       { display: none }
+
+.NAVTOC    { margin-left: 15;
+             display: none }
+
+.NAVBTN    { font-size: 10pt }
+
+.TOCTITLE  { font-size: 10pt;
+             color: blue;
+            text-decoration: underline; }
diff --git a/frames/docbook.js b/frames/docbook.js
new file mode 100644 (file)
index 0000000..9e2f4ce
--- /dev/null
@@ -0,0 +1,86 @@
+function toggleDiv(id) {
+  // Find element with ID "id" and toggle its display property.
+  // By convention, the ID of the corresponding +/- image is "${id}IMG".
+  var div = eval("document.all." + id);
+  var img = eval("document.all." + id + "IMG");
+  var display = div.style.display;
+
+  if (display != "block") {
+    div.style.display = "block";
+    img.src = "toc-minus.gif";
+  } else {
+    div.style.display = "none";
+    img.src = "toc-plus.gif";
+  }
+}
+
+function link_href(rel) {
+  // Find the LINK element (in the body document) with the specified REL
+  // and return its HREF.  Return "" if no such LINK can be found.
+  var body  = parent.frames[1].document;
+  var links = body.all.tags("LINK");
+  for (i=0; i<links.length; i++) {
+    if (links(i).getAttribute("REL") == rel) {
+      return links(i).getAttribute("HREF");
+    }
+  }
+
+  return "";
+}
+
+function load_body(href) {
+  // Change the body frame to the specified href.  Update the
+  // navigation bar. We use the setTimeout() trick to give the browser
+  // a chance to load the document...
+  var bodyframe = parent.frames[1];
+  if (href != "") {
+    bodyframe.location = href;
+    setTimeout('reset_links()', 50);
+  }
+}
+
+function goto_link(rel) {
+  // Change the body frame to the specified LINK document.
+  var href = link_href(rel);
+  load_body(href);
+}
+
+function link_on(rel) {
+  // Turn on the link
+  navbar = parent.frames[2].document;
+  navbar.all[rel].style.color = "black";
+}
+
+function link_off(rel) {
+  // Turn off the link
+  navbar = parent.frames[2].document;
+  navbar.all[rel].style.color = "gray";
+}
+
+function set_link(rel) {
+  // Set link on if there's somewhere to go, off otherwise
+  link_off(rel);
+
+  if (link_href(rel) !=  "") {
+    link_on(rel);
+  }
+}    
+
+function set_links() {
+  // Set 'em all
+  set_link("HOME");
+  set_link("UP");
+  set_link("PREVIOUS");
+  set_link("NEXT");
+}
+
+function reset_links() {
+  // Reset the links after a load.  Make sure we wait until the
+  // document is loaded.
+  var body  = parent.frames[1].document;
+  if (body.readyState == 'complete') {
+    set_links();
+  } else {
+    setTimeout('reset_links()', 100);
+  }
+}
diff --git a/frames/frames.dsl b/frames/frames.dsl
new file mode 100644 (file)
index 0000000..c5d9ce2
--- /dev/null
@@ -0,0 +1,131 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+(define %stylesheet-version%
+  "Modular DocBook HTML Frames Stylesheet version 1.0")
+
+(define %stylesheet% "docbook.css");
+
+(root
+ (make sequence
+   (process-children)
+   (with-mode manifest
+     (process-children))
+   (make-dhtml-toc)))
+
+(define (make-dhtml-toc)
+  (make entity
+    system-id: "toc.htm"
+    (make element gi: "HTML"
+         (make element gi: "HEAD"
+               (make element gi: "TITLE" (literal "DocBook TOC"))
+               ($standard-html-header$)
+               (make element gi: "SCRIPT"
+                     attributes: '(("SRC" "docbook.js"))
+                     (empty-sosofo)))
+         (make element gi: "BODY" 
+               (make element gi: "DIV"
+                     (with-mode dhtmltoc
+                       (process-children)))))))
+
+(define (dhtml-toc-entry nd gilist)
+  (let* ((subdivnodes (node-list-filter-by-gi (children nd) gilist))
+        (subdivs (and (> (node-list-length subdivnodes) 0)
+                      (not (node-list=? nd (sgml-root-element)))))
+        (imgsrc  (if subdivs
+                     "toc-plus.gif"
+                     "toc-blank.gif"))
+        (imgatt  (list (list "SRC" imgsrc)
+                       (list "BORDER" "0")
+                       (list "ID" (string-append (generate-anchor) "IMG"))))
+        (span    (if subdivs
+                     (make element gi: "SPAN"
+                           attributes: (list 
+                                        (list "CLASS" "TOGGLE")
+                                        (list "onClick" 
+                                              (string-append 
+                                               "toggleDiv('"
+                                               (generate-anchor)
+                                               "')")))
+                           (make empty-element gi: "IMG"
+                                 attributes: imgatt))
+                     (make element gi: "SPAN" 
+                           attributes: '(("CLASS" "TOGGLE"))
+                           (make empty-element gi: "IMG"
+                                 attributes: imgatt)))))
+    (if (node-list=? nd (sgml-root-element))
+       (make sequence
+         (make element gi: "NOBR"
+               (make element gi: "SPAN"
+                     attributes: (list ;(list "HREF" (href-to (current-node)))
+                                       (list "onClick" (string-append 
+                                                        "load_body(\""
+                                                        (href-to (current-node))
+                                                        "\")"))
+                                       (list "CLASS" "TOCTITLE"))
+                     (element-title-sosofo (current-node))))
+         (make element gi: "DIV"
+               (process-children)))
+       (make sequence
+         (make element gi: "NOBR"
+               span
+               (make element gi: "SPAN"
+                     attributes: (list ;(list "HREF" (href-to (current-node)))
+                                       (list "onClick" (string-append 
+                                                        "load_body(\""
+                                                        (href-to (current-node))
+                                                        "\")"))
+                                       (list "CLASS" "TOCTITLE"))
+                     (element-title-sosofo (current-node))))
+         (make element gi: "DIV"
+               attributes: (list (list "CLASS" "NAVTOC")
+                                 (list "ID" (generate-anchor)))
+               (process-children))))))
+
+(mode dhtmltoc
+  (default (empty-sosofo))
+
+  (element set (dhtml-toc-entry (current-node) 
+                               (list (normalize "book"))))
+
+  (element book (dhtml-toc-entry (current-node) 
+                                (list (normalize "part") 
+                                      (normalize "preface")
+                                      (normalize "chapter")
+                                      (normalize "appendix")
+                                      (normalize "reference"))))
+
+  (element preface (dhtml-toc-entry (current-node) 
+                                   (list (normalize "sect1"))))
+
+  (element part (dhtml-toc-entry (current-node)
+                                (list (normalize "preface")
+                                      (normalize "chapter")
+                                      (normalize "appendix")
+                                      (normalize "reference"))))
+
+  (element chapter (dhtml-toc-entry (current-node)
+                                   (list (normalize "sect1"))))
+
+  (element appendix (dhtml-toc-entry (current-node)
+                                    (list (normalize "sect1"))))
+
+  (element sect1 (dhtml-toc-entry (current-node) '()))
+
+  (element reference (dhtml-toc-entry (current-node)
+                                     (list (normalize "refentry"))))
+  
+  (element refentry (dhtml-toc-entry (current-node) '()))
+)
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/frames/frames.htm b/frames/frames.htm
new file mode 100644 (file)
index 0000000..85a607a
--- /dev/null
@@ -0,0 +1,19 @@
+<html>
+<head>
+<title>Frames Example</title>
+<LINK REL="STYLESHEET" TYPE="text/css" HREF="docbook.css">
+</head>
+<frameset COLS="20%,*">
+    <frame SRC="toc.htm" NAME="TOC">
+    <frameset ROWS="*,25">
+       <frame SRC="book1.htm"   NAME="BODY">
+       <frame SRC="navbar.htm" NAME="NAV" frameborder="no"
+              marginheight=0 marginwidth=10 scrolling="no" >
+    </frameset>
+<noframes>
+<body>
+Your browser does not support frames.
+</body>
+</noframes>
+</frameset>
+</html> 
\ No newline at end of file
diff --git a/frames/navbar.htm b/frames/navbar.htm
new file mode 100644 (file)
index 0000000..2fd6529
--- /dev/null
@@ -0,0 +1,31 @@
+<html>
+<head>
+<title>Navigation</title>
+<script language="JScript" src="docbook.js"></script>
+<LINK REL="STYLESHEET" TYPE="text/css" HREF="docbook.css">
+</head>
+<body onload="set_links()" bgcolor="#C0C0C0">
+<div class="NAVBAR">
+<table width="100%" border=0 cellpadding=0 cellspacing=0>
+<tr>
+  <td width="10%" align="left">
+    <span class="NAVBTN" id="HOME"
+          onClick='goto_link("HOME")'>Home</span>
+  </td>
+  <td width="40%" align="left">
+    <span class="NAVBTN" id="UP"
+          onClick='goto_link("UP")'>Up</span>
+  </td>
+  <td width="40%" align="right">
+    <span class="NAVBTN" id="PREVIOUS"
+          onClick='goto_link("PREVIOUS")'>Prev</span>
+  </td>
+  <td width="10%" align="right">
+    <span class="NAVBTN" id="NEXT"
+          onClick='goto_link("NEXT")'>Next</span>
+  </td>
+</tr>
+</table>
+</div>
+</body>
+</html>
diff --git a/html/ChangeLog b/html/ChangeLog
new file mode 100644 (file)
index 0000000..187f25e
--- /dev/null
@@ -0,0 +1,349 @@
+2004-10-10  <petere78@users.sourceforge.net>
+
+       * dbhtml.dsl, dbparam.dsl, dbttlpg.dsl: Support for specifying a system ID for the HTML output documents, required
+       for better parsing in contemporary browsers.  A default system ID is set
+       if %html40% is true.
+
+2004-10-09  <petere78@users.sourceforge.net>
+
+       * docbook.dsl: New Bulgarian translation by Viktor Vasilev (SF patch #1040075)
+
+2004-09-23  <petere78@users.sourceforge.net>
+
+       * dbprocdr.dsl: Add CSS decoration of procedure steps (RFE #1033197)
+
+2004-09-17  <petere78@users.sourceforge.net>
+
+       * docbook.dsl: Bosnian translation by Kemal Skripic
+
+2004-09-14  <petere78@users.sourceforge.net>
+
+       * dbinline.dsl: Fix for bug #860398: Change uses of $var-seq$ to something more appropriate.
+
+2004-07-11  <nyraghu@users.sourceforge.net>
+
+       * version.dsl: Closes Bug 912831: the last character of VERSION was being cut off.
+
+2003-05-28  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbblock.dsl: HTML attribs for comments variablized for maintenance.
+
+2003-04-29  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbcompon.dsl: Finding the subtitle for a component should use the parent title if
+       set; this is consistent with how the title is already set;
+       closes SF bug 613773.
+
+2003-04-28  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbpi.dsl: Ensure dbhtml-findvalue can handle the pi-field-list being a non-pair,
+       which may occur in some poorly formed dbhtml PIs; returns #f in this
+       case.
+
+2003-04-27  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbcompon.dsl: Simplify some code, no functional changes
+
+2003-04-26  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbcallou.dsl, dbparam.dsl: callout graphics and admonition graphics, if needed, share a single
+       variable, %stock-graphics-extension% -- "stock" here referring to
+       standard, stock images, e.g., not per document images; this closes
+       Debian Bug#187429
+
+2003-04-12  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbadmon.dsl: VALIGN should be MIDDLE, not CENTER; closes Debian Bug#187569
+
+2003-04-05  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dblists.dsl: back out my last change; there are 4 places taht use this and until I
+       understand how varlistentry-term-too-long? is supposed to work at all
+       I better not mess with it
+
+       * dblists.dsl: termlength in varlist is measurement-to-length, not string->number
+
+2003-03-25  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * db31.dsl, dbblock.dsl, dbcompon.dsl, dbgraph.dsl, dbqanda.dsl, dbsect.dsl, docbook.dsl: 
+       move data from db31 into its proper component files
+
+2003-03-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: Don't hardcode DSSSL file list, use $(wildcard *.dsl); clean is cleaner
+
+2003-02-12  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * db31.dsl, dbhtml.dsl, dbinline.dsl, dbttlpg.dsl: Deprecate TT; use CODE, KBD, SAMP, or VAR instead.
+       
+       acronym make's use of HTML4's ACRONYM element if %html40%
+       
+       abbrev make's use of HTML4's ABBR element if %html40%
+
+       * dbparam.dsl: Emit a HTML 4.0.1 doctype by default if %html40%, this seems like a
+       good idea.
+       
+       Update %spacing-paras% and %html40% docs a bit, without changing their
+       settings.
+
+2003-02-11  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbtable.dsl: If %html40%, create col elements representing colspecs (implied or
+       explicit), and don't emit widths on each and every cell.
+       
+       If %html40%, set the tbody valign properly.
+       
+       If %html40%, allow relative column sizes such as "1*", thus we're not
+       emitting 50% when we mean 1* (out of 1*, 1*); the effect is that we're
+       not forcing pgwide if it's not turned on.
+       
+       Don't set valign on entries, set them on rows (unless they really are
+       set on the entries).
+       
+       Some rewriting for speed/efficiency (doens't seem to make much
+       difference in my timing testing though)
+
+2003-02-09  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbtable.dsl: Improve table rendering using frame and border attributes on HTML
+       tables, conditional on HTML4 support being on.
+       
+       The following cases in table.006.xml are now fixed: outer edit (table
+       frame but no rowsep nor colseps); rows (frame is topbot, rowsep but no
+       colsep); columns; tic tac toc (no frame, colsep and rowsep).
+       
+       Note we still have no way (yet) to override colsep/rowsep in either
+       colspec or in the individual rows, but I'm working on colspec ->
+       colgroup.
+
+2003-02-07  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbblock.dsl: move the anchor closer to the content in informal-objects; no way to
+       get around empty A element in this case
+
+       * dbsect.dsl, dbttlpg.dsl: "<a></a>title" changes to "<a>title</a>" -- weblint says we should
+       avoid empty A elements
+
+       * dbtable.dsl: fix a div-by-zero error identified in informaltable.015.xml; would
+       cause loss of a table header column in some cases
+
+2003-01-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbblock.dsl: formal and informal objects reset the processing mode, this closes
+       Debian#79432f; so <bookinfo><productname> is still in special mode,
+       but <bookinfo><legalnotice><productname> is not; test is legalnotice.001.xml
+
+2003-01-20  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbgraph.dsl: correct this error: html/dbgraph.dsl:68:1:E: 1st argument for
+       primitive "append" of wrong type: "#<unknown object 146207544>" not a
+       list, fix and report from Christopher B. Browne
+
+2003-01-15  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbadmon.dsl, dbautoc.dsl, dbbibl.dsl, dbblock.dsl, dbcallou.dsl, dbcompon.dsl, dbdivis.dsl, dbefsyn.dsl, dbfootn.dsl, dbgloss.dsl, dbgraph.dsl, dbhtml.dsl, dbindex.dsl, dbinfo.dsl, dbinline.dsl, dblink.dsl, dblists.dsl, dblot.dsl, dbmath.dsl, dbmsgset.dsl, dbprocdr.dsl, dbrfntry.dsl, dbsect.dsl, dbsynop.dsl, dbtable.dsl, dbtitle.dsl, dbttlpg.dsl, dbverb.dsl, docbook.dsl: 
+       update docbook URL to http://docbook.sourceforge.net/projects/dsssl/;
+       N.B.: credit for the group option and repeating goes to John Daily
+
+       * dblink.dsl: xref to varlistentry using the term, patch from Jens Emmerich; closes
+       bug 520561
+
+       * dbsynop.dsl: Patch #562401 <group choice="opt" rep="repeat">, elipsis should be
+       outside of group, reference test cmdsynopsis.003
+
+2003-01-14  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbblock.dsl: define a $remark$ function, unifying comment and remark element
+       rendering; remarks within paras are now rendering using a span rather
+       than p so they mark up as inline text decoration
+
+2002-12-16  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbblock.dsl, dbparam.dsl: %epigraph-start-col% and %epigraph-content-col% allows customization
+       of epigraph positioning; %blockquote-start-col% and
+       %blockquote-end-col% parameters allows customization of the whitespace
+       around blockquote
+
+2002-06-09  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbbibl.dsl, dbttlpg.dsl: Fix bug #502337: remove 'by' from copyright statements
+
+2002-05-21  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbttlpg.dsl: Make sure email addresses in info elements are links
+
+2002-05-12  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbttlpg.dsl: Bug #494693: bad formalpara formatting on title pages
+
+       * dbverb.dsl: Bugs #429663 and #474328 fixed (allow external linespecific content to be indented and numbered). Eight bit or unicode external linespecific content may be problematic though.
+
+2002-05-09  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbgraph.dsl: Bug #448732: make image-library work with imagedata
+
+       * dblink.dsl: Allow xref to refnamediv
+
+2002-05-06  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbbibl.dsl: Fix broken style attribute on biblioentries
+
+2002-04-29  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbefsyn.dsl: Format synopsis elements correctly outside of classsynopsis
+
+2002-04-21  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * db31.dsl, dbadmon.dsl, dbblock.dsl, dbcompon.dsl, dbdivis.dsl, dbgloss.dsl, dbindex.dsl, dblists.dsl, dbrfntry.dsl, dbsect.dsl, dbtable.dsl, dbttlpg.dsl: 
+       Make sure named anchors are closed
+
+2002-03-24  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: add a clean rule here
+
+2002-03-21  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbfootn.dsl: Fix footnote bugs (Adam, please double-check)
+
+2002-03-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbefsyn.dsl: Support freestanding {method,field,constructor,destructor}synopsis
+
+2002-03-16  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbfootn.dsl: footnotes go in a CSS class "footnote"; reduce code, additional modularity -- to change footnote rendering,
+          you just have to provide a different "$footnote-literal$" procedure
+
+2002-02-22  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dblink.dsl: Add element-page-number-sosofo back in; always produce "???"
+
+2002-02-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dblink.dsl: Remove bogus page-number rules
+
+2002-01-03  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbindex.dsl: Wrap DIVs around index lists
+
+2001-12-06  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * db31.dsl, dbadmon.dsl, dbblock.dsl, dbcompon.dsl, dbdivis.dsl, dbgloss.dsl, dbindex.dsl, dblists.dsl, dbrfntry.dsl, dbsect.dsl, dbttlpg.dsl: 
+       Make anchors empty so that they don't imply style for the things they wrap
+
+2001-12-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * docbook.dsl: Bug #462406 legalnotice-link breaks HTML manifest
+
+2001-11-30  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbsect.dsl: Patch #473116: Section levels
+
+2001-11-18  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbparam.dsl: Bug #482355: use legalnotice id when use-id-as-filename is true
+
+2001-11-14  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * docbook.dsl: Added Basque, Nynorsk, Ukranian, and Xhosa
+
+2001-11-03  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbinline.dsl: Support pubwork=article on citetitle
+
+2001-10-13  Jirka Kosek <kosek@users.sourceforge.net>
+
+       * dbinline.dsl: Fixed bug #470840 - added support for methodname.
+
+2001-10-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbverb.dsl: Support linenumbering attribute on verbatim environments
+
+2001-09-29  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbcallou.dsl: Bug #449494: make callouts work even if they appear on the last line of a verbatim environment
+
+2001-09-23  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * db31.dsl: ImageData should use the image function from dbgraph.dsl
+
+       * dbgraph.dsl: Patch #421990: support width and depth attributes on graphics
+
+       * dbverb.dsl: Patch #461901, make %fix-para-wrappers% affect verbatim
+
+2001-09-18  Nik Clayton <nikclayton@users.sourceforge.net>
+
+       * dbcompon.dsl, dbparam.dsl: Add $generate-article-lot-list$, initially empty, which controls what
+       whether or not a list of titles is generated for articles.
+       
+       Currently HTML only.
+
+2001-08-30  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * db31.dsl: Fix XML/SGML discrepancy wrt normalization of notation names; move some common stuff into dbcommon
+
+2001-08-25  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbinline.dsl: Fix erroneous literals
+
+       * dbsect.dsl: Bug #451005: no id anchor for bridgehead
+
+2001-08-06  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbinline.dsl, dbparam.dsl: Support 'bold' and 'strong' roles on emphasis in the expected way, added %{emphasis,phrase}-propagates-style% parameters
+
+2001-07-05  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbautoc.dsl, dbhtml.dsl: Patch #420730, use dingbat-sosofo instead of literal to create emdash
+
+       * dbnavig.dsl: Patch #418401, add accesskey attributes to HTML navigation
+
+       * dbparam.dsl: Patch #420012, Add colon to content-title-end-punct
+
+2001-07-04  <uid48421@users.sourceforge.net>
+
+       * docbook.dsl: Added Afrikaans and Turkish
+
+2001-05-11  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * docbook.dsl: Support Serbian and Traditional Chinese
+
+2001-05-04  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbprocdr.dsl: Support links to procedures and steps
+
+2001-05-03  Jirka Kosek <kosek@users.sourceforge.net>
+
+       * dbinline.dsl: Attributes marked up by <sgmltag> are now in monospace (same as in XSL and print DSSSL).
+
+2001-04-21  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbblock.dsl: Output anchors for formalparas with IDs
+
+       * dbinline.dsl: Bug #417697: workaround Netscape limitation with trade named entity.
+
+2001-04-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbbibl.dsl: Make sure anchors are produced for bibliomixed elements
+
+2001-04-18  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbinline.dsl, dbparam.dsl: Bug #413982, easy support for man page CGI links on citerefentry
+
+2001-04-16  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbnavig.dsl: Added summary attribute to navigation tables
+
+2001-04-04  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * Makefile: New file.
+
+2001-04-03  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * db31.dsl: Fix bug 412548, allow WMF in media objects
+
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * .cvsignore, catalog, db31.dsl, dbadmon.dsl, dbautoc.dsl, dbbibl.dsl, dbblock.dsl, dbcallou.dsl, dbchunk.dsl, dbcompon.dsl, dbdivis.dsl, dbefsyn.dsl, dbfootn.dsl, dbgloss.dsl, dbgraph.dsl, dbhtml.dsl, dbindex.dsl, dbinfo.dsl, dbinline.dsl, dblink.dsl, dblists.dsl, dblot.dsl, dbmath.dsl, dbmsgset.dsl, dbnavig.dsl, dbparam.dsl, dbpi.dsl, dbprocdr.dsl, dbrfntry.dsl, dbsect.dsl, dbsynop.dsl, dbtable.dsl, dbtitle.dsl, dbttlpg.dsl, dbverb.dsl, docbook.dsl, version.dsl: 
+       New file.
+
diff --git a/html/XREF b/html/XREF
new file mode 100644 (file)
index 0000000..3ec54e8
--- /dev/null
+++ b/html/XREF
@@ -0,0 +1,2 @@
+Symbol             Defined In                    Used In                       
+================== ============================= =============================
diff --git a/html/catalog b/html/catalog
new file mode 100644 (file)
index 0000000..f5ce23a
--- /dev/null
@@ -0,0 +1,3 @@
+CATALOG "../catalog"
+
+
diff --git a/html/dbadmon.dsl b/html/dbadmon.dsl
new file mode 100644 (file)
index 0000000..06834f2
--- /dev/null
@@ -0,0 +1,171 @@
+;; $Id: dbadmon.dsl,v 1.5 2003/04/12 17:30:56 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================ ADMONITIONS =============================
+
+(define ($graphical-admonition$)
+  (let* ((adm       (current-node))
+        (id        (attribute-string (normalize "id")))
+        (title     (select-elements (children adm) 
+                                    (normalize "title")))
+        (title?    (not (node-list-empty? title)))
+        (adm-title (if title?
+                       (with-mode title-sosofo-mode
+                         (process-node-list (node-list-first title)))
+                       (literal (gentext-element-name adm))))
+        (gr-cell   (make element gi: "TD"
+                         attributes: (list 
+                                      (list "WIDTH" 
+                                            ($admon-graphic-width$))
+                                      (list "ALIGN" "CENTER")
+                                      (list "VALIGN" "TOP"))
+                         (make empty-element gi: "IMG"
+                               attributes: (list 
+                                            (list "SRC" 
+                                                  (root-rel-path 
+                                                   ($admon-graphic$)))
+                                            (list "HSPACE" "5")
+                                            (list "ALT"
+                                                  (gentext-element-name adm))))))
+        (ttl-cell  (make element gi: "TH"
+                         attributes: '(("ALIGN" "LEFT")
+                                       ("VALIGN" "MIDDLE"))
+                         (make element gi: "B" adm-title)))
+        (body-cell (make element gi: "TD"
+                         attributes: '(("ALIGN" "LEFT")
+                                       ("VALIGN" "TOP"))
+                         (process-children))))
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi adm)))
+         (if id
+             (make element gi: "A"
+                   attributes: (list (list "NAME" id))
+                   (empty-sosofo))
+             (empty-sosofo))
+         (if %spacing-paras%
+             (make element gi: "P" (empty-sosofo))
+             (empty-sosofo))
+         (make element gi: "TABLE"
+               attributes: (list (list "CLASS" (gi))
+                                 (list "WIDTH" ($table-width$))
+                                 (list "BORDER" "0"))
+               (if title?
+                   (make sequence
+                     (make element gi: "TR"
+                           gr-cell
+                           ttl-cell)
+                     (make element gi: "TR"
+                           (make element gi: "TD"
+                                 (make entity-ref name: "nbsp"))
+                           body-cell))
+                   (make sequence
+                     (make element gi: "TR"
+                           gr-cell
+                           body-cell)))))))
+
+(define ($admonition$)
+  (let ((id     (attribute-string (normalize "id"))))
+    (if %admon-graphics%
+       ($graphical-admonition$)
+       (make element gi: "DIV"
+             attributes: (list (list "CLASS" (gi)))
+             ;; The DIV isn't strictly necessary, of course, but it
+             ;; is consistent with the graphical-admonition case.
+             (make element gi: "BLOCKQUOTE"
+                   attributes: (list
+                                (list "CLASS" (gi)))
+                   (if id
+                       (make element gi: "A"
+                             attributes: (list (list "NAME" id))
+                             (empty-sosofo))
+                       (empty-sosofo))
+                   (process-children))))))
+
+(define ($admonpara$)
+  (let* ((title     (select-elements 
+                    (children (parent (current-node))) (normalize "title")))
+        (has-title (not (node-list-empty? title)))
+        (adm-title (if has-title 
+                       (make sequence
+                         (with-mode title-sosofo-mode
+                           (process-node-list (node-list-first title)))
+                         (literal (gentext-label-title-sep 
+                                   (gi (parent (current-node))))))
+                       (literal
+                        (gentext-element-name 
+                         (gi (parent (current-node))))
+                        (gentext-label-title-sep 
+                         (gi (parent (current-node))))))))
+    (make element gi: "P"
+         (if (and (not %admon-graphics%) (= (child-number) 1))
+             (make element gi: "B"
+                   adm-title)
+             (empty-sosofo))
+         (process-children))))
+
+(element important ($admonition$))
+(element (important title) (empty-sosofo))
+(element (important para) ($admonpara$))
+(element (important simpara) ($admonpara$))
+(element note ($admonition$))
+(element (note title) (empty-sosofo))
+(element (note para) ($admonpara$))
+(element (note simpara) ($admonpara$))
+(element tip ($admonition$))
+(element (tip title) (empty-sosofo))
+(element (tip para) ($admonpara$))
+(element (tip simpara) ($admonpara$))
+
+;; perils are given special treatment by generating a centered title
+;;   and throwing a box around them
+;;
+(define ($peril$)
+  (let* ((title     (select-elements 
+                    (children (current-node)) (normalize "title")))
+        (has-title (not (node-list-empty? title)))
+        (adm-title (if has-title 
+                       (make sequence
+                         (with-mode title-sosofo-mode
+                           (process-node-list (node-list-first title))))
+                       (literal
+                        (gentext-element-name 
+                         (gi (current-node))))))
+        (id     (attribute-string (normalize "id"))))
+    (if %admon-graphics%
+       ($graphical-admonition$)
+       (make element gi: "DIV"
+             attributes: (list (list "CLASS" (gi)))
+             ;; The DIV isn't strictly necessary, of course, but it
+             ;; is consistent with the graphical-admonition case.
+             (if %spacing-paras%
+                 (make element gi: "P" (empty-sosofo))
+                 (empty-sosofo))
+             (make element gi: "TABLE"
+                   attributes: (list
+                                (list "CLASS" (gi))
+                                (list "BORDER" "1")
+                                (list "WIDTH" ($table-width$)))
+                   (make element gi: "TR"
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "ALIGN" "CENTER"))
+                               (make element gi: "B"
+                                     (if id
+                                         (make element gi: "A"
+                                               attributes: (list (list "NAME" id))
+                                               (empty-sosofo))
+                                         (empty-sosofo))
+                                     adm-title)))
+                   (make element gi: "TR"
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "ALIGN" "LEFT"))
+                               (process-children))))))))
+
+(element caution ($peril$))
+(element warning ($peril$))
+(element (caution title) (empty-sosofo))
+(element (warning title) (empty-sosofo))
diff --git a/html/dbautoc.dsl b/html/dbautoc.dsl
new file mode 100644 (file)
index 0000000..c2f2b9b
--- /dev/null
@@ -0,0 +1,128 @@
+;; $Id: dbautoc.dsl,v 1.3 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================== TABLE OF CONTENTS =========================
+
+;; Returns the depth of auto TOC that should be made at the nd-level
+(define (toc-depth nd)
+  (if (string=? (gi nd) (normalize "book"))
+      3
+      1))
+
+(define (toc-entry tocentry)
+  (make element gi: "DT"
+       (make sequence
+         (if (equal? (element-label tocentry) "")
+             (empty-sosofo)
+             (make sequence
+               (literal (element-label tocentry))
+               (literal (gentext-label-title-sep 
+                         (gi tocentry)))))
+
+         ;; If the tocentry isn't in its own
+         ;; chunk, don't make a link...
+         (if (and #f (not (chunk? tocentry)))
+             (element-title-sosofo tocentry)
+             (make element gi: "A"
+                   attributes: (list
+                                (list "HREF"
+                                      (href-to tocentry)))
+                   (element-title-sosofo tocentry)))
+
+         ;; Maybe annotate...
+         (if (and %annotate-toc% 
+                  (equal? (gi tocentry) (normalize "refentry")))
+             (make sequence
+               (dingbat-sosofo "nbsp");
+               (dingbat-sosofo "em-dash");
+               (dingbat-sosofo "nbsp");
+               (toc-annotation tocentry))
+             (empty-sosofo)))))
+
+(define (toc-annotation tocentry)
+  ;; only handles refentry at the moment
+  (let* ((refnamediv (select-elements (children tocentry) 
+                                     (normalize "refnamediv")))
+        (refpurpose (select-elements (children refnamediv)
+                                     (normalize "refpurpose"))))
+    (process-node-list (children refpurpose))))
+
+(define (build-toc nd depth #!optional (chapter-toc? #f) (first? #t))
+  (let ((toclist (toc-list-filter 
+                 (node-list-filter-by-gi (children nd)
+                                         (append (division-element-list)
+                                                 (component-element-list)
+                                                 (section-element-list)))))
+       (wrappergi (if first? "DIV" "DD"))
+       (wrapperattr (if first? '(("CLASS" "TOC")) '())))
+    (if (or (<= depth 0) 
+           (node-list-empty? toclist)
+           (and chapter-toc?
+                (not %force-chapter-toc%)
+                (<= (node-list-length toclist) 1)))
+       (empty-sosofo)
+       (make element gi: wrappergi
+             attributes: wrapperattr
+             (make element gi: "DL"
+                   (if first?
+                       (make element gi: "DT"
+                             (make element gi: "B"
+                                   (literal (gentext-element-name (normalize "toc")))))
+                       (empty-sosofo))
+                   (let loop ((nl toclist))
+                     (if (node-list-empty? nl)
+                         (empty-sosofo)
+                         (sosofo-append
+                           (toc-entry (node-list-first nl))
+                           (build-toc (node-list-first nl) 
+                                      (- depth 1) chapter-toc? #f)
+                           (loop (node-list-rest nl))))))))))
+
+;; Print the LOT entry
+(define (lot-entry tocentry)
+  (make element gi: "DT"
+       (make sequence
+         (if (equal? (element-label tocentry) "")
+             (empty-sosofo)
+             (make sequence
+               (literal (element-label tocentry))
+               (literal (gentext-label-title-sep 
+                         (gi tocentry)))))
+
+         ;; If the tocentry isn't in its own
+         ;; chunk, don't make a link...
+         (if (and #f (not (chunk? tocentry)))
+             (element-title-sosofo tocentry)
+             (make element gi: "A"
+                   attributes: (list
+                                (list "HREF"
+                                      (href-to tocentry)))
+                   (element-title-sosofo tocentry))))))
+
+;; Build a LOT starting at nd for all the lotgi's it contains.
+;; The optional arguments are used on recursive calls to build-toc
+;; and shouldn't be set by the initial caller...
+;;
+
+(define (build-lot nd lotgi)
+  (let* ((lotlist (select-elements (descendants nd)
+                                  (normalize lotgi))))
+    (if (node-list-empty? lotlist)
+       (empty-sosofo)
+       (make element gi: "DIV"
+             attributes: '(("CLASS" "LOT"))
+             (make element gi: "DL"
+                   attributes: '(("CLASS" "LOT"))
+                   (make element gi: "DT"
+                         (make element gi: "B"
+                               (literal ($lot-title$ 
+                                         (gi (node-list-first lotlist))))))
+                   (let loop ((lote lotlist))
+                     (if (node-list-empty? lote)
+                         (empty-sosofo)
+                         (make sequence
+                           (lot-entry (node-list-first lote))
+                           (loop (node-list-rest lote))))))))))
diff --git a/html/dbbibl.dsl b/html/dbbibl.dsl
new file mode 100644 (file)
index 0000000..daa8af6
--- /dev/null
@@ -0,0 +1,997 @@
+;; $Id: dbbibl.dsl,v 1.5 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ......................... BIBLIOGRAPHY PARAMS .........................
+
+;; these should be in dbparam...
+(define %biblsep% ", ")
+(define %biblend% ".")
+(define bibltable #f)
+
+(define (bibliography-table) 
+  (let* ((bibliography (ancestor-member (current-node) 
+                                       (list (normalize "bibliography"))))
+        (biblpi       (dbhtml-value bibliography "bibliography-format")))
+    (and (or bibltable (equal? biblpi "table"))
+        (not (equal? biblpi "list")))))
+
+(define %biblioentry-in-entry-order% #t)
+
+;; .................... BIBLIOGRAPHY and BIBLIODIV ......................
+
+(define (bibliography-content)
+  ;; Note that the code below works for both the case where the bibliography
+  ;; has BIBLIODIVs and the case where it doesn't, by the slightly subtle
+  ;; fact that if it does, then allentries will be (empty-node-list).
+  (let* ((allbibcontent (children (current-node)))
+        (prebibcontent (node-list-filter-by-not-gi 
+                        allbibcontent
+                        (list (normalize "biblioentry")
+                              (normalize "bibliomixed"))))
+        (allentries    (node-list-filter-by-gi 
+                        allbibcontent
+                        (list (normalize "biblioentry")
+                              (normalize "bibliomixed"))))
+        (entries       (if biblio-filter-used
+                           (biblio-filter allentries)
+                           allentries)))
+    (make sequence
+      (process-node-list prebibcontent)
+      (if (bibliography-table)
+         (make element gi: "TABLE"
+               attributes: '(("BORDER" "0"))
+               (process-node-list entries))
+         (process-node-list entries)))))
+
+(element (book bibliography)
+  (let ((title         (element-title-sosofo (current-node)))
+       (body          (make sequence
+                        (make element gi: "A"
+                              attributes: (list (list "NAME" (element-id)))
+                              (empty-sosofo))
+                        ($component-separator$)
+                        ($component-title$)
+                        (bibliography-content))))
+    (html-document title body)))
+
+(element (article bibliography)
+  (let ((title         (element-title-sosofo (current-node)))
+       (body          (make sequence
+                        (make element gi: "A"
+                              attributes: (list (list "NAME" (element-id)))
+                              (empty-sosofo))
+                        ($component-separator$)
+                        ($component-title$)
+                        (bibliography-content))))
+    (html-document title body)))
+
+(element bibliography
+  ;; A bibliography that's inside something else...or root
+  (if (sgml-root-element? (current-node))
+      (let ((title         (element-title-sosofo (current-node)))
+           (body          (make sequence
+                            (make element gi: "A"
+                                  attributes: (list (list "NAME"
+                                                          (element-id)))
+                                  (empty-sosofo))
+                            ($component-separator$)
+                            ($component-title$)
+                            (bibliography-content))))
+       (html-document title body))
+      (let* ((sect   (ancestor-member (current-node) 
+                                     (append (section-element-list)
+                                             (component-element-list))))
+            (hlevel (+ (SECTLEVEL sect) 1))
+            (helem  (string-append "H" (number->string (+ hlevel 1)))))
+       (make sequence
+         (make element gi: helem
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (element-title-sosofo (current-node))))
+         (bibliography-content)))))
+  
+(element (bibliography title) (empty-sosofo))
+
+(element bibliodiv
+  (let* ((allentries (node-list-filter-by-gi (children (current-node))
+                                            (list (normalize "biblioentry")
+                                                  (normalize "bibliomixed"))))
+        (entries (if biblio-filter-used
+                     (biblio-filter allentries)
+                     allentries)))
+    (if (and biblio-filter-used (node-list-empty? entries))
+       (empty-sosofo)
+       (make sequence
+         ($section-separator$)
+         ($section-title$)
+         (if (bibliography-table)
+             (make element gi: "TABLE"
+                   attributes: '(("BORDER" "0"))
+                   (process-node-list entries))
+             (process-node-list entries))))))
+
+(element (bibliodiv title) (empty-sosofo))
+
+;; ..................... BIBLIOGRAPHY ENTRIES .........................
+
+(define (biblioentry-inline-sep node rest)
+  ;; Output the character that should separate inline node from rest
+  (cond 
+   ((and (equal? (gi node) (normalize "title"))
+        (equal? (gi (node-list-first rest)) (normalize "subtitle")))
+    (make element gi: "I"
+         (literal ": ")))
+   (else
+    (literal %biblsep%))))
+
+(define (biblioentry-inline-end blocks)
+  ;; Output the character that should occur at the end of inline
+  (literal %biblend%))
+
+(define (biblioentry-block-sep node rest)
+  ;; Output the character that should separate block node from rest
+  (empty-sosofo))
+
+(define (biblioentry-block-end)
+  ;; Output the character that should occur at the end of block
+  (empty-sosofo))
+
+(define (nontable-biblioentry 
+        xreflabel leading-abbrev inline-children block-children)
+  (let ((has-leading-abbrev?
+        (not (or (node-list-empty? leading-abbrev) biblio-number))))
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "A"
+               attributes: (list (list "NAME" (element-id)))
+               (empty-sosofo))
+         (make element gi: "P"
+               (if (or biblio-number xreflabel has-leading-abbrev?)
+                   (make sequence
+                     (literal "[")
+                     
+                     (if biblio-number 
+                         (literal (number->string (bibentry-number 
+                                                   (current-node))))
+                         (empty-sosofo))
+                     
+                     (if xreflabel
+                         (literal xreflabel)
+                         (empty-sosofo))
+                     
+                     (if has-leading-abbrev?
+                         (with-mode biblioentry-inline-mode 
+                           (process-node-list leading-abbrev))
+                         (empty-sosofo))
+                     
+                     (literal "]")
+                     (make entity-ref name: "nbsp"))
+                   (empty-sosofo))
+
+               (let loop ((nl inline-children))
+                 (if (node-list-empty? nl)
+                     (empty-sosofo)
+                     (make sequence
+                       (with-mode biblioentry-inline-mode
+                         (process-node-list (node-list-first nl)))
+                       (if (node-list-empty? (node-list-rest nl))
+                           (biblioentry-inline-end block-children)
+                           (biblioentry-inline-sep (node-list-first nl)
+                                                   (node-list-rest nl)))
+                       (loop (node-list-rest nl))))))
+         
+         (make element gi: "DIV"
+               attributes: '(("CLASS" "BIBLIOENTRYBLOCK")
+                             ("STYLE" "margin-left: 0.5in"))
+               (let loop ((nl block-children))
+                 (if (node-list-empty? nl)
+                     (empty-sosofo)
+                     (make sequence
+                       (with-mode biblioentry-block-mode
+                         (process-node-list (node-list-first nl)))
+                       (if (node-list-empty? (node-list-rest nl))
+                           (biblioentry-block-end)
+                           (biblioentry-block-sep (node-list-first nl)
+                                                  (node-list-rest nl)))
+                       (loop (node-list-rest nl)))))))))
+
+(define (table-biblioentry 
+        xreflabel leading-abbrev inline-children block-children)
+  (let ((has-leading-abbrev? 
+        (not (or (node-list-empty? leading-abbrev) biblio-number))))
+    (make element gi: "TR"
+         (make element gi: "TD"
+               attributes: '(("ALIGN" "LEFT")
+                             ("VALIGN" "TOP")
+                             ("WIDTH" "10%"))
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               
+               (if (or biblio-number xreflabel has-leading-abbrev?)
+                   (make sequence
+                     (literal "[")
+
+                     (if biblio-number 
+                         (literal (number->string (bibentry-number 
+                                                   (current-node))))
+                         (empty-sosofo))
+               
+                     (if xreflabel
+                         (literal xreflabel)
+                         (empty-sosofo))
+               
+                     (if has-leading-abbrev?
+                         (with-mode biblioentry-inline-mode 
+                           (process-node-list leading-abbrev))
+                         (empty-sosofo))
+                     
+                     (literal "]"))
+                   (make entity-ref name: "nbsp")))
+
+         (make element gi: "TD"
+               attributes: '(("ALIGN" "LEFT")
+                             ("VALIGN" "TOP")
+                             ("WIDTH" "90%"))
+               (make element gi: "P"
+                     (let loop ((nl inline-children))
+                       (if (node-list-empty? nl)
+                           (empty-sosofo)
+                           (make sequence
+                             (with-mode biblioentry-inline-mode
+                               (process-node-list (node-list-first nl)))
+                             (if (node-list-empty? (node-list-rest nl))
+                                 (biblioentry-inline-end block-children)
+                                 (biblioentry-inline-sep (node-list-first nl)
+                                                         (node-list-rest nl)))
+                             (loop (node-list-rest nl))))))
+         
+               (let loop ((nl block-children))
+                 (if (node-list-empty? nl)
+                     (empty-sosofo)
+                     (make sequence
+                       (with-mode biblioentry-block-mode
+                         (process-node-list (node-list-first nl)))
+                       (if (node-list-empty? (node-list-rest nl))
+                           (biblioentry-block-end)
+                           (biblioentry-block-sep (node-list-first nl)
+                                                  (node-list-rest nl)))
+                       (loop (node-list-rest nl)))))
+
+               (if (node-list-empty? block-children)
+                   (empty-sosofo)
+                   (make element gi: "P"
+                         ;; get the table row spacing right
+                         (empty-sosofo)))))))
+
+(element biblioentry
+  (let* ((expanded-children   (expand-children 
+                              (children (current-node))
+                              (biblioentry-flatten-elements)))
+        (all-inline-children (if %biblioentry-in-entry-order%
+                                 (titlepage-gi-list-by-nodelist
+                                  (biblioentry-inline-elements)
+                                  expanded-children)
+                                 (titlepage-gi-list-by-elements
+                                  (biblioentry-inline-elements)
+                                  expanded-children)))
+        (block-children      (if %biblioentry-in-entry-order%
+                                 (titlepage-gi-list-by-nodelist
+                                  (biblioentry-block-elements)
+                                  expanded-children)
+                                 (titlepage-gi-list-by-elements
+                                  (biblioentry-block-elements)
+                                  expanded-children)))
+        (leading-abbrev      (if (equal? (normalize "abbrev")
+                                         (gi (node-list-first 
+                                              all-inline-children)))
+                                 (node-list-first all-inline-children)
+                                 (empty-node-list)))
+        (inline-children     (if (node-list-empty? leading-abbrev)
+                                 all-inline-children
+                                 (node-list-rest all-inline-children)))
+        (has-leading-abbrev? (not (node-list-empty? leading-abbrev)))
+        (xreflabel           (if (or has-leading-abbrev? biblio-number)
+                                 #f
+                                 (attribute-string (normalize "xreflabel")))))
+    (if (bibliography-table)
+       (table-biblioentry xreflabel leading-abbrev inline-children block-children)
+       (nontable-biblioentry xreflabel leading-abbrev inline-children block-children))))
+
+(mode biblioentry-inline-mode
+  (element abbrev
+    (make sequence
+      (process-children)))
+
+  (element affiliation
+    (let ((inline-children (node-list-filter-by-not-gi 
+                           (children (current-node))
+                           (list (normalize "address")))))
+      (let loop ((nl inline-children))
+       (if (node-list-empty? nl)
+           (empty-sosofo)
+           (make sequence
+             (process-node-list (node-list-first nl))
+             (if (node-list-empty? (node-list-rest nl))
+                 (empty-sosofo)
+                 (literal ", "))
+             (loop (node-list-rest nl)))))))
+
+  (element artpagenums
+    (make sequence
+      (process-children)))
+
+  (element author
+    (make element gi: "SPAN"
+         attributes: '(("CLASS" "AUTHOR"))
+         (literal (author-list-string))))
+
+  (element authorgroup
+    (process-children))
+
+  (element authorinitials
+    (make sequence
+      (process-children)))
+
+  (element collab
+    (let* ((nl (children (current-node)))
+          (collabname (node-list-first nl))
+          (affil (node-list-rest nl)))
+      (make sequence
+       (process-node-list collabname)
+       (if (node-list-empty? affil)
+           (empty-sosofo)
+           (let loop ((nl affil))
+             (if (node-list-empty? nl)
+                 (empty-sosofo)
+                 (make sequence
+                   (literal ", ")
+                   (process-node-list (node-list-first nl))
+                   (loop (node-list-rest nl)))))))))
+
+  (element (collab collabname)
+    (process-children))
+
+  (element confgroup
+    (let ((inline-children (node-list-filter-by-not-gi 
+                           (children (current-node))
+                           (list (normalize "address")))))
+      (let loop ((nl inline-children))
+       (if (node-list-empty? nl)
+           (empty-sosofo)
+           (make sequence
+             (process-node-list (node-list-first nl))
+             (if (node-list-empty? (node-list-rest nl))
+                 (empty-sosofo)
+                 (literal ", "))
+             (loop (node-list-rest nl)))))))
+
+  (element contractnum
+    (process-children))
+
+  (element contractsponsor
+    (process-children))
+
+  (element contrib
+    (process-children))
+
+  (element copyright
+    ;; Just print the year(s)
+    (let ((years (select-elements (children (current-node))
+                                 (normalize "year"))))
+      (process-node-list years)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make sequence
+      (process-children)))
+
+  (element corpname
+    (make sequence
+      (process-children)))
+
+  (element date
+    (make sequence
+      (process-children)))
+
+  (element edition
+    (make sequence
+      (process-children)))
+
+  (element editor
+    (make element gi: "SPAN"
+         attributes: '(("CLASS" "EDITOR"))
+         (if (first-sibling?) 
+             (make sequence
+               (literal (gentext-edited-by))
+               (literal " "))
+             (empty-sosofo))
+         (literal (author-list-string))))
+
+  (element firstname
+    (make sequence
+      (process-children)))
+
+  (element honorific
+    (make sequence
+      (process-children)))
+
+  (element invpartnumber
+    (make sequence
+      (process-children)))
+
+  (element isbn
+    (make sequence
+      (process-children)))
+
+  (element issn
+    (make sequence
+      (process-children)))
+
+  (element issuenum
+    (make sequence
+      (process-children)))
+
+  (element lineage
+    (make sequence
+      (process-children)))
+
+  (element orgname
+    (make sequence
+      (process-children)))
+
+  (element othercredit
+    (make element gi: "SPAN"
+         attributes: '(("CLASS" "OTHERCREDIT"))
+         (literal (author-list-string))))
+
+  (element othername
+    (make sequence
+      (process-children)))
+
+  (element pagenums
+    (make sequence
+      (process-children)))
+
+  (element productname
+    (make sequence
+      ($charseq$)
+; this is actually a problem since "trade" is the default value for
+; the class attribute. we can put this back in in DocBook 5.0, when
+; class becomes #IMPLIED
+;      (if (equal? (attribute-string "class") (normalize "trade"))
+;        (dingbat-sosofo "trademark")
+;        (empty-sosofo))
+      ))
+
+  (element productnumber
+    (make sequence
+      (process-children)))
+
+  (element pubdate
+    (make sequence
+      (process-children)))
+
+  (element publisher
+    (let ((pubname (select-elements (children (current-node))
+                                   (normalize "publishername")))
+         (cities  (select-elements (descendants (current-node))
+                                   (normalize "city"))))
+    (make sequence
+      (process-node-list pubname)
+      (if (node-list-empty? cities)
+         (empty-sosofo)
+         (literal ", "))
+      (process-node-list cities))))
+
+  (element publishername
+    (make sequence
+      (process-children)))
+
+  (element (publisher address city)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element pubsnumber
+    (make sequence
+      (process-children)))
+
+  (element releaseinfo
+    (make sequence
+      (process-children)))
+
+  (element seriesvolnums
+    (make sequence
+      (process-children)))
+
+  (element subtitle
+    (make element gi: "I"
+         (process-children)))
+
+  (element surname
+    (make sequence
+      (process-children)))
+
+  (element title
+    (make element gi: "I"
+         (process-children)))
+
+  (element titleabbrev
+    (make sequence
+      (process-children)))
+
+  (element volumenum
+    (make sequence
+      (process-children)))
+
+  (element (bibliomixed title) 
+      (make element gi: "I"
+           (process-children)))
+  
+  (element (bibliomixed subtitle) 
+    (make element gi: "I"
+         (process-children)))
+
+  (element (biblioset title)
+    (let ((rel (case-fold-up 
+               (inherited-attribute-string (normalize "relation")))))
+      (cond
+       ((equal? rel "ARTICLE") (make sequence
+                                (literal (gentext-start-quote))
+                                (process-children)
+                                (literal (gentext-end-quote))))
+       (else (make element gi: "I"
+                  (process-children))))))
+
+  (element (bibliomset title)
+    (let ((rel (case-fold-up 
+               (inherited-attribute-string (normalize "relation")))))
+      (cond
+       ((equal? rel "ARTICLE") (make sequence
+                                (literal (gentext-start-quote))
+                                (process-children)
+                                (literal (gentext-end-quote))))
+       (else        (make element gi: "I"
+                         (process-children))))))
+)
+
+(mode biblioentry-block-mode
+  (element abstract
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element (abstract title)
+    (make element gi: "P"
+         (make element gi: "B"
+               (process-children))))
+
+  (element address
+    ($linespecific-display$ %indent-address-lines% %number-address-lines%))
+
+  (element authorblurb
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element printhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+      (process-children)))
+
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node))
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (node-list-filter-by-gi
+                     (descendants (current-node))
+                     (list (normalize "revremark")
+                           (normalize "revdescription")))))
+      (make sequence
+       (make element gi: "TR"
+             (make element gi: "TD"
+                   attributes: (list
+                                (list "ALIGN" "LEFT"))
+                   (if (not (node-list-empty? revnumber))
+                       (make sequence
+                         (literal (gentext-element-name-space 
+                                   (gi (current-node))))
+                         (process-node-list revnumber))
+                       (empty-sosofo)))
+             (make element gi: "TD"
+                   attributes: (list
+                                (list "ALIGN" "LEFT"))
+                   (if (not (node-list-empty? revdate))
+                       (process-node-list revdate)
+                       (empty-sosofo)))
+             (make element gi: "TD"
+                   attributes: (list
+                                (list "ALIGN" "LEFT"))
+                   (if (not (node-list-empty? revauthor))
+                       (make sequence
+                         (literal (gentext-revised-by))
+                         (process-node-list revauthor))
+                       (empty-sosofo))))
+       (make element gi: "TR"
+             (make element gi: "TD"
+                   attributes: (list
+                                (list "ALIGN" "LEFT")
+                                (list "COLSPAN" "3"))
+                   (if (not (node-list-empty? revremark))
+                       (process-node-list revremark)
+                       (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesinfo
+    ;; This is a nearly biblioentry recursively...
+    (let* ((expanded-children   (expand-children 
+                                (children (current-node))
+                                (biblioentry-flatten-elements)))
+          (all-inline-children (if %biblioentry-in-entry-order%
+                                   (titlepage-gi-list-by-nodelist
+                                    (biblioentry-inline-elements)
+                                    expanded-children)
+                                   (titlepage-gi-list-by-elements
+                                    (biblioentry-inline-elements)
+                                    expanded-children)))
+          (block-children      (if %biblioentry-in-entry-order%
+                                   (titlepage-gi-list-by-nodelist
+                                    (biblioentry-block-elements)
+                                    expanded-children)
+                                   (titlepage-gi-list-by-elements
+                                    (biblioentry-block-elements)
+                                    expanded-children)))
+          (inline-children     all-inline-children))
+      (make element gi: "DIV"
+           attributes: (list (list "CLASS" (gi)))
+           (make element gi: "P"
+                 (let loop ((nl inline-children))
+                   (if (node-list-empty? nl)
+                       (empty-sosofo)
+                       (make sequence
+                         (with-mode biblioentry-inline-mode
+                           (process-node-list (node-list-first nl)))
+                         (if (node-list-empty? (node-list-rest nl))
+                             (biblioentry-inline-end block-children)
+                             (biblioentry-inline-sep (node-list-first nl)
+                                                     (node-list-rest nl)))
+                         (loop (node-list-rest nl))))))
+       
+           (make element gi: "DIV"
+                 attributes: (list (list "CLASS" (gi)))
+                 (let loop ((nl block-children))
+                   (if (node-list-empty? nl)
+                       (empty-sosofo)
+                       (make sequence
+                         (with-mode biblioentry-block-mode
+                           (process-node-list (node-list-first nl)))
+                         (if (node-list-empty? (node-list-rest nl))
+                             (biblioentry-block-end)
+                             (biblioentry-block-sep (node-list-first nl)
+                                                    (node-list-rest nl)))
+                         (loop (node-list-rest nl)))))))))
+)
+
+(define (nontable-bibliomixed 
+        xreflabel leading-abbrev inline-children)
+  (let* ((has-leading-abbrev? (not (node-list-empty? leading-abbrev))))
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "A"
+               attributes: (list (list "NAME" (element-id)))
+               (empty-sosofo))
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+
+               (if (or biblio-number xreflabel has-leading-abbrev?)
+                   (make sequence
+                     (literal "[")
+
+                     (if biblio-number 
+                         (literal (number->string (bibentry-number 
+                                                   (current-node))))
+                         (empty-sosofo))
+                     
+                     (if xreflabel
+                         (literal xreflabel)
+                         (empty-sosofo))
+         
+                     (if has-leading-abbrev?
+                         (with-mode biblioentry-inline-mode 
+                           (process-node-list leading-abbrev))
+                         (empty-sosofo))
+
+                     (literal "]")
+                     (make entity-ref name: "nbsp"))
+                   (empty-sosofo))
+       
+               (with-mode biblioentry-inline-mode
+                 (process-node-list inline-children))))))
+
+(define (table-bibliomixed 
+        xreflabel leading-abbrev inline-children)
+  (let* ((has-leading-abbrev? (not (node-list-empty? leading-abbrev))))
+    (make element gi: "TR"
+         (make element gi: "TD"
+               attributes: '(("ALIGN" "LEFT")
+                             ("VALIGN" "TOP")
+                             ("WIDTH" "10%"))
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+
+               (if (or biblio-number xreflabel has-leading-abbrev?)
+                   (make sequence
+                     (literal "[")
+
+                     (if biblio-number 
+                         (literal (number->string (bibentry-number 
+                                                   (current-node))))
+                         (empty-sosofo))
+               
+                     (if xreflabel
+                         (literal xreflabel)
+                         (empty-sosofo))
+               
+                     (if has-leading-abbrev?
+                         (with-mode biblioentry-inline-mode 
+                           (process-node-list leading-abbrev))
+                         (empty-sosofo))
+
+                     (literal "]"))
+                   (make entity-ref name: "nbsp")))
+
+         (make element gi: "TD"
+               attributes: '(("ALIGN" "LEFT")
+                             ("VALIGN" "TOP")
+                             ("WIDTH" "90%"))
+               (with-mode biblioentry-inline-mode
+                 (process-node-list inline-children))))))
+
+(element bibliomixed 
+  (let* ((all-inline-children (children (current-node)))
+        (leading-abbrev      (if (equal? (normalize "abbrev")
+                                         (gi (node-list-first 
+                                              all-inline-children)))
+                                 (node-list-first all-inline-children)
+                                 (empty-node-list)))
+        (inline-children     (if (node-list-empty? leading-abbrev)
+                                 all-inline-children
+                                 (node-list-rest all-inline-children)))
+        (has-leading-abbrev? (not (node-list-empty? leading-abbrev)))
+        (xreflabel           (if (or has-leading-abbrev? biblio-number)
+                                 #f
+                                 (attribute-string (normalize "xreflabel")))))
+    (if (bibliography-table)
+       (table-bibliomixed xreflabel leading-abbrev inline-children)
+       (nontable-bibliomixed xreflabel leading-abbrev inline-children))))
+
+;; ....................... BIBLIOGRAPHY ELEMENTS .......................
+
+;; These are element construction rules for bibliography elements that 
+;; may occur outside of a BIBLIOENTRY or BIBLIOMIXED.
+
+(element bibliomisc (process-children))
+(element bibliomset (process-children))
+(element biblioset (process-children))
+(element bookbiblio (process-children))
+
+(element street ($charseq$))
+(element pob ($charseq$))
+(element postcode ($charseq$))
+(element city ($charseq$))
+(element state ($charseq$))
+(element country ($charseq$))
+(element phone ($charseq$))
+(element fax ($charseq$))
+(element otheraddr ($charseq$))
+(element affiliation ($charseq$))
+(element shortaffil ($charseq$))
+(element jobtitle ($charseq$))
+(element orgdiv ($charseq$))
+(element artpagenums ($charseq$))
+
+(element author
+  (make sequence
+    (literal (author-list-string))))
+
+(element authorgroup (process-children))
+
+(element collab (process-children))
+(element collabname ($charseq$))
+(element authorinitials ($charseq$))
+(element confgroup (process-children))
+(element confdates ($charseq$))
+(element conftitle ($charseq$))
+(element confnum ($charseq$))
+(element confsponsor ($charseq$))
+(element contractnum ($charseq$))
+(element contractsponsor ($charseq$))
+
+(element copyright
+  (make sequence
+    (literal (gentext-element-name (gi (current-node))))
+    (make entity-ref name: "nbsp")
+    (dingbat-sosofo "copyright")
+    (make entity-ref name: "nbsp")
+    (process-children)))
+
+(element year
+  (make sequence
+    (process-children)
+    (if (not (last-sibling? (current-node)))
+       (literal ", ")
+       (literal " "))))
+
+(element holder ($charseq$))
+
+(element corpauthor
+  (make sequence
+    (literal (author-list-string))))
+
+(element corpname ($charseq$))
+(element date ($charseq$))
+(element edition ($charseq$))
+(element editor ($charseq$))
+(element isbn ($charseq$))
+(element issn ($charseq$))
+(element invpartnumber ($charseq$))
+(element issuenum ($charseq$))
+
+(element legalnotice ($semiformal-object$))
+(element (legalnotice title) (empty-sosofo))
+
+(element modespec (empty-sosofo))
+
+(element orgname ($charseq$))
+
+(element othercredit
+  (make sequence
+    (literal (author-list-string))))
+
+(element pagenums ($charseq$))
+(element contrib ($charseq$))
+
+(element firstname ($charseq$))
+(element honorific ($charseq$))
+(element lineage ($charseq$))
+(element othername ($charseq$))
+(element surname ($charseq$))
+
+(element printhistory (empty-sosofo))
+
+  (element productname
+    (make sequence
+      ($charseq$)
+; this is actually a problem since "trade" is the default value for
+; the class attribute. we can put this back in in DocBook 5.0, when
+; class becomes #IMPLIED
+;      (if (equal? (attribute-string "class") (normalize "trade"))
+;        (dingbat-sosofo "trademark")
+;        (empty-sosofo))
+      ))
+
+(element productnumber ($charseq$))
+(element pubdate ($charseq$))
+(element publisher (process-children))
+(element publishername ($charseq$))
+(element pubsnumber ($charseq$))
+(element releaseinfo (empty-sosofo))
+(element revision ($charseq$))
+(element revnumber ($charseq$))
+(element revremark ($charseq$))
+(element revdescription ($block-container$))
+(element seriesvolnums ($charseq$))
+(element volumenum ($charseq$))
+
+(element (bookbiblio revhistory) ($book-revhistory$))
+
+;; The (element (bookinfo revhistory)) construction rule is in dbinfo.dsl
+;; It calls $book-revhistory$...
+(define ($book-revhistory$)
+  (make element gi: "DIV"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       (make element gi: "TABLE"
+             attributes: (list
+                          (list "WIDTH" ($table-width$))
+                          (list "BORDER" "0"))
+             (make sequence
+               (make element gi: "TR"
+                     (make element gi: "TH"
+                           attributes: '(("ALIGN" "LEFT") 
+                                         ("VALIGN" "TOP")
+                                         ("COLSPAN" "3"))
+                           (make element gi: "B"
+                                 (literal (gentext-element-name 
+                                           (gi (current-node)))))))
+             (process-children)))))
+
+(element (revhistory revision)
+  (let ((revnumber (select-elements (descendants (current-node))
+                                   (normalize "revnumber")))
+       (revdate   (select-elements (descendants (current-node))
+                                   (normalize "date")))
+       (revauthor (select-elements (descendants (current-node))
+                                   (normalize "authorinitials")))
+       (revremark (node-list-filter-by-gi
+                   (descendants (current-node))
+                   (list (normalize "revremark")
+                         (normalize "revdescription")))))
+    (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+(element (revision revnumber) (process-children-trim))
+(element (revision date) (process-children-trim))
+(element (revision authorinitials) (process-children-trim))
+(element (revision revremark) (process-children-trim))
diff --git a/html/dbblock.dsl b/html/dbblock.dsl
new file mode 100644 (file)
index 0000000..966cd1c
--- /dev/null
@@ -0,0 +1,306 @@
+;; $Id: dbblock.dsl,v 1.11 2003/05/28 16:48:47 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(element highlights ($block-container$))
+
+(element revhistory ($book-revhistory$))
+
+(element blockquote
+  (let ((id     (element-id))
+       (attrib (select-elements (children (current-node))
+                                (normalize "attribution")))
+        (startc (list (list "WIDTH" %blockquote-start-col%)))
+        (endc   (list (list "WIDTH" %blockquote-end-col%)))
+       (paras  (node-list-filter-by-not-gi
+                (children (current-node))
+                (list (normalize "attribution")))))
+    (make sequence
+      (if id
+         (make element gi: "A"
+               attributes: (list (list "NAME" id))
+               (empty-sosofo))
+         (empty-sosofo))
+
+      (if (node-list-empty? attrib) 
+         (make element gi: "BLOCKQUOTE"
+               attributes: '(("CLASS" "BLOCKQUOTE"))
+               (process-children))
+         (make element gi: "TABLE"
+               attributes: '(("BORDER" "0")
+                             ("WIDTH" "100%")
+                             ("CELLSPACING" "0")
+                             ("CELLPADDING" "0")
+                             ("CLASS" "BLOCKQUOTE"))
+               (make element gi: "TR"
+                     (make element gi: "TD"
+                           attributes: (append startc
+                                                '(("VALIGN" "TOP")))
+                           (make entity-ref name: "nbsp"))
+                     (make element gi: "TD"
+                           attributes: '(("VALIGN" "TOP"))
+                           (process-node-list paras))
+                     (make element gi: "TD"
+                           attributes: (append endc
+                                                '(("VALIGN" "TOP")))
+                           (make entity-ref name: "nbsp")))
+               (make element gi: "TR"
+                     (make element gi: "TD"
+                           attributes: '(("COLSPAN" "2")
+                                         ("ALIGN" "RIGHT")
+                                         ("VALIGN" "TOP"))
+                           (make sequence
+                             (literal "--")
+                             (process-node-list attrib)))
+                     (make element gi: "TD"
+                           attributes: endc
+                           (make entity-ref name: "nbsp"))))))))
+       
+(element epigraph
+  (let* ((attrib       (select-elements (children (current-node))
+                                       (normalize "attribution")))
+         (startcol     (list (list "WIDTH" %epigraph-start-col%)))
+         (contentcol   (list (list "WIDTH" %epigraph-content-col%)))
+        (paras        (node-list-filter-by-not-gi
+                       (children (current-node))
+                       (list (normalize "attribution")))))
+  (make element gi: "TABLE"
+       attributes: '(("BORDER" "0")
+                     ("WIDTH" "100%")
+                     ("CELLSPACING" "0")
+                     ("CELLPADDING" "0")
+                     ("CLASS" "EPIGRAPH"))
+       (make element gi: "TR"
+             (make element gi: "TD"
+                   attributes: startcol
+                   (make entity-ref name: "nbsp"))
+             (make element gi: "TD"
+                   attributes: (append contentcol
+                                        '(("ALIGN" "LEFT")
+                                          ("VALIGN" "TOP")))
+                   (make element gi: "I"
+                         (process-node-list paras))))
+       (if (node-list-empty? attrib)
+           (empty-sosofo)
+           (make element gi: "TR"
+                 (make element gi: "TD"
+                       attributes: startcol
+                       (make entity-ref name: "nbsp"))
+                 (make element gi: "TD"
+                       attributes: (append contentcol
+                                            '(("ALIGN" "RIGHT")
+                                              ("VALIGN" "TOP")))
+                       (make element gi: "I"
+                             (process-node-list attrib))))))))
+
+(element attribution ($charseq$))
+
+(element (epigraph para)
+  (make element gi: "P"
+       (make element gi: "I"
+             (process-children-trim))))
+
+(element para ($paragraph$))
+(element simpara ($paragraph$))
+
+(element formalpara
+  (make element gi: "DIV"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       (make element gi: "P"
+             (if (attribute-string (normalize "id"))
+                 (make element gi: "A"
+                       attributes: (list
+                                    (list "NAME"
+                                          (attribute-string
+                                           (normalize "id"))))
+                       (empty-sosofo))
+                 (empty-sosofo))
+             (process-children))))
+
+(element (formalpara title) ($runinhead$))
+
+(element (formalpara para)
+  (process-children))
+
+(element sidebar 
+  (make element gi: "TABLE"
+       attributes: (list
+                    (list "CLASS" (gi))
+                    (list "BORDER" "1")
+                    (list "CELLPADDING" "5"))
+       (make element gi: "TR"
+             (make element gi: "TD"
+                   ($semiformal-object$)))))
+
+(element (sidebar title)
+  (empty-sosofo))
+
+(element abstract 
+  (make element gi: "BLOCKQUOTE"
+       attributes: '(("CLASS" "ABSTRACT"))
+       ($semiformal-object$)))
+
+(element (abstract title) (empty-sosofo))
+
+(element authorblurb ($block-container$))
+
+(element ackno ($paragraph$))
+
+(define ($inline-object$)
+  (process-children))
+
+(define ($informal-object$ #!optional (rule-before? #f) (rule-after? #f))
+  (let ((id (element-id)))
+    (make element gi: "DIV"
+         attributes: (list
+                      (list "CLASS" (gi)))
+         (if %spacing-paras%
+             (make element gi: "P" (empty-sosofo))
+             (empty-sosofo))
+         
+         (if rule-before?
+             (make empty-element gi: "HR")
+             (empty-sosofo))
+
+         (if id
+              ;; empty A is a little evil but for instance you can't
+              ;; wrap TABLE within A
+             (make element gi: "A"
+                   attributes: (list (list "NAME" id))
+                   (empty-sosofo))
+             (empty-sosofo))
+
+          ;; reset the mode to make processing of elements within an
+          ;; informal object not subject to whatever mode they would
+          ;; be in on the top level; e.g.,
+          ;; bookinfo-legalnotice-productname distinguished from
+          ;; bookinfo-productname
+          (with-mode #f
+            (process-children))
+
+         (if rule-after?
+             (make empty-element gi: "HR")
+             (empty-sosofo))
+         
+         (if %spacing-paras%
+             (make element gi: "P" (empty-sosofo))
+             (empty-sosofo)))))
+  
+(define (object-title-after #!optional (node (current-node))) 
+  (if (member (gi node) ($object-titles-after$))
+      #t
+      #f))
+
+(define (named-formal-objects)
+  (list (normalize "figure")
+       (normalize "table")
+       (normalize "example")
+       (normalize "equation")))
+
+(define ($formal-object$ #!optional (rule-before? #f) (rule-after? #f))
+  (let* ((nsep  (gentext-label-title-sep (gi)))
+        (id    (element-id))
+        (title-inline-sosofo 
+               (make sequence
+                 (if (member (gi) (named-formal-objects))
+                     (make sequence
+                       (literal (gentext-element-name (gi)))
+                       (if (string=? (element-label) "")
+                           (literal nsep)
+                           (literal " " (element-label) nsep)))
+                     (empty-sosofo))
+                 (with-mode title-mode
+                   (process-node-list 
+                    (select-elements (children (current-node))
+                                     (normalize "title"))))))
+        (title-sosofo (make element gi: "P"
+                            (make element gi: "B"
+                                  title-inline-sosofo)))
+
+         ;; reset the mode to make processing of elements within an
+         ;; formal object not subject to whatever mode they would be
+         ;; in on the top level; e.g.,
+         ;; bookinfo-legalnotice-productname distinguished from
+         ;; bookinfo-productname
+        (object-sosofo (with-mode #f
+                          (process-children))))
+    (make element gi: "DIV" 
+         attributes: (list
+                      (list "CLASS" (gi)))
+
+         (if rule-before?
+             (make empty-element gi: "HR")
+             (empty-sosofo))
+
+         (if id
+             (make element gi: "A"
+                   attributes: (list 
+                                (list "NAME" id))
+                   (empty-sosofo))
+             (empty-sosofo))
+         
+         (if (object-title-after)
+             (make sequence
+               object-sosofo
+               title-sosofo)
+             (make sequence
+               title-sosofo
+               object-sosofo))
+
+         (if rule-after?
+             (make empty-element gi: "HR")
+             (empty-sosofo)))))
+
+(define ($semiformal-object$)
+  ;; semiformal means optional title...
+  (if (node-list-empty? (select-elements (children (current-node)) 
+                                        (normalize "title")))
+      ($informal-object$)
+      ($formal-object$)))
+
+(element example 
+  ($formal-object$ %example-rules% %example-rules%))
+
+(element (example title) (empty-sosofo)) ; don't show caption below example
+
+(element informalexample
+  ($informal-object$ %informalexample-rules% %informalexample-rules%))
+
+(element informalfigure
+  ($informal-object$ %informalfigure-rules% %informalfigure-rules%))
+
+(element (figure title) (empty-sosofo)) ; don't show caption below figure
+
+(element figure 
+  ($formal-object$ %figure-rules% %figure-rules%))
+
+(element informaltable
+  ($informal-object$ %informaltable-rules% %informaltable-rules%))
+
+(element table
+  ($formal-object$ %table-rules% %table-rules%))
+
+(element (table title) (empty-sosofo))
+
+;; remark and comment use the same rendering
+(define ($remark$)
+  (if %show-comments%
+      (let ((inpara (equal? (gi (parent (current-node))) (normalize "para")))
+            (attrib '(("CLASS" "COMMENT"))))
+        (if inpara
+            (make element gi: "SPAN"
+                  attributes: attrib
+                  (process-children))
+            (make element gi: "P"
+                  attributes: attrib
+                  (process-children))))
+      (empty-sosofo)))
+
+(element comment ($remark$))
+
+;; In DocBook V4.0 comment became remark
+(element remark ($remark$))
+
diff --git a/html/dbcallou.dsl b/html/dbcallou.dsl
new file mode 100644 (file)
index 0000000..c3d1297
--- /dev/null
@@ -0,0 +1,206 @@
+;; $Id: dbcallou.dsl,v 1.4 2003/04/26 18:36:22 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; The support provided below is a little primitive because there's no way
+;; to do line-addressing in Jade.
+;;
+;; CO's are supported with the CO element or, in SCREENCO and 
+;; PROGRAMLISTINGCO only, AREAs.
+;;
+;; Notes on the use of AREAs:
+;;
+;; - Processing is very slow. Jade loops through each AREA for
+;;   every column on every line.
+;; - Only the LINECOLUMN units are supported, and they are #IMPLIED
+;; - If a COORDS only specifies a line, the %callout-default-col% will
+;;   be used for the column.
+;; - If the column is beyond the end of the line, that will work OK, but
+;;   if more than one callout has to get placed beyond the end of the same
+;;   line, that doesn't work so well.
+;; - Embedded tabs foul up the column counting.
+;; - Embedded markup fouls up the column counting.
+;; - Embedded markup with embedded line breaks fouls up the line counting.
+;; - The callout bugs occur immediately before the LINE COLUMN specified.
+;; - You can't point to an AREASET, that doesn't make any sense in HTML
+;;   since it would imply a one-to-many link
+;;
+;; There's still no support for a stylesheet drawing the callouts on a
+;; GRAPHIC, and I don't think there ever will be.
+;;
+
+(element areaspec (empty-sosofo))
+(element area (empty-sosofo))
+(element areaset (empty-sosofo))
+
+(element co
+  ($callout-mark$ (current-node) #t))
+
+(element programlistingco (process-children))
+(element screenco (process-children))
+(element graphicco (process-children))
+
+(element (screenco screen) 
+  ($callout-verbatim-display$ %indent-screen-lines% %number-screen-lines%))
+
+(element (programlistingco programlisting) 
+  ($callout-verbatim-display$ %indent-programlisting-lines% 
+                             %number-programlisting-lines%))
+
+;; ----------------------------------------------------------------------
+
+(define ($callout-bug$ conumber)
+  (let ((number (if conumber (format-number conumber "1") "0")))
+    (if conumber
+       (if %callout-graphics%
+           (if (<= conumber %callout-graphics-number-limit%)
+               (make empty-element gi: "IMG"
+                     attributes: (list (list "SRC" 
+                                             (root-rel-path
+                                              (string-append
+                                               %callout-graphics-path%
+                                               number
+                                               %stock-graphics-extension%)))
+                                       (list "HSPACE" "0")
+                                       (list "VSPACE" "0")
+                                       (list "BORDER" "0")
+                                       (list "ALT"
+                                             (string-append
+                                              "(" number ")"))))
+               (make element gi: "B"
+                     (literal "(" (format-number conumber "1") ")")))
+           (make element gi: "B"
+                 (literal "(" (format-number conumber "1") ")")))
+       (make element gi: "B"
+             (literal "(??)")))))
+
+(define ($callout-mark$ co anchor?)
+  ;; Print the callout mark for co
+  (let* ((id (attribute-string (normalize "id") co))
+        (attr (if anchor?
+                  (list (list "NAME" id))
+                  (list (list "HREF" (href-to co))))))
+    (make element gi: "A"
+         attributes: attr
+         (if (equal? (gi co) (normalize "co"))
+             ($callout-bug$ (if (node-list-empty? co)
+                                #f
+                                (child-number co)))
+             (let ((areanum (if (node-list-empty? co)
+                                0
+                                (if (equal? (gi (parent co)) (normalize "areaset"))
+                                    (absolute-child-number (parent co))
+                                    (absolute-child-number co)))))
+               ($callout-bug$ (if (node-list-empty? co)
+                                  #f
+                                  areanum)))))))
+
+(define ($look-for-callout$ line col #!optional (eol? #f))
+  ;; Look to see if a callout should be printed at line col, and print
+  ;; it if it should
+  (let* ((areaspec (select-elements (children (parent (current-node)))
+                                   (normalize "areaspec")))
+        (areas    (expand-children (children areaspec) 
+                                   (list (normalize "areaset")))))
+    (let loop ((areanl areas))
+      (if (node-list-empty? areanl)
+         (empty-sosofo)
+         (make sequence
+           (if ($callout-area-match$ (node-list-first areanl) line col eol?)
+               ($callout-area-format$ (node-list-first areanl) line col eol?)
+               (empty-sosofo))
+           (loop (node-list-rest areanl)))))))
+
+(define ($callout-area-match$ area line col eol?)
+  ;; Does AREA area match line col?
+  (let* ((coordlist (split (attribute-string (normalize "coords") area)))
+        (aline (string->number (car coordlist)))
+        (acol  (if (null? (cdr coordlist))
+                   #f
+                   (string->number (car (cdr coordlist)))))
+        (units (if (inherited-attribute-string (normalize "units") area)
+                   (inherited-attribute-string (normalize "units") area)
+                   (normalize "linecolumn"))))
+    (and (equal? units (normalize "linecolumn"))
+        (or
+         (and (equal? line aline)
+              (equal? col acol))
+         (and (equal? line aline)
+              eol? 
+              (or (not acol) (> acol col)))))))
+
+(define ($callout-area-format$ area line col eol?)
+  ;; Format AREA area at the appropriate place
+  (let* ((coordlist (split (attribute-string (normalize "coords") area)))
+        (aline (string->number (car coordlist)))
+        (acol  (if (null? (cdr coordlist))
+                   #f
+                   (string->number (car (cdr coordlist))))))
+    (if (and (equal? line aline)
+            eol? 
+            (or (not acol) (> acol col)))
+       (make sequence
+         (let loop ((atcol col))
+           (if (>= atcol (if acol acol %callout-default-col%))
+               (empty-sosofo)
+               (make sequence
+                 (literal " ")
+                 (loop (+ atcol 1)))))
+         ($callout-mark$ area #t))
+       ($callout-mark$ area #t))))
+
+(define ($callout-verbatim-display$ indent line-numbers?)
+  (let* ((content (make element gi: "PRE"
+                       attributes: (list
+                                    (list "CLASS" (gi)))
+                       ($callout-verbatim-content$ indent line-numbers?))))
+    (if %shade-verbatim%
+       (make element gi: "TABLE"
+             attributes: ($shade-verbatim-attr$)
+             (make element gi: "TR"
+                   (make element gi: "TD"
+                         content)))
+       content)))
+
+(define ($callout-verbatim-content$ indent line-numbers?)
+  ;; Print linespecific content in a callout with line numbers
+  (make sequence
+    ($line-start$ indent line-numbers? 1)
+    (let loop ((kl (children (current-node)))
+              (linecount 1)
+              (colcount 1)
+              (res (empty-sosofo)))
+      (if (node-list-empty? kl)
+         (sosofo-append res
+                        ($look-for-callout$ linecount colcount #t)
+                        (empty-sosofo))
+         (loop
+          (node-list-rest kl)
+          (if (char=? (node-property 'char (node-list-first kl)
+                                     default: #\U-0000) #\U-000D)
+              (+ linecount 1)
+              linecount)
+          (if (char=? (node-property 'char (node-list-first kl)
+                                     default: #\U-0000) #\U-000D)
+              1
+              (if (char=? (node-property 'char (node-list-first kl)
+                                         default: #\U-0000) #\U-0000)
+                  colcount
+                  (+ colcount 1)))
+          (let ((c (node-list-first kl)))
+            (if (char=? (node-property 'char c default: #\U-0000)
+                        #\U-000D)
+                (sosofo-append res
+                               ($look-for-callout$ linecount colcount #t)
+                               (process-node-list c)
+                               ($line-start$ indent
+                                             line-numbers?
+                                             (+ linecount 1)))
+                (sosofo-append res
+                               ($look-for-callout$ linecount colcount)
+                               (process-node-list c)))))))))
+
+;; EOF dbcallout.dsl
+
diff --git a/html/dbchunk.dsl b/html/dbchunk.dsl
new file mode 100644 (file)
index 0000000..3321569
--- /dev/null
@@ -0,0 +1,492 @@
+;; $Id: dbchunk.dsl,v 1.1 2001/04/02 21:40:27 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+(define (chunk-element-list)
+  (list (normalize "preface")
+       (normalize "chapter")
+       (normalize "appendix") 
+       (normalize "article")
+       (normalize "glossary")
+       (normalize "bibliography")
+       (normalize "index")
+       (normalize "colophon")
+       (normalize "setindex")
+       (normalize "reference")
+       (normalize "refentry")
+       (normalize "part")
+       (normalize "sect1") 
+       (normalize "section") 
+       (normalize "book") ;; just in case nothing else matches...
+       (normalize "set")  ;; sets are definitely chunks...
+       ))
+
+(define (chunk-skip-first-element-list)
+  (list (normalize "sect1")
+       (normalize "section")))
+
+(define (chunk-section-depth)
+  1)
+
+(define (section-element-depth #!optional (section (current-node)))
+  (if (node-list-empty? section)
+      0
+      (if (equal? (gi section) (normalize "section"))
+         (length (hierarchical-number-recursive
+                  (normalize "section")
+                  section))
+         (section-element-depth (parent section)))))
+
+(define (is-first-element nd)
+  (equal? (child-number nd) 1))
+
+(define (combined-chunk? #!optional (nd (current-node)))
+  (or
+   ;; if it's a section and the parent element is also a section
+   ;; and its depth is less than or equal to chunk-section-depth
+   (and (equal? (gi nd) (normalize "section"))
+       (not (node-list-empty? (parent nd)))
+       (equal? (gi (parent nd)) (normalize "section"))
+       (>= (section-element-depth nd) (chunk-section-depth)))
+   ;; if it's the first skipped chunk in a chunk
+   (and (not (node-list-empty? nd))
+       (member (gi nd) (chunk-element-list))
+       (is-first-element nd)
+       (member (gi nd) (chunk-skip-first-element-list)))
+   ;; or if it's a chunk in a partintro
+   (and (member (gi nd) (chunk-element-list))
+       (has-ancestor-member? nd (list (normalize "partintro"))))))
+
+(define (chunk? #!optional (nd (current-node)))
+  ;; 1. The (sgml-root-element) is always a chunk.
+  ;; 2. If nochunks is #t or the dbhtml PI on the root element 
+  ;;    specifies chunk='no', then the root element is the only
+  ;;    chunk.
+  ;; 3. Otherwise, elements in the chunk-element-list are chunks
+  ;;    unless they're combined with their parent.
+  ;; 4. Except for bibliographys, which are only chunks if they
+  ;;    occur in book or article.
+  ;; 5. And except for sections, which are only chunks if they
+  ;;    are not too deep
+  ;;
+  (let* ((notchunk (or (and (equal? (gi nd) (normalize "bibliography"))
+                           (not (or (equal? (gi (parent nd)) (normalize "book"))
+                                    (equal? (gi (parent nd)) (normalize "article")))))
+                      (and (equal? (gi nd) (normalize "section"))
+                           (equal? (gi (parent nd)) (normalize "section"))
+                           (>= (section-element-depth nd)
+                               (chunk-section-depth)))))
+        (maybechunk (not notchunk)))
+    (if (node-list=? nd (sgml-root-element))
+       #t
+       (if (or nochunks
+               (equal? (dbhtml-value (sgml-root-element) "chunk") "no"))
+           #f
+           (if (member (gi nd) (chunk-element-list))
+               (if (combined-chunk? nd)
+                   #f
+                   maybechunk)
+               #f)))))
+
+(define (html-prefix nd) 
+  (let ((dbhtml-prefix (inherited-dbhtml-value nd "prefix")))
+    (if dbhtml-prefix
+       dbhtml-prefix
+       %html-prefix%)))
+
+(define (id-based-filename nd)
+  (if (and %use-id-as-filename% 
+          (attribute-string (normalize "id") nd))
+      (case-fold-down (attribute-string (normalize "id") nd))
+      #f))
+
+(define (book-html-base nd)
+  (let ((number (number->string (all-element-number nd)))
+       ;(number (pad-string (number->string 3) 2 "0"))
+       (prefix (html-prefix nd))
+       (pibase (or
+                (inherited-dbhtml-value nd "basename")
+                (inherited-pi-value nd "html-basename")))
+       (idbase (id-based-filename nd)))
+    (if idbase
+       (string-append (if prefix prefix "") idbase)
+       (string-append (if prefix prefix "") 
+                      (if pibase pibase "book") number))))
+
+(define (division-html-base nd)
+  (let* ((number (number->string (all-element-number nd)))
+        (prefix (html-prefix nd))
+        (pibase (or
+                 (inherited-dbhtml-value nd "basename")
+                 (inherited-pi-value nd "html-basename")))
+        (idbase (id-based-filename nd))
+        (base   (cond (pibase pibase)
+                      (idbase idbase)
+                      ((equal? (gi nd) (normalize "set"))          "s")
+                      ((equal? (gi nd) (normalize "preface"))      "f")
+                      ((equal? (gi nd) (normalize "chapter"))      "c")
+                      ((equal? (gi nd) (normalize "article"))      "t")
+                      ((equal? (gi nd) (normalize "appendix"))     "a")
+                      ((equal? (gi nd) (normalize "part"))         "p")
+                      ((equal? (gi nd) (normalize "reference"))    "r")
+                      ((equal? (gi nd) (normalize "glossary"))     "g")
+                      ((equal? (gi nd) (normalize "bibliography")) "b")
+                      ((equal? (gi nd) (normalize "index"))        "i")
+                      ((equal? (gi nd) (normalize "setindex"))     "n")
+                      ((equal? (gi nd) (normalize "refentry"))     "r")
+                      ;; "x" is section
+                      (else "z"))))
+    (if idbase
+       (string-append (if prefix prefix "") idbase)
+       (if pibase
+           (string-append (if prefix prefix "") pibase number)
+           (string-append (if prefix prefix "") base number)))))
+
+(define (component-html-base nd)
+  (division-html-base nd))
+
+(define (section-html-base nd)
+  ;; Now that I'm using all-element-number, there's no point in basing
+  ;; it off the component-html-base at all...
+  (let* ((number (number->string (all-element-number nd)))
+        (prefix (html-prefix nd))
+        (pibase (or
+                 (inherited-dbhtml-value nd "basename")
+                 (inherited-pi-value nd "html-basename")))
+        (idbase (id-based-filename nd))
+        (base   (if pibase
+                    (string-append (if prefix prefix "") pibase)
+                    (string-append (if prefix prefix "") "x"))))
+    (if idbase
+       (string-append (if prefix prefix "") idbase)
+       (if (chunk? nd)
+           (string-append base number)
+           base))))
+
+(define (element-html-base nd)
+  (let* ((number (number->string (all-element-number nd)))
+        (prefix (html-prefix nd))
+        (pibase (or
+                 (inherited-dbhtml-value nd "basename")
+                 (inherited-pi-value nd "html-basename")))
+        (idbase (id-based-filename nd))
+        (base   (if pibase
+                    (string-append (if prefix prefix "") pibase)
+                    (string-append (if prefix prefix "") 
+                                   (case-fold-down (gi nd))))))
+    (if idbase
+       (string-append (if prefix prefix "") idbase)
+       (string-append base number))))
+
+;; Returns the filename of the html file that contains elemnode, without
+;; any leading path information
+(define (html-base-filename #!optional (input_nd (current-node)))
+  (let* ((nd       (chunk-parent input_nd))
+        (base     (cond ((member (gi nd) (book-element-list))
+                         (book-html-base nd))
+                        ((member (gi nd) (division-element-list))
+                         (division-html-base nd))
+                        ((member (gi nd) (component-element-list))
+                         (component-html-base nd))
+                        ((member (gi nd) (section-element-list))
+                         (section-html-base nd))
+                        (else (element-html-base input_nd))))
+        ;; If this chunk-level element isn't a chunk, get the pifile from
+        ;; the parent element.
+        (pifile   (if (chunk? nd)
+                      (or
+                       (dbhtml-value nd "filename")
+                       (pi-value nd "html-filename"))
+                      (or
+                       (dbhtml-value (parent nd) "filename")
+                       (pi-value (parent nd) "html-filename"))))
+        (language (if %html-use-lang-in-filename%
+                      (if (inherited-attribute-string (normalize "lang") nd)
+                          (inherited-attribute-string (normalize "lang") nd)
+                          %default-language%)
+                      ""))
+        (ext      (if %html-use-lang-in-filename%
+                      (string-append "." language %html-ext%)
+                      %html-ext%)))
+    (if (and %root-filename% (node-list=? (sgml-root-element) nd))
+       (string-append %root-filename% ext)
+       (if pifile 
+           pifile
+           (string-append base ext)))))
+
+(define (root-rel-path filename #!optional (node (current-node)))
+  ;; Return the filename relative to the root path
+  (string-append (copy-string "../" (directory-depth (html-file node)))
+                filename))
+
+;; Returns the filename of the html file that contains elemnode
+;;
+(define (html-file #!optional (input_nd (current-node)))
+  (let* ((cp-nd         (chunk-parent input_nd))
+        ;; If the sgml-root-element is at a level below the chunking
+        ;; level, then cp-nd will return an empty-node-list. In this
+        ;; case, we want to return the root-element.
+        (nd            (if (node-list-empty? cp-nd)
+                           (sgml-root-element)
+                           cp-nd))
+        (base-filename (html-base-filename nd))
+        (pidir (or
+                (inherited-dbhtml-value nd "dir")
+                (inherited-pi-value nd "html-dir"))))
+    (if (and %root-filename% (node-list=? (sgml-root-element) nd))
+       base-filename
+       (if pidir
+           (string-append pidir "/" base-filename)
+           base-filename))))
+
+(define (href-to target)
+  ;; Return the HTML HREF for the given node.  If nochunks is true, just
+  ;; return the fragment identifier.
+  (let* ((id       (element-id target))
+        (curdepth (directory-depth (html-file (current-node))))
+        (entfile  (html-file target))
+        (fragid   (if (chunk? target)
+                    ""
+                    (string-append "#" id))))
+    (if nochunks
+       fragid
+       (string-append (copy-string "../" curdepth) entfile fragid))))
+
+(define (html-entity-file htmlfilename)
+  ;; Returns the filename that should be used for _writing_ htmlfilename.
+  ;; This may differ from the filename used in referencing it.  (The point
+  ;; is that you can force the stylesheets to write the chunked files
+  ;; somewhere else, if you want.)
+  (let* ((pi-outputdir (dbhtml-value (sgml-root-element) "output-dir"))
+        (outputdir    (if pi-outputdir
+                          pi-outputdir
+                          %output-dir%)))
+    (if (and use-output-dir outputdir)
+       (string-append outputdir "/" htmlfilename)
+       htmlfilename)))
+  
+;; Split node list nl at nd; return '(nodes-prev-to-nd nodes-following-nd)
+;; Note that nd does not appear in either return list.
+(define (split-node-list nd nodelist)
+  (let loop ((prev (empty-node-list)) 
+            (nl nodelist))
+    (if (node-list-empty? nl)
+       (list prev (empty-node-list))
+       (if (node-list=? (node-list-first nl) nd)
+           (list prev (node-list-rest nl))
+           (loop (node-list prev (node-list-first nl))
+                 (node-list-rest nl))))))
+
+(define (navigate-to? nd)
+  #t)
+
+(define (chunk-parent #!optional (nd (current-node)))
+  (let ((cp (let loop ((p (chunk-level-parent nd)))
+             (if (or (node-list-empty? p) (chunk? p))
+                 p
+                 (chunk-parent (parent p))))))
+    cp))
+;    (if (node-list-empty? cp)
+;      ;; if there's no chunk-parent, return the root node
+;      (sgml-root-element)
+;      ;; otherwise, return the parent that we found
+;      cp)))
+
+(define (chunk-level-parent #!optional (nd (current-node)))
+  (ancestor-member nd (chunk-element-list)))
+
+(define (chunk-children #!optional (nd (current-node)))
+  (node-list-filter-by-gi (children nd) (chunk-element-list)))
+
+(define (ifollow-by-gi nd gilist)
+  (let loop ((next (ifollow nd)))
+    (if (node-list-empty? next)
+       (empty-node-list)
+       (if (member (gi next) gilist)
+           next
+           (loop (ifollow next))))))
+
+(define (ipreced-by-gi nd gilist)
+  (let loop ((prev (ipreced nd)))
+    (if (node-list-empty? prev)
+       (empty-node-list)
+       (if (member (gi prev) gilist)
+           prev
+           (loop (ipreced prev))))))
+
+(define (last-chunk-element nd)
+  (let ((clc (node-list-filter-by-gi (children nd) (chunk-element-list))))
+    (if (node-list-empty? clc)
+       nd
+       (last-chunk-element (node-list-last clc)))))
+
+(define (next-chunk-skip-children #!optional (elem (current-node)))
+  (let* ((nd  (chunk-level-parent elem))
+        (psl (node-list-filter-by-gi (children (parent nd)) 
+                                     (chunk-element-list)))
+        (nextlist (car (cdr (split-node-list nd psl)))))
+    (if (node-list-empty? nextlist)
+       (if (node-list-empty? (parent nd))
+           (empty-node-list)
+           (next-chunk-skip-children (parent nd)))
+       (node-list-first nextlist))))
+
+(define (next-chunk-with-children #!optional (elem (current-node)))
+  (let* ((nd  (chunk-level-parent elem))
+        (clc (chunk-children nd))
+        (ns  (ifollow-by-gi nd (chunk-element-list))))
+    (if (node-list-empty? clc)
+       (if (node-list-empty? ns)
+           (next-chunk-skip-children (parent nd))
+           (node-list-first ns))
+       ;; If the first of the chunk-children (clc) of this element
+       ;; isn't its own chunk, skip over it, otherwise it's next.
+       (if (chunk? (node-list-first clc))
+           (node-list-first clc)
+           (next-chunk-with-children (node-list-first clc))))))
+;;         (if (> (node-list-length clc) 1)
+;;             (node-list-first (node-list-rest clc))
+;;             (next-chunk-skip-children nd))))))
+
+(define (abs-prev-chunk #!optional (elem (current-node)))
+  (let* ((nd  (chunk-parent elem))
+        (pse (ipreced-by-gi nd (chunk-element-list)))
+        (ps  (chunk-parent pse)))
+    (if (node-list-empty? ps)
+       (parent nd)
+       (last-chunk-element ps))))
+
+(define (prev-chunk-element #!optional (elem (current-node)))
+  (let* ((nd   (chunk-parent elem))
+        (prev (chunk-parent (abs-prev-chunk nd))))
+    ;; There's a special case here.  abs-prev-chunk always returns the last
+    ;; chunk element of the preceding element if we walk up the tree.  This
+    ;; assures that the last section of the preceding chapter is the "prev"
+    ;; element of the current chapter.
+    ;;
+    ;; However, if chunk-skip-first-element is in use, then abs-prev-chunk
+    ;; gets fooled when it tries to find the element that precedes the
+    ;; second child element that's in chunk-skip-first-element list.
+    ;;
+    ;; For example, if SECT1 is in chunk-skip-first-element then the
+    ;; chunk that precedes the second SECT1 in a CHAPTER is the CHAPTER
+    ;; (not the first SECT1 because the first SECT1 is "skipped", 
+    ;; it's in the CHAPTER chunk).  Confused yet?
+    ;;
+    ;; Ok, now unfortunately, what abs-prev-chunk returns is the last child
+    ;; of the CHAPTER, so instead of going from the second SECT1 to the
+    ;; CHAPTER, we go from the second SECT1 to the last SECT1 of the CHAPTER.
+    ;;
+    ;; I can't think of a good way to handle this except to test for it
+    ;; right up front.  I wonder if all this skip stuff was really worth it?
+    ;;
+    (if (and (member (gi elem) (chunk-skip-first-element-list))
+            (equal? (child-number elem) 2))
+       ;; this is the second child, the prev node is the parent.
+       (parent elem)
+       ;; otherwise, do the "normal" thing to find it:
+       (if (node-list-empty? prev)
+           prev
+           (if (combined-chunk? prev)
+               (parent prev)
+               (if (and (chunk? nd)
+                        (chunk? prev)
+                        (navigate-to? prev))
+                   prev
+                   (prev-chunk-element prev)))))))
+
+(define (abs-prev-peer-chunk-element #!optional (elem (current-node)))
+  ;; Returns the previous element that is a sibling or parent of the
+  ;; current element.  Absolute in this case refers to the fact that
+  ;; it returns the immediate predecessor without regard for whether or
+  ;; not it is a chunk.
+  (let* ((psibling (if (node-list-empty? (preced elem))
+                      (empty-node-list)
+                      (node-list-last (preced elem)))))
+    (if (node-list-empty? psibling)
+       (parent elem)
+       psibling)))
+
+(define (prev-peer-chunk-element #!optional (elem (current-node)))
+  (let loop ((nd (chunk-level-parent elem)))
+    (if (node-list-empty? nd)
+       (empty-node-list)
+       (if (and (chunk? (abs-prev-peer-chunk-element nd))
+                (navigate-to? (abs-prev-peer-chunk-element nd)))
+           (abs-prev-peer-chunk-element nd)
+           (loop (abs-prev-peer-chunk-element nd))))))
+
+(define (prev-major-component-chunk-element #!optional (elem (current-node)) (in-chain #f))
+  ;; Return the prev major component of the document that is a sibling (or
+  ;; ancestor) of the starting element. This is essentially 'prev-sibling' 
+  ;; but skips over things that aren't chunks.
+  (if (or (navigate-to? elem) in-chain)
+      (if (member (gi elem) (major-component-element-list))
+         (if (node-list-empty? (node-list-last-element (preced elem)))
+             (prev-chunk-element elem)
+             (let ((nd (node-list-last-element (preced elem))))
+               (if (navigate-to? nd)
+                   nd
+                   (prev-major-component-chunk-element nd #t))))
+         (ancestor-member elem (major-component-element-list)))
+      (empty-node-list)))
+
+(define (abs-next-chunk #!optional (elem (current-node)) (children-ok? #t))
+  (let* ((nd  (chunk-level-parent elem))
+        (clc (if children-ok? (chunk-children nd) (empty-node-list)))
+        (ns  (ifollow-by-gi nd (chunk-element-list))))
+    (if (node-list-empty? clc)
+       (if (node-list-empty? ns)
+           (if (node-list-empty? (parent nd))
+               (empty-node-list)
+               (abs-next-chunk (parent nd) #f))
+           (node-list-first ns))
+       (node-list-first clc))))
+
+(define (next-chunk-element #!optional (elem (current-node)))
+  (let ((next (abs-next-chunk elem)))
+    (if (node-list-empty? next)
+       (empty-node-list)
+       (if (chunk? next)
+           (if (navigate-to? next)
+               next
+               (next-chunk-element next))
+           (next-chunk-element next)))))
+
+(define (abs-next-peer-chunk-element #!optional (elem (current-node)))
+  (let* ((fsibling (if (node-list-empty? (follow elem))
+                      (empty-node-list)
+                      (node-list-first (follow elem)))))
+    (if (node-list-empty? fsibling)
+       (if (node-list-empty? (parent elem))
+           (empty-node-list)
+           (abs-next-peer-chunk-element (parent elem)))
+       fsibling)))
+
+(define (next-peer-chunk-element #!optional (elem (current-node)))
+  (let loop ((nd (chunk-level-parent elem)))
+    (if (node-list-empty? nd)
+       (empty-node-list)
+       (if (and (chunk? (abs-next-peer-chunk-element nd))
+                (navigate-to? (abs-next-peer-chunk-element nd)))
+           (abs-next-peer-chunk-element nd)
+           (loop (abs-next-peer-chunk-element nd))))))
+
+(define (next-major-component-chunk-element #!optional (elem (current-node)) (in-chain #f))
+  ;; Return the next major component of the document that is not a descendant
+  ;; of the starting element.  This is essentially 'next-sibling' but skips
+  ;; over things that aren't chunks.
+  (if (or (navigate-to? elem) in-chain)
+      (if (member (gi elem) (major-component-element-list))
+         (if (node-list-empty? (node-list-first-element (follow elem)))
+             (next-major-component-chunk-element (parent elem))
+             (let ((nd (node-list-first-element (follow elem))))
+               (if (navigate-to? nd)
+                   nd
+                   (next-major-component-chunk-element nd #t))))
+         (ancestor-member elem (major-component-element-list)))
+      (empty-node-list)))
+
+;; EOF dbchunk.dsl
\ No newline at end of file
diff --git a/html/dbcompon.dsl b/html/dbcompon.dsl
new file mode 100644 (file)
index 0000000..250726d
--- /dev/null
@@ -0,0 +1,199 @@
+;; $Id: dbcompon.dsl,v 1.8 2003/04/29 05:49:21 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================= COMPONENTS =============================
+;;
+;; in docbook, components are containers at the chapter/appendix level
+
+(define ($component$)
+  (html-document 
+   (with-mode head-title-mode 
+     (literal (element-title-string (current-node))))
+   ($component-body$)))
+
+(define ($component-separator$) 
+  (if (or (not nochunks) (node-list=? (current-node) (sgml-root-element)))
+      (empty-sosofo)
+      (make empty-element gi: "HR")))
+
+(define ($component-body$)
+  (let* ((epigraph (let loop ((nl (children (current-node))))
+                    (if (node-list-empty? nl)
+                        nl
+                         (let ((first-gi (gi (node-list-first nl))))
+                           (if (equal? first-gi (normalize "epigraph"))
+                               (node-list-first nl)
+                               (if (or (equal? first-gi (normalize "title"))
+                                       (equal? first-gi (normalize "subtitle"))
+                                       (equal? first-gi (normalize "titleabbrev"))
+                                       (equal? first-gi (normalize "docinfo"))
+                                       (equal? first-gi (normalize "chapterinfo"))
+                                       (equal? first-gi (normalize "appendixinfo")))
+                                   (loop (node-list-rest nl))
+                                   (loop (empty-node-list))))))))
+        (notepigraph (let loop ((nl (children (current-node)))
+                                (ch (empty-node-list)))
+                       (if (node-list-empty? nl)
+                           ch
+                           (if (node-list=? (node-list-first nl) epigraph)
+                               (loop (node-list-rest nl) ch)
+                               (loop (node-list-rest nl)
+                                     (node-list ch (node-list-first nl))))))))
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         ($component-separator$)
+         ($component-title$)
+         (process-node-list epigraph)
+         (if ($generate-chapter-toc$)
+             ($chapter-toc$)
+             (empty-sosofo))
+         (process-node-list notepigraph))))
+
+(define ($component-title$ #!optional (titlegi "H1") (subtitlegi "H2"))
+  (let* ((info (cond
+               ((equal? (gi) (normalize "article"))
+                (node-list-filter-by-gi (children (current-node))
+                                        (list (normalize "artheader")
+                                              (normalize "articleinfo"))))
+               ((or
+                  (equal? (gi) (normalize "appendix"))
+                  (equal? (gi) (normalize "bibliography"))
+                  (equal? (gi) (normalize "chapter"))
+                  (equal? (gi) (normalize "glossary"))
+                  (equal? (gi) (normalize "index"))
+                  (equal? (gi) (normalize "preface"))
+                  (equal? (gi) (normalize "reference"))
+                  (equal? (gi) (normalize "setindex")))
+                (select-elements (children (current-node)) (normalize "docinfo")))
+               (else
+                (empty-node-list))))
+        (exp-children (if (node-list-empty? info)
+                          (empty-node-list)
+                          (expand-children (children info) 
+                                           (list (normalize "bookbiblio") 
+                                                 (normalize "bibliomisc")
+                                                 (normalize "biblioset")))))
+        (parent-titles (select-elements (children (current-node)) (normalize "title")))
+        (titles        (if (node-list-empty? parent-titles)
+                           (select-elements exp-children (normalize "title"))
+                           parent-titles))
+        (parent-subttl (select-elements (children (current-node)) (normalize "subtitle")))         
+        (subtitles     (if (node-list-empty? parent-subttl)
+                           (select-elements exp-children (normalize "subtitle"))
+                           parent-subttl)))
+    (make sequence
+      (make element gi: titlegi
+           (make sequence
+             (make element gi: "A"
+                 attributes: (list (list "NAME" (element-id)))
+                 (empty-sosofo))
+             (if (and %chapter-autolabel%
+                      (or (equal? (gi) (normalize "chapter"))
+                          (equal? (gi) (normalize "appendix"))))
+                 (literal (gentext-element-name-space (gi))
+                          (element-label (current-node))
+                          (gentext-label-title-sep (gi)))
+                 (empty-sosofo))
+             (if (node-list-empty? titles)
+                 (element-title-sosofo) ;; get a default!
+                 (with-mode title-mode
+                   (process-node-list titles)))))
+      (if (node-list-empty? subtitles) 
+         (empty-sosofo)
+         (with-mode subtitle-mode
+           (make element gi: subtitlegi
+                 (process-node-list subtitles)))))))
+
+(define ($chapter-toc$)
+  ;; Called by the TITLE element so that it can come after the TITLE
+  (build-toc (ancestor-member (current-node) (component-element-list))
+            (toc-depth 
+             (ancestor-member (current-node) (component-element-list)))
+            #t))
+
+(element appendix ($component$))
+(element (appendix title) (empty-sosofo))
+
+(element chapter ($component$))
+(element (chapter title) (empty-sosofo))
+
+(element preface ($component$))
+(element (preface title) (empty-sosofo))
+
+;; Dedication is empty except in a special mode so that it can be
+;; reordered (made to come before the TOCs)...see dbttlpg.dsl
+;; Dedication is empty except in a special mode so that it can be
+;; reordered (made to come before the TOCs)
+
+(element dedication (empty-sosofo))
+
+(mode dedication-page-mode
+  (element dedication
+    (html-document 
+     (with-mode head-title-mode 
+       (literal (element-title-string (current-node))))
+     (make sequence
+       ($component-separator$)
+       ($component-title$)
+       (process-children))))
+  (element (dedication title) (empty-sosofo))
+)
+
+(element colophon ($component$))
+
+;; Articles are like components, except that if they may have much
+;; more formal title pages (created with article-titlepage).
+;;
+(element article
+  (let* ((info (node-list-filter-by-gi (children (current-node))
+                                      (list (normalize "artheader")
+                                            (normalize "articleinfo"))))
+        (ititle (select-elements (children info) (normalize "title")))
+        (title (if (node-list-empty? ititle)
+                   (select-elements (children (current-node)) 
+                                    (normalize "title"))
+                   (node-list-first ititle)))
+        (tsosofo (with-mode head-title-mode
+                   (process-node-list title)))
+        (nl   (titlepage-info-elements (current-node) info)))
+    (html-document
+     tsosofo
+     (make element gi: "DIV"
+          attributes: '(("CLASS" "ARTICLE"))
+          (if %generate-article-titlepage%
+              (make sequence
+                (article-titlepage nl 'recto)
+                (article-titlepage nl 'verso))
+              ($component-title$))
+
+          (if (not (generate-toc-in-front))
+              (process-children)
+              (empty-sosofo))
+         
+          (if %generate-article-toc%
+              (make sequence
+                (build-toc (current-node)
+                           (toc-depth (current-node))))
+              (empty-sosofo))
+         
+          (let loop ((gilist ($generate-article-lot-list$)))
+            (if (null? gilist)
+                (empty-sosofo)
+                (if (not (node-list-empty?
+                          (select-elements (descendants (current-node))
+                                           (car gilist))))
+                          (make sequence
+                           (build-lot (current-node) (car gilist))
+                           (loop (cdr gilist)))
+                          (loop (cdr gilist)))))
+
+          (if (generate-toc-in-front)
+              (process-children)
+              (empty-sosofo))))))
+
+(element (article title) (empty-sosofo))
+
+(element (article appendix) ($section$)) ;; this is a special case
diff --git a/html/dbdivis.dsl b/html/dbdivis.dsl
new file mode 100644 (file)
index 0000000..9d622b8
--- /dev/null
@@ -0,0 +1,176 @@
+;; $Id: dbdivis.dsl,v 1.4 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================= DIVISIONS ==============================
+
+(element set
+  (let* ((setinfo  (select-elements (children (current-node)) (normalize "setinfo")))
+        (ititle   (select-elements (children setinfo) (normalize "title")))
+        (title    (if (node-list-empty? ititle)
+                      (select-elements (children (current-node)) (normalize "title"))
+                      (node-list-first ititle)))
+        (nl       (titlepage-info-elements (current-node) setinfo))
+        (tsosofo  (with-mode head-title-mode
+                    (process-node-list title))))
+    (html-document
+     tsosofo
+     (make element gi: "DIV"
+          attributes: '(("CLASS" "SET"))
+
+          (make element gi: "A"
+                attributes: (list (list "NAME" (element-id)))
+                (empty-sosofo))
+
+          (if %generate-set-titlepage%
+              (make sequence
+                (set-titlepage nl 'recto)
+                (set-titlepage nl 'verso))
+              (empty-sosofo))
+
+          (if (not (generate-toc-in-front))
+              (process-children)
+              (empty-sosofo))
+
+          (if %generate-set-toc%
+              (make sequence
+                (build-toc (current-node) (toc-depth (current-node))))
+              (empty-sosofo))
+
+          (if (generate-toc-in-front)
+              (process-children)
+              (empty-sosofo))))))
+
+(element (set title) (empty-sosofo))
+
+(element book
+  (let* ((bookinfo  (select-elements (children (current-node)) (normalize "bookinfo")))
+        (ititle   (select-elements (children bookinfo) (normalize "title")))
+        (title    (if (node-list-empty? ititle)
+                      (select-elements (children (current-node)) (normalize "title"))
+                      (node-list-first ititle)))
+        (nl       (titlepage-info-elements (current-node) bookinfo))
+        (tsosofo  (with-mode head-title-mode
+                    (process-node-list title)))
+        (dedication (select-elements (children (current-node)) (normalize "dedication"))))
+    (html-document
+     tsosofo
+     (make element gi: "DIV"
+          attributes: '(("CLASS" "BOOK"))
+
+          (make element gi: "A"
+                attributes: (list (list "NAME" (element-id)))
+                (empty-sosofo))
+
+          (if %generate-book-titlepage%
+              (make sequence
+                (book-titlepage nl 'recto)
+                (book-titlepage nl 'verso))
+              (empty-sosofo))
+
+          (if (node-list-empty? dedication)
+              (empty-sosofo)
+              (with-mode dedication-page-mode
+                (process-node-list dedication)))
+
+          (if (not (generate-toc-in-front))
+              (process-children)
+              (empty-sosofo))
+
+          (if %generate-book-toc%
+              (build-toc (current-node) (toc-depth (current-node)))
+              (empty-sosofo))
+
+          (let loop ((gilist ($generate-book-lot-list$)))
+            (if (null? gilist)
+                (empty-sosofo)
+                (if (not (node-list-empty?
+                          (select-elements (descendants (current-node))
+                                           (car gilist))))
+                    (make sequence
+                      (build-lot (current-node) (car gilist))
+                      (loop (cdr gilist)))
+                    (loop (cdr gilist)))))
+
+
+          (if (generate-toc-in-front)
+              (process-children)
+              (empty-sosofo))))))
+
+(element (book title) (empty-sosofo))
+
+(element part
+  (let* ((partinfo (select-elements (children (current-node))
+                                   (normalize "docinfo")))
+        (partintro (select-elements (children (current-node))
+                                    (normalize "partintro")))
+        (nl       (titlepage-info-elements
+                   (current-node)
+                   partinfo
+                   (if %generate-partintro-on-titlepage%
+                       partintro
+                       (empty-node-list))))
+        (ititle   (select-elements (children partinfo) (normalize "title")))
+        (title    (if (node-list-empty? ititle)
+                      (select-elements (children (current-node)) (normalize "title"))
+                      (node-list-first ititle)))
+        (tsosofo  (with-mode head-title-mode
+                    (process-node-list title))))
+    (html-document
+     tsosofo
+     (make element gi: "DIV"
+          attributes: '(("CLASS" "PART"))
+
+          (make element gi: "A"
+                attributes: (list (list "NAME" (element-id)))
+                (empty-sosofo))
+
+          (if %generate-part-titlepage%
+              (make sequence
+                (part-titlepage nl 'recto)
+                (part-titlepage nl 'verso))
+              (empty-sosofo))
+
+          (if (not (generate-toc-in-front))
+              (process-children)
+              (empty-sosofo))
+
+          (if (and (not (node-list-empty? partintro))
+                   (not %generate-partintro-on-titlepage%))
+              ($process-partintro$ partintro)
+              (empty-sosofo))
+
+          (if (and %generate-part-toc%
+                   (not %generate-part-toc-on-titlepage%))
+              (make sequence
+                (build-toc (current-node)
+                           (toc-depth (current-node))))
+              (empty-sosofo))
+
+          (if (generate-toc-in-front)
+              (process-children)
+              (empty-sosofo))))))
+
+(element (part title) (empty-sosofo))
+
+(element partintro (empty-sosofo))
+
+(element (partintro title)
+  (make element gi: "H1"
+       (process-children)))
+
+(element (partintro sect1)
+  ($section-body$))
+
+(define ($process-partintro$ partintro)
+  (make element gi: "DIV"
+       attributes: (list (list "CLASS" "PARTINTRO"))
+
+       (make element gi: "A"
+             attributes: (list (list "NAME" (element-id partintro)))
+             (empty-sosofo))
+
+       (process-node-list (children partintro))
+       (make-endnotes partintro)))
diff --git a/html/dbefsyn.dsl b/html/dbefsyn.dsl
new file mode 100644 (file)
index 0000000..c737003
--- /dev/null
@@ -0,0 +1,824 @@
+;; $Id: dbefsyn.dsl,v 1.4 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================ CLASS SYNOPSIS =============================
+
+(define %indent-classsynopsisinfo-lines% #f)
+(define %number-classsynopsisinfo-lines% #f)
+
+(define %default-classsynopsis-language% "java")
+
+(element classsynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("cpp") (with-mode cs-cpp-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+(element methodsynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("cpp") (with-mode cs-cpp-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+(element fieldsynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("cpp") (with-mode cs-cpp-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+(element constructorsynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("cpp") (with-mode cs-cpp-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+(element destructorsynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("cpp") (with-mode cs-cpp-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+;; ===== Java ========================================================
+
+(mode cs-java-mode
+
+(element classsynopsis
+  (let* ((classes      (select-elements (children (current-node))
+                                       (normalize "ooclass")))
+        (classname    (node-list-first classes))
+        (superclasses (node-list-rest classes)))
+    (make element gi: "pre"
+         attributes: '(("class" "classsynopsis"))
+         (process-node-list classname)
+         (process-node-list superclasses)
+         (literal "{&#RE;")
+         (process-node-list
+          (node-list-filter-by-gi
+           (children (current-node))
+           (list (normalize "constructorsynopsis")
+                 (normalize "destructorsynopsis")
+                 (normalize "fieldsynopsis")
+                 (normalize "methodsynopsis")
+                 (normalize "classsynopsisinfo"))))
+         (literal "}"))))
+
+(element classsynopsisinfo
+  ($verbatim-display$ %indent-classsynopsisinfo-lines%
+                     %number-classsynopsisinfo-lines%))
+
+(element ooclass
+  (make sequence
+    (if (first-sibling?)
+       (literal " ")
+       (literal ", "))
+    (make element gi: "SPAN"
+         attributes: '(("class" "ooclass"))
+         (process-children))))
+
+(element oointerface
+  (make sequence
+    (if (first-sibling?)
+       (literal " ")
+       (literal ", "))
+    (make element gi: "SPAN"
+         attributes: '(("class" "oointerface"))
+         (process-children))))
+
+(element ooexception
+  (make sequence
+    (if (first-sibling?)
+       (literal " ")
+       (literal ", "))
+    (make element gi: "SPAN"
+         attributes: '(("class" "ooexception"))
+         (process-children))))
+
+(element modifier
+  (make element gi: "span"
+       attributes: '(("class" "modifier"))
+       (process-children)
+       (literal " ")))
+
+(element classname
+  (if (first-sibling?)
+      (make sequence
+       (literal "class ")
+       (make element gi: "span"
+             attributes: '(("class" "classname"))
+             (process-children)
+             (literal " "))
+       (if (last-sibling?)
+           (empty-sosofo)
+           (literal "extends ")))
+      (make sequence
+       (make element gi: "span"
+             attributes: '(("class" "superclass"))
+             (process-children))
+       (if (last-sibling?)
+           (literal " ")
+           (literal ", ")))))
+
+(element fieldsynopsis
+  (make element gi: "code"
+       attributes: '(("class" "fieldsynopsis"))
+       (literal "  ")
+       (process-children)
+       (literal ";&#RE;")))
+
+(element type
+  (make element gi: "span"
+       attributes: '(("class" "type"))
+       (process-children)
+       (literal " ")))
+
+(element varname
+  (make element gi: "span"
+       attributes: '(("class" "varname"))
+       (process-children)))
+
+(element initializer
+  (make element gi: "span"
+       attributes: '(("class" "initializer"))
+       (literal " = ")
+       (process-children)))
+
+(element constructorsynopsis
+  (java-method-synopsis))
+
+(element destructorsynopsis
+  (java-method-synopsis))
+
+(element methodsynopsis
+  (java-method-synopsis))
+
+(element void
+  (make element gi: "span"
+       attributes: '(("class" "void"))
+       (literal "void ")))
+
+(element methodname
+  (process-children))
+
+(element methodparam
+  (make element gi: "span"
+       attributes: '(("class" "methodparam"))
+       (if (first-sibling?)
+           (empty-sosofo)
+           (literal ", "))
+       (process-children)))
+
+(element parameter
+  (make element gi: "span"
+       attributes: '(("class" "parameter"))
+       (process-children)))
+
+(element exceptionname
+  (make element gi: "span"
+       attributes: '(("class" "exceptionname"))
+       (if (first-sibling?)
+           (literal "&#RE;          throws ")
+           (literal ", "))
+       (process-children)))
+)
+
+(define (java-method-synopsis #!optional (nd (current-node)))
+  (let* ((modifiers  (select-elements (children nd)
+                                     (normalize "modifier")))
+        (notmod     (node-list-filter-by-not-gi
+                     (children nd)
+                     (list (normalize "modifier"))))
+        (type       (if (equal? (gi (node-list-first notmod)) 
+                                (normalize "methodname"))
+                        (empty-node-list)
+                        (node-list-first notmod)))
+        (methodname (select-elements (children nd)
+                                     (normalize "methodname")))
+        (param      (node-list-filter-by-gi (node-list-rest notmod)
+                                            (list (normalize "methodparam"))))
+        (excep      (select-elements (children nd)
+                                     (normalize "exceptionname"))))
+    (make element gi: "code"
+         attributes: (list (list "class" (gi nd)))
+         (if (first-sibling?)
+             (literal "&#RE;")
+             (empty-sosofo))
+         (literal "  ")
+         (process-node-list modifiers)
+         (process-node-list type)
+         (process-node-list methodname)
+         (literal "(")
+         (process-node-list param)
+         (literal ")")
+         (process-node-list excep)
+         (literal ";&#RE;"))))
+
+;; ===== C++ =========================================================
+
+(mode cs-cpp-mode
+
+(element classsynopsis
+  (let* ((classes      (node-list-filter-by-gi (children (current-node))
+                                              (list (normalize "classname")
+                                                    (normalize "modifier"))))
+        (classname    (let loop ((nl classes) (cn (empty-node-list)))
+                        (if (node-list-empty? nl)
+                            cn
+                            (if (equal? (gi (node-list-first nl))
+                                        (normalize "classname"))
+                                (node-list cn (node-list-first nl))
+                                (loop (node-list-rest nl)
+                                      (node-list cn (node-list-first nl)))))))
+
+        (superclasses (let loop ((nl classes))
+                        (if (node-list-empty? nl)
+                            (empty-node-list)
+                            (if (equal? (gi (node-list-first nl))
+                                        (normalize "classname"))
+                                (node-list-rest nl)
+                                (loop (node-list-rest nl)))))))
+    (make element gi: "pre"
+         attributes: '(("class" "classsynopsis"))
+         (process-node-list classname)
+         (process-node-list superclasses)
+         (literal "{&#RE;")
+         (process-node-list
+          (node-list-filter-by-gi
+           (children (current-node))
+           (list (normalize "constructorsynopsis")
+                 (normalize "destructorsynopsis")
+                 (normalize "fieldsynopsis")
+                 (normalize "methodsynopsis")
+                 (normalize "classsynopsisinfo"))))
+         (literal "}"))))
+
+(element classsynopsisinfo
+  ($verbatim-display$ %indent-classsynopsisinfo-lines%
+                     %number-classsynopsisinfo-lines%))
+
+(element modifier
+  (make element gi: "span"
+       attributes: '(("class" "modifier"))
+       (process-children)
+       (literal " ")))
+
+(element classname
+  (if (first-sibling?)
+      (make sequence
+       (literal "class ")
+       (make element gi: "span"
+             attributes: '(("class" "classname"))
+             (process-children))
+       (if (last-sibling?)
+           (empty-sosofo)
+           (literal ": ")))
+      (make sequence
+       (make element gi: "span"
+             attributes: '(("class" "superclass"))
+             (process-children))
+       (if (last-sibling?)
+           (literal " ")
+           (literal ", ")))))
+
+(element fieldsynopsis
+  (make element gi: "code"
+       attributes: '(("class" "fieldsynopsis"))
+       (literal "  ")
+       (process-children)
+       (literal ";&#RE;")))
+
+(element type
+  (make element gi: "span"
+       attributes: '(("class" "type"))
+       (process-children)
+       (literal " ")))
+
+(element varname
+  (make element gi: "span"
+       attributes: '(("class" "varname"))
+       (process-children)))
+
+(element initializer
+  (make element gi: "span"
+       attributes: '(("class" "initializer"))
+       (literal " = ")
+       (process-children)))
+
+(element constructorsynopsis
+  (cpp-method-synopsis))
+
+(element destructorsynopsis
+  (cpp-method-synopsis))
+
+(element methodsynopsis
+  (cpp-method-synopsis))
+
+(element void
+  (make element gi: "span"
+       attributes: '(("class" "void"))
+       (literal "void ")))
+
+(element methodname
+  (process-children))
+
+(element methodparam
+  (make element gi: "span"
+       attributes: '(("class" "methodparam"))
+       (if (first-sibling?)
+           (empty-sosofo)
+           (literal ", "))
+       (process-children)))
+
+(element parameter
+  (make element gi: "span"
+       attributes: '(("class" "parameter"))
+       (process-children)))
+
+(element exceptionname
+  (make element gi: "span"
+       attributes: '(("class" "exceptionname"))
+       (if (first-sibling?)
+           (literal "&#RE;          throws ")
+           (literal ", "))
+       (process-children)))
+)
+
+(define (cpp-method-synopsis #!optional (nd (current-node)))
+  (let* ((modifiers  (select-elements (children nd)
+                                     (normalize "modifier")))
+        (notmod     (node-list-filter-by-not-gi
+                     (children nd)
+                     (list (normalize "modifier"))))
+        (type       (if (equal? (gi (node-list-first notmod)) 
+                                (normalize "methodname"))
+                        (empty-node-list)
+                        (node-list-first notmod)))
+        (methodname (select-elements (children nd)
+                                     (normalize "methodname")))
+        (param      (node-list-filter-by-gi (node-list-rest notmod)
+                                            (list (normalize "methodparam"))))
+        (excep      (select-elements (children nd)
+                                     (normalize "exceptionname"))))
+    (make element gi: "code"
+         attributes: (list (list "class" (gi nd)))
+         (if (first-sibling?)
+             (literal "&#RE;")
+             (empty-sosofo))
+         (literal "  ")
+         (process-node-list modifiers)
+         (process-node-list type)
+         (process-node-list methodname)
+         (literal "(")
+         (process-node-list param)
+         (literal ")")
+         (process-node-list excep)
+         (literal ";&#RE;"))))
+
+;; ===== Perl ======================================================== 
+
+(mode cs-perl-mode
+
+(element classsynopsis
+  (let* ((modifiers    (select-elements (children (current-node))
+                                       (normalize "modifier")))
+        (classes      (select-elements (children (current-node))
+                                       (normalize "classname")))
+        (classname    (node-list-first classes))
+        (superclasses (node-list-rest classes)))
+  (make element gi: "pre"
+       attributes: '(("class" "classsynopsis"))
+       (literal "package ")
+       (process-node-list classname)
+       (literal ";&#RE;")
+       (if (node-list-empty? superclasses)
+           (empty-sosofo)
+           (make sequence
+             (literal "@ISA = (");
+             (process-node-list superclasses)
+             (literal ";&#RE;")))
+       (process-node-list
+        (node-list-filter-by-gi
+         (children (current-node))
+         (list (normalize "constructorsynopsis")
+               (normalize "destructorsynopsis")
+               (normalize "fieldsynopsis")
+               (normalize "methodsynopsis")
+               (normalize "classsynopsisinfo")))))))
+
+(element classsynopsisinfo
+  ($verbatim-display$ %indent-classsynopsisinfo-lines%
+                     %number-classsynopsisinfo-lines%))
+
+(element modifier
+  (literal "Perl ClassSynopses don't use Modifiers"))
+
+(element classname
+  (if (first-sibling?)
+      (make element gi: "span"
+           attributes: '(("class" "classname"))
+           (process-children))
+      (make sequence
+       (make element gi: "span"
+             attributes: '(("class" "superclass"))
+             (process-children))
+       (if (last-sibling?)
+           (empty-sosofo)
+           (literal ", ")))))
+
+(element fieldsynopsis
+  (make element gi: "code"
+       attributes: '(("class" "fieldsynopsis"))
+       (literal "  ");
+       (process-children)
+       (literal ";&#RE;")))
+
+(element type
+  (make element gi: "span"
+       attributes: '(("class" "type"))
+       (process-children)
+       (literal " ")))
+
+(element varname
+  (make element gi: "span"
+       attributes: '(("class" "varname"))
+       (process-children)))
+
+(element initializer
+  (make element gi: "span"
+       attributes: '(("class" "initializer"))
+       (literal " = ")
+       (process-children)
+       (literal " ")))
+
+(element constructorsynopsis
+  (perl-method-synopsis))
+
+(element destructorsynopsis
+  (perl-method-synopsis))
+
+(element methodsynopsis
+  (perl-method-synopsis))
+
+(element void
+  (empty-sosofo))
+
+(element methodname
+  (make element gi: "span"
+       attributes: '(("class" "methodname"))
+       (process-children)))
+
+(element methodparam
+  (make element gi: "span"
+       attributes: '(("class" "methodparam"))
+       (if (first-sibling?)
+           (empty-sosofo)
+           (literal ", "))
+       (process-children)))
+
+(element parameter
+  (make element gi: "span"
+       attributes: '(("class" "parameter"))
+       (process-children)))
+
+(element exceptionname
+  (literal "Perl ClassSynopses don't use Exceptions"))
+
+)
+
+(define (perl-method-synopsis #!optional (nd (current-node)))
+  (let* ((modifiers  (select-elements (children nd)
+                                     (normalize "modifier")))
+        (notmod     (node-list-filter-by-not-gi
+                     (children nd)
+                     (list (normalize "modifier"))))
+        (type       (if (equal? (gi (node-list-first notmod)) 
+                                (normalize "methodname"))
+                        (empty-node-list)
+                        (node-list-first notmod)))
+        (methodname (select-elements (children nd)
+                                     (normalize "methodname")))
+        (param      (node-list-filter-by-gi (node-list-rest notmod)
+                                            (list (normalize "type")
+                                                  (normalize "void"))))
+        (excep      (select-elements (children nd)
+                                     (normalize "exceptionname"))))
+    (make element gi: "code"
+         attributes: (list (list "class" (gi nd)))
+         (literal "sub ")
+         (process-node-list modifiers)
+         (process-node-list type)
+         (process-node-list methodname)
+         (literal " { ... }"))))
+
+;; ===== IDL ========================================================= 
+
+(mode cs-idl-mode
+
+(element classsynopsis
+  (let* ((modifiers    (select-elements (children (current-node))
+                                       (normalize "modifier")))
+        (classes      (select-elements (children (current-node))
+                                       (normalize "classname")))
+        (classname    (node-list-first classes))
+        (superclasses (node-list-rest classes)))
+  (make element gi: "pre"
+       attributes: '(("class" "classsynopsis"))
+       (literal "interface ")
+       (process-node-list modifiers)
+       (process-node-list classname)
+       (if (node-list-empty? superclasses)
+           (literal " ")
+           (make sequence
+             (literal " : ")
+             (process-node-list superclasses)))
+       (literal " {&#RE;")
+       (process-node-list
+        (node-list-filter-by-gi
+         (children (current-node))
+         (list (normalize "constructorsynopsis")
+               (normalize "destructorsynopsis")
+               (normalize "fieldsynopsis")
+               (normalize "methodsynopsis")
+               (normalize "classsynopsisinfo"))))
+       (literal "}"))))
+
+(element classsynopsisinfo
+  ($verbatim-display$ %indent-classsynopsisinfo-lines%
+                     %number-classsynopsisinfo-lines%))
+
+(element modifier
+  (make element gi: "span"
+       attributes: '(("class" "modifier"))
+    (process-children)
+    (literal " ")))
+
+(element classname
+  (if (first-sibling?)
+      (make element gi: "span"
+           attributes: '(("class" "classname"))
+           (process-children))
+      (make sequence
+       (make element gi: "span"
+             attributes: '(("class" "superclass"))
+             (process-children))
+       (if (last-sibling?)
+           (empty-sosofo)
+           (literal ", ")))))
+
+(element fieldsynopsis
+  (make element gi: "code"
+       attributes: '(("class" "fieldsynopsis"))
+       (literal "  ");
+       (process-children)
+       (literal ";&#RE;")))
+
+(element type
+  (make element gi: "span"
+       attributes: '(("class" "type"))
+       (process-children)
+       (literal " ")))
+
+(element varname
+  (make element gi: "span"
+       attributes: '(("class" "varname"))
+       (process-children)))
+
+(element initializer
+  (make element gi: "span"
+       attributes: '(("class" "initializer"))
+       (literal " = ")
+       (process-children)
+       (literal " ")))
+
+(element constructorsynopsis
+  (idl-method-synopsis))
+
+(element destructorsynopsis
+  (idl-method-synopsis))
+
+(element methodsynopsis
+  (idl-method-synopsis))
+
+(element void
+  (make element gi: "span"
+       attributes: '(("class" "void"))
+       (literal "void ")))
+
+(element methodname
+  (make element gi: "span"
+       attributes: '(("class" "methodname"))
+       (process-children)))
+
+(element methodparam
+  (make element gi: "span"
+       attributes: '(("class" "methodparam"))
+       (if (first-sibling?)
+           (empty-sosofo)
+           (literal ", "))
+       (process-children)))
+
+(element parameter
+  (make element gi: "span"
+       attributes: '(("class" "parameter"))
+       (process-children)))
+
+(element exceptionname
+  (make element gi: "span"
+       attributes: '(("class" "exceptionname"))
+       (if (first-sibling?)
+           (literal " raises(")
+           (literal ", "))
+       (process-children)
+       (if (last-sibling?)
+           (literal ")")
+           (empty-sosofo))))
+)
+
+(define (idl-method-synopsis #!optional (nd (current-node)))
+  (let* ((modifiers  (select-elements (children nd)
+                                     (normalize "modifier")))
+        (notmod     (node-list-filter-by-not-gi
+                     (children nd)
+                     (list (normalize "modifier"))))
+        (type       (if (equal? (gi (node-list-first notmod)) 
+                                (normalize "methodname"))
+                        (empty-node-list)
+                        (node-list-first notmod)))
+        (methodname (select-elements (children nd)
+                                     (normalize "methodname")))
+        (param      (node-list-filter-by-gi (node-list-rest notmod)
+                                            (list (normalize "methodparam"))))
+        (excep      (select-elements (children nd)
+                                     (normalize "exceptionname"))))
+    (make element gi: "code"
+         attributes: (list (list "class" (gi nd)))
+         (literal "  ")
+         (process-node-list modifiers)
+         (process-node-list type)
+         (process-node-list methodname)
+         (literal "(")
+         (process-node-list param)
+         (literal ")")
+         (process-node-list excep)
+         (literal ";&#RE;"))))
+
+;; ===== Python ======================================================= 
+;; Contributed by Lane Stevens, lane@cycletime.com
+
+(mode cs-python-mode
+  (element classsynopsis
+    (let* ((classes      (select-elements (children (current-node))
+                                         (normalize "ooclass")))
+          (classname    (node-list-first classes))
+          (superclasses (node-list-rest classes)))
+      (make element gi: "pre"
+           attributes: '(("class" "classsynopsis"))
+           (literal "class ")
+           (process-node-list classname)
+           (literal "(")
+           (process-node-list superclasses)
+           (literal ") :")
+           (process-node-list
+            (node-list-filter-by-gi
+             (children (current-node))
+             (list (normalize "constructorsynopsis")
+                   (normalize "destructorsynopsis")
+                   (normalize "fieldsynopsis")
+                   (normalize "methodsynopsis")
+                   (normalize "classsynopsisinfo"))))
+           )
+      )
+    )
+
+  (element ooclass
+    (make sequence
+      (make element gi: "SPAN"
+           attributes: '(("class" "ooclass"))
+           (process-children)
+           (cond
+            ((first-sibling?) (literal " "))
+            ((last-sibling?) (empty-sosofo))
+            (#t (literal ", "))
+            )
+           )
+      )
+    )
+           
+  (element classname
+    (if (first-sibling?)
+       (make element gi: "SPAN"
+             attributes: '(("class" "classname"))
+             (process-children))
+       (make element gi: "SPAN"
+             attributes: '(("class" "superclass")))
+       )
+    )
+
+  (element methodsynopsis
+    (python-method-synopsis))
+
+  (element initializer
+    (make element gi: "SPAN"
+         attributes: '(("class" "initializer"))
+         (literal " = ")
+         (process-children)))
+  
+  (element methodname
+    (process-children))
+
+  (element methodparam
+    (make element gi: "SPAN"
+         attributes: '(("class" "methodparam"))
+         (process-children)
+         (if (last-sibling?)
+             (empty-sosofo)
+             (literal ", "))
+         )
+    )
+             
+    
+  (element parameter
+    (make element gi: "SPAN"
+         attributes: '(("class" "parameter"))
+         (process-children)))
+
+  
+  )
+
+(define (python-method-synopsis #!optional (nd (current-node)))
+  (let* ((the-method-name (select-elements (children nd) (normalize "methodname")))
+        (the-method-params (select-elements (children nd) (normalize "methodparam"))))
+    (make element gi: "code"
+         attributes: (list (list "class" (gi nd)))
+         (literal "    def ")
+         (process-node-list the-method-name)
+         (literal "(")
+         (process-node-list the-method-params)
+         (literal ") :")
+         )
+    )
+  )
+
+;; EOF
diff --git a/html/dbfootn.dsl b/html/dbfootn.dsl
new file mode 100644 (file)
index 0000000..cd4ad06
--- /dev/null
@@ -0,0 +1,249 @@
+;; $Id: dbfootn.dsl,v 1.4 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ======================================================================
+;; Handle footnotes in body text
+
+(element footnote ;; A footnote inserts a reference to itself
+  (let ((id (if (attribute-string (normalize "id"))
+               (attribute-string (normalize "id"))
+               (generate-anchor))))
+    (make element gi: "A"
+         attributes: (list
+                      (list "NAME" id)
+                      (list "HREF" (string-append "#FTN." id)))
+         ($footnote-literal$ (current-node)))))
+
+(element footnoteref
+  (let* ((target   (element-with-id (attribute-string (normalize "linkend"))))
+        (id       (if (attribute-string (normalize "id") target)
+                      (attribute-string (normalize "id") target)
+                      (generate-anchor target)))
+        (curdepth (directory-depth (html-file (current-node))))
+        (entfile  (html-file target))
+        ;; can't use (href-to) here because we tinker with the fragid
+        (href     (if nochunks
+                      (string-append "#FTN." id)
+                      (string-append (copy-string "../" curdepth)
+                                     entfile "#FTN." id))))
+    (make element gi: "A"
+         attributes: (list
+                      (list "HREF" href))
+         ($footnote-literal$ target))))
+
+(define (count-footnote? footnote)
+  ;; don't count footnotes in comments (unless you're showing comments)
+  ;; or footnotes in tables which are handled locally in the table
+  (if (or (and (has-ancestor-member? footnote (list (normalize "comment")))
+              (not %show-comments%))
+         (has-ancestor-member? footnote (list (normalize "tgroup"))))
+      #f
+      #t))
+
+(define ($chunk-footnote-number$ footnote)
+  ;; This is more complex than it at first appears because footnotes 
+  ;; can be in Comments which may be suppressed.
+  (let* ((footnotes (select-elements
+                    (descendants (chunk-parent footnote))
+                    (normalize "footnote"))))
+    (let loop ((nl footnotes) (num 1))
+      (if (node-list-empty? nl)
+         0
+         (if (node-list=? (node-list-first nl) footnote)
+             num
+             (if (count-footnote? (node-list-first nl))
+                 (loop (node-list-rest nl) (+ num 1))
+                 (loop (node-list-rest nl) num)))))))
+
+(define ($footnote-literal$ node)
+  (make element gi: "SPAN"
+        attributes: (list
+                     (list "CLASS" "footnote"))
+        (literal
+         (string-append
+          "[" ($footnote-number$ node) "]"))))
+
+(define ($table-footnote-number$ footnote)
+  (let* ((chunk (ancestor (normalize "tgroup") footnote))
+        (footnotes (select-elements (descendants chunk) (normalize "footnote"))))
+    (let loop ((nl footnotes) (num 1))
+      (if (node-list-empty? nl)
+         0
+         (if (node-list=? footnote (node-list-first nl))
+             num
+             (loop (node-list-rest nl)
+                   (+ num 1)))))))
+
+(define ($footnote-number$ footnote)
+  (if (node-list-empty? (ancestor (normalize "tgroup") footnote))
+      (format-number ($chunk-footnote-number$ footnote) "1")
+      (format-number ($table-footnote-number$ footnote) "a")))
+
+(mode footnote-mode
+  (element footnote
+    (process-children))
+
+  (element (footnote para)
+    (let ((id (if (attribute-string (normalize "id") (parent (current-node)))
+                 (attribute-string (normalize "id") (parent (current-node)))
+                 (generate-anchor (parent (current-node))))))
+      (make element gi: "P"
+           (if (= (child-number) 1)
+               (make sequence
+                 (make element gi: "A"
+                       attributes: (list
+                                    (list "NAME" (string-append "FTN." id))
+                                    (list "HREF" (href-to (parent (current-node)))))
+                       ($footnote-literal$ (parent (current-node))))
+                 (literal " "))
+               (literal ""))
+           (process-children))))
+)
+
+(define (non-table-footnotes footnotenl)
+  (let loop ((nl footnotenl) (result (empty-node-list)))
+    (if (node-list-empty? nl)
+       result
+       (if (has-ancestor-member? (node-list-first nl)
+                                 (list (normalize "tgroup")))
+           (loop (node-list-rest nl)
+                 result)
+           (loop (node-list-rest nl)
+                 (node-list result (node-list-first nl)))))))
+
+(define (make-endnotes #!optional (node (current-node)))
+  (if %footnotes-at-end%
+      (let* ((allfootnotes   (select-elements (descendants node) 
+                                             (normalize "footnote")))
+            (allntfootnotes (non-table-footnotes allfootnotes))
+            (this-chunk     (chunk-parent node))
+            (chunkfootnotes (let loop ((fn allntfootnotes) 
+                                       (chunkfn (empty-node-list)))
+                              (if (node-list-empty? fn)
+                                  chunkfn
+                                  (if (node-list=? this-chunk
+                                                   (chunk-parent
+                                                    (node-list-first fn)))
+                                      (loop (node-list-rest fn)
+                                            (node-list chunkfn 
+                                                       (node-list-first fn)))
+                                      (loop (node-list-rest fn)
+                                            chunkfn)))))
+            (footnotes      (let loop ((nl chunkfootnotes)
+                                       (fnlist (empty-node-list)))
+                              (if (node-list-empty? nl)
+                                  fnlist
+                                  (if (count-footnote? (node-list-first nl))
+                                      (loop (node-list-rest nl) 
+                                            (node-list fnlist 
+                                                       (node-list-first nl)))
+                                      (loop (node-list-rest nl)
+                                            fnlist))))))
+       (if (node-list-empty? footnotes) 
+           (empty-sosofo)
+           (if (and #f
+                    ;; there was a time when make-endnotes was called in
+                    ;; more places, and this code prevented footnotes from
+                    ;; being output more than once. now that it's only 
+                    ;; called in footer-navigation, this code isn't necessary
+                    ;; and does the wrong thing if -V nochunks is specified.
+                    (or (equal? (gi node) (normalize "reference"))
+                        (equal? (gi node) (normalize "part"))
+                        (equal? (gi node) (normalize "set"))
+                        (equal? (gi node) (normalize "book"))))
+               (empty-sosofo) ;; Each RefEntry/Component does its own...
+               (make sequence
+                 (make-endnote-header)
+                 (make element gi: "TABLE"
+                       attributes: '(("BORDER" "0")
+                                     ("CLASS" "FOOTNOTES")
+                                     ("WIDTH" "100%"))
+                       (with-mode endnote-mode
+                         (process-node-list footnotes)))))))
+      (empty-sosofo)))
+
+(define (make-endnote-header)
+  (let ((headsize (if (equal? (gi) (normalize "refentry")) "H2" "H3")))
+    (make element gi: headsize
+         attributes: '(("CLASS" "FOOTNOTES"))
+         (literal (gentext-endnotes)))))
+
+(mode endnote-mode
+  (element footnote
+    (let ((id (if (attribute-string (normalize "id") (current-node))
+                 (attribute-string (normalize "id") (current-node))
+                 (generate-anchor (current-node)))))
+      (make sequence
+       (make element gi: "TR"
+             (make element gi: "TD"
+                   attributes: '(("ALIGN" "LEFT")
+                                 ("VALIGN" "TOP")
+                                 ("WIDTH" "5%"))
+                   (make element gi: "A"
+                         attributes: (list
+                                      (list "NAME" (string-append "FTN." id))
+                                      (list "HREF" (href-to (current-node))))
+                          ($footnote-literal$ (current-node))))
+             (make element gi: "TD"
+                   attributes: '(("ALIGN" "LEFT")
+                                 ("VALIGN" "TOP")
+                                 ("WIDTH" "95%"))
+                   (process-children))))))
+)
+
+;; ======================================================================
+;; Handle table footnotes
+
+(define (table-footnote-number footnote)
+  (format-number (component-child-number footnote 
+                                        (list (normalize "table") 
+                                              (normalize "informaltable")))
+                "a"))
+
+(element (entry para footnote)
+  (make element gi: "SUP"
+       (literal (table-footnote-number (current-node)))))
+
+(define (make-table-endnote-header)
+  (make sequence
+    (literal (gentext-table-endnotes))
+    (make empty-element gi: "BR")))
+
+(define (make-table-endnotes)
+  (let* ((footnotes (select-elements (descendants (current-node)) 
+                                    (normalize "footnote")))
+        (tgroup (ancestor-member (current-node) (list (normalize "tgroup"))))
+        (cols   (string->number (attribute-string (normalize "cols") tgroup))))
+    (if (node-list-empty? footnotes) 
+       (empty-sosofo)
+       (make element gi: "TR"
+         (make element gi: "TD"
+               attributes: (list 
+                            (list "COLSPAN" (number->string cols)))
+               (make-table-endnote-header)
+               (with-mode table-footnote-mode
+                 (process-node-list footnotes)))))))
+
+(mode table-footnote-mode
+  (element footnote
+    (process-children))
+
+  (element (footnote para)
+    (let* ((target (parent (current-node)))
+          (fnnum (table-footnote-number target))
+          (idstr (if (attribute-string (normalize "id") target)
+                     (attribute-string (normalize "id") target)
+                     (generate-anchor target))))
+      (make sequence
+       (if (= (child-number) 1)
+           (make element gi: "A"
+                 attributes: (list (list "NAME" (string-append "FTN." idstr)))
+                 (literal fnnum 
+                          (gentext-label-title-sep (normalize "footnote"))))
+           (empty-sosofo))
+       (process-children)
+       (make empty-element gi: "BR")))))
+
diff --git a/html/dbgloss.dsl b/html/dbgloss.dsl
new file mode 100644 (file)
index 0000000..3e83a20
--- /dev/null
@@ -0,0 +1,193 @@
+;; $Id: dbgloss.dsl,v 1.4 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================= GLOSSARY ELEMENTS ==========================
+
+;; HACK ALERT!  There is no top-level wrapper around one or more GLOSSENTRYs,
+;; so this code has to look around and output the right thing for the
+;; front matter and then the GLOSSENTRYs.  Ugh.
+
+(define ($glossary-frontmatter$)
+  (let loop ((nl (children (current-node))) (headlist (empty-node-list)))
+    (if (node-list-empty? nl)
+       headlist
+       (if (equal? (gi (node-list-first nl)) (normalize "glossentry"))
+           headlist
+           (loop (node-list-rest nl) (node-list
+                                      headlist
+                                      (node-list-first nl)))))))
+
+(define ($glossary-glossentrys$)
+  (let loop ((nl (children (current-node))) (gelist (empty-node-list)))
+    (if (node-list-empty? nl)
+       gelist
+       (loop (node-list-rest nl)
+             (if (equal? (gi (node-list-first nl)) (normalize "glossentry"))
+                 (node-list gelist (node-list-first nl))
+                 gelist)))))
+
+(define ($glossary-body$)
+  (make element gi: "DIV"
+       attributes: '(("CLASS" "GLOSSARY"))
+       ($component-title$)
+       (process-node-list ($glossary-frontmatter$))
+       (if (not (node-list-empty? ($glossary-glossentrys$)))
+           (make element gi: "DL"
+                 (process-node-list ($glossary-glossentrys$)))
+           (empty-sosofo))))
+
+(element glossary
+  (html-document (with-mode head-title-mode 
+                  (literal (element-title-string (current-node))))
+                ($glossary-body$)))
+
+(element (glossary title) (empty-sosofo))
+
+(element glossdiv 
+  (make element gi: "DIV"
+       attributes: (list 
+                    (list "CLASS" (gi)))
+       ($section-title$)
+       (process-node-list ($glossary-frontmatter$))
+       (if (not (node-list-empty? ($glossary-glossentrys$)))
+           (make element gi: "DL"
+                 (process-node-list ($glossary-glossentrys$)))
+           (empty-sosofo))))
+
+(element (glossdiv title) (empty-sosofo))
+
+(element glosslist 
+  (make element gi: "DIV"
+       attributes: (list 
+                    (list "CLASS" (gi)))
+       (make element gi: "DL"
+             (process-children))))
+
+(element glossentry (process-children))
+
+(element (glossentry glossterm) 
+  (let ((id (attribute-string (normalize "id") (parent (current-node)))))
+    (make element gi: "DT"
+         (if id
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list
+                                  (list "NAME" id))
+                     (empty-sosofo))
+                   (make element gi: "B"
+                         (process-children)))
+             (make element gi: "B"
+                   (process-children))))))
+
+(element (glossentry acronym)
+  (make sequence
+    (literal " (")
+    (process-children)
+    (literal ")")))
+
+(element (glossentry abbrev) (empty-sosofo))
+
+(element (glossentry glossdef)
+  (make element gi: "DD"
+       (process-children)))
+
+(element (glossterm revhistory)
+  (empty-sosofo))
+
+(element (glossentry glosssee)
+  (make element gi: "DD"
+       (if (attribute-string (normalize "otherterm"))
+           (make element gi: "P"
+             (make element gi: "EM"
+                   (literal (gentext-element-name (gi))
+                            (gentext-label-title-sep (gi))))
+             (make element gi: "A"
+                   attributes: (list (list "HREF"
+                                           (link-target 
+                                            (attribute-string
+                                             (normalize "otherterm")))))
+                   (with-mode otherterm
+                     (process-element-with-id
+                      (attribute-string (normalize "otherterm"))))))
+           (process-children))))
+
+;; When we hit the first GLOSSSEEALSO, process all of them as a node-list
+(element glossseealso
+  (if (first-sibling?)
+      (make element gi: "P"
+           (make sequence
+             (make element gi: "EM"
+                   (literal (gentext-element-name (gi))
+                            (gentext-label-title-sep (gi))))
+             (with-mode glossseealso
+               (process-node-list
+                (select-elements (children (parent)) '(glossseealso))))
+             (literal ".")))
+      (empty-sosofo)))
+
+(mode glossseealso
+  (element glossseealso
+    (make sequence
+      (if (first-sibling?)
+         (empty-sosofo)
+         (make element gi: "EM"
+               (literal ", ")))
+      (if (attribute-string (normalize "otherterm")) ;; but this should be required...
+         (make element gi: "A"
+               attributes: (list (list "HREF"
+                                       (link-target
+                                        (attribute-string
+                                         (normalize "otherterm")))))
+               (with-mode otherterm
+                 (process-element-with-id
+                  (attribute-string (normalize "otherterm")))))
+         (process-children)))))
+
+;; This is referenced within the GLOSSSEE and GLOSSSEEALSO element
+;; construction expressions.  The OTHERTERM attributes on GLOSSSEE and
+;; GLOSSSEEALSO (should) refer to GLOSSENTRY elements but we're only
+;; interested in the text within the GLOSSTERM.  Discard the revision
+;; history and the definition from the referenced term.
+(mode otherterm
+  (element glossterm
+    (process-children))
+  (element glossdef
+    (empty-sosofo))
+  (element revhistory
+    (empty-sosofo))
+  (element glosssee
+    (empty-sosofo))
+  (element (glossentry acronym)
+    (empty-sosofo))
+  (element (glossentry abbrev)
+    (empty-sosofo)))
+
+;; an inline gloss term
+(element glossterm
+  (let* ((linkend (attribute-string (normalize "linkend"))))
+    (if linkend
+       (make element gi: "A"
+             attributes: (list (list "HREF" (href-to (element-with-id 
+                                                      linkend))))
+             ($italic-seq$))
+       ($italic-seq$))))
+
+;; a first glossterm
+(element firstterm
+  (let* ((linkend (attribute-string (normalize "linkend")))
+        (sosofo  (if linkend
+                     (make element gi: "A"
+                           attributes: (list (list "HREF" 
+                                                   (href-to 
+                                                    (element-with-id 
+                                                     linkend))))
+                           ($italic-seq$))
+                     ($italic-seq$))))
+    (if firstterm-bold
+       (make element gi: "B"
+             sosofo)
+       sosofo)))
+
diff --git a/html/dbgraph.dsl b/html/dbgraph.dsl
new file mode 100644 (file)
index 0000000..d3c0371
--- /dev/null
@@ -0,0 +1,218 @@
+;; $Id: dbgraph.dsl,v 1.6 2003/03/25 19:53:40 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ==================== GRAPHICS ====================
+
+(define (graphic-file filename)
+  (let ((ext (file-extension filename)))
+    (if (or (not filename)
+           (not %graphic-default-extension%)
+           (member ext %graphic-extensions%))
+       filename
+       (string-append filename "." %graphic-default-extension%))))
+
+(define (graphic-attrs imagefile instance-alt)
+  (let* ((grove    (sgml-parse image-library-filename))
+        (imagelib (node-property 'document-element 
+                                 (node-property 'grove-root grove)))
+        (images   (select-elements (children imagelib) "image"))
+        (image    (let loop ((imglist images))
+                    (if (node-list-empty? imglist)
+                        #f
+                        (if (equal? (attribute-string 
+                                     "filename"
+                                     (node-list-first imglist))
+                                    imagefile)
+                            (node-list-first imglist)
+                            (loop (node-list-rest imglist))))))
+        (prop     (if image
+                      (select-elements (children image) "properties")
+                      #f))
+        (metas    (if prop
+                      (select-elements (children prop) "meta")
+                      #f))
+        (attrs    (if metas
+                      (let loop ((meta metas) (attrlist '()))
+                        (if (node-list-empty? meta)
+                            attrlist
+                            (if (equal? (attribute-string 
+                                         "imgattr"
+                                         (node-list-first meta))
+                                        "yes")
+                                (loop (node-list-rest meta)
+                                      (append attrlist
+                                              (list 
+                                               (list 
+                                                (attribute-string 
+                                                 "name"
+                                                 (node-list-first meta))
+                                                (attribute-string
+                                                 "content"
+                                                 (node-list-first meta))))))
+                                (loop (node-list-rest meta) attrlist))))
+                      '()))
+        (width    (if prop (attribute-string "width" prop) #f))
+        (height   (if prop (attribute-string "height" prop) #f))
+        (alttext  (if image
+                      (select-elements (children image) "alttext")
+                      (empty-node-list)))
+        (alt      (if instance-alt
+                      instance-alt
+                      (if (node-list-empty? alttext)
+                          #f
+                          (data alttext)))))
+    (if (or width height alt (not (null? attrs)))
+       (append
+        attrs
+        (if width   (list (list "WIDTH" width)) '())
+        (if height  (list (list "HEIGHT" height)) '())
+        (if (not (node-list-empty? alttext)) (list (list "ALT" alt)) '()))
+       '())))
+
+(define ($graphic$ fileref
+                  #!optional (format #f) (alt #f) (align #f) (width #f) (height #f))
+  (let ((img-attr  (append
+                   (list     (list "SRC" (graphic-file fileref)))
+                   (if align (list (list "ALIGN" align)) '())
+                   (if width (list (list "WIDTH" width)) '())
+                   (if height (list (list "HEIGHT" height)) '())
+                   (if image-library (graphic-attrs fileref alt) '()))))
+    (make empty-element gi: "IMG"
+         attributes: img-attr)))
+
+(define ($img$ #!optional (nd (current-node)) (alt #f))
+  ;; This function now supports an extension to DocBook.  It's
+  ;; either a clever trick or an ugly hack, depending on your
+  ;; point of view, but it'll hold us until XLink is finalized
+  ;; and we can extend DocBook the "right" way.
+  ;;
+  ;; If the entity passed to GRAPHIC has the FORMAT
+  ;; "LINESPECIFIC", either because that's what's specified or
+  ;; because it's the notation of the supplied ENTITYREF, then
+  ;; the text of the entity is inserted literally (via Jade's
+  ;; read-entity external procedure).
+  ;;
+  (let* ((fileref   (attribute-string (normalize "fileref") nd))
+        (entityref (attribute-string (normalize "entityref") nd))
+        (format    (if (attribute-string (normalize "format") nd)
+                       (attribute-string (normalize "format") nd)
+                       (if entityref
+                           (entity-notation entityref)
+                           #f)))
+        (align     (attribute-string (normalize "align") nd))
+        (width     (attribute-string (normalize "width") nd))
+        (height    (attribute-string (normalize "depth") nd)))
+    (if (or fileref entityref)
+       (if (equal? format (normalize "linespecific"))
+           (if fileref
+               (include-file fileref)
+               (include-file (entity-generated-system-id entityref)))
+           (if fileref
+               ($graphic$ fileref format alt align width height)
+               ($graphic$ (system-id-filename entityref)
+                          format alt align width height)))
+       (empty-sosofo))))
+
+(element graphic
+  (make element gi: "P"
+       ($img$)))
+
+(element inlinegraphic
+  ($img$))
+
+;; ======================================================================
+;; MediaObject and friends...
+
+(define preferred-mediaobject-notations
+  (list "JPG" "JPEG" "PNG" "linespecific"))
+
+(define preferred-mediaobject-extensions
+  (list "jpeg" "jpg" "png" "avi" "mpg" "mpeg" "qt"))
+
+(define acceptable-mediaobject-notations
+  (list "GIF" "GIF87a" "GIF89a" "BMP" "WMF"))
+
+(define acceptable-mediaobject-extensions
+  (list "gif" "bmp" "wmf"))
+
+(element mediaobject
+  (make element gi: "DIV"
+       attributes: (list (list "CLASS" (gi)))
+       (make element gi: "P"
+             ($mediaobject$))))
+
+(element inlinemediaobject
+  (make element gi: "SPAN"
+       attributes: (list (list "CLASS" (gi)))
+       ($mediaobject$)))
+
+(element mediaobjectco
+  (process-children))
+
+(element imageobjectco
+  (process-children))
+
+(element objectinfo
+  (empty-sosofo))
+
+(element videoobject
+  (process-children))
+
+(element videodata
+  (let ((filename (data-filename (current-node))))
+    (make element gi: "EMBED"
+         attributes: (list (list "SRC" filename)))))
+
+(element audioobject
+  (process-children))
+
+(element audiodata
+  (let ((filename (data-filename (current-node))))
+    (make element gi: "EMBED"
+         attributes: (list (list "SRC" filename)))))
+
+(element imageobject
+  (process-children))
+
+(element imagedata
+  (let* ((filename (data-filename (current-node)))
+        (mediaobj (parent (parent (current-node))))
+        (textobjs (select-elements (children mediaobj) 
+                                   (normalize "textobject")))
+        (alttext  (let loop ((nl textobjs) (alttext #f))
+                    (if (or alttext (node-list-empty? nl))
+                        alttext
+                        (let ((phrase (select-elements 
+                                       (children 
+                                        (node-list-first nl))
+                                       (normalize "phrase"))))
+                          (if (node-list-empty? phrase)
+                              (loop (node-list-rest nl) #f)
+                              (loop (node-list-rest nl)
+                                    (data (node-list-first phrase))))))))
+        (fileref   (attribute-string (normalize "fileref")))
+        (entityref (attribute-string (normalize "entityref")))
+        (format    (if (attribute-string (normalize "format"))
+                       (attribute-string (normalize "format"))
+                       (if entityref
+                           (entity-notation entityref)
+                           #f))))
+    (if (equal? format (normalize "linespecific"))
+       (if fileref
+           (include-file fileref)
+           (include-file (entity-generated-system-id entityref)))
+       ($img$ (current-node) alttext))))
+
+(element textobject
+  (make element gi: "DIV"
+       attributes: (list (list "CLASS" (gi)))
+       (process-children)))
+
+(element caption
+  (make element gi: "DIV"
+       attributes: (list (list "CLASS" (gi)))
+       (process-children)))
+
diff --git a/html/dbhtml.dsl b/html/dbhtml.dsl
new file mode 100644 (file)
index 0000000..e23f56b
--- /dev/null
@@ -0,0 +1,446 @@
+;; $Id: dbhtml.dsl,v 1.5 2004/10/10 11:55:10 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ======================================================================
+;; HTML Linking...
+;;
+
+(define (element-id #!optional (nd (current-node)))
+  ;; IDs of TITLEs are the IDs of the PARENTs
+  (let ((elem (if (equal? (gi nd)
+                         (normalize "title"))
+                 (parent nd)
+                 nd)))
+    (if (attribute-string (normalize "id") elem)
+       (attribute-string (normalize "id") elem)
+       (generate-anchor elem))))
+
+(define (link-target idstring)
+  ;; Return the HTML HREF for the given idstring.  For RefEntrys, this is
+  ;; just the name of the file, for anything else it's the name of the file
+  ;; with the fragment identifier for the specified id.
+  (href-to (element-with-id idstring)))
+
+(define (generate-anchor #!optional (nd (current-node)))
+  (string-append "AEN" (number->string (all-element-number nd))))
+
+(define (generate-xptr #!optional (nd (current-node)))
+  ;; returns the location of the current node in a modified xptr
+  ;; syntax.  This used to be used to calculate unique anchor names
+  ;; in the HTML document.  all-element-number seems like a better
+  ;; way to go...so this function is probably never called anymore.
+  (let loop ((suffix "")
+            (nd nd))
+    (let ((eid (id nd)))
+      (if eid
+         (string-append "I("
+                        eid
+                        ")"
+                        (if (= (string-length suffix) 0)
+                            ""
+                            (string-append "C"
+                                           suffix)))
+         (let ((par (parent nd)))
+           (if (not (node-list-empty? par))
+               (loop (string-append "("
+                                    (number->string (child-number nd))
+                                    ","
+                                    (gi nd)
+                                    ")"
+                                    suffix)
+                     par)
+               (string-append (if (= (string-length suffix) 0)
+                                  "R"
+                                  "R,C")
+                              suffix)))))))
+
+;; ======================================================================
+;; HTML output
+;;
+
+(define (html-document title-sosofo body-sosofo)
+  (let* (;; Let's look these up once, so that we can avoid calculating
+        ;; them over and over again.
+        (prev         (prev-chunk-element))
+        (next         (next-chunk-element))
+        (prevm        (prev-major-component-chunk-element))
+        (nextm        (next-major-component-chunk-element))
+        (navlist      (list prev next prevm nextm))
+
+        ;; Let's make it possible to control the output even in the
+        ;; nochunks case. Note: in the nochunks case, (chunk?) will
+        ;; return #t for only the root element.
+        (make-entity? (and (or (not nochunks) rootchunk)
+                           (chunk?)))
+
+        (make-head?   (or make-entity?
+                          (and nochunks
+                               (node-list=? (current-node)
+                                            (sgml-root-element)))))
+        (doc-sosofo 
+         (if make-head?
+             (make element gi: "HTML"
+                   (make element gi: "HEAD"
+                         (make element gi: "TITLE" title-sosofo)
+                         ($standard-html-header$ prev next prevm nextm))
+                   (make element gi: "BODY"
+                         attributes: (append
+                                      (list (list "CLASS" (gi)))
+                                      %body-attr%)
+                         (header-navigation (current-node) navlist)
+                         body-sosofo
+                         (footer-navigation (current-node) navlist)))
+             body-sosofo)))
+    (if make-entity?
+       (make entity
+         system-id: (html-entity-file (html-file))
+         (html-doctype)
+         doc-sosofo)
+       (if (node-list=? (current-node) (sgml-root-element))
+           (make sequence
+             (html-doctype)
+             doc-sosofo)
+           doc-sosofo))))
+
+(define (html-doctype)
+  (cond
+   ((and %html-pubid% %html-sysid%)
+    (make document-type
+      name: "HTML"
+      public-id: %html-pubid%
+      system-id: %html-sysid%))
+   (%html-pubid%
+    (make document-type
+      name: "HTML"
+      public-id: %html-pubid%))
+   (%html-sysid%
+    (make document-type
+      name: "HTML"
+      system-id: %html-sysid%))
+   (else
+    (empty-sosofo))))
+
+(define ($standard-html-header$ #!optional
+                               (prev  (prev-chunk-element))
+                               (next  (next-chunk-element))
+                               (prevm (prev-major-component-chunk-element))
+                               (nextm (next-major-component-chunk-element)))
+  ;; A hook function to add additional tags to the HEAD of your HTML files
+  (let* ((info (info-element))
+        (kws  (select-elements (descendants info) (normalize "keyword")))
+        (home (nav-home (current-node)))
+        (up   (parent (current-node))))
+    (make sequence
+      ;; Add the META NAME=GENERATOR tag
+      (make empty-element gi: "META"
+           attributes: (list (list "NAME" "GENERATOR")
+                             (list "CONTENT" (stylesheet-version))))
+
+      ;; Add the LINK REV=MADE tag
+      (if %link-mailto-url%
+         (make empty-element gi: "LINK"
+               attributes: (list (list "REV" "MADE")
+                                 (list "HREF" %link-mailto-url%)))
+         (empty-sosofo))
+
+      ;; Add the LINK REL=HOME tag
+      (if (nav-home? (current-node))
+         (make empty-element gi: "LINK"
+               attributes: (append '(("REL" "HOME"))
+                                   (if (equal? (element-title-string home) 
+                                               "")
+                                       '()
+                                       (list 
+                                        (list "TITLE"
+                                              (element-title-string home))))
+                                   (list (list "HREF" (href-to home)))))
+         (empty-sosofo))
+
+      ;; Add the LINK REL=UP tag
+      (if (nav-up? (current-node))
+         (if (or (node-list-empty? up)
+                 (node-list=? up (sgml-root-element)))
+             (empty-sosofo)
+             (make empty-element gi: "LINK"
+                   attributes: (append  '(("REL" "UP"))
+                                        (if (equal? (element-title-string up)
+                                                    "")
+                                            '()
+                                            (list
+                                             (list "TITLE" 
+                                                   (element-title-string up))))
+                                        (list (list "HREF" (href-to up))))))
+         (empty-sosofo))
+
+      ;; Add the LINK REL=PREVIOUS tag
+      (if (node-list-empty? prev)
+         (empty-sosofo)
+         (make empty-element gi: "LINK"
+               attributes: (append '(("REL" "PREVIOUS"))
+                                   (if (equal? (element-title-string prev) "")
+                                       '()
+                                       (list
+                                        (list "TITLE"
+                                              (element-title-string prev))))
+                                   (list (list "HREF" (href-to prev))))))
+
+      ;; Add the LINK REL=NEXT tag
+      (if (node-list-empty? next)
+         (empty-sosofo)
+         (make empty-element gi: "LINK"
+               attributes: (append '(("REL" "NEXT"))
+                                   (if (equal? (element-title-string next) "")
+                                       '()
+                                       (list
+                                        (list "TITLE"
+                                              (element-title-string next))))
+                                   (list (list "HREF" (href-to next))))))
+
+      ;; Add META NAME=KEYWORD tags
+      (let loop ((nl kws))
+       (if (node-list-empty? nl)
+           (empty-sosofo)
+           (make sequence
+             (make empty-element gi: "META"
+                   attributes: (list (list "NAME" "KEYWORD")
+                                     (list "CONTENT" (data (node-list-first nl)))))
+             (loop (node-list-rest nl)))))
+
+      ;; Add LINK REL=STYLESHEET tag
+      (if %stylesheet%
+         (make empty-element gi: "LINK"
+               attributes: (list (list "REL" "STYLESHEET")
+                                 (list "TYPE" %stylesheet-type%)
+                                 (list "HREF" %stylesheet%)))
+         (empty-sosofo))
+
+      ($user-html-header$ home up prev next))))
+
+(define ($user-html-header$ #!optional 
+                           (home (empty-node-list))
+                           (up (empty-node-list))
+                           (prev (empty-node-list))
+                           (next (empty-node-list)))
+  ;; Add additional header tags.
+  (let loop ((tl %html-header-tags%))
+    (if (null? tl)
+       (empty-sosofo)
+       (make sequence
+         (make empty-element gi: (car (car tl))
+               attributes: (cdr (car tl)))
+         (loop (cdr tl))))))
+
+(define ($html-body-start$)
+  (empty-sosofo))
+
+(define ($html-body-content-start$)
+  (empty-sosofo))
+
+(define ($html-body-content-end$)
+  (empty-sosofo))
+
+(define ($html-body-end$)
+  (empty-sosofo))
+
+(define (dingbat usrname)
+  ;; Print dingbats and other characters selected by name
+  (let ((name (case-fold-down usrname)))
+    (case name
+      ;; For backward compatibility
+      (("copyright")           "(C)")
+      (("trademark")           "TM")
+
+      ;; Straight out of Unicode
+      (("ldquo")               "\"")
+      (("rdquo")               "\"")
+      (("lsquo")               "'")
+      (("rsquo")               "'")
+      (("ldquor")              "\"")
+      (("rdquor")              "\"")
+      (("raquo")                ">>")
+      (("laquo")                "<<")
+      (("rsaquo")               ">")
+      (("lsaquo")               "<")
+      (("nbsp")                        " ")
+      (("en-dash")             "-")
+      (("em-dash")             "--")
+      (("en-space")            " ")
+      (("em-space")            "  ")
+      (("bullet")              "*")
+      (("copyright-sign")      "(C)")
+      (("registered-sign")     "(R)")
+      (else
+       (let ((err (debug (string-append "No dingbat defined for: " name))))
+        "*")))))
+
+(define (dingbat-sosofo usrname)
+  ;; Print dingbats and other characters selected by name
+  (let ((name (case-fold-down usrname)))
+    (case name
+      ;; For backward compatibility
+      (("copyright")           (make entity-ref name: "copy"))
+      (("trademark")           (make entity-ref name: "trade"))
+
+      ;; Straight out of Unicode
+      (("ldquo")               (literal "\""))
+      (("rdquo")               (literal "\""))
+      (("lsquo")               "'")
+      (("rsquo")               "'")
+      (("raquo")                (literal "\""))
+      (("laquo")                (literal "\""))
+      (("rsaquo")               (literal "\""))
+      (("lsaquo")               (literal "\""))
+      (("nbsp")                        (make entity-ref name: "nbsp"))
+      (("en-dash")             (literal "-"))
+      (("em-dash")             (literal "--"))
+      (("en-space")            (make entity-ref name: "nbsp"))
+      (("em-space")            (make sequence
+                                 (make entity-ref name: "nbsp")
+                                 (make entity-ref name: "nbsp")))
+      (("bullet")              (literal "*"))
+      (("copyright-sign")      (make entity-ref name: "copy"))
+      (("registered-sign")     (literal "(R)"))
+      (else
+       (let ((err (debug (string-append "No dingbat defined for: " name))))
+        (literal "*"))))))
+
+(define (para-check #!optional (place 'stop))
+  (let ((inpara (equal? (gi (parent (current-node))) (normalize "para"))))
+    (if (and %fix-para-wrappers% inpara)
+       (if (equal? place 'stop)
+           (make formatting-instruction data: "&#60;/P>")
+           (make formatting-instruction data: "&#60;P>"))
+       (empty-sosofo))))
+
+;; ======================================================================
+;; HTML element functions
+
+(define ($block-container$)
+  (make element gi: "DIV"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       (make element gi: "A"
+             attributes: (list (list "NAME" (element-id)))
+             (empty-sosofo))
+       (process-children)))
+
+(define ($paragraph$ #!optional (para-wrapper "P"))
+  (let ((footnotes (select-elements (descendants (current-node)) 
+                                   (normalize "footnote")))
+       (tgroup (have-ancestor? (normalize "tgroup"))))
+    (make sequence
+      (make element gi: para-wrapper
+           attributes: (append
+                        (if %default-quadding%
+                            (list (list "ALIGN" %default-quadding%))
+                            '()))
+           (process-children))
+      (if (or %footnotes-at-end% tgroup (node-list-empty? footnotes))
+         (empty-sosofo)
+         (make element gi: "BLOCKQUOTE"
+               attributes: (list
+                            (list "CLASS" "FOOTNOTES"))
+               (with-mode footnote-mode
+                 (process-node-list footnotes)))))))
+
+(define ($indent-para-container$)
+  (make element gi: "BLOCKQUOTE"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       (process-children)))
+
+(define ($bold-seq$ #!optional (sosofo (process-children)))
+  (make element gi: "B"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+(define ($italic-seq$ #!optional (sosofo (process-children)))
+  (make element gi: "I"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+(define ($bold-italic-seq$ #!optional (sosofo (process-children)))
+  (make element gi: "B"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       (make element gi: "I"
+             sosofo)))
+
+(define ($mono-seq$ #!optional (sosofo (process-children)))
+  ;; please avoid using this, TT is presentational
+  (make element gi: "TT"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+(define ($code-seq$ #!optional (sosofo (process-children)))
+  ;; fragments of computer code
+  (make element gi: "CODE"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+(define ($samp-seq$ #!optional (sosofo (process-children)))
+  ;; sample output from programs, scripts, etc
+  (make element gi: "SAMP"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+(define ($kbd-seq$ #!optional (sosofo (process-children)))
+  ;; text to be entered by the user
+  (make element gi: "KBD"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+(define ($abbr-seq$ #!optional (sosofo (process-children)))
+  ;; abbreviated form
+  ;; FIXME: html4 only
+  (make element gi: "ABBR"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+(define ($acronym-seq$ #!optional (sosofo (process-children)))
+  ;; FIXME: html4 only
+  (make element gi: "ACRONYM"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+(define ($var-seq$ #!optional (sosofo (process-children)))
+  ;; variable or program argument
+  (make element gi: "VAR"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+(define ($italic-mono-seq$ #!optional (sosofo (process-children)))
+  (make element gi: "TT"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       (make element gi: "I"
+             sosofo)))
+
+(define ($bold-mono-seq$ #!optional (sosofo (process-children)))
+  (make element gi: "TT"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       (make element gi: "B"
+             sosofo)))
+
+(define ($charseq$ #!optional (sosofo (process-children)))
+  (make element gi: "SPAN"
+       attributes: (list
+                    (list "CLASS" (gi)))
+       sosofo))
+
+;; EOF dbhtml.dsl
+
+
diff --git a/html/dbindex.dsl b/html/dbindex.dsl
new file mode 100644 (file)
index 0000000..e73a1d5
--- /dev/null
@@ -0,0 +1,374 @@
+;; $Id: dbindex.dsl,v 1.5 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ................... INDEX TERMS (EMBEDDED MARKERS) ...................
+
+(element indexterm 
+  (if html-index
+      (let* ((id (if (attribute-string (normalize "id"))
+                    (attribute-string (normalize "id"))
+                    (generate-anchor))))
+       (make element gi: "A"
+             attributes: (list (list "NAME" id))
+             (empty-sosofo)))
+      (empty-sosofo)))
+
+(element primary (empty-sosofo))
+(element secondary (empty-sosofo))
+(element tertiary (empty-sosofo))
+(element see (empty-sosofo))
+(element seealso (empty-sosofo))
+
+;; =========================== INDEX ELEMENTS ===========================
+
+(element (setindex title) (empty-sosofo))
+(element setindex
+  (let ((preamble (node-list-filter-by-not-gi 
+                  (children (current-node))
+                  (list (normalize "indexentry"))))
+       (entries  (node-list-filter-by-gi
+                  (children (current-node))
+                  (list (normalize "indexentry")))))
+    (html-document 
+     (with-mode head-title-mode 
+       (literal (element-title-string (current-node))))
+     (make element gi: "DIV"
+          attributes: (list (list "CLASS" (gi)))
+          ($component-separator$)
+          ($component-title$)
+          (process-node-list preamble)
+          (if (node-list-empty? entries)
+              (empty-sosofo)
+              (make element gi: "DL"
+                    (process-node-list entries)))))))
+
+(element (index title) (empty-sosofo))
+(element index 
+  (let ((preamble (node-list-filter-by-not-gi 
+                  (children (current-node))
+                  (list (normalize "indexentry"))))
+       (entries  (node-list-filter-by-gi
+                  (children (current-node))
+                  (list (normalize "indexentry")))))
+    (html-document 
+     (with-mode head-title-mode 
+       (literal (element-title-string (current-node))))
+     (make element gi: "DIV"
+          attributes: (list (list "CLASS" (gi)))
+          ($component-separator$)
+          ($component-title$)
+          (process-node-list preamble)
+          (if (node-list-empty? entries)
+              (empty-sosofo)
+              (make element gi: "DL"
+                    (process-node-list entries)))))))
+
+
+(element (indexdiv title) (empty-sosofo))
+(element indexdiv
+  (let ((preamble (node-list-filter-by-not-gi 
+                  (children (current-node))
+                  (list (normalize "indexentry"))))
+       (entries  (node-list-filter-by-gi
+                  (children (current-node))
+                  (list (normalize "indexentry")))))
+    (html-document
+     (with-mode head-title-mode
+       (literal (element-title-string (current-node))))
+     (make element gi: "DIV"
+          attributes: (list (list "CLASS" (gi)))
+          ($section-separator$)
+          ($section-title$)
+          (process-node-list preamble)
+          (if (node-list-empty? entries)
+              (empty-sosofo)
+              (make element gi: "DL"
+                    (process-node-list entries)))))))
+
+(define (break-node-list nodes breakatgi)
+  ;; Given a _node_ list "PRIM SEC TERT SEC SEC TERT PRIM SEC PRIM PRIM"
+  ;; and the breakatgi of "PRIM", returns the _list_ of _node_ lists:
+  ;; '("PRIM SEC TERT SEC SEC TERT" "PRIM SEC" "PRIM" "PRIM")
+  (let loop ((nl nodes) (result '()) (curlist (empty-node-list)))
+    (if (node-list-empty? nl)
+       (if (node-list-empty? curlist)
+           result
+           (append result (list curlist)))
+       (if (equal? (gi (node-list-first nl)) breakatgi)
+           (loop (node-list-rest nl)
+                 (if (node-list-empty? curlist)
+                     result
+                     (append result (list curlist)))
+                 (node-list-first nl))
+           (loop (node-list-rest nl)
+                 result
+                 (node-list curlist (node-list-first nl)))))))
+
+(define (process-primary primnode secnl)
+  (let ((see?     (equal? (gi (node-list-first secnl)) 
+                         (normalize "seeie")))
+       (seealso? (equal? (gi (node-list-first secnl))
+                         (normalize "seealsoie")))
+       (second   (break-node-list secnl (normalize "secondaryie"))))
+    (if (or see? seealso?)
+       (process-terminal primnode secnl #t)
+       (make sequence
+         (process-nonterminal primnode)
+         (if (node-list-empty? secnl)
+             (empty-sosofo)
+             (make element gi: "DD"
+                   (make element gi: "DL"
+                         (let sloop ((secs second))
+                           (if (null? secs)
+                               (empty-sosofo)
+                               (make sequence
+                                 (let* ((nodes (car secs))
+                                        (sec   (node-list-first nodes))
+                                        (terts (node-list-rest nodes)))
+                                   (process-secondary sec terts))
+                                 (sloop (cdr secs))))))))))))
+
+(define (process-secondary secnode tertnl)
+  (let ((see?     (equal? (gi (node-list-first tertnl))
+                         (normalize "seeie")))
+       (seealso? (equal? (gi (node-list-first tertnl))
+                         (normalize "seealsoie")))
+       (tert (break-node-list tertnl (normalize "tertiaryie"))))
+    (if (or see? seealso?)
+       (process-terminal secnode tertnl)
+       (make sequence
+         (process-nonterminal secnode)
+         (make element gi: "DD"
+               (make element gi: "DL"
+                     (let tloop ((terts tert))
+                       (if (null? terts)
+                           (empty-sosofo)
+                           (make sequence
+                             (let* ((nodes (car terts))
+                                    (tert  (node-list-first nodes))
+                                    (sees  (node-list-rest nodes)))
+                               (process-tertiary tert sees))
+                             (tloop (cdr terts)))))))))))
+
+(define (process-tertiary tertnode seenl)
+  (process-terminal tertnode seenl))
+
+(define (process-terminal node seenl #!optional (output-id #f))
+  (let ((id (attribute-string (normalize "id") (parent node))))
+    (make sequence
+      (make element gi: "DT"
+           (if id
+               (make element gi: "A"
+                     attributes: (list (list "NAME" id))
+                     (empty-sosofo))
+               (empty-sosofo))
+           (process-node-list node))
+      (if (node-list-empty? seenl)
+         (empty-sosofo)
+         (make element gi: "DD"
+               (make element gi: "DL"
+                     (let loop ((nl seenl))
+                       (if (node-list-empty? nl)
+                           (empty-sosofo)
+                           (make sequence
+                             (make element gi: "DT"
+                                   (process-node-list 
+                                    (node-list-first nl)))
+                             (loop (node-list-rest nl)))))))))))
+
+(define (process-nonterminal node)
+  (make element gi: "DT"
+       (process-node-list node)))
+
+(element indexentry
+  (let* ((primary   (break-node-list (children (current-node))
+                                    (normalize "primaryie"))))
+    (make sequence
+      (let ploop ((prims primary))
+       (if (null? prims)
+           (empty-sosofo)
+           (make sequence
+             (let* ((nodes (car prims))
+                    (prim  (node-list-first nodes))
+                    (secs  (node-list-rest nodes)))
+               (process-primary prim secs))
+             (ploop (cdr prims))))))))
+
+(element primaryie (process-children))
+(element secondaryie (process-children))
+(element tertiaryie (process-children))
+
+(define (indexentry-link nd)
+  (let* ((preferred (not (node-list-empty?
+                         (select-elements (children (current-node))
+                                          (normalize "emphasis"))))))
+    (make element gi: "A"
+         attributes: (list (list "HREF" 
+                                 (attribute-string (normalize "url"))))
+         (process-children))))
+
+(element (primaryie ulink)
+  (indexentry-link (current-node)))
+
+(element (secondaryie ulink)
+  (indexentry-link (current-node)))
+
+(element (tertiaryie ulink)
+  (indexentry-link (current-node)))
+
+(element seeie 
+  (let ((linkend (attribute-string (normalize "linkend"))))
+      (if linkend
+         (make element gi: "A"
+               attributes: (list (list "HREF" 
+                                       (href-to (element-with-id linkend))))
+               (literal (gentext-element-name (current-node)))
+               (literal (gentext-label-title-sep (current-node)))
+               (process-children))
+         (make sequence
+           (literal (gentext-element-name (current-node)))
+           (literal (gentext-label-title-sep (current-node)))
+           (process-children)))))
+
+(element seealsoie
+  (let* ((alinkends (attribute-string (normalize "linkends")))
+        (linkends  (if alinkends
+                       (split alinkends)
+                       '()))
+        (linkend   (if alinkends
+                       (car linkends)
+                       #f)))
+    (if linkend
+       (make element gi: "A"
+             attributes: (list (list "HREF" 
+                                     (href-to (element-with-id linkend))))
+             (literal (gentext-element-name (current-node)))
+             (literal (gentext-label-title-sep (current-node)))
+             (process-children))
+       (make sequence
+         (literal (gentext-element-name (current-node)))
+         (literal (gentext-label-title-sep (current-node)))
+         (process-children)))))
+
+;; =====================HTML INDEX PROCESSING ==============================
+
+(define (htmlnewline)
+  (make formatting-instruction data: "&#13;"))
+
+(define (htmlindexattr attr)
+  (if (attribute-string (normalize attr))
+      (make sequence
+       (make formatting-instruction data: attr)
+       (make formatting-instruction data: " ")
+       (make formatting-instruction data: (attribute-string 
+                                           (normalize attr)))
+       (htmlnewline))
+      (empty-sosofo)))
+
+(define (htmlindexterm)
+  (let* ((attr    (gi (current-node)))
+        (content (data (current-node)))
+        (string  (string-replace content "&#13;" " "))
+        (sortas  (attribute-string (normalize "sortas"))))
+    (make sequence
+      (make formatting-instruction data: attr)
+      (if sortas
+         (make sequence
+           (make formatting-instruction data: "[")
+           (make formatting-instruction data: sortas)
+           (make formatting-instruction data: "]"))
+         (empty-sosofo))
+      (make formatting-instruction data: " ")
+      (make formatting-instruction data: string)
+      (htmlnewline))))
+
+(define (htmlindexzone zone)
+  (let loop ((idlist (split zone)))
+    (if (null? idlist)
+       (empty-sosofo)
+       (make sequence
+         (htmlindexzone1 (car idlist))
+         (loop (cdr idlist))))))
+
+(define (htmlindexzone1 id)
+  (let* ((target (ancestor-member (element-with-id id)
+                                 (append (book-element-list)
+                                         (division-element-list)
+                                         (component-element-list)
+                                         (section-element-list))))
+        (title  (string-replace (element-title-string target) "&#13;" " ")))
+    (make sequence
+      (make formatting-instruction data: "ZONE ")
+      (make formatting-instruction data: (href-to target))
+      (htmlnewline)
+
+      (make formatting-instruction data: "TITLE ")
+      (make formatting-instruction data: title)
+      (htmlnewline))))
+
+(mode htmlindex
+  ;; this mode is really just a hack to get at the root element
+  (root (process-children))
+
+  (default 
+    (if (node-list=? (current-node) (sgml-root-element))
+       (make entity
+         system-id: (html-entity-file html-index-filename)
+         (process-node-list (select-elements 
+                             (descendants (current-node))
+                             (normalize "indexterm"))))
+       (empty-sosofo)))
+
+  (element indexterm
+    (let* ((target (ancestor-member (current-node)
+                                   (append (book-element-list)
+                                           (division-element-list)
+                                           (component-element-list)
+                                           (section-element-list))))
+          (title  (string-replace (element-title-string target) "&#13;" " ")))
+      (make sequence
+       (make formatting-instruction data: "INDEXTERM ")
+       (make formatting-instruction data: (href-to target))
+       (htmlnewline)
+
+       (make formatting-instruction data: "INDEXPOINT ")
+       (make formatting-instruction data: (href-to (current-node)))
+       (htmlnewline)
+
+       (make formatting-instruction data: "TITLE ")
+       (make formatting-instruction data: title)
+       (htmlnewline)
+
+       (htmlindexattr "scope")
+       (htmlindexattr "significance")
+       (htmlindexattr "class")
+       (htmlindexattr "id")
+       (htmlindexattr "startref")
+       
+       (if (attribute-string (normalize "zone"))
+           (htmlindexzone (attribute-string (normalize "zone")))
+           (empty-sosofo))
+
+       (process-children)
+
+       (make formatting-instruction data: "/INDEXTERM")
+       (htmlnewline))))
+                   
+  (element primary
+    (htmlindexterm))
+
+  (element secondary
+    (htmlindexterm))
+
+  (element tertiary
+    (htmlindexterm))
+
+  (element see
+    (htmlindexterm))
+
+  (element seealso
+    (htmlindexterm))
+)
diff --git a/html/dbinfo.dsl b/html/dbinfo.dsl
new file mode 100644 (file)
index 0000000..5d03246
--- /dev/null
@@ -0,0 +1,879 @@
+;; $Id: dbinfo.dsl,v 1.2 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ................................ INFO ................................
+
+;; Rather than make the *INFO containers empty-sosofos, we make them
+;; process-children and then make all of the elements they may contain
+;; empty in this context.  The advantage here is that we can then
+;; more easily override some of them in stylesheets that use this one.
+
+;; SetInfo is handled differently in dbdivis.dsl by using a
+;; special mode...
+
+(element setinfo (empty-sosofo))
+
+(element (setinfo abbrev) (process-children))
+(element (setinfo abstract) (process-children))
+(element (setinfo address) (process-children))
+(element (setinfo affiliation) (process-children))
+(element (setinfo artpagenums) (process-children))
+(element (setinfo author) (process-children))
+(element (setinfo authorblurb) (process-children))
+(element (setinfo authorgroup) (process-children))
+(element (setinfo authorinitials) (process-children))
+(element (setinfo bibliomisc) (process-children))
+(element (setinfo biblioset) (process-children))
+(element (setinfo collab) (process-children))
+(element (setinfo confgroup) (process-children))
+(element (setinfo contractnum) (process-children))
+(element (setinfo contractsponsor) (process-children))
+(element (setinfo contrib) (process-children))
+(element (setinfo copyright) (process-children))
+(element (setinfo corpauthor) (process-children))
+(element (setinfo corpname) (process-children))
+(element (setinfo date) (process-children))
+(element (setinfo edition) (process-children))
+(element (setinfo editor) (process-children))
+(element (setinfo firstname) (process-children))
+(element (setinfo graphic) (process-children))
+(element (setinfo honorific) (process-children))
+(element (setinfo invpartnumber) (process-children))
+(element (setinfo isbn) (process-children))
+(element (setinfo issn) (process-children))
+(element (setinfo issuenum) (process-children))
+(element (setinfo itermset) (process-children))
+(element (setinfo keywordset) (process-children))
+(element (setinfo legalnotice) ($semiformal-object$))
+(element (setinfo lineage) (process-children))
+(element (setinfo modespec) (process-children))
+(element (setinfo orgname) (process-children))
+(element (setinfo othercredit) (process-children))
+(element (setinfo othername) (process-children))
+(element (setinfo pagenums) (process-children))
+(element (setinfo printhistory) (process-children))
+(element (setinfo productname) (process-children))
+(element (setinfo productnumber) (process-children))
+(element (setinfo pubdate) (process-children))
+(element (setinfo publisher) (process-children))
+(element (setinfo publishername) (process-children))
+(element (setinfo pubsnumber) (process-children))
+(element (setinfo releaseinfo) (process-children))
+(element (setinfo revhistory) ($book-revhistory$))
+(element (setinfo seriesvolnums) (process-children))
+(element (setinfo subjectset) (process-children))
+(element (setinfo subtitle) (process-children))
+(element (setinfo surname) (process-children))
+(element (setinfo title) (process-children))
+(element (setinfo titleabbrev) (process-children))
+(element (setinfo volumenum) (process-children))
+
+;; BookInfo is handled differently in dbdivis.dsl by using a
+;; special mode...
+
+(element bookinfo (empty-sosofo))
+
+(element (bookinfo abbrev) (process-children))
+(element (bookinfo abstract) (process-children))
+(element (bookinfo address) (process-children))
+(element (bookinfo affiliation) (process-children))
+(element (bookinfo artpagenums) (process-children))
+(element (bookinfo author) (process-children))
+(element (bookinfo authorblurb) (process-children))
+(element (bookinfo authorgroup) (process-children))
+(element (bookinfo authorinitials) (process-children))
+(element (bookinfo bibliomisc) (process-children))
+(element (bookinfo biblioset) (process-children))
+(element (bookinfo bookbiblio) (process-children))
+(element (bookinfo collab) (process-children))
+(element (bookinfo confgroup) (process-children))
+(element (bookinfo contractnum) (process-children))
+(element (bookinfo contractsponsor) (process-children))
+(element (bookinfo contrib) (process-children))
+(element (bookinfo copyright) (process-children))
+(element (bookinfo corpauthor) (process-children))
+(element (bookinfo corpname) (process-children))
+(element (bookinfo date) (process-children))
+(element (bookinfo edition) (process-children))
+(element (bookinfo editor) (process-children))
+(element (bookinfo firstname) (process-children))
+(element (bookinfo graphic) (process-children))
+(element (bookinfo honorific) (process-children))
+(element (bookinfo invpartnumber) (process-children))
+(element (bookinfo isbn) (process-children))
+(element (bookinfo issn) (process-children))
+(element (bookinfo issuenum) (process-children))
+(element (bookinfo itermset) (process-children))
+(element (bookinfo keywordset) (process-children))
+(element (bookinfo legalnotice) ($semiformal-object$))
+(element (bookinfo lineage) (process-children))
+(element (bookinfo modespec) (process-children))
+(element (bookinfo orgname) (process-children))
+(element (bookinfo othercredit) (process-children))
+(element (bookinfo othername) (process-children))
+(element (bookinfo pagenums) (process-children))
+(element (bookinfo printhistory) (process-children))
+(element (bookinfo productname) (process-children))
+(element (bookinfo productnumber) (process-children))
+(element (bookinfo pubdate) (process-children))
+(element (bookinfo publisher) (process-children))
+(element (bookinfo publishername) (process-children))
+(element (bookinfo pubsnumber) (process-children))
+(element (bookinfo releaseinfo) (process-children))
+(element (bookinfo revhistory) ($book-revhistory$))
+(element (bookinfo seriesvolnums) (process-children))
+(element (bookinfo subjectset) (process-children))
+(element (bookinfo subtitle) (process-children))
+(element (bookinfo surname) (process-children))
+(element (bookinfo title) (process-children))
+(element (bookinfo titleabbrev) (process-children))
+(element (bookinfo volumenum) (process-children))
+
+(element docinfo (empty-sosofo))
+
+(element (docinfo abbrev) (empty-sosofo))
+
+(element (docinfo abstract) 
+  (make element gi: "DIV"
+       attributes: '(("CLASS" "ABSTRACT"))
+       (process-children)))
+       
+(element (docinfo abstract para) 
+  (make element gi: "P"
+       (process-children-trim)))
+
+(element (docinfo address) (empty-sosofo))
+(element (docinfo affiliation) (empty-sosofo))
+(element (docinfo artpagenums) (empty-sosofo))
+(element (docinfo author) (empty-sosofo))
+(element (docinfo authorblurb) (empty-sosofo))
+(element (docinfo authorgroup) (empty-sosofo))
+(element (docinfo authorinitials) (empty-sosofo))
+(element (docinfo bibliomisc) (empty-sosofo))
+(element (docinfo biblioset) (empty-sosofo))
+(element (docinfo collab) (empty-sosofo))
+(element (docinfo confgroup) (empty-sosofo))
+(element (docinfo contractnum) (empty-sosofo))
+(element (docinfo contractsponsor) (empty-sosofo))
+(element (docinfo contrib) (empty-sosofo))
+(element (docinfo copyright) (empty-sosofo))
+(element (docinfo corpauthor) (empty-sosofo))
+(element (docinfo corpname) (empty-sosofo))
+(element (docinfo date) (empty-sosofo))
+(element (docinfo edition) (empty-sosofo))
+(element (docinfo editor) (empty-sosofo))
+(element (docinfo firstname) (empty-sosofo))
+(element (docinfo graphic) (empty-sosofo))
+(element (docinfo honorific) (empty-sosofo))
+(element (docinfo invpartnumber) (empty-sosofo))
+(element (docinfo isbn) (empty-sosofo))
+(element (docinfo issn) (empty-sosofo))
+(element (docinfo issuenum) (empty-sosofo))
+(element (docinfo itermset) (empty-sosofo))
+(element (docinfo keywordset) (empty-sosofo))
+(element (docinfo legalnotice) (empty-sosofo))
+(element (docinfo lineage) (empty-sosofo))
+(element (docinfo modespec) (empty-sosofo))
+(element (docinfo orgname) (empty-sosofo))
+(element (docinfo othercredit) (empty-sosofo))
+(element (docinfo othername) (empty-sosofo))
+(element (docinfo pagenums) (empty-sosofo))
+(element (docinfo printhistory) (empty-sosofo))
+(element (docinfo productname) (empty-sosofo))
+(element (docinfo productnumber) (empty-sosofo))
+(element (docinfo pubdate) (empty-sosofo))
+(element (docinfo publisher) (empty-sosofo))
+(element (docinfo publishername) (empty-sosofo))
+(element (docinfo pubsnumber) (empty-sosofo))
+(element (docinfo releaseinfo) (empty-sosofo))
+(element (docinfo revhistory) (empty-sosofo))
+(element (docinfo seriesvolnums) (empty-sosofo))
+(element (docinfo subjectset) (empty-sosofo))
+(element (docinfo subtitle) (empty-sosofo))
+(element (docinfo surname) (empty-sosofo))
+(element (docinfo title) (empty-sosofo))
+(element (docinfo titleabbrev) (empty-sosofo))
+(element (docinfo volumenum) (empty-sosofo))
+
+(element sect1info (process-children))
+
+(element (sect1info abbrev) (empty-sosofo))
+(element (sect1info abstract) (empty-sosofo))
+(element (sect1info address) (empty-sosofo))
+(element (sect1info affiliation) (empty-sosofo))
+(element (sect1info artpagenums) (empty-sosofo))
+(element (sect1info author) (empty-sosofo))
+(element (sect1info authorblurb) (empty-sosofo))
+(element (sect1info authorgroup) (empty-sosofo))
+(element (sect1info authorinitials) (empty-sosofo))
+(element (sect1info bibliomisc) (empty-sosofo))
+(element (sect1info biblioset) (empty-sosofo))
+(element (sect1info collab) (empty-sosofo))
+(element (sect1info confgroup) (empty-sosofo))
+(element (sect1info contractnum) (empty-sosofo))
+(element (sect1info contractsponsor) (empty-sosofo))
+(element (sect1info contrib) (empty-sosofo))
+(element (sect1info copyright) (empty-sosofo))
+(element (sect1info corpauthor) (empty-sosofo))
+(element (sect1info corpname) (empty-sosofo))
+(element (sect1info date) (empty-sosofo))
+(element (sect1info edition) (empty-sosofo))
+(element (sect1info editor) (empty-sosofo))
+(element (sect1info firstname) (empty-sosofo))
+(element (sect1info graphic) (empty-sosofo))
+(element (sect1info honorific) (empty-sosofo))
+(element (sect1info invpartnumber) (empty-sosofo))
+(element (sect1info isbn) (empty-sosofo))
+(element (sect1info issn) (empty-sosofo))
+(element (sect1info issuenum) (empty-sosofo))
+(element (sect1info itermset) (empty-sosofo))
+(element (sect1info keywordset) (empty-sosofo))
+(element (sect1info legalnotice) (empty-sosofo))
+(element (sect1info lineage) (empty-sosofo))
+(element (sect1info modespec) (empty-sosofo))
+(element (sect1info orgname) (empty-sosofo))
+(element (sect1info othercredit) (empty-sosofo))
+(element (sect1info othername) (empty-sosofo))
+(element (sect1info pagenums) (empty-sosofo))
+(element (sect1info printhistory) (empty-sosofo))
+(element (sect1info productname) (empty-sosofo))
+(element (sect1info productnumber) (empty-sosofo))
+(element (sect1info pubdate) (empty-sosofo))
+(element (sect1info publisher) (empty-sosofo))
+(element (sect1info publishername) (empty-sosofo))
+(element (sect1info pubsnumber) (empty-sosofo))
+(element (sect1info releaseinfo) (empty-sosofo))
+(element (sect1info revhistory) (empty-sosofo))
+(element (sect1info seriesvolnums) (empty-sosofo))
+(element (sect1info subjectset) (empty-sosofo))
+(element (sect1info subtitle) (empty-sosofo))
+(element (sect1info surname) (empty-sosofo))
+(element (sect1info title) (empty-sosofo))
+(element (sect1info titleabbrev) (empty-sosofo))
+(element (sect1info volumenum) (empty-sosofo))
+
+(element sect2info (process-children))
+
+(element (sect2info abbrev) (empty-sosofo))
+(element (sect2info abstract) (empty-sosofo))
+(element (sect2info address) (empty-sosofo))
+(element (sect2info affiliation) (empty-sosofo))
+(element (sect2info artpagenums) (empty-sosofo))
+(element (sect2info author) (empty-sosofo))
+(element (sect2info authorblurb) (empty-sosofo))
+(element (sect2info authorgroup) (empty-sosofo))
+(element (sect2info authorinitials) (empty-sosofo))
+(element (sect2info bibliomisc) (empty-sosofo))
+(element (sect2info biblioset) (empty-sosofo))
+(element (sect2info collab) (empty-sosofo))
+(element (sect2info confgroup) (empty-sosofo))
+(element (sect2info contractnum) (empty-sosofo))
+(element (sect2info contractsponsor) (empty-sosofo))
+(element (sect2info contrib) (empty-sosofo))
+(element (sect2info copyright) (empty-sosofo))
+(element (sect2info corpauthor) (empty-sosofo))
+(element (sect2info corpname) (empty-sosofo))
+(element (sect2info date) (empty-sosofo))
+(element (sect2info edition) (empty-sosofo))
+(element (sect2info editor) (empty-sosofo))
+(element (sect2info firstname) (empty-sosofo))
+(element (sect2info graphic) (empty-sosofo))
+(element (sect2info honorific) (empty-sosofo))
+(element (sect2info invpartnumber) (empty-sosofo))
+(element (sect2info isbn) (empty-sosofo))
+(element (sect2info issn) (empty-sosofo))
+(element (sect2info issuenum) (empty-sosofo))
+(element (sect2info itermset) (empty-sosofo))
+(element (sect2info keywordset) (empty-sosofo))
+(element (sect2info legalnotice) (empty-sosofo))
+(element (sect2info lineage) (empty-sosofo))
+(element (sect2info modespec) (empty-sosofo))
+(element (sect2info orgname) (empty-sosofo))
+(element (sect2info othercredit) (empty-sosofo))
+(element (sect2info othername) (empty-sosofo))
+(element (sect2info pagenums) (empty-sosofo))
+(element (sect2info printhistory) (empty-sosofo))
+(element (sect2info productname) (empty-sosofo))
+(element (sect2info productnumber) (empty-sosofo))
+(element (sect2info pubdate) (empty-sosofo))
+(element (sect2info publisher) (empty-sosofo))
+(element (sect2info publishername) (empty-sosofo))
+(element (sect2info pubsnumber) (empty-sosofo))
+(element (sect2info releaseinfo) (empty-sosofo))
+(element (sect2info revhistory) (empty-sosofo))
+(element (sect2info seriesvolnums) (empty-sosofo))
+(element (sect2info subjectset) (empty-sosofo))
+(element (sect2info subtitle) (empty-sosofo))
+(element (sect2info surname) (empty-sosofo))
+(element (sect2info title) (empty-sosofo))
+(element (sect2info titleabbrev) (empty-sosofo))
+(element (sect2info volumenum) (empty-sosofo))
+
+(element sect3info (process-children))
+
+(element (sect3info abbrev) (empty-sosofo))
+(element (sect3info abstract) (empty-sosofo))
+(element (sect3info address) (empty-sosofo))
+(element (sect3info affiliation) (empty-sosofo))
+(element (sect3info artpagenums) (empty-sosofo))
+(element (sect3info author) (empty-sosofo))
+(element (sect3info authorblurb) (empty-sosofo))
+(element (sect3info authorgroup) (empty-sosofo))
+(element (sect3info authorinitials) (empty-sosofo))
+(element (sect3info bibliomisc) (empty-sosofo))
+(element (sect3info biblioset) (empty-sosofo))
+(element (sect3info collab) (empty-sosofo))
+(element (sect3info confgroup) (empty-sosofo))
+(element (sect3info contractnum) (empty-sosofo))
+(element (sect3info contractsponsor) (empty-sosofo))
+(element (sect3info contrib) (empty-sosofo))
+(element (sect3info copyright) (empty-sosofo))
+(element (sect3info corpauthor) (empty-sosofo))
+(element (sect3info corpname) (empty-sosofo))
+(element (sect3info date) (empty-sosofo))
+(element (sect3info edition) (empty-sosofo))
+(element (sect3info editor) (empty-sosofo))
+(element (sect3info firstname) (empty-sosofo))
+(element (sect3info graphic) (empty-sosofo))
+(element (sect3info honorific) (empty-sosofo))
+(element (sect3info invpartnumber) (empty-sosofo))
+(element (sect3info isbn) (empty-sosofo))
+(element (sect3info issn) (empty-sosofo))
+(element (sect3info issuenum) (empty-sosofo))
+(element (sect3info itermset) (empty-sosofo))
+(element (sect3info keywordset) (empty-sosofo))
+(element (sect3info legalnotice) (empty-sosofo))
+(element (sect3info lineage) (empty-sosofo))
+(element (sect3info modespec) (empty-sosofo))
+(element (sect3info orgname) (empty-sosofo))
+(element (sect3info othercredit) (empty-sosofo))
+(element (sect3info othername) (empty-sosofo))
+(element (sect3info pagenums) (empty-sosofo))
+(element (sect3info printhistory) (empty-sosofo))
+(element (sect3info productname) (empty-sosofo))
+(element (sect3info productnumber) (empty-sosofo))
+(element (sect3info pubdate) (empty-sosofo))
+(element (sect3info publisher) (empty-sosofo))
+(element (sect3info publishername) (empty-sosofo))
+(element (sect3info pubsnumber) (empty-sosofo))
+(element (sect3info releaseinfo) (empty-sosofo))
+(element (sect3info revhistory) (empty-sosofo))
+(element (sect3info seriesvolnums) (empty-sosofo))
+(element (sect3info subjectset) (empty-sosofo))
+(element (sect3info subtitle) (empty-sosofo))
+(element (sect3info surname) (empty-sosofo))
+(element (sect3info title) (empty-sosofo))
+(element (sect3info titleabbrev) (empty-sosofo))
+(element (sect3info volumenum) (empty-sosofo))
+
+(element sect4info (process-children))
+
+(element (sect4info abbrev) (empty-sosofo))
+(element (sect4info abstract) (empty-sosofo))
+(element (sect4info address) (empty-sosofo))
+(element (sect4info affiliation) (empty-sosofo))
+(element (sect4info artpagenums) (empty-sosofo))
+(element (sect4info author) (empty-sosofo))
+(element (sect4info authorblurb) (empty-sosofo))
+(element (sect4info authorgroup) (empty-sosofo))
+(element (sect4info authorinitials) (empty-sosofo))
+(element (sect4info bibliomisc) (empty-sosofo))
+(element (sect4info biblioset) (empty-sosofo))
+(element (sect4info collab) (empty-sosofo))
+(element (sect4info confgroup) (empty-sosofo))
+(element (sect4info contractnum) (empty-sosofo))
+(element (sect4info contractsponsor) (empty-sosofo))
+(element (sect4info contrib) (empty-sosofo))
+(element (sect4info copyright) (empty-sosofo))
+(element (sect4info corpauthor) (empty-sosofo))
+(element (sect4info corpname) (empty-sosofo))
+(element (sect4info date) (empty-sosofo))
+(element (sect4info edition) (empty-sosofo))
+(element (sect4info editor) (empty-sosofo))
+(element (sect4info firstname) (empty-sosofo))
+(element (sect4info graphic) (empty-sosofo))
+(element (sect4info honorific) (empty-sosofo))
+(element (sect4info invpartnumber) (empty-sosofo))
+(element (sect4info isbn) (empty-sosofo))
+(element (sect4info issn) (empty-sosofo))
+(element (sect4info issuenum) (empty-sosofo))
+(element (sect4info itermset) (empty-sosofo))
+(element (sect4info keywordset) (empty-sosofo))
+(element (sect4info legalnotice) (empty-sosofo))
+(element (sect4info lineage) (empty-sosofo))
+(element (sect4info modespec) (empty-sosofo))
+(element (sect4info orgname) (empty-sosofo))
+(element (sect4info othercredit) (empty-sosofo))
+(element (sect4info othername) (empty-sosofo))
+(element (sect4info pagenums) (empty-sosofo))
+(element (sect4info printhistory) (empty-sosofo))
+(element (sect4info productname) (empty-sosofo))
+(element (sect4info productnumber) (empty-sosofo))
+(element (sect4info pubdate) (empty-sosofo))
+(element (sect4info publisher) (empty-sosofo))
+(element (sect4info publishername) (empty-sosofo))
+(element (sect4info pubsnumber) (empty-sosofo))
+(element (sect4info releaseinfo) (empty-sosofo))
+(element (sect4info revhistory) (empty-sosofo))
+(element (sect4info seriesvolnums) (empty-sosofo))
+(element (sect4info subjectset) (empty-sosofo))
+(element (sect4info subtitle) (empty-sosofo))
+(element (sect4info surname) (empty-sosofo))
+(element (sect4info title) (empty-sosofo))
+(element (sect4info titleabbrev) (empty-sosofo))
+(element (sect4info volumenum) (empty-sosofo))
+
+(element sect5info (process-children))
+
+(element (sect5info abbrev) (empty-sosofo))
+(element (sect5info abstract) (empty-sosofo))
+(element (sect5info address) (empty-sosofo))
+(element (sect5info affiliation) (empty-sosofo))
+(element (sect5info artpagenums) (empty-sosofo))
+(element (sect5info author) (empty-sosofo))
+(element (sect5info authorblurb) (empty-sosofo))
+(element (sect5info authorgroup) (empty-sosofo))
+(element (sect5info authorinitials) (empty-sosofo))
+(element (sect5info bibliomisc) (empty-sosofo))
+(element (sect5info biblioset) (empty-sosofo))
+(element (sect5info collab) (empty-sosofo))
+(element (sect5info confgroup) (empty-sosofo))
+(element (sect5info contractnum) (empty-sosofo))
+(element (sect5info contractsponsor) (empty-sosofo))
+(element (sect5info contrib) (empty-sosofo))
+(element (sect5info copyright) (empty-sosofo))
+(element (sect5info corpauthor) (empty-sosofo))
+(element (sect5info corpname) (empty-sosofo))
+(element (sect5info date) (empty-sosofo))
+(element (sect5info edition) (empty-sosofo))
+(element (sect5info editor) (empty-sosofo))
+(element (sect5info firstname) (empty-sosofo))
+(element (sect5info graphic) (empty-sosofo))
+(element (sect5info honorific) (empty-sosofo))
+(element (sect5info invpartnumber) (empty-sosofo))
+(element (sect5info isbn) (empty-sosofo))
+(element (sect5info issn) (empty-sosofo))
+(element (sect5info issuenum) (empty-sosofo))
+(element (sect5info itermset) (empty-sosofo))
+(element (sect5info keywordset) (empty-sosofo))
+(element (sect5info legalnotice) (empty-sosofo))
+(element (sect5info lineage) (empty-sosofo))
+(element (sect5info modespec) (empty-sosofo))
+(element (sect5info orgname) (empty-sosofo))
+(element (sect5info othercredit) (empty-sosofo))
+(element (sect5info othername) (empty-sosofo))
+(element (sect5info pagenums) (empty-sosofo))
+(element (sect5info printhistory) (empty-sosofo))
+(element (sect5info productname) (empty-sosofo))
+(element (sect5info productnumber) (empty-sosofo))
+(element (sect5info pubdate) (empty-sosofo))
+(element (sect5info publisher) (empty-sosofo))
+(element (sect5info publishername) (empty-sosofo))
+(element (sect5info pubsnumber) (empty-sosofo))
+(element (sect5info releaseinfo) (empty-sosofo))
+(element (sect5info revhistory) (empty-sosofo))
+(element (sect5info seriesvolnums) (empty-sosofo))
+(element (sect5info subjectset) (empty-sosofo))
+(element (sect5info subtitle) (empty-sosofo))
+(element (sect5info surname) (empty-sosofo))
+(element (sect5info title) (empty-sosofo))
+(element (sect5info titleabbrev) (empty-sosofo))
+(element (sect5info volumenum) (empty-sosofo))
+
+(element refsect1info (process-children))
+
+(element (refsect1info abbrev) (empty-sosofo))
+(element (refsect1info abstract) (empty-sosofo))
+(element (refsect1info address) (empty-sosofo))
+(element (refsect1info affiliation) (empty-sosofo))
+(element (refsect1info artpagenums) (empty-sosofo))
+(element (refsect1info author) (empty-sosofo))
+(element (refsect1info authorblurb) (empty-sosofo))
+(element (refsect1info authorgroup) (empty-sosofo))
+(element (refsect1info authorinitials) (empty-sosofo))
+(element (refsect1info bibliomisc) (empty-sosofo))
+(element (refsect1info biblioset) (empty-sosofo))
+(element (refsect1info collab) (empty-sosofo))
+(element (refsect1info confgroup) (empty-sosofo))
+(element (refsect1info contractnum) (empty-sosofo))
+(element (refsect1info contractsponsor) (empty-sosofo))
+(element (refsect1info contrib) (empty-sosofo))
+(element (refsect1info copyright) (empty-sosofo))
+(element (refsect1info corpauthor) (empty-sosofo))
+(element (refsect1info corpname) (empty-sosofo))
+(element (refsect1info date) (empty-sosofo))
+(element (refsect1info edition) (empty-sosofo))
+(element (refsect1info editor) (empty-sosofo))
+(element (refsect1info firstname) (empty-sosofo))
+(element (refsect1info graphic) (empty-sosofo))
+(element (refsect1info honorific) (empty-sosofo))
+(element (refsect1info invpartnumber) (empty-sosofo))
+(element (refsect1info isbn) (empty-sosofo))
+(element (refsect1info issn) (empty-sosofo))
+(element (refsect1info issuenum) (empty-sosofo))
+(element (refsect1info itermset) (empty-sosofo))
+(element (refsect1info keywordset) (empty-sosofo))
+(element (refsect1info legalnotice) (empty-sosofo))
+(element (refsect1info lineage) (empty-sosofo))
+(element (refsect1info modespec) (empty-sosofo))
+(element (refsect1info orgname) (empty-sosofo))
+(element (refsect1info othercredit) (empty-sosofo))
+(element (refsect1info othername) (empty-sosofo))
+(element (refsect1info pagenums) (empty-sosofo))
+(element (refsect1info printhistory) (empty-sosofo))
+(element (refsect1info productname) (empty-sosofo))
+(element (refsect1info productnumber) (empty-sosofo))
+(element (refsect1info pubdate) (empty-sosofo))
+(element (refsect1info publisher) (empty-sosofo))
+(element (refsect1info publishername) (empty-sosofo))
+(element (refsect1info pubsnumber) (empty-sosofo))
+(element (refsect1info releaseinfo) (empty-sosofo))
+(element (refsect1info revhistory) (empty-sosofo))
+(element (refsect1info seriesvolnums) (empty-sosofo))
+(element (refsect1info subjectset) (empty-sosofo))
+(element (refsect1info subtitle) (empty-sosofo))
+(element (refsect1info surname) (empty-sosofo))
+(element (refsect1info title) (empty-sosofo))
+(element (refsect1info titleabbrev) (empty-sosofo))
+(element (refsect1info volumenum) (empty-sosofo))
+
+(element refsect2info (process-children))
+
+(element (refsect2info abbrev) (empty-sosofo))
+(element (refsect2info abstract) (empty-sosofo))
+(element (refsect2info address) (empty-sosofo))
+(element (refsect2info affiliation) (empty-sosofo))
+(element (refsect2info artpagenums) (empty-sosofo))
+(element (refsect2info author) (empty-sosofo))
+(element (refsect2info authorblurb) (empty-sosofo))
+(element (refsect2info authorgroup) (empty-sosofo))
+(element (refsect2info authorinitials) (empty-sosofo))
+(element (refsect2info bibliomisc) (empty-sosofo))
+(element (refsect2info biblioset) (empty-sosofo))
+(element (refsect2info collab) (empty-sosofo))
+(element (refsect2info confgroup) (empty-sosofo))
+(element (refsect2info contractnum) (empty-sosofo))
+(element (refsect2info contractsponsor) (empty-sosofo))
+(element (refsect2info contrib) (empty-sosofo))
+(element (refsect2info copyright) (empty-sosofo))
+(element (refsect2info corpauthor) (empty-sosofo))
+(element (refsect2info corpname) (empty-sosofo))
+(element (refsect2info date) (empty-sosofo))
+(element (refsect2info edition) (empty-sosofo))
+(element (refsect2info editor) (empty-sosofo))
+(element (refsect2info firstname) (empty-sosofo))
+(element (refsect2info graphic) (empty-sosofo))
+(element (refsect2info honorific) (empty-sosofo))
+(element (refsect2info invpartnumber) (empty-sosofo))
+(element (refsect2info isbn) (empty-sosofo))
+(element (refsect2info issn) (empty-sosofo))
+(element (refsect2info issuenum) (empty-sosofo))
+(element (refsect2info itermset) (empty-sosofo))
+(element (refsect2info keywordset) (empty-sosofo))
+(element (refsect2info legalnotice) (empty-sosofo))
+(element (refsect2info lineage) (empty-sosofo))
+(element (refsect2info modespec) (empty-sosofo))
+(element (refsect2info orgname) (empty-sosofo))
+(element (refsect2info othercredit) (empty-sosofo))
+(element (refsect2info othername) (empty-sosofo))
+(element (refsect2info pagenums) (empty-sosofo))
+(element (refsect2info printhistory) (empty-sosofo))
+(element (refsect2info productname) (empty-sosofo))
+(element (refsect2info productnumber) (empty-sosofo))
+(element (refsect2info pubdate) (empty-sosofo))
+(element (refsect2info publisher) (empty-sosofo))
+(element (refsect2info publishername) (empty-sosofo))
+(element (refsect2info pubsnumber) (empty-sosofo))
+(element (refsect2info releaseinfo) (empty-sosofo))
+(element (refsect2info revhistory) (empty-sosofo))
+(element (refsect2info seriesvolnums) (empty-sosofo))
+(element (refsect2info subjectset) (empty-sosofo))
+(element (refsect2info subtitle) (empty-sosofo))
+(element (refsect2info surname) (empty-sosofo))
+(element (refsect2info title) (empty-sosofo))
+(element (refsect2info titleabbrev) (empty-sosofo))
+(element (refsect2info volumenum) (empty-sosofo))
+
+(element refsect3info (process-children))
+
+(element (refsect3info abbrev) (empty-sosofo))
+(element (refsect3info abstract) (empty-sosofo))
+(element (refsect3info address) (empty-sosofo))
+(element (refsect3info affiliation) (empty-sosofo))
+(element (refsect3info artpagenums) (empty-sosofo))
+(element (refsect3info author) (empty-sosofo))
+(element (refsect3info authorblurb) (empty-sosofo))
+(element (refsect3info authorgroup) (empty-sosofo))
+(element (refsect3info authorinitials) (empty-sosofo))
+(element (refsect3info bibliomisc) (empty-sosofo))
+(element (refsect3info biblioset) (empty-sosofo))
+(element (refsect3info collab) (empty-sosofo))
+(element (refsect3info confgroup) (empty-sosofo))
+(element (refsect3info contractnum) (empty-sosofo))
+(element (refsect3info contractsponsor) (empty-sosofo))
+(element (refsect3info contrib) (empty-sosofo))
+(element (refsect3info copyright) (empty-sosofo))
+(element (refsect3info corpauthor) (empty-sosofo))
+(element (refsect3info corpname) (empty-sosofo))
+(element (refsect3info date) (empty-sosofo))
+(element (refsect3info edition) (empty-sosofo))
+(element (refsect3info editor) (empty-sosofo))
+(element (refsect3info firstname) (empty-sosofo))
+(element (refsect3info graphic) (empty-sosofo))
+(element (refsect3info honorific) (empty-sosofo))
+(element (refsect3info invpartnumber) (empty-sosofo))
+(element (refsect3info isbn) (empty-sosofo))
+(element (refsect3info issn) (empty-sosofo))
+(element (refsect3info issuenum) (empty-sosofo))
+(element (refsect3info itermset) (empty-sosofo))
+(element (refsect3info keywordset) (empty-sosofo))
+(element (refsect3info legalnotice) (empty-sosofo))
+(element (refsect3info lineage) (empty-sosofo))
+(element (refsect3info modespec) (empty-sosofo))
+(element (refsect3info orgname) (empty-sosofo))
+(element (refsect3info othercredit) (empty-sosofo))
+(element (refsect3info othername) (empty-sosofo))
+(element (refsect3info pagenums) (empty-sosofo))
+(element (refsect3info printhistory) (empty-sosofo))
+(element (refsect3info productname) (empty-sosofo))
+(element (refsect3info productnumber) (empty-sosofo))
+(element (refsect3info pubdate) (empty-sosofo))
+(element (refsect3info publisher) (empty-sosofo))
+(element (refsect3info publishername) (empty-sosofo))
+(element (refsect3info pubsnumber) (empty-sosofo))
+(element (refsect3info releaseinfo) (empty-sosofo))
+(element (refsect3info revhistory) (empty-sosofo))
+(element (refsect3info seriesvolnums) (empty-sosofo))
+(element (refsect3info subjectset) (empty-sosofo))
+(element (refsect3info subtitle) (empty-sosofo))
+(element (refsect3info surname) (empty-sosofo))
+(element (refsect3info title) (empty-sosofo))
+(element (refsect3info titleabbrev) (empty-sosofo))
+(element (refsect3info volumenum) (empty-sosofo))
+
+(element seriesinfo (process-children))
+
+(element (seriesinfo abbrev) (empty-sosofo))
+(element (seriesinfo abstract) (empty-sosofo))
+(element (seriesinfo address) (empty-sosofo))
+(element (seriesinfo affiliation) (empty-sosofo))
+(element (seriesinfo artpagenums) (empty-sosofo))
+(element (seriesinfo author) (empty-sosofo))
+(element (seriesinfo authorblurb) (empty-sosofo))
+(element (seriesinfo authorgroup) (empty-sosofo))
+(element (seriesinfo authorinitials) (empty-sosofo))
+(element (seriesinfo bibliomisc) (empty-sosofo))
+(element (seriesinfo biblioset) (empty-sosofo))
+(element (seriesinfo collab) (empty-sosofo))
+(element (seriesinfo confgroup) (empty-sosofo))
+(element (seriesinfo contractnum) (empty-sosofo))
+(element (seriesinfo contractsponsor) (empty-sosofo))
+(element (seriesinfo contrib) (empty-sosofo))
+(element (seriesinfo copyright) (empty-sosofo))
+(element (seriesinfo corpauthor) (empty-sosofo))
+(element (seriesinfo corpname) (empty-sosofo))
+(element (seriesinfo date) (empty-sosofo))
+(element (seriesinfo edition) (empty-sosofo))
+(element (seriesinfo editor) (empty-sosofo))
+(element (seriesinfo firstname) (empty-sosofo))
+(element (seriesinfo honorific) (empty-sosofo))
+(element (seriesinfo invpartnumber) (empty-sosofo))
+(element (seriesinfo isbn) (empty-sosofo))
+(element (seriesinfo issn) (empty-sosofo))
+(element (seriesinfo issuenum) (empty-sosofo))
+(element (seriesinfo lineage) (empty-sosofo))
+(element (seriesinfo orgname) (empty-sosofo))
+(element (seriesinfo othercredit) (empty-sosofo))
+(element (seriesinfo othername) (empty-sosofo))
+(element (seriesinfo pagenums) (empty-sosofo))
+(element (seriesinfo printhistory) (empty-sosofo))
+(element (seriesinfo productname) (empty-sosofo))
+(element (seriesinfo productnumber) (empty-sosofo))
+(element (seriesinfo pubdate) (empty-sosofo))
+(element (seriesinfo publisher) (empty-sosofo))
+(element (seriesinfo publishername) (empty-sosofo))
+(element (seriesinfo pubsnumber) (empty-sosofo))
+(element (seriesinfo releaseinfo) (empty-sosofo))
+(element (seriesinfo revhistory) (empty-sosofo))
+(element (seriesinfo seriesvolnums) (empty-sosofo))
+(element (seriesinfo subtitle) (empty-sosofo))
+(element (seriesinfo surname) (empty-sosofo))
+(element (seriesinfo title) (empty-sosofo))
+(element (seriesinfo titleabbrev) (empty-sosofo))
+(element (seriesinfo volumenum) (empty-sosofo))
+
+(element artheader (empty-sosofo))
+
+(element (artheader abbrev) (empty-sosofo))
+(element (artheader abstract) (empty-sosofo))
+(element (artheader address) (empty-sosofo))
+(element (artheader affiliation) (empty-sosofo))
+(element (artheader artpagenums) (empty-sosofo))
+(element (artheader author) (empty-sosofo))
+(element (artheader authorblurb) (empty-sosofo))
+(element (artheader authorgroup) (empty-sosofo))
+(element (artheader authorinitials) (empty-sosofo))
+(element (artheader bibliomisc) (empty-sosofo))
+(element (artheader biblioset) (empty-sosofo))
+(element (artheader bookbiblio) (empty-sosofo))
+(element (artheader collab) (empty-sosofo))
+(element (artheader confgroup) (empty-sosofo))
+(element (artheader contractnum) (empty-sosofo))
+(element (artheader contractsponsor) (empty-sosofo))
+(element (artheader contrib) (empty-sosofo))
+(element (artheader copyright) (empty-sosofo))
+(element (artheader corpauthor) (empty-sosofo))
+(element (artheader corpname) (empty-sosofo))
+(element (artheader date) (empty-sosofo))
+(element (artheader edition) (empty-sosofo))
+(element (artheader editor) (empty-sosofo))
+(element (artheader firstname) (empty-sosofo))
+(element (artheader honorific) (empty-sosofo))
+(element (artheader invpartnumber) (empty-sosofo))
+(element (artheader isbn) (empty-sosofo))
+(element (artheader issn) (empty-sosofo))
+(element (artheader issuenum) (empty-sosofo))
+(element (artheader lineage) (empty-sosofo))
+(element (artheader orgname) (empty-sosofo))
+(element (artheader othercredit) (empty-sosofo))
+(element (artheader othername) (empty-sosofo))
+(element (artheader pagenums) (empty-sosofo))
+(element (artheader printhistory) (empty-sosofo))
+(element (artheader productname) (empty-sosofo))
+(element (artheader productnumber) (empty-sosofo))
+(element (artheader pubdate) (empty-sosofo))
+(element (artheader publisher) (empty-sosofo))
+(element (artheader publishername) (empty-sosofo))
+(element (artheader pubsnumber) (empty-sosofo))
+(element (artheader releaseinfo) (empty-sosofo))
+(element (artheader revhistory) (empty-sosofo))
+(element (artheader seriesvolnums) (empty-sosofo))
+(element (artheader subtitle) (empty-sosofo))
+(element (artheader surname) (empty-sosofo))
+(element (artheader title) (empty-sosofo))
+(element (artheader titleabbrev) (empty-sosofo))
+(element (artheader volumenum) (empty-sosofo))
+
+(element articleinfo (empty-sosofo))
+
+(element (articleinfo abbrev) (empty-sosofo))
+(element (articleinfo abstract) (empty-sosofo))
+(element (articleinfo address) (empty-sosofo))
+(element (articleinfo affiliation) (empty-sosofo))
+(element (articleinfo artpagenums) (empty-sosofo))
+(element (articleinfo author) (empty-sosofo))
+(element (articleinfo authorblurb) (empty-sosofo))
+(element (articleinfo authorgroup) (empty-sosofo))
+(element (articleinfo authorinitials) (empty-sosofo))
+(element (articleinfo bibliomisc) (empty-sosofo))
+(element (articleinfo biblioset) (empty-sosofo))
+(element (articleinfo bookbiblio) (empty-sosofo))
+(element (articleinfo collab) (empty-sosofo))
+(element (articleinfo confgroup) (empty-sosofo))
+(element (articleinfo contractnum) (empty-sosofo))
+(element (articleinfo contractsponsor) (empty-sosofo))
+(element (articleinfo contrib) (empty-sosofo))
+(element (articleinfo copyright) (empty-sosofo))
+(element (articleinfo corpauthor) (empty-sosofo))
+(element (articleinfo corpname) (empty-sosofo))
+(element (articleinfo date) (empty-sosofo))
+(element (articleinfo edition) (empty-sosofo))
+(element (articleinfo editor) (empty-sosofo))
+(element (articleinfo firstname) (empty-sosofo))
+(element (articleinfo honorific) (empty-sosofo))
+(element (articleinfo invpartnumber) (empty-sosofo))
+(element (articleinfo isbn) (empty-sosofo))
+(element (articleinfo issn) (empty-sosofo))
+(element (articleinfo issuenum) (empty-sosofo))
+(element (articleinfo lineage) (empty-sosofo))
+(element (articleinfo orgname) (empty-sosofo))
+(element (articleinfo othercredit) (empty-sosofo))
+(element (articleinfo othername) (empty-sosofo))
+(element (articleinfo pagenums) (empty-sosofo))
+(element (articleinfo printhistory) (empty-sosofo))
+(element (articleinfo productname) (empty-sosofo))
+(element (articleinfo productnumber) (empty-sosofo))
+(element (articleinfo pubdate) (empty-sosofo))
+(element (articleinfo publisher) (empty-sosofo))
+(element (articleinfo publishername) (empty-sosofo))
+(element (articleinfo pubsnumber) (empty-sosofo))
+(element (articleinfo releaseinfo) (empty-sosofo))
+(element (articleinfo revhistory) (empty-sosofo))
+(element (articleinfo seriesvolnums) (empty-sosofo))
+(element (articleinfo subtitle) (empty-sosofo))
+(element (articleinfo surname) (empty-sosofo))
+(element (articleinfo title) (empty-sosofo))
+(element (articleinfo titleabbrev) (empty-sosofo))
+(element (articleinfo volumenum) (empty-sosofo))
+
+(element refsynopsisdivinfo (process-children))
+
+(element (refsynopsisdivinfo graphic) (empty-sosofo))
+(element (refsynopsisdivinfo legalnotice) (empty-sosofo))
+(element (refsynopsisdivinfo modespec) (empty-sosofo))
+(element (refsynopsisdivinfo subjectset) (empty-sosofo))
+(element (refsynopsisdivinfo keywordset) (empty-sosofo))
+(element (refsynopsisdivinfo itermset) (empty-sosofo))
+(element (refsynopsisdivinfo abbrev) (empty-sosofo))
+(element (refsynopsisdivinfo abstract) (empty-sosofo))
+(element (refsynopsisdivinfo address) (empty-sosofo))
+(element (refsynopsisdivinfo artpagenums) (empty-sosofo))
+(element (refsynopsisdivinfo author) (empty-sosofo))
+(element (refsynopsisdivinfo authorgroup) (empty-sosofo))
+(element (refsynopsisdivinfo authorinitials) (empty-sosofo))
+(element (refsynopsisdivinfo bibliomisc) (empty-sosofo))
+(element (refsynopsisdivinfo biblioset) (empty-sosofo))
+(element (refsynopsisdivinfo collab) (empty-sosofo))
+(element (refsynopsisdivinfo confgroup) (empty-sosofo))
+(element (refsynopsisdivinfo contractnum) (empty-sosofo))
+(element (refsynopsisdivinfo contractsponsor) (empty-sosofo))
+(element (refsynopsisdivinfo copyright) (empty-sosofo))
+(element (refsynopsisdivinfo corpauthor) (empty-sosofo))
+(element (refsynopsisdivinfo corpname) (empty-sosofo))
+(element (refsynopsisdivinfo date) (empty-sosofo))
+(element (refsynopsisdivinfo edition) (empty-sosofo))
+(element (refsynopsisdivinfo editor) (empty-sosofo))
+(element (refsynopsisdivinfo invpartnumber) (empty-sosofo))
+(element (refsynopsisdivinfo isbn) (empty-sosofo))
+(element (refsynopsisdivinfo issn) (empty-sosofo))
+(element (refsynopsisdivinfo issuenum) (empty-sosofo))
+(element (refsynopsisdivinfo orgname) (empty-sosofo))
+(element (refsynopsisdivinfo othercredit) (empty-sosofo))
+(element (refsynopsisdivinfo pagenums) (empty-sosofo))
+(element (refsynopsisdivinfo printhistory) (empty-sosofo))
+(element (refsynopsisdivinfo productname) (empty-sosofo))
+(element (refsynopsisdivinfo productnumber) (empty-sosofo))
+(element (refsynopsisdivinfo pubdate) (empty-sosofo))
+(element (refsynopsisdivinfo publisher) (empty-sosofo))
+(element (refsynopsisdivinfo publishername) (empty-sosofo))
+(element (refsynopsisdivinfo pubsnumber) (empty-sosofo))
+(element (refsynopsisdivinfo releaseinfo) (empty-sosofo))
+(element (refsynopsisdivinfo revhistory) (empty-sosofo))
+(element (refsynopsisdivinfo seriesvolnums) (empty-sosofo))
+(element (refsynopsisdivinfo subtitle) (empty-sosofo))
+(element (refsynopsisdivinfo title) (empty-sosofo))
+(element (refsynopsisdivinfo titleabbrev) (empty-sosofo))
+(element (refsynopsisdivinfo volumenum) (empty-sosofo))
+(element (refsynopsisdivinfo honorific) (empty-sosofo))
+(element (refsynopsisdivinfo firstname) (empty-sosofo))
+(element (refsynopsisdivinfo surname) (empty-sosofo))
+(element (refsynopsisdivinfo lineage) (empty-sosofo))
+(element (refsynopsisdivinfo othername) (empty-sosofo))
+(element (refsynopsisdivinfo affiliation) (empty-sosofo))
+(element (refsynopsisdivinfo authorblurb) (empty-sosofo))
+(element (refsynopsisdivinfo contrib) (empty-sosofo))
+
+(element appendixinfo (empty-sosofo))
+(element bibliographyinfo (empty-sosofo))
+(element chapterinfo (empty-sosofo))
+(element glossaryinfo (empty-sosofo))
+(element indexinfo (empty-sosofo))
+(element partinfo (empty-sosofo))
+(element prefaceinfo (empty-sosofo))
+(element refentryinfo (empty-sosofo))
+(element referenceinfo (empty-sosofo))
+(element setindexinfo (empty-sosofo))
+(element sidebarinfo (empty-sosofo))
diff --git a/html/dbinline.dsl b/html/dbinline.dsl
new file mode 100644 (file)
index 0000000..2f274b9
--- /dev/null
@@ -0,0 +1,312 @@
+;; $Id: dbinline.dsl,v 1.11 2004/09/14 14:47:10 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================== INLINES ===============================
+
+(element abbrev (if %html40%
+                    ($abbr-seq$)
+                    ($charseq$)))
+(element acronym (if %html40%
+                     ($acronym-seq$)
+                     ($charseq$)))
+(element accel ($charseq$))
+(element action ($charseq$))
+(element application ($charseq$))
+(element classname ($code-seq$))
+(element constant ($code-seq$))
+(element command ($bold-seq$))
+(element computeroutput ($samp-seq$))
+(element database ($charseq$))
+
+(element email 
+  ($code-seq$ 
+   (make sequence 
+     (literal "&#60;")
+     (make element gi: "A"
+          attributes: (list (list "HREF" 
+                                  (string-append "mailto:" 
+                                                 (data (current-node)))))
+          (process-children))
+     (literal "&#62;"))))
+
+(element errorcode ($charseq$))
+(element errorname ($charseq$))
+(element errortype ($charseq$))
+(element envar ($code-seq$))
+(element filename ($mono-seq$))         ; unsure
+(element function ($code-seq$))
+(element guibutton ($charseq$))
+(element guiicon ($charseq$))
+(element guilabel ($charseq$))
+(element guimenu ($charseq$))
+(element guimenuitem ($charseq$))
+(element guisubmenu ($charseq$))
+(element hardware ($charseq$))
+(element interface ($charseq$))
+(element interfacedefinition ($charseq$))
+(element keycap ($bold-seq$))
+(element keycode ($charseq$))
+
+(element keycombo 
+  (let* ((action (attribute-string (normalize "action")))
+        (joinchar 
+         (cond
+          ((equal? action (normalize "seq")) " ")          ;; space
+          ((equal? action (normalize "simul")) "+")        ;; +
+          ((equal? action (normalize "press")) "-")        ;; ? I don't know
+          ((equal? action (normalize "click")) "-")        ;; ? what to do
+          ((equal? action (normalize "double-click")) "-") ;; ? about the rest
+          ((equal? action (normalize "other")) "-")        ;; ? of these
+          (else "-"))))
+    (let loop ((nl (children (current-node))) (count 1))
+      (if (node-list-empty? nl)
+         (empty-sosofo)
+         (if (equal? count 1)
+             (make sequence
+               (process-node-list (node-list-first nl))
+               (loop (node-list-rest nl) (+ count 1)))
+             (make sequence
+               (literal joinchar)
+               (process-node-list (node-list-first nl))
+               (loop (node-list-rest nl) (+ count 1))))))))
+
+(element keysym ($charseq$))
+(element literal ($mono-seq$))
+(element medialabel ($italic-seq$))
+
+(element menuchoice
+  (let* ((shortcut (select-elements (children (current-node)) 
+                                   (normalize "shortcut")))
+        (items    (node-list-filter-by-not-gi
+                   (children (current-node))
+                   (list (normalize "shortcut")))))
+    (make sequence
+      (let loop ((nl items) (first? #t))
+       (if (node-list-empty? nl)
+           (empty-sosofo)
+           (make sequence
+             (if first?
+                 (process-node-list (node-list-first nl))
+                 (make sequence
+                   (if (or (equal? (gi (node-list-first nl))
+                                   (normalize "guimenuitem"))
+                           (equal? (gi (node-list-first nl))
+                                   (normalize "guisubmenu")))
+                       (make sequence
+                         (literal "-")
+                         (make entity-ref name: "gt"))
+                       (literal "+"))
+                   (process-node-list (node-list-first nl))))
+             (loop (node-list-rest nl) #f))))
+      (if (node-list-empty? shortcut)
+         (empty-sosofo)
+         (make sequence
+           (literal " (")
+           (process-node-list shortcut)
+           (literal ")"))))))
+
+(element methodname ($code-seq$))
+(element shortcut ($bold-seq$))
+(element mousebutton ($charseq$))
+(element option ($code-seq$))
+
+(element optional 
+  (make sequence 
+    (literal %arg-choice-opt-open-str%)
+    ($charseq$)
+    (literal %arg-choice-opt-close-str%)))
+
+(element parameter ($code-seq$))
+(element property ($charseq$))
+(element prompt ($samp-seq$))
+(element replaceable ($italic-mono-seq$))
+(element returnvalue ($charseq$))
+(element structfield ($code-seq$))
+(element structname ($code-seq$))
+(element symbol ($code-seq$))
+(element systemitem ($charseq$))        ; ambiguous, should look at class
+(element token ($charseq$))
+(element type ($charseq$))              ; ambiguous
+(element userinput ($kbd-seq$))
+(element varname ($code-seq$))
+
+(element citation 
+  (if biblio-citation-check
+      (let* ((bgraphies (select-elements (descendants (sgml-root-element))
+                                        (normalize "bibliography")))
+            (bchildren1 (expand-children bgraphies
+                                         (list (normalize "bibliography"))))
+            (bchildren2 (expand-children bchildren1
+                                         (list (normalize "bibliodiv"))))
+            (bibentries (node-list-filter-by-gi 
+                         bchildren2
+                         (list (normalize "biblioentry")
+                               (normalize "bibliomixed")))))
+       (let loop ((bibs bibentries))
+         (if (node-list-empty? bibs)
+             (make sequence
+               (error (string-append "Cannot find citation: " 
+                                     (data (current-node))))
+               (literal "[") ($charseq$) (literal "]"))
+             (if (citation-matches-target? (current-node) 
+                                           (node-list-first bibs))
+                 (make element gi: "A"
+                       attributes: (list 
+                                    (list "HREF" (href-to 
+                                                  (node-list-first bibs))))
+                       (literal "[") ($charseq$) (literal "]"))
+                 (loop (node-list-rest bibs))))))
+      (make sequence 
+       (literal "[") ($charseq$) (literal "]"))))
+
+(element citerefentry
+  (if %citerefentry-link%
+      (make element gi: "A"
+           attributes: (list (list "HREF" ($generate-citerefentry-link$)))
+           (if %refentry-xref-italic%
+               ($italic-seq$)
+               ($charseq$)))
+      (if %refentry-xref-italic%
+         ($italic-seq$)
+         ($charseq$))))
+
+(define ($generate-citerefentry-link$)
+  (empty-sosofo))
+
+(define ($x-generate-citerefentry-link$)
+  (let* ((refentrytitle (select-elements (children (current-node))
+                                        (normalize "refentrytitle")))
+        (manvolnum (select-elements (children (current-node))
+                                    (normalize "manvolnum"))))
+    (string-append "http://example.com/cgi-bin/man.cgi?"
+                  (data refentrytitle)
+                  "("
+                  (data manvolnum)
+                  ")")))
+
+(element citetitle
+  (if (equal? (attribute-string (normalize "pubwork")) "article")
+      (make sequence
+       (literal (gentext-start-quote))
+       (process-children)
+       (literal (gentext-end-quote)))
+      ($italic-seq$)))
+
+(element emphasis
+  (let* ((class (if (and (attribute-string (normalize "role"))
+                        %emphasis-propagates-style%)
+                   (attribute-string (normalize "role"))
+                   "emphasis")))
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" class))
+         (if (and (attribute-string (normalize "role"))
+                  (or (equal? (attribute-string (normalize "role")) "strong")
+                      (equal? (attribute-string (normalize "role")) "bold")))
+             ($bold-seq$)
+             ($italic-seq$)))))
+
+(element foreignphrase ($italic-seq$))
+(element markup ($charseq$))
+
+(element phrase
+  (let* ((class (if (and (attribute-string (normalize "role"))
+                        %phrase-propagates-style%)
+                   (attribute-string (normalize "role"))
+                   "phrase")))
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" class))
+         ($charseq$))))
+
+(element quote
+  (let* ((hnr   (hierarchical-number-recursive (normalize "quote") 
+                                              (current-node)))
+        (depth (length hnr)))
+    (make element gi: "SPAN"
+         attributes: '(("CLASS" "QUOTE"))
+         (if (equal? (modulo depth 2) 1)
+             (make sequence
+               (literal (gentext-start-nested-quote))
+               (process-children)
+               (literal (gentext-end-nested-quote)))
+             (make sequence
+               (literal (gentext-start-quote))
+               (process-children)
+               (literal (gentext-end-quote)))))))
+
+(element sgmltag
+  (let ((class (if (attribute-string (normalize "class"))
+                  (attribute-string (normalize "class"))
+                  (normalize "element"))))
+<![CDATA[
+  (cond
+   ((or (equal? class (normalize "attribute"))
+        (equal? class (normalize "attvalue"))
+        (equal? class (normalize "element"))) ($code-seq$))
+   ((equal? class (normalize "endtag")) ($code-seq$ (make sequence 
+                                                     (literal "</") 
+                                                     (process-children)
+                                                     (literal ">"))))
+   ((equal? class (normalize "genentity")) ($code-seq$ (make sequence
+                                                        (literal "&")
+                                                        (process-children)
+                                                        (literal ";"))))
+   ((equal? class (normalize "numcharref")) ($code-seq$ (make sequence
+                                                         (literal "&#")
+                                                         (process-children)
+                                                         (literal ";"))))
+   ((equal? class (normalize "paramentity")) ($code-seq$ (make sequence
+                                                          (literal "%")
+                                                          (process-children)
+                                                          (literal ";"))))
+   ((equal? class (normalize "pi")) ($code-seq$ (make sequence 
+                                                 (literal "<?")
+                                                 (process-children)
+                                                 (literal ">"))))
+   ((equal? class (normalize "xmlpi")) ($code-seq$ (make sequence 
+                                                 (literal "<?")
+                                                 (process-children)
+                                                 (literal "?>"))))
+   ((equal? class (normalize "starttag")) ($code-seq$ (make sequence 
+                                                       (literal "<") 
+                                                       (process-children)
+                                                       (literal ">"))))
+   ((equal? class (normalize "emptytag")) ($code-seq$ (make sequence 
+                                                       (literal "<") 
+                                                       (process-children)
+                                                       (literal "/>"))))
+   ((equal? class (normalize "sgmlcomment")) ($code-seq$ (make sequence 
+                                                          (literal "<!--")
+                                                          (process-children)
+                                                          (literal "-->"))))
+]]>
+  (else ($charseq$)))))
+
+(element trademark
+  (make sequence
+    ($charseq$)
+    (cond
+     ((equal? (attribute-string "class") (normalize "copyright"))
+      (make entity-ref name: "copy"))
+     ((equal? (attribute-string "class") (normalize "registered"))
+      (make entity-ref name: "reg"))
+     ((equal? (attribute-string "class") (normalize "service"))
+      (make element gi: "SUP"
+           (literal "SM")))
+     (else
+      (make entity-ref name: "#8482")))))
+
+(element wordasword ($italic-seq$))
+
+(element lineannotation
+  (process-children))
+
+(element superscript 
+  (make element gi: "SUP"
+       (process-children)))
+
+(element subscript
+  (make element gi: "SUB"
+       (process-children)))
diff --git a/html/dblink.dsl b/html/dblink.dsl
new file mode 100644 (file)
index 0000000..2f9c2cc
--- /dev/null
@@ -0,0 +1,433 @@
+;; $Id: dblink.dsl,v 1.6 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================= LINKS AND ANCHORS ==========================
+
+(element link
+  (let* ((endterm (attribute-string (normalize "endterm")))
+        (linkend (attribute-string (normalize "linkend")))
+        (target  (element-with-id linkend))
+        (etarget (if endterm 
+                     (element-with-id endterm)
+                     (empty-node-list))))
+    ;; It isn't necessary to catch either of these errors. The normal
+    ;; ID/IDREF processing in Jade will catch them, and if -wno-idref
+    ;; is used, then it's your gun, your bullet, and your foot.
+;;      (if (node-list-empty? target) 
+;;       (error (string-append "Link to missing ID '" linkend "'"))
+;;       (empty-sosofo))
+;;      (if (and endterm (node-list-empty? etarget))
+;;       (error (string-append "EndTerm to missing ID '" endterm "' on Link"))
+;;       (empty-sosofo))
+    (if (node-list-empty? target)
+       (process-children)
+       (make element gi: "A"
+             attributes: (list (list "HREF" (href-to target)))
+             (if (and endterm (not (node-list-empty? etarget)))
+                 (with-mode xref-endterm-mode (process-node-list etarget))
+                 (process-children))))))
+
+(element ulink 
+  (make element gi: "A"
+       attributes: (list
+                    (list "HREF" (attribute-string (normalize "url")))
+                    (list "TARGET" "_top"))
+       (if (node-list-empty? (children (current-node)))
+           (literal (attribute-string (normalize "url")))
+           (process-children))))
+
+(element anchor
+  (make element gi: "A"
+       attributes: (list
+                    (list "NAME" (attribute-string (normalize "id"))))
+       (empty-sosofo)))
+
+(element beginpage (empty-sosofo))
+
+;; ======================================================================
+
+(define (olink-link)
+  ;; This is an olink without a TARGETDOCENT, treat it as a link within
+  ;; the same document.
+  (let* ((localinfo (normalize (attribute-string (normalize "localinfo"))))
+        (target    (element-with-id localinfo))
+        (linkmode  (attribute-string (normalize "linkmode")))
+        (modespec  (if linkmode (element-with-id linkmode) (empty-node-list)))
+        (xreflabel (if (node-list-empty? modespec)
+                       #f
+                       (attribute-string (normalize "xreflabel") modespec)))
+        (href      (if (node-list-empty? target)
+                       (error 
+                        (string-append "OLink to missing ID '" localinfo "'"))
+                       (href-to target)))
+        (linktext  (strip (data-of (current-node)))))
+    (make element gi: "A"
+         attributes: (list (list "HREF" href)
+                           (list "CLASS" "OLINK"))
+         (if (equal? linktext "")
+             (if xreflabel
+                 (xref-general target xreflabel)
+                 (xref-general target))
+             (process-children)))))
+
+(define (olink-href target modespec)
+  (let* ((pubid     (entity-public-id target))
+        (sysid     (system-id-filename target))
+        (localinfo (normalize (attribute-string (normalize "localinfo"))))
+        (qident    (if pubid
+                       (string-append %olink-pubid% (url-encode-string pubid))
+                       (string-append %olink-sysid% (url-encode-string sysid))))
+        (qfragid   (if localinfo
+                       (string-append %olink-fragid% 
+                                      (url-encode-string localinfo))
+                       ""))
+        (lb-href   (string-append %olink-resolution% qident qfragid))
+        (modetext  (if (node-list-empty? modespec) "" (data-of modespec)))
+        (href      (if (equal? (strip modetext) "")
+                       lb-href
+                       (if localinfo
+                           (string-append 
+                            modetext "#" (url-encode-string localinfo))
+                           modetext))))
+    href))
+
+(define (olink-simple)
+  ;; Assumptions: 
+  ;; - The TARGETDOCENT is identified by a public ID
+  ;; - LOLCALINFO contains the ID value (i.e. HREF fragment identifier) of
+  ;;   the target resource
+  ;; - If the element has no content, the title extracted by
+  ;;   (olink-resource-title) should be used
+  ;; - The (olink-resource-title) function can deduce the title from
+  ;;   the pubid and the sysid
+  ;; - %olink-resolution% is the prefix to use on URLs (to point to a 
+  ;;   cgi-bin script, or whatever you can make work for you)
+  ;; - %olink-pubid% identifies the pubid in the query
+  ;; - %olink-fragid% identifies the fragment identifier in the query
+  (let* ((target   (attribute-string (normalize "targetdocent")))
+        (pubid    (entity-public-id target))
+        (sysid    (system-id-filename target))
+        (title    (olink-resource-title pubid sysid))
+        (href     (olink-href target (empty-node-list)))
+        (linktext (strip (data-of (current-node)))))
+    (make element gi: "A"
+         attributes: (list (list "HREF" href)
+                           (list "CLASS" "OLINK"))
+         (if (equal? linktext "")
+             (make element gi: "I" (literal title))
+             (process-children)))))
+
+(define (olink-outline-xref olroot target linktext)
+  (let* ((name  (attribute-string (normalize "name") target))
+        (label (attribute-string (normalize "label") target))
+        (title (select-elements (children target) (normalize "ttl")))
+        (substitute (list
+                     (list "%g" (if name (literal name) (literal "")))
+                     (list "%n" (if label (literal label) (literal "")))
+                     (list "%t" (with-mode olink-title-mode
+                                  (process-node-list title)))))
+        (tlist   (match-split-list linktext (assoc-objs substitute))))
+    (string-list-sosofo tlist substitute)))
+
+(define (olink-outline)
+  (let* ((target    (attribute-string (normalize "targetdocent")))
+        (localinfo (normalize (attribute-string (normalize "localinfo"))))
+        (sysid     (entity-generated-system-id target))
+        (basename  (trim-string sysid '(".sgm" ".xml" ".sgml")))
+        (olinkfile (string-append basename %olink-outline-ext%))
+        (olinkdoc  (sgml-parse olinkfile))
+        (olinkroot (node-property 'document-element olinkdoc))
+        (olnode    (if localinfo
+                       (element-with-id localinfo olinkroot)
+                       olinkroot))
+        (linkmode  (attribute-string (normalize "linkmode")))
+        (modespec  (if linkmode (element-with-id linkmode) (empty-node-list)))
+        (xreflabel (if (node-list-empty? modespec)
+                       ""
+                       (attribute-string (normalize "xreflabel") modespec)))
+        (href      (if (equal? (attribute-string (normalize "type")) "href")
+                       (attribute-string (normalize "href") olnode)
+                       (olink-href target modespec)))
+        (linktext  (strip (data-of (current-node)))))
+    (make element gi: "A"
+         attributes: (list (list "HREF" href)
+                           (list "CLASS" "OLINK"))
+         (if (equal? linktext "")
+             (olink-outline-xref olinkroot olnode xreflabel)
+             (process-children)))))
+
+(element olink
+  (if (not (attribute-string (normalize "targetdocent")))
+      (olink-link)
+      (if (attribute-string (normalize "linkmode"))
+         (olink-outline)
+         (olink-simple))))
+
+(mode olink-title-mode
+  (default (process-children))
+
+  (element ttl
+    (make element gi: "I"
+         (process-children)))
+
+  (element it
+    (make element gi: "I"
+         (process-children)))
+
+  (element tt
+    (make element gi: "TT"
+         (process-children)))
+
+  (element sub 
+    (make element gi: "SUB"
+         (process-children)))
+
+  (element sup 
+    (make element gi: "SUP"
+         (process-children)))
+)
+
+;; ======================================================================
+
+(element xref
+  (let* ((endterm   (attribute-string (normalize "endterm")))
+        (linkend   (attribute-string (normalize "linkend")))
+        (target    (element-with-id linkend))
+        (xreflabel (if (node-list-empty? target)
+                       #f
+                       (attribute-string (normalize "xreflabel") target))))
+    (if (node-list-empty? target)
+       (error (string-append "XRef LinkEnd to missing ID '" linkend "'"))
+       (make element gi: "A"
+             attributes: (list
+                          (list "HREF" (href-to target)))
+             (if xreflabel
+                 (literal xreflabel)
+                 (if endterm
+                     (if (node-list-empty? (element-with-id endterm))
+                         (error (string-append
+                                 "XRef EndTerm to missing ID '" 
+                                 endterm "'"))
+                         (with-mode xref-endterm-mode
+                           (process-node-list (element-with-id endterm))))
+                     (cond
+                      ((or (equal? (gi target) (normalize "biblioentry"))
+                           (equal? (gi target) (normalize "bibliomixed")))
+                       ;; xref to the bibliography is a special case
+                       (xref-biblioentry target))
+                      ((equal? (gi target) (normalize "co"))
+                       ;; callouts are a special case
+                       ($callout-mark$ target #f))
+                      ((equal? (gi target) (normalize "listitem"))
+                       ;; listitems are a special case
+                       (if (equal? (gi (parent target)) (normalize "orderedlist"))
+                           (literal (orderedlist-listitem-label-recursive target))
+                           (error (string-append "XRef to LISTITEM only supported in ORDEREDLISTs"))))
+                      ((equal? (gi target) (normalize "varlistentry"))
+                       (xref-varlistentry target))
+                      ((equal? (gi target) (normalize "question"))
+                       ;; questions and answers are (yet another) special case
+                       (make sequence
+                         (literal (gentext-element-name target))
+                         (literal (gentext-label-title-sep target))
+                         (literal (question-answer-label target))))
+                      ((equal? (gi target) (normalize "answer"))
+                       ;; questions and answers are (yet another) special case
+                       (make sequence
+                         (literal (gentext-element-name target))
+                         (literal (gentext-label-title-sep target))
+                         (literal (question-answer-label target))))
+                      ((equal? (gi target) (normalize "refentry"))
+                       ;; so are refentrys
+                       (xref-refentry target))
+                      ((equal? (gi target) (normalize "refnamediv"))
+                       ;; and refnamedivs
+                       (xref-refnamediv target))
+                      ((equal? (gi target) (normalize "glossentry"))
+                       ;; as are glossentrys
+                       (xref-glossentry target))
+                      ((equal? (gi target) (normalize "author"))
+                       ;; and authors
+                       (xref-author target))
+                      ((equal? (gi target) (normalize "authorgroup"))
+                       ;; and authorgroups
+                       (xref-authorgroup target))
+; this doesn't really work very well yet
+;                     ((equal? (gi target) (normalize "substeps"))
+;                      ;; and substeps
+;                      (xref-substeps target))
+                      (else 
+                       (xref-general target)))))))))
+
+(define (xref-refentry target)
+;; refmeta/refentrytitle, refmeta/manvolnum, refnamediv/refdescriptor, 
+;; refnamediv/refname
+  (let* ((refmeta    (select-elements (children target)
+                                     (normalize "refmeta")))
+        (refnamediv (select-elements (children target)
+                                     (normalize "refnamediv")))
+        (rfetitle   (select-elements (children refmeta) 
+                                     (normalize "refentrytitle")))
+        (manvolnum  (select-elements (children refmeta)
+                                     (normalize "manvolnum")))
+        (refdescrip (select-elements (children refnamediv)
+                                     (normalize "refdescriptor")))
+        (refname    (select-elements (children refnamediv)
+                                     (normalize "refname")))
+
+        (title      (if (node-list-empty? rfetitle)
+                        (if (node-list-empty? refdescrip)
+                            (node-list-first refname)
+                            (node-list-first refdescrip))
+                        (node-list-first rfetitle)))
+
+        (xsosofo    (make sequence
+                      (process-node-list (children title))
+                      (if (and %refentry-xref-manvolnum%
+                               (not (node-list-empty? manvolnum)))
+                          (process-node-list manvolnum)
+                          (empty-sosofo)))))
+
+    (make sequence
+      (if %refentry-xref-italic%
+         (make element gi: "I"
+               xsosofo)
+         xsosofo))))
+
+(define (xref-refnamediv target)
+  (let* ((refname    (select-elements (children target)
+                                     (normalize "refname")))
+
+        (title      (node-list-first refname))
+
+        (xsosofo    (make sequence
+                      (process-node-list (children title)))))
+    (make sequence
+      (if %refentry-xref-italic%
+         (make element gi: "I"
+               xsosofo)
+         xsosofo))))
+
+(define (xref-varlistentry target)
+  (let ((terms (select-elements (children target)
+                               (normalize "term"))))
+    (with-mode xref-varlistentry-mode
+      (process-node-list (node-list-first terms)))))
+
+(define (xref-glossentry target)
+  (let ((glossterms (select-elements (children target)
+                                    (normalize "glossterm"))))
+    (with-mode xref-glossentry-mode
+      (process-node-list (node-list-first glossterms)))))
+
+(define (xref-author target)
+  (literal (author-string target)))
+
+(define (xref-authorgroup target)
+  ;; it's a quirk of author-list-string that it needs to point to
+  ;; one of the authors in the authorgroup, not the authorgroup.
+  ;; go figure.
+  (let loop ((author (select-elements (children target) (normalize "author"))))
+    (if (node-list-empty? author)
+       (empty-sosofo)
+       (make sequence
+         (literal (author-list-string (node-list-first author)))
+         (loop (node-list-rest author))))))
+
+;(define (xref-substeps target)
+;  (let* ((steps (select-elements (children target) (normalize "step")))
+;       (firststep (node-list-first steps))
+;       (laststep (node-list-last steps))
+;       (firstlabel (auto-xref-direct firststep))
+;       (lastlabel (auto-xref-direct laststep "%n")))
+;    (make sequence
+;      firstlabel
+;      (literal "-")
+;      lastlabel)))
+
+(define (xref-general target #!optional (xref-string #f))
+  ;; This function is used by both XREF and OLINK (when no TARGETDOCENT
+  ;; is specified).  The only case where xref-string is supplied is
+  ;; on OLINK.
+  (let ((label (attribute-string (normalize "xreflabel") target)))
+    (if xref-string
+       (auto-xref target xref-string)
+       (if label
+           (xreflabel-sosofo label)
+           (auto-xref target)))))
+
+(define (xref-biblioentry target)
+  (let* ((abbrev (node-list-first 
+                 (node-list-filter-out-pis (children target))))
+        (label  (attribute-string (normalize "xreflabel") target)))
+
+    (if biblio-xref-title
+       (let* ((citetitles (select-elements (descendants target)
+                                           (normalize "citetitle")))
+              (titles     (select-elements (descendants target)
+                                           (normalize "title")))
+              (title      (if (node-list-empty? citetitles)
+                              (node-list-first titles)
+                              (node-list-first citetitles))))
+         (with-mode xref-title-mode
+           (process-node-list title)))
+       (if biblio-number 
+           (make sequence
+             (literal "[" (number->string (bibentry-number target)) "]"))
+           (if label
+               (make sequence
+                 (literal "[" label "]"))
+               (if (equal? (gi abbrev) (normalize "abbrev"))
+                   (make sequence
+                     (process-node-list abbrev))
+                   (make sequence
+                     (literal "[" (id target) "]"))))))))
+
+(mode xref-endterm-mode
+  (default
+    (make element gi: "I"
+         (process-children-trim))))
+
+(define (xreflabel-sosofo xreflabel)
+  (make element gi: "I"
+       (literal xreflabel)))
+
+;; Returns the title of the element as a sosofo, italicized for xref.
+;;
+(define (element-title-xref-sosofo nd)
+  (make element gi: "I"
+       (element-title-sosofo nd)))
+
+(mode xref-title-mode
+  (element title
+    (make element gi: "I"
+         (process-children-trim)))
+
+  (element citetitle
+    (make element gi: "I"
+         (process-children-trim)))
+
+  (element refname
+    (process-children-trim))
+
+  (element refentrytitle
+    (process-children-trim)))
+
+(mode xref-varlistentry-mode
+  (element term
+    ($italic-seq$)))
+
+(mode xref-glossentry-mode
+  (element glossterm
+    ($italic-seq$)))
+
+;; ======================================================================
+
+(define (element-page-number-sosofo target)
+  (literal "???"))
+
+;; ======================================================================
+
diff --git a/html/dblists.dsl b/html/dblists.dsl
new file mode 100644 (file)
index 0000000..1585c2c
--- /dev/null
@@ -0,0 +1,435 @@
+;; $Id: dblists.dsl,v 1.6 2003/04/05 21:39:15 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; =============================== LISTS ================================
+
+(element orderedlist
+  (let* ((depth (length (hierarchical-number-recursive 
+                        (normalize "orderedlist"))))
+        (numeration (attribute-string (normalize "numeration")))
+        (firstitem (node-list-first 
+                    (select-elements (children (current-node))
+                                     (normalize "listitem"))))
+        (start  (orderedlist-listitem-number firstitem))
+        (rawnum (cond
+                 ((equal? numeration (normalize "arabic")) 0)
+                 ((equal? numeration (normalize "loweralpha")) 1)
+                 ((equal? numeration (normalize "lowerroman")) 2)
+                 ((equal? numeration (normalize "upperalpha")) 3)
+                 ((equal? numeration (normalize "upperroman")) 4)
+                 (else (modulo depth 5))))
+        (type (case rawnum
+                ((0) "1")
+                ((1) "a")
+                ((2) "i")
+                ((3) "A")
+                ((4) "I"))))
+    (make sequence
+      (if %spacing-paras%
+         (make element gi: "P" (empty-sosofo))
+         (empty-sosofo))
+      (para-check)
+      (process-node-list (select-elements (children (current-node))
+                                         (normalize "title")))
+      (make element gi: "OL"
+           attributes: (append
+                        (if (equal? start 1)
+                            '()
+                            (list (list "START" (number->string start))))
+                        (if (equal? (attribute-string (normalize "spacing"))
+                                    (normalize "compact"))
+                            '(("COMPACT" "COMPACT"))
+                            '())
+                        (list (list "TYPE" type)))
+           (process-node-list (select-elements (children (current-node))
+                                               (normalize "listitem"))))
+      (para-check 'restart))))
+
+(element (orderedlist title)
+  (make element gi: "P"
+       (make element gi: "B"
+             (process-children))))
+
+(element itemizedlist
+  (make sequence
+    (if %spacing-paras%
+       (make element gi: "P" (empty-sosofo))
+       (empty-sosofo))
+    (para-check)
+    (process-node-list (select-elements (children (current-node))
+                                       (normalize "title")))
+    (make element gi: "UL"
+         attributes: (if (equal? (attribute-string (normalize "spacing")) (normalize "compact"))
+                         '(("COMPACT" "COMPACT"))
+                         '())
+         (process-node-list (select-elements (children (current-node))
+                                             (normalize "listitem"))))
+    (para-check 'restart)))
+
+(element listitem
+  (let* ((override (inherited-attribute-string (normalize "override")))
+        (mark     (inherited-attribute-string (normalize "mark")))
+        (usemark  (if override override mark))
+        (cssmark  (if (and usemark (assoc usemark %css-liststyle-alist%))
+                      (car (cdr (assoc usemark %css-liststyle-alist%)))
+                      usemark))
+        (cssstyle (if (and %css-decoration% cssmark)
+                      (list (list "STYLE" 
+                                  (string-append "list-style-type: "
+                                                 cssmark)))
+                      '())))
+  (make element gi: "LI"
+       attributes: cssstyle
+       (if (attribute-string (normalize "id"))
+           (make element gi: "A"
+                 attributes: (list
+                              (list "NAME" (attribute-string (normalize "id"))))
+                 (empty-sosofo))
+           (empty-sosofo))
+       (process-children))))
+
+(element (orderedlist listitem simpara)
+  (let* ((spacing    (inherited-attribute-string (normalize "spacing")))
+        (listitem   (parent (current-node)))
+        (lichildren (node-list-filter-out-pis
+                     (children listitem)))
+        (childcount (node-list-length lichildren)))
+    (if (and (equal? spacing (normalize "compact"))
+            (equal? childcount 1))
+       ($paragraph$ "SPAN")
+       (next-match))))
+
+(element (itemizedlist listitem simpara)
+  (let* ((spacing    (inherited-attribute-string (normalize "spacing")))
+        (listitem   (parent (current-node)))
+        (lichildren (node-list-filter-out-pis
+                     (children listitem)))
+        (childcount (node-list-length lichildren)))
+    (if (and (equal? spacing (normalize "compact"))
+            (equal? childcount 1))
+       ($paragraph$ "SPAN")
+       (next-match))))
+
+(element variablelist
+  (let* ((termlength (if (attribute-string (normalize "termlength"))
+                        (string->number 
+                         (attribute-string (normalize "termlength")))
+                        %default-variablelist-termlength%))
+        (too-long?  (variablelist-term-too-long? termlength)))
+    (make sequence
+      (if %spacing-paras%
+         (make element gi: "P" (empty-sosofo))
+         (empty-sosofo))
+      (para-check)
+
+      (if (and (or (and termlength (not too-long?))
+                  %always-format-variablelist-as-table%)
+              (or %may-format-variablelist-as-table%
+                  %always-format-variablelist-as-table%))
+         (make element gi: "TABLE"
+               attributes: '(("CLASS" "VARIABLELIST")
+                             ("BORDER" "0")
+                             ("CELLSPACING" "1")
+                             ("CELLPADDING" "1"))
+               (if %html40%
+                   (make element gi: "TBODY"
+                         (with-mode variablelist-table
+                           (process-children)))
+                   (with-mode variablelist-table
+                     (process-children))))
+         (make sequence
+           (make element gi: "DIV"
+                 attributes: (list (list "CLASS" (gi)))
+                 (process-node-list
+                  (select-elements (children (current-node)) 
+                                   (normalize "title")))
+                 (make element gi: "DL"
+                       (process-node-list
+                        (select-elements (children (current-node)) 
+                                         (normalize "varlistentry")))))))
+      (para-check 'restart))))
+
+(element varlistentry
+  (let ((terms    (select-elements (children (current-node)) (normalize "term")))
+       (listitem (select-elements (children (current-node)) (normalize "listitem"))))
+    (make sequence
+      (make element gi: "DT"
+           (if (attribute-string (normalize "id"))
+               (make sequence
+                 (make element gi: "A"
+                       attributes: (list
+                                    (list "NAME" (attribute-string (normalize "id"))))
+                       (empty-sosofo))
+                 (process-node-list terms))
+               (process-node-list terms)))
+      (process-node-list listitem))))
+  
+(element (varlistentry term)
+  (make sequence
+    (process-children-trim)
+    (if (not (last-sibling?))
+       (literal ", ")
+       (literal ""))))
+
+(element (varlistentry listitem)
+  (make element gi: "DD"
+       (process-children)))
+
+(mode variablelist-table
+  (element (variablelist title)
+    (make element gi: "TR"
+         attributes: '(("CLASS" "TITLE"))
+         (make element gi: "TH"
+               attributes: '(("ALIGN" "LEFT")
+                             ("VALIGN" "TOP")
+                             ("COLSPAN" "3"))
+               (process-children))))
+
+  (element varlistentry
+    (let* ((terms      (select-elements (children (current-node))
+                                       (normalize "term")))
+          (listitem   (select-elements (children (current-node))
+                                       (normalize "listitem")))
+          (termlen    (if (attribute-string (normalize "termlength")
+                                            (parent (current-node)))
+                          (string->number (attribute-string
+                                            (normalize "termlength")
+                                            (parent (current-node))))
+                          %default-variablelist-termlength%))
+          (too-long? (varlistentry-term-too-long? (current-node) termlen)))
+      (if too-long?
+         (make sequence
+           (make element gi: "TR"
+                 (make element gi: "TD"
+                       attributes: '(("ALIGN" "LEFT")
+                                     ("VALIGN" "TOP")
+                                     ("COLSPAN" "3"))
+                       (make element gi: "A"
+                             attributes: (list
+                                          (list "NAME" (element-id)))
+                             (empty-sosofo))
+                       (process-node-list terms)))
+           (make element gi: "TR"
+                 (make element gi: "TD"
+                       attributes: '(("ALIGN" "LEFT")
+                                     ("VALIGN" "TOP")
+                                     ("WIDTH" "5"))
+                       ;; where terms would have gone
+                       (make entity-ref name: "nbsp"))
+                 (make element gi: "TD"
+                       attributes: '(("ALIGN" "LEFT")
+                                     ("VALIGN" "TOP")
+                                     ("WIDTH" "5"))
+                       ;; just a little spacer
+                       (make entity-ref name: "nbsp"))
+                 (make element gi: "TD"
+                       attributes: '(("ALIGN" "LEFT")
+                                     ("VALIGN" "TOP"))
+                       (process-node-list listitem))))
+         (make element gi: "TR"
+               (make element gi: "TD"
+                     attributes: '(("ALIGN" "LEFT")
+                                   ("VALIGN" "TOP"))
+                     (make element gi: "A"
+                           attributes: (list
+                                        (list "NAME" (element-id)))
+                           (empty-sosofo))
+                     (process-node-list terms))
+               (make element gi: "TD"
+                     attributes: '(("ALIGN" "LEFT")
+                                   ("VALIGN" "TOP")
+                                   ("WIDTH" "5"))
+                     ;; just a little spacer
+                     (make entity-ref name: "nbsp"))
+               (make element gi: "TD"
+                     attributes: '(("ALIGN" "LEFT")
+                                   ("VALIGN" "TOP"))
+                     (process-node-list listitem))))))
+  
+  (element (varlistentry term)
+    (make sequence
+      (if %css-decoration%
+         (make element gi: "SPAN"
+               attributes: '(("STYLE" "white-space: nowrap"))
+               (process-children-trim))
+         (make element gi: "NOBR"
+               (process-children-trim)))
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element (varlistentry listitem)
+    (process-children))
+)
+
+(define (simplelist-table majororder cols members)
+  (let* ((termcount (node-list-length members))
+        (rows      (quotient (+ termcount (- cols 1)) cols))
+        (htmlrows  (let rowloop ((rownum 1))
+                     (if (> rownum rows)
+                         (empty-sosofo)
+                         (make sequence
+                           (simplelist-row rownum majororder
+                                           rows cols members)
+                           (rowloop (+ rownum 1)))))))
+    (make sequence
+      (if %spacing-paras%
+         (make element gi: "P" (empty-sosofo))
+         (empty-sosofo))
+      (make element gi: "TABLE"
+           attributes: '(("BORDER" "0"))
+           (if %html40%
+               (make element gi: "TBODY"
+                     htmlrows)
+               htmlrows))
+      (if %spacing-paras%
+         (make element gi: "P" (empty-sosofo))
+         (empty-sosofo)))))
+
+(define (simplelist-row rownum majororder rows cols members)
+  (make element gi: "TR"
+       (let colloop ((colnum 1))
+         (if (> colnum cols)
+             (empty-sosofo)
+             (make sequence
+               (simplelist-entry rownum colnum majororder rows cols members)
+               (colloop (+ colnum 1)))))))
+
+(define (simplelist-entry rownum colnum majororder rows cols members)
+  (let ((membernum (if (equal? majororder 'row)
+                      (+ (* (- rownum 1) cols) colnum)
+                      (+ (* (- colnum 1) rows) rownum)))
+       (attlist   (if %simplelist-column-width%
+                      (list (list "WIDTH" %simplelist-column-width%))
+                      '())))
+    (let loop ((nl members) (count membernum))
+      (if (<= count 1)
+         (make element gi: "TD"
+               attributes: attlist
+               (if (node-list-empty? nl)
+                   (make entity-ref name: "nbsp")
+                   (process-node-list (node-list-first nl))))
+         (loop (node-list-rest nl) (- count 1))))))
+
+(element simplelist
+  (let ((type (attribute-string "type"))
+       (cols (if (attribute-string "columns")
+                 (if (> (string->number (attribute-string "columns")) 0)
+                     (string->number (attribute-string "columns"))
+                     1)
+                 1))
+       (members (select-elements (children (current-node)) (normalize "member"))))
+    (cond
+       ((equal? type (normalize "inline")) 
+       (process-children))
+       ((equal? type (normalize "vert"))
+       (simplelist-table 'column cols members))
+       ((equal? type (normalize "horiz"))
+       (simplelist-table 'row    cols members)))))
+
+(element member
+  (let ((type (inherited-attribute-string (normalize "type"))))
+    (if (equal? type (normalize "inline"))
+       (make sequence
+         (process-children-trim)
+         (if (not (last-sibling?))
+             (literal ", ")
+             (literal "")))
+       (process-children))))
+
+(element segmentedlist (process-children))
+(element (segmentedlist title) ($lowtitle$ 6))
+
+(element segtitle (empty-sosofo))
+
+(mode seglist-in-seg
+  (element segtitle
+    (process-children)))
+
+(element seglistitem (process-children))
+(element seg 
+  (let* ((seg-num (child-number (current-node)))
+        (seglist (parent (parent (current-node))))
+        (segtitle (nth-node (select-elements 
+                        (descendants seglist) (normalize "segtitle")) seg-num)))
+
+    ;; Note: segtitle is only going to be the right thing in a well formed
+    ;; SegmentedList.  If there are too many Segs or too few SegTitles,
+    ;; you'll get something odd...maybe an error
+
+    (with-mode seglist-in-seg
+      (make element gi: "P"
+           (make element gi: "B"
+                 (sosofo-append (process-node-list segtitle))
+                 (literal ": "))
+           (process-children)))))
+
+(element calloutlist 
+  (let* ((nsep  (gentext-label-title-sep (gi)))
+        (id    (attribute-string (normalize "id")))
+        (titlesosofo (make sequence
+                       (literal (gentext-element-name (gi)))
+                       (if (string=? (element-label) "")
+                           (literal nsep)
+                           (literal " " (element-label) nsep))
+                       (element-title-sosofo))))
+    (make element gi: "DIV"
+         attributes: (list
+                      (list "CLASS" (gi)))
+         (if (node-list-empty? 
+              (select-elements (children (current-node)) (normalize "title")))
+             (empty-sosofo)
+             (make element gi: "P"
+                   (make element gi: "B"
+                         (if id
+                             (make sequence
+                               (make element gi: "A"
+                                     attributes: (list (list "NAME" id))
+                                     (empty-sosofo))
+                               titlesosofo)
+                             titlesosofo))))
+         (make element gi: "DL"
+               attributes: '(("COMPACT" "COMPACT"))
+               (process-children)))))
+
+(element (calloutlist title) (empty-sosofo))
+
+(element callout 
+  (process-children))
+
+(element (calloutlist callout)
+  (process-children))
+
+(element (calloutlist callout para)
+  (let ((footnotes (select-elements (descendants (current-node))
+                                   (normalize "footnote"))))
+    (make sequence
+      (if (= (child-number) 1)
+         (let* ((ilevel (length (hierarchical-number-recursive 
+                                 (normalize "calloutlist"))))
+                (arearefs (inherited-attribute-string (normalize "arearefs")))
+                (idlist (split arearefs)))
+           (make sequence
+             (make element gi: "DT"
+                   (let loop ((ids idlist))
+                     (if (null? ids)
+                         (empty-sosofo)
+                         (make sequence
+                           ($callout-mark$ (element-with-id (car ids)) #f)
+                           (loop (cdr ids))))))
+             (make element gi: "DD"
+                   (process-children))))
+         (make element gi: "DD"
+               (make element gi: "P"
+                     (process-children))))
+
+      (if (or %footnotes-at-end% (node-list-empty? footnotes))
+         (empty-sosofo)
+         (make element gi: "BLOCKQUOTE"
+               attributes: (list
+                            (list "CLASS" "FOOTNOTES"))
+               (with-mode footnote-mode
+                 (process-node-list footnotes)))))))
diff --git a/html/dblot.dsl b/html/dblot.dsl
new file mode 100644 (file)
index 0000000..5524bd6
--- /dev/null
@@ -0,0 +1,24 @@
+;; $Id: dblot.dsl,v 1.2 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; need test cases to do toc/lot; do these later
+
+(element toc (empty-sosofo))
+(element (toc title) (empty-sosofo))
+(element tocfront ($paragraph$))
+(element tocentry ($paragraph$))
+(element tocpart (process-children))
+(element tocchap (process-children))
+(element toclevel1 (process-children))
+(element toclevel2 (process-children))
+(element toclevel3 (process-children))
+(element toclevel4 (process-children))
+(element toclevel5 (process-children))
+(element tocback ($paragraph$))
+(element lot (empty-sosofo))
+(element (lot title) (empty-sosofo))
+(element lotentry ($paragraph$))
+
diff --git a/html/dbmath.dsl b/html/dbmath.dsl
new file mode 100644 (file)
index 0000000..c72d9ed
--- /dev/null
@@ -0,0 +1,67 @@
+;; $Id: dbmath.dsl,v 1.2 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define %equation-autolabel% #f)
+
+(element equation
+  ;; derived from $semiformal-object$
+  (if (node-list-empty? (select-elements (children (current-node))
+                                        (normalize "title")))
+      ($informal-object$ %informalequation-rules% %informalequation-rules%)
+      ($formal-object$ %informalequation-rules% %informalequation-rules%)))
+
+(element (equation title) (empty-sosofo))
+(element (equation alt) (empty-sosofo))
+(element (equation graphic)
+  (let ((alttag (select-elements (children (parent)) (normalize "alt"))))
+    (if alttag
+       ($img$ (current-node) (data alttag))
+       ($img$))))
+
+(element informalequation
+  ;; Derived from informal-object
+  (let ((rule-before? %informalequation-rules%)
+       (rule-after? %informalequation-rules%))
+    (if %equation-autolabel%
+       (make sequence
+         (if rule-before?
+             (make empty-element gi: "HR")
+             (empty-sosofo))
+         (make element gi: "TABLE"
+               attributes: '(("CLASS" "INFORMALEQUATION")
+                             ("WIDTH" "100%")
+                             ("BORDER" "0"))
+               (make element gi: "TR"
+                     (make element gi: "TD"
+                           attributes: '(("VALIGN" "MIDDLE")
+                                         ("ALIGN" "LEFT"))
+                           (process-children))
+                     (make element gi: "TD"
+                           attributes: '(("VALIGN" "MIDDLE")
+                                         ("ALIGN" "RIGHT")
+                                         ("WIDTH" "100"))
+                           (literal "(" 
+                                    (element-label (current-node)) 
+                                    ")"))))
+         (if rule-after?
+             (make empty-element gi: "HR")
+             (empty-sosofo)))
+       ($informal-object$ rule-before? rule-after?))))
+
+(element (informalequation alt) (empty-sosofo))
+(element (informalequation graphic) 
+  (let ((alttag (select-elements (children (parent)) (normalize "alt"))))
+    (if alttag
+       ($img$ (current-node) (data alttag))
+       ($img$))))
+
+(element inlineequation ($inline-object$))
+(element (inlineequation alt) (empty-sosofo))
+(element (inlineequation graphic) 
+  (let ((alttag (select-elements (children (parent)) (normalize "alt"))))
+    (if alttag
+       ($img$ (current-node) (data alttag))
+       ($img$))))
diff --git a/html/dbmsgset.dsl b/html/dbmsgset.dsl
new file mode 100644 (file)
index 0000000..6f6fb6e
--- /dev/null
@@ -0,0 +1,42 @@
+;; $Id: dbmsgset.dsl,v 1.2 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ======================== ERROR MESSAGES (ETC.) =======================
+
+(element msgset (process-children))
+
+(element msgentry ($block-container$))
+
+(element simplemsgentry ($block-container$))
+
+(element msg ($block-container$))
+
+(element msgmain (process-children))
+
+(element msgsub
+  (process-children))
+
+(element msgrel (empty-sosofo))
+
+(element msgtext (process-children))
+
+(element msginfo ($indent-para-container$))
+
+(define ($genhead-para$ headtext)
+  (make element gi: "P"
+       (make element gi: "B"
+             (literal
+              (string-append headtext ": ")))
+       (process-children)))
+
+(element msglevel ($genhead-para$ (gentext-element-name (current-node))))
+(element msgorig ($genhead-para$ (gentext-element-name (current-node))))
+(element msgaud ($genhead-para$ (gentext-element-name (current-node))))
+
+(element msgexplan ($indent-para-container$))
+(element (msgexplan title) ($runinhead$))
+(element (msgexplan para) (make sequence (process-children)))
+
diff --git a/html/dbnavig.dsl b/html/dbnavig.dsl
new file mode 100644 (file)
index 0000000..eabcead
--- /dev/null
@@ -0,0 +1,1058 @@
+;; $Id: dbnavig.dsl,v 1.3 2001/07/05 12:08:42 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; The header of a chunk has this form:
+;;
+;; +-----------------------------------------+
+;; |               nav-banner                |
+;; +------------+---------------+------------|
+;; |  prevlink  |  nav-context  |  nextlink  |
+;; +-----------------------------------------+
+
+(define (nav-banner? elemnode)
+  ;; This node has a banner if:
+  ;; 1. There's an inherited dbhtml PI value for "banner-text" and that
+  ;;    value is not the empty string, or
+  ;; 2. The element is not the root element
+  (let ((banner (inherited-dbhtml-value elemnode "banner-text")))
+    (or (and banner (not (string=? banner "")))
+       (not (node-list=? elemnode (sgml-root-element))))))
+
+(define (nav-banner elemnode)
+  (let* ((rootelem       (sgml-root-element))
+        (info           (info-element rootelem))
+        (subtitle-child (select-elements (children rootelem)
+                                         (normalize "subtitle")))
+        (subtitle-info  (select-elements (children info)
+                                         (normalize "subtitle")))
+        (subtitle       (if (node-list-empty? subtitle-info)
+                            subtitle-child
+                            subtitle-info))
+        (banner-text    (inherited-dbhtml-value elemnode "banner-text"))
+        (banner-href    (inherited-dbhtml-value elemnode "banner-href"))
+        (banner         (if (and banner-text (not (string=? banner-text "")))
+                            (literal banner-text)
+                            (make sequence
+                              (element-title-sosofo rootelem)
+                              (if (node-list-empty? subtitle)
+                                  (empty-sosofo)
+                                  (make sequence
+                                    (literal ": ")
+                                    (with-mode subtitle-mode
+                                      (process-node-list subtitle))))))))
+    (make sequence
+      (if banner-href
+         (make element gi: "A"
+               attributes: (list (list "HREF" banner-href))
+               banner)
+         banner))))
+
+(define (nav-context? elemnode)
+  ;; Print a context header if
+  ;; 1. There's an inherited dbhtml PI value for "context-text" and that
+  ;;    value is not the empty string, or
+  ;; 2. The chunk is a top level section and the parent component 
+  ;;    isn't the same as the root element (which appears in the nav-banner).
+  ;;
+  (let* ((context-text (inherited-dbhtml-value elemnode "context-text"))
+        (rootelem     (sgml-root-element))
+        (component    (ancestor-member elemnode
+                                       (append (book-element-list)
+                                               (division-element-list)
+                                               (component-element-list))))
+        (gencontext   (and (or (equal? (gi elemnode) (normalize "sect1"))
+                               (equal? (gi elemnode) (normalize "section")))
+                           (not (node-list=? component rootelem)))))
+    (or gencontext
+       (and context-text (not (string=? context-text ""))))))
+
+(define (nav-context elemnode)
+  ;; Print the context string for elemnode.  If there's an inherited
+  ;; dbhtml value for 'context-text', use that.  Otherwise, use the
+  ;; title of the parent component...
+  (let* ((context-href  (inherited-dbhtml-value elemnode "context-href")))
+    (if (nav-context? elemnode)
+       (if context-href
+           (make element gi: "A"
+                 attributes: (list (list "HREF" context-href))
+                 (nav-context-sosofo elemnode))
+           (nav-context-sosofo elemnode))
+       (empty-sosofo))))
+
+(define (nav-context-sosofo elemnode)
+  (let* ((component     (ancestor-member elemnode
+                                        (append (book-element-list)
+                                                (division-element-list)
+                                                (component-element-list))))
+        (context-text  (inherited-dbhtml-value elemnode "context-text")))
+    (if (and context-text (not (string=? context-text "")))
+       (literal context-text)
+       (if (equal? (element-label component) "")
+           (make sequence
+             (element-title-sosofo component))
+           (make sequence
+             ;; Special case.  This is a bit of a hack.
+             ;; I need to revisit this aspect of 
+             ;; appendixes. 
+             (if (and (equal? (gi component) (normalize "appendix"))
+                      (or (equal? (gi elemnode) (normalize "sect1"))
+                          (equal? (gi elemnode) (normalize "section")))
+                      (equal? (gi (parent component)) (normalize "article")))
+                 (empty-sosofo)
+                 (literal (gentext-element-name-space (gi component))))
+             (element-label-sosofo component)
+             (literal (gentext-label-title-sep (gi component)))
+             (element-title-sosofo component))))))
+
+;; The footer of a chunk has this form:
+;;
+;; +----------------------------------------+
+;; |  prevlink  |   nav-home   |  nextlink  |
+;; +------------+--------------+------------|
+;; |  p. title  |    nav-up    |  n. title  |
+;; +-----------------------------------------+
+
+(define (nav-home? elemnode)
+  (not (node-list=? elemnode (sgml-root-element))))
+
+(define (nav-home elemnode)
+  (sgml-root-element))
+
+(define (nav-home-link elemnode)
+  (let ((home      (nav-home elemnode))
+       (home-text (inherited-dbhtml-value elemnode "home-text")))
+    (if (node-list=? elemnode home)
+       (make entity-ref name: "nbsp")
+       (make element gi: "A"
+             attributes: (list
+                          (list "HREF" 
+                                (href-to home))
+                          (list "ACCESSKEY" "H"))
+             (if home-text
+                 (literal home-text)
+                 (gentext-nav-home home))))))
+
+;; nav-up is displayed in the bottom center of the footer-navigation
+;; table.  The definition below will show "Up" for nested components
+;; (the component wrapping a section, the division wrapping a component
+;; etc.).  It can be abused for other things, such as an index...
+;;
+(define (nav-up? elemnode)
+  (let ((up      (parent elemnode))
+       (up-text (inherited-dbhtml-value elemnode "up-text")))
+    (if (and up-text (not (string=? up-text "")))
+       #t
+       (if (or (node-list-empty? up)
+               (node-list=? up (sgml-root-element))
+               (equal? (gi up) (normalize "bookinfo"))
+               (equal? (gi up) (normalize "docinfo"))
+               (equal? (gi up) (normalize "setinfo")))
+           #f
+           #t))))
+
+(define (nav-up elemnode)
+  (let* ((up      (parent elemnode))
+        (up-href (inherited-dbhtml-value elemnode "up-href"))
+        (uplink? (not (or (node-list-empty? up)
+                          (node-list=? up (sgml-root-element)))))
+        (href    (if up-href
+                     up-href
+                     (if uplink?
+                         (href-to up)
+                         #f))))
+    (if href
+       (make element gi: "A"
+             attributes: (list
+                          (list "HREF" href)
+                          (list "ACCESSKEY" "U"))
+             (nav-up-sosofo elemnode))
+       (nav-up-sosofo elemnode))))
+
+(define (nav-up-sosofo elemnode)
+  (let* ((up      (parent elemnode))
+        (up-text (inherited-dbhtml-value elemnode "up-text")))
+    (if (and up-text (not (string=? up-text "")))
+       (literal up-text)
+       (if (or (node-list-empty? up)
+               (node-list=? up (sgml-root-element)))
+           (make entity-ref name: "nbsp")
+           (gentext-nav-up up)))))
+
+(define (nav-footer elemnode)
+  (empty-sosofo))
+
+;; ======================================================================
+
+(define (header-navigation nd #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element nd)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element nd)
+                   (list-ref navlist 1)))
+        (prevm (if (null? navlist)
+                   (prev-major-component-chunk-element nd)
+                   (list-ref navlist 2)))
+        (nextm (if (null? navlist)
+                   (next-major-component-chunk-element nd)
+                   (list-ref navlist 3)))
+        (rnavlist (list prev next prevm nextm)))
+    (make sequence
+      ($html-body-start$)
+      (if %header-navigation%
+         (cond 
+          ((equal? (gi nd) (normalize "set"))
+           (set-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "book"))
+           (book-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "part"))
+           (part-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "preface"))
+           (preface-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "chapter"))
+           (chapter-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "article"))
+           (article-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "appendix"))
+           (appendix-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "reference"))
+           (reference-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "refentry"))
+           (refentry-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "glossary"))
+           (glossary-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "bibliography"))
+           (bibliography-header-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "index"))
+           (index-header-navigation nd rnavlist))
+          ;; LegalNotice only happens when %generate-legalnotice-link% is #t
+          ((equal? (gi nd) (normalize "legalnotice"))
+           (default-header-navigation nd
+             (empty-node-list) (empty-node-list)
+             (empty-node-list) (empty-node-list)))
+          ((member (gi nd) (section-element-list))
+           (section-header-navigation nd rnavlist))
+          (else (default-header-navigation nd prev next prevm nextm)))
+         (empty-sosofo))
+      ($user-header-navigation$ prev next prevm nextm)
+      ($html-body-content-start$))))
+
+(define (footer-navigation nd #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element nd)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element nd)
+                   (list-ref navlist 1)))
+        (prevm (if (null? navlist)
+                   (prev-major-component-chunk-element nd)
+                   (list-ref navlist 2)))
+        (nextm (if (null? navlist)
+                   (next-major-component-chunk-element nd)
+                   (list-ref navlist 3)))
+        (rnavlist (list prev next prevm nextm)))
+    (make sequence
+      (make-endnotes)
+      ($html-body-content-end$)
+      ($user-footer-navigation$ prev next prevm nextm)
+      (if %footer-navigation%
+         (cond 
+          ((equal? (gi nd) (normalize "set"))          
+           (set-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "book"))
+           (book-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "part"))
+           (part-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "preface"))
+           (preface-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "chapter"))
+           (chapter-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "article"))
+           (article-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "appendix"))
+           (appendix-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "reference"))
+           (reference-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "refentry"))
+           (refentry-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "glossary"))
+           (glossary-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "bibliography"))
+           (bibliography-footer-navigation nd rnavlist))
+          ((equal? (gi nd) (normalize "index"))
+           (index-footer-navigation nd rnavlist))
+          ;; LegalNotice only happens when %generate-legalnotice-link% is #t
+          ((equal? (gi nd) (normalize "legalnotice"))  
+           (default-footer-navigation nd
+             (empty-node-list) (empty-node-list)
+             (empty-node-list) (empty-node-list)))
+          ((member (gi nd) (section-element-list))
+           (section-footer-navigation nd rnavlist))
+          (else (default-footer-navigation nd prev next prevm nextm)))
+         (empty-sosofo))
+      (nav-footer nd)
+      ($html-body-end$))))
+
+(define (set-header-navigation elemnode #!optional (navlist '()))
+  (empty-sosofo))
+
+(define (book-header-navigation elemnode #!optional (navlist '()))
+  (empty-sosofo))
+
+(define (part-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (preface-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (chapter-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (appendix-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (article-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (if (node-list=? elemnode (sgml-root-element))
+       (empty-sosofo)
+       (default-header-navigation elemnode prev next prevsib nextsib))))
+
+(define (glossary-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (bibliography-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (index-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (reference-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (refentry-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (section-header-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-header-navigation elemnode prev next prevsib nextsib)))
+
+(define (set-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (book-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (part-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (preface-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (chapter-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (appendix-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (article-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (glossary-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (bibliography-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (index-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (reference-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (refentry-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+(define (section-footer-navigation elemnode #!optional (navlist '()))
+  (let* ((prev  (if (null? navlist)
+                   (prev-chunk-element elemnode)
+                   (list-ref navlist 0)))
+        (next  (if (null? navlist)
+                   (next-chunk-element elemnode)
+                   (list-ref navlist 1)))
+        (prevsib (if (null? navlist)
+                   (prev-major-component-chunk-element elemnode)
+                   (list-ref navlist 2)))
+        (nextsib (if (null? navlist)
+                   (next-major-component-chunk-element elemnode)
+                   (list-ref navlist 3))))
+    (default-footer-navigation elemnode prev next prevsib nextsib)))
+
+;; ----------------------------------------------------------------------
+
+(define (default-header-nav-tbl-ff elemnode prev next prevsib nextsib)
+  (let* ((r1? (nav-banner? elemnode))
+        (r1-sosofo (make element gi: "TR"
+                         (make element gi: "TH"
+                               attributes: (list
+                                            (list "COLSPAN" "5")
+                                            (list "ALIGN" "center")
+                                            (list "VALIGN" "bottom"))
+                               (nav-banner elemnode))))
+        (r2? (or (not (node-list-empty? prev))
+                 (not (node-list-empty? next))
+                 (not (node-list-empty? prevsib))
+                 (not (node-list-empty? nextsib))
+                 (nav-context? elemnode)))
+        (r2-sosofo (make element gi: "TR"
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "WIDTH" "10%")
+                                            (list "ALIGN" "left")
+                                            (list "VALIGN" "top"))
+                               (if (node-list-empty? prev)
+                                   (make entity-ref name: "nbsp")
+                                   (make element gi: "A"
+                                         attributes: (list
+                                                      (list "HREF"
+                                                            (href-to
+                                                             prev))
+                                                      (list "ACCESSKEY"
+                                                            "P"))
+                                         (gentext-nav-prev prev))))
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "WIDTH" "10%")
+                                            (list "ALIGN" "left")
+                                            (list "VALIGN" "top"))
+                               (if (node-list-empty? prevsib)
+                                   (make entity-ref name: "nbsp")
+                                   (make element gi: "A"
+                                         attributes: (list
+                                                      (list "HREF"
+                                                            (href-to
+                                                             prevsib)))
+                                         (gentext-nav-prev-sibling prevsib))))
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "WIDTH" "60%")
+                                            (list "ALIGN" "center")
+                                            (list "VALIGN" "bottom"))
+                               (nav-context elemnode))
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "WIDTH" "10%")
+                                            (list "ALIGN" "right")
+                                            (list "VALIGN" "top"))
+                               (if (node-list-empty? nextsib)
+                                   (make entity-ref name: "nbsp")
+                                   (make element gi: "A"
+                                         attributes: (list
+                                                      (list "HREF" 
+                                                            (href-to
+                                                             nextsib)))
+                                         (gentext-nav-next-sibling nextsib))))
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "WIDTH" "10%")
+                                            (list "ALIGN" "right")
+                                            (list "VALIGN" "top"))
+                               (if (node-list-empty? next)
+                                   (make entity-ref name: "nbsp")
+                                   (make element gi: "A"
+                                         attributes: (list
+                                                      (list "HREF" 
+                                                            (href-to
+                                                             next))
+                                                      (list "ACCESSKEY"
+                                                            "N"))
+                                         (gentext-nav-next next)))))))
+    (if (or r1? r2?)
+       (make element gi: "DIV"
+             attributes: '(("CLASS" "NAVHEADER"))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "SUMMARY" "Header navigation table")
+                            (list "WIDTH" %gentext-nav-tblwidth%)
+                            (list "BORDER" "0")
+                            (list "CELLPADDING" "0")
+                            (list "CELLSPACING" "0"))
+               (if r1? r1-sosofo (empty-sosofo))
+               (if r2? r2-sosofo (empty-sosofo)))
+         (make empty-element gi: "HR"
+               attributes: (list
+                            (list "ALIGN" "LEFT")
+                            (list "WIDTH" %gentext-nav-tblwidth%))))
+       (empty-sosofo))))
+
+(define (default-header-nav-tbl-noff elemnode prev next prevsib nextsib)
+  (let* ((r1? (nav-banner? elemnode))
+        (r1-sosofo (make element gi: "TR"
+                         (make element gi: "TH"
+                               attributes: (list
+                                            (list "COLSPAN" "3")
+                                            (list "ALIGN" "center"))
+                               (nav-banner elemnode))))
+        (r2? (or (not (node-list-empty? prev))
+                 (not (node-list-empty? next))
+                 (nav-context? elemnode)))
+        (r2-sosofo (make element gi: "TR"
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "WIDTH" "10%")
+                                            (list "ALIGN" "left")
+                                            (list "VALIGN" "bottom"))
+                               (if (node-list-empty? prev)
+                                   (make entity-ref name: "nbsp")
+                                   (make element gi: "A"
+                                         attributes: (list
+                                                      (list "HREF" 
+                                                            (href-to 
+                                                             prev))
+                                                      (list "ACCESSKEY"
+                                                            "P"))
+                                         (gentext-nav-prev prev))))
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "WIDTH" "80%")
+                                            (list "ALIGN" "center")
+                                            (list "VALIGN" "bottom"))
+                               (nav-context elemnode))
+                         (make element gi: "TD"
+                               attributes: (list
+                                            (list "WIDTH" "10%")
+                                            (list "ALIGN" "right")
+                                            (list "VALIGN" "bottom"))
+                               (if (node-list-empty? next)
+                                   (make entity-ref name: "nbsp")
+                                   (make element gi: "A"
+                                         attributes: (list
+                                                      (list "HREF" 
+                                                            (href-to
+                                                             next))
+                                                      (list "ACCESSKEY"
+                                                            "N"))
+                                         (gentext-nav-next next)))))))
+    (if (or r1? r2?)
+       (make element gi: "DIV"
+             attributes: '(("CLASS" "NAVHEADER"))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "SUMMARY" "Header navigation table")
+                            (list "WIDTH" %gentext-nav-tblwidth%)
+                            (list "BORDER" "0")
+                            (list "CELLPADDING" "0")
+                            (list "CELLSPACING" "0"))
+               (if r1? r1-sosofo (empty-sosofo))
+               (if r2? r2-sosofo (empty-sosofo)))
+         (make empty-element gi: "HR"
+               attributes: (list
+                            (list "ALIGN" "LEFT")
+                            (list "WIDTH" %gentext-nav-tblwidth%))))
+       (empty-sosofo))))
+
+(define (default-header-nav-notbl-ff elemnode prev next prevsib nextsib)
+  (make element gi: "DIV"
+       attributes: '(("CLASS" "NAVHEADER"))
+       (if (nav-banner? elemnode)
+           (make element gi: "H1"
+                 (nav-banner elemnode))
+           (empty-sosofo))
+
+       (if (and (node-list-empty? prev)
+                (node-list-empty? prevsib)
+                (node-list-empty? nextsib)
+                (node-list-empty? next))
+           (empty-sosofo)
+           (make element gi: "P"
+                 (if (node-list-empty? next)
+                     (empty-sosofo)
+                     (make sequence 
+                       (make element gi: "A"
+                             attributes: (list
+                                          (list "HREF" (href-to next))
+                                          (list "ACCESSKEY" "N"))
+                             (gentext-nav-next next))))
+
+                 (if (node-list-empty? prev)
+                     (empty-sosofo)
+                     (make sequence
+                       (if (node-list-empty? next)
+                           (empty-sosofo)
+                           (literal ", "))
+                       (make element gi: "A"
+                             attributes: (list
+                                          (list "HREF" (href-to prev))
+                                          (list "ACCESSKEY" "P"))
+                             (gentext-nav-prev prev))))
+                 
+                 (if (node-list-empty? nextsib)
+                     (empty-sosofo)
+                     (make sequence 
+                       (if (and (node-list-empty? next)
+                                (node-list-empty? prev))
+                           (empty-sosofo)
+                           (literal ", "))
+                       (make element gi: "A"
+                             attributes: (list
+                                          (list "HREF" (href-to nextsib)))
+                             (gentext-nav-next-sibling nextsib))))
+
+                 (if (node-list-empty? prevsib)
+                     (empty-sosofo)
+                     (make sequence 
+                       (if (and (node-list-empty? next)
+                                (node-list-empty? prev)
+                                (node-list-empty? nextsib))
+                           (empty-sosofo)
+                           (literal ", "))
+                       (make element gi: "A"
+                             attributes: (list
+                                          (list "HREF" (href-to prevsib)))
+                             (gentext-nav-prev-sibling prevsib))))))
+       
+       (if (nav-context? elemnode)
+           (make element gi: "H2"
+                 (nav-context elemnode))
+           (empty-sosofo))
+       
+       (make empty-element gi: "HR")))
+
+(define (default-header-nav-notbl-noff elemnode prev next prevsib nextsib)
+  (default-header-nav-notbl-ff elemnode prev next 
+    (empty-node-list) (empty-node-list)))
+
+(define (default-header-navigation elemnode prev next prevsib nextsib)
+  (if %gentext-nav-use-tables%
+      (if %gentext-nav-use-ff% 
+         (default-header-nav-tbl-ff elemnode prev next prevsib nextsib)
+         (default-header-nav-tbl-noff elemnode prev next prevsib nextsib))
+      (if %gentext-nav-use-ff% 
+         (default-header-nav-notbl-ff elemnode prev next prevsib nextsib)
+         (default-header-nav-notbl-noff elemnode prev next prevsib nextsib))))
+
+(define (default-footer-navigation elemnode prev next prevsib nextsib)
+  (if %gentext-nav-use-tables%
+      (default-footer-nav-tbl elemnode prev next prevsib nextsib)
+      (default-footer-nav-notbl elemnode prev next prevsib nextsib)))
+
+(define (default-footer-nav-tbl elemnode prev next prevsib nextsib)
+  (let ((r1? (or (not (node-list-empty? prev))
+                (not (node-list-empty? next))
+                (nav-home? elemnode)))
+       (r2? (or (not (node-list-empty? prev))
+                (not (node-list-empty? next))
+                (nav-up? elemnode)))
+
+       (r1-sosofo (make element gi: "TR"
+                        (make element gi: "TD"
+                              attributes: (list
+                                           (list "WIDTH" "33%")
+                                           (list "ALIGN" "left")
+                                           (list "VALIGN" "top"))
+                              (if (node-list-empty? prev)
+                                  (make entity-ref name: "nbsp")
+                                  (make element gi: "A"
+                                        attributes: (list
+                                                     (list "HREF" (href-to
+                                                                   prev))
+                                                     (list "ACCESSKEY"
+                                                           "P"))
+                                        (gentext-nav-prev prev))))
+                        (make element gi: "TD"
+                              attributes: (list
+                                           (list "WIDTH" "34%")
+                                           (list "ALIGN" "center")
+                                           (list "VALIGN" "top"))
+                              (nav-home-link elemnode))
+                        (make element gi: "TD"
+                              attributes: (list
+                                           (list "WIDTH" "33%")
+                                           (list "ALIGN" "right")
+                                           (list "VALIGN" "top"))
+                              (if (node-list-empty? next)
+                                  (make entity-ref name: "nbsp")
+                                  (make element gi: "A"
+                                        attributes: (list
+                                                     (list "HREF" (href-to
+                                                                   next))
+                                                     (list "ACCESSKEY"
+                                                           "N"))
+                                        (gentext-nav-next next))))))
+       (r2-sosofo (make element gi: "TR"
+                        (make element gi: "TD"
+                              attributes: (list
+                                           (list "WIDTH" "33%")
+                                           (list "ALIGN" "left")
+                                           (list "VALIGN" "top"))
+                              (if (node-list-empty? prev)
+                                  (make entity-ref name: "nbsp")
+                                  (element-title-sosofo prev)))
+                        (make element gi: "TD"
+                              attributes: (list
+                                           (list "WIDTH" "34%")
+                                           (list "ALIGN" "center")
+                                           (list "VALIGN" "top"))
+                              (if (nav-up? elemnode)
+                                  (nav-up elemnode)
+                                  (make entity-ref name: "nbsp")))
+                        (make element gi: "TD"
+                              attributes: (list
+                                           (list "WIDTH" "33%")
+                                           (list "ALIGN" "right")
+                                           (list "VALIGN" "top"))
+                              (if (node-list-empty? next)
+                                  (make entity-ref name: "nbsp")
+                                  (element-title-sosofo next))))))
+    (if (or r1? r2?)
+       (make element gi: "DIV"
+             attributes: '(("CLASS" "NAVFOOTER"))
+         (make empty-element gi: "HR"
+               attributes: (list
+                            (list "ALIGN" "LEFT") 
+                            (list "WIDTH" %gentext-nav-tblwidth%)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "SUMMARY" "Footer navigation table")
+                            (list "WIDTH" %gentext-nav-tblwidth%)
+                            (list "BORDER" "0")
+                            (list "CELLPADDING" "0")
+                            (list "CELLSPACING" "0"))
+               (if r1? r1-sosofo (empty-sosofo))
+               (if r2? r2-sosofo (empty-sosofo))))
+       (empty-sosofo))))
+
+(define (default-footer-nav-notbl elemnode prev next prevsib nextsib)
+  (make element gi: "DIV"
+       attributes: '(("CLASS" "NAVFOOTER"))
+       (make empty-element gi: "HR")
+    
+       (if (nav-home? elemnode)
+           (nav-home-link elemnode)
+           (empty-sosofo))
+
+       (if (nav-up? elemnode)
+           (make sequence
+             (if (nav-home? elemnode)
+                 (literal ", ")
+                 (empty-sosofo))
+             (nav-up elemnode))
+           (empty-sosofo))
+    
+       (if (or (nav-home? elemnode) (nav-up? elemnode))
+           (make empty-element gi: "BR")
+           (empty-sosofo))
+
+       (if (node-list-empty? prev)
+           (empty-sosofo)
+           (make sequence
+             (make element gi: "A"
+                   attributes: (list
+                                (list "HREF" (href-to prev))
+                                (list "ACCESSKEY" "P"))
+                   (gentext-nav-prev prev))
+             (literal ": " (element-title-string prev))
+             (make empty-element gi: "BR")))
+       
+       (if (node-list-empty? next)
+           (empty-sosofo)
+           (make sequence
+             (make element gi: "A"
+                   attributes: (list
+                                (list "HREF" (href-to next))
+                                (list "ACCESSKEY" "N"))
+                   (gentext-nav-next next))
+             (literal ": " (element-title-string next))
+             (make empty-element gi: "BR")))))
+
+(define ($user-header-navigation$ #!optional 
+                                 (prev (empty-node-list))
+                                 (next (empty-node-list))
+                                 (prevm (empty-node-list))
+                                 (nextm (empty-node-list)))
+  (empty-sosofo))
+
+(define ($user-footer-navigation$ #!optional 
+                                 (prev (empty-node-list))
+                                 (next (empty-node-list))
+                                 (prevm (empty-node-list))
+                                 (nextm (empty-node-list)))
+  (empty-sosofo))
+
+;; EOF dbnavig.dsl;
diff --git a/html/dbparam.dsl b/html/dbparam.dsl
new file mode 100644 (file)
index 0000000..c913cb8
--- /dev/null
@@ -0,0 +1,1723 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
+
+<style-sheet>
+<style-specification>
+<style-specification-body>
+
+;; $Id: dbparam.dsl,v 1.10 2004/10/10 11:55:10 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://www.nwalsh.com/docbook/dsssl/
+;;
+
+;; === Book intro, for dsl2man ==========================================
+
+<![CDATA[
+;; DOCINFO
+;; <title>DocBook HTML Parameters</title>
+;; <subtitle>Part of the Modular DocBook Stylesheet distribution</subtitle>
+;; <author><firstname>Norman</firstname><surname>Walsh</surname>
+;; </author>
+;; <edition>$Revision: 1.10 $</edition>
+;; <copyright><year>1997</year><year>1998</year><year>1999</year>
+;; <holder>Norman Walsh</holder></copyright>
+;; <legalnotice>
+;; <para>
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+;; OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT.  IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+;; CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+;; OTHER DEALINGS IN THE SOFTWARE.
+;; </para>
+;; </legalnotice>
+;; <legalnotice>
+;; <para>
+;; Please direct all questions, bug reports, or suggestions for changes
+;; to Norman Walsh, &lt;<literal>ndw@nwalsh.com</literal>&gt;.
+;; </para>
+;; <para>
+;; See <ulink url="http://nwalsh.com/docbook/dsssl/">http://nwalsh.com/docbook/dsssl/</ulink> for more information.</para>
+;; </legalnotice>
+;; /DOCINFO
+]]>
+
+;; REFERENCE TOC/LOT Apparatus
+
+(define %generate-set-toc% 
+  ;; REFENTRY generate-set-toc
+  ;; PURP Should a Table of Contents be produced for Sets?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Set'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-book-toc% 
+  ;; REFENTRY generate-book-toc
+  ;; PURP Should a Table of Contents be produced for Books?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Book'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define ($generate-book-lot-list$)
+  ;; REFENTRY generate-book-lot-list
+  ;; PURP Which Lists of Titles should be produced for Books?
+  ;; DESC
+  ;; This parameter should be a list (possibly empty) of the elements
+  ;; for which Lists of Titles should be produced for each 'Book'.
+  ;;
+  ;; It is meaningless to put elements that do not have titles in this
+  ;; list.  If elements with optional titles are placed in this list, only
+  ;; the instances of those elements that do have titles will appear in
+  ;; the LOT.
+  ;;
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (list (normalize "table")
+(normalize "figure")
+(normalize "example")
+(normalize "equation")))
+
+(define %generate-part-toc% 
+  ;; REFENTRY generate-part-toc
+  ;; PURP Should a Table of Contents be produced for Parts?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Part'.
+  ;; Note: '%generate-part-toc-on-titlepage%' controls whether the Part TOC
+  ;; is placed on the bottom of the part titlepage or on page(s) of its own.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-part-toc-on-titlepage%
+  ;; REFENTRY generate-part-toc-on-titlepage
+  ;; PURP Should the Part TOC appear on the Part title page?
+  ;; DESC
+  ;; If true, the Part TOC will be placed on the Part title page.  If false,
+  ;; the TOC will be placed on separate page(s) after the Part title page.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define $generate-chapter-toc$ 
+  ;; REFENTRY generate-chapter-toc
+  ;; PURP Should a Chapter Table of Contents be produced?
+  ;; DESC
+  ;; If true, an automatically generated
+  ;; chapter TOC should be included. By default, it's true.  It's false if
+  ;; the output is going to a single file and the current node isn't the
+  ;; root element.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (lambda ()
+    (or (not nochunks)
+(node-list=? (current-node) (sgml-root-element)))))
+
+(define %force-chapter-toc% 
+  ;; REFENTRY force-chapter-toc
+  ;; PURP Force a chapter TOC even if it includes only a single entry
+  ;; DESC
+  ;; Force chapter toc indicates whether or not an automatically generated
+  ;; chapter TOC should be included even if it has only one entry.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %generate-article-toc% 
+  ;; REFENTRY generate-article-toc
+  ;; PURP Should a Table of Contents be produced for Articles?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Article'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define ($generate-article-lot-list$)
+  ;; REFENTRY generate-article-lot-list
+  ;; PURP Which Lists of Titles should be produced for Books?
+  ;; DESC
+  ;; This parameter should be a list (possibly empty) of the elements
+  ;; for which Lists of Titles shold be produced for each 'Article'.
+  ;;
+  ;; It is meaningless to put elements that do not have titles in this
+  ;; list.  If elements with optional titles are placed in this list, only
+  ;; the instances of those elements that do have titles will appear in
+  ;; the LOT.
+  ;;
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+(list))
+
+(define %generate-reference-toc% 
+  ;; REFENTRY generate-reference-toc
+  ;; PURP Should a Table of Contents be produced for References?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Reference'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-reference-toc-on-titlepage%
+  ;; REFENTRY generate-reference-toc-on-titlepage
+  ;; PURP Should the Reference TOC appear on the Reference title page?
+  ;; DESC
+  ;; If true, the Reference TOC will be placed on the Reference title page.
+  ;; If false,
+  ;; the TOC will be placed after the Reference title page.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %annotate-toc%
+  ;; REFENTRY annotate-toc
+  ;; PURP Annotate TOC entries
+  ;; DESC
+  ;; If #t, TOC entries will be annotated (e.g., the RefPurpose
+  ;; of a RefEntry will be displayed in the TOC).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define ($generate-qandaset-toc$)
+  ;; REFENTRY generate-qandaset-toc
+  ;; PURP Should a QandASet Table of Contents be produced?
+  ;; DESC
+  ;; If true, an automatically generated TOC is produced for each 
+  ;; QandASet.
+  ;; /DESC
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE Titlepages
+
+(define %generate-set-titlepage%
+  ;; REFENTRY generate-set-titlepage
+  ;; PURP Should a set title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Set'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-book-titlepage%
+  ;; REFENTRY generate-book-titlepage
+  ;; PURP Should a book title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Book'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-part-titlepage% 
+  ;; REFENTRY generate-part-titlepage
+  ;; PURP Should a part title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Part'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-partintro-on-titlepage%
+  ;; REFENTRY generate-partintro-on-titlepage
+  ;; PURP Should the PartIntro appear on the Part/Reference title page?
+  ;; DESC
+  ;; If true, the PartIntro content will appear on the title page of
+  ;; Parts and References.  If false,
+  ;; it will be placed on separate page(s) after the title page.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-reference-titlepage% 
+  ;; REFENTRY generate-reference-titlepage
+  ;; PURP Should a reference title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Reference'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-article-titlepage% 
+  ;; REFENTRY generate-article-titlepage
+  ;; PURP Should an article title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Article'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %titlepage-in-info-order% 
+  ;; REFENTRY titlepage-in-info-order
+  ;; PURP Place elements on title page in document order?
+  ;; DESC
+  ;; If true, the elements on the title page will be set in the order that
+  ;; they appear in the *info element.  Otherwise, they will be set in
+  ;; the order specified in the *-titlepage-*-elements list.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %generate-legalnotice-link%
+  ;; REFENTRY generate-legalnotice-link
+  ;; PURP Should legal notices be a link to a separate file?
+  ;; DESC
+  ;; If true, legal notices will be references to a separate file.
+  ;; Note: the support for this handles the case where a single *INFO
+  ;; node contains several distinct legal notices, but won't
+  ;; handle multiple legal notices in different *INFO nodes.
+  ;; (Each set will overwrite the previous.)  A more complex
+  ;; approach could be implemented, but this is sufficient for
+  ;; the current demand.  Let me know...
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define ($legalnotice-link-file$ legalnotice)
+  ;; REFENTRY legalnotice-link-file
+  ;; PURP Name of output file for legal notices
+  ;; DESC
+  ;; Name of the output file for legal notices if 
+  ;; '%generate-legalnotice-link%' is true.  Since several legal notices
+  ;; may occur (in a Set of Books, for example), this is no longer a fixed
+  ;; filename.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (if (and %use-id-as-filename% (attribute-string (normalize "id") legalnotice))
+      (string-append (attribute-string (normalize "id") legalnotice)
+                    %html-ext%)
+      (string-append "ln"
+                    (number->string (all-element-number legalnotice))
+                    %html-ext%)))
+
+(define %author-othername-in-middle%
+  ;; REFENTRY othername-in-middle
+  ;; PURP Author OTHERNAME appears between FIRSTNAME and SURNAME?
+  ;; DESC
+  ;; If true, the OTHERNAME of an AUTHOR appears between the 
+  ;; FIRSTNAME and SURNAME.  Otherwise, OTHERNAME is suppressed.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE Admonitions
+
+(define %admon-graphics%
+  ;; REFENTRY admon-graphics
+  ;; PURP Use graphics in admonitions?
+  ;; DESC
+  ;; If true, admonitions are presented in an alternate style that uses
+  ;; a graphic.  Default graphics are provided in the distribution.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %admon-graphics-path%
+  ;; REFENTRY admon-graphics-path
+  ;; PURP Path to admonition graphics
+  ;; DESC
+  ;; Sets the path, probably relative to the directory where the HTML
+  ;; files are created, to the admonition graphics.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "../images/")
+
+(define ($admon-graphic$ #!optional (nd (current-node)))
+  ;; REFENTRY admon-graphic
+  ;; PURP Admonition graphic file
+  ;; DESC
+  ;; Given an admonition node, returns the name of the graphic that should
+  ;; be used for that admonition.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (cond ((equal? (gi nd) (normalize "tip"))
+        (string-append %admon-graphics-path% "tip" %stock-graphics-extension%))
+       ((equal? (gi nd) (normalize "note"))
+        (string-append %admon-graphics-path% "note" %stock-graphics-extension%))
+       ((equal? (gi nd) (normalize "important"))
+        (string-append %admon-graphics-path% "important" %stock-graphics-extension%))
+       ((equal? (gi nd) (normalize "caution"))
+        (string-append %admon-graphics-path% "caution" %stock-graphics-extension%))
+       ((equal? (gi nd) (normalize "warning"))
+        (string-append %admon-graphics-path% "warning" %stock-graphics-extension%))
+       (else (error (string-append (gi nd) " is not an admonition.")))))
+
+(define ($admon-graphic-width$ #!optional (nd (current-node)))
+  ;; REFENTRY admon-graphic-width
+  ;; PURP Admonition graphic file width
+  ;; DESC
+  ;; Given an admonition node, returns the width of the graphic that will
+  ;; be used for that admonition.
+  ;;
+  ;; All of the default graphics in the distribution are 25 pixels wide.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "25")
+
+;; REFERENCE Callouts
+
+(define %callout-graphics%
+  ;; REFENTRY callout-graphics
+  ;; PURP Use graphics in callouts?
+  ;; DESC
+  ;; If true, callouts are presented with graphics (e.g., reverse-video
+  ;; circled numbers instead of "(1)", "(2)", etc.).
+  ;; Default graphics are provided in the distribution.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %callout-graphics-path%
+  ;; REFENTRY callout-graphics-path
+  ;; PURP Path to callout graphics
+  ;; DESC
+  ;; Sets the path, probably relative to the directory where the HTML
+  ;; files are created, to the callout graphics.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "../images/callouts/")
+
+(define %callout-graphics-number-limit%
+  ;; REFENTRY callout-graphics-number-limit
+  ;; PURP Number of largest callout graphic
+  ;; DESC
+  ;; If '%callout-graphics%' is true, graphics are used to represent
+  ;; callout numbers. The value of '%callout-graphics-number-limit%' is
+  ;; the largest number for which a graphic exists. If the callout number
+  ;; exceeds this limit, the default presentation "(nnn)" will always
+  ;; be used.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  10)
+
+;; REFERENCE VariableLists
+
+(define %always-format-variablelist-as-table%
+  ;; REFENTRY always-format-variablelist-as-table
+  ;; PURP Always format VariableLists as tables?
+  ;; DESC
+  ;; When a 'VariableList' is formatted, if any of the
+  ;; terms in the list are too long, the whole list is formatted as a
+  ;; list.
+  ;; 
+  ;; If '%always-format-variablelist-as-table%' is
+  ;; '#t', the 'VariableList' will be
+  ;; formatted as a table, even if some terms are too long.  The terms that
+  ;; are too long will format span above their associated description.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %default-variablelist-termlength%
+  ;; REFENTRY default-variablelist-termlength
+  ;; PURP Default term length on variablelists
+  ;; DESC
+  ;; When formatting a 'VariableList', this value is
+  ;; used as the default term length, if no 'TermLength' is specified.
+  ;; 
+  ;; If all of the terms in a list shorter than the term length, the
+  ;; stylesheet may format them "side-by-side" in a table.
+  ;; /DESC
+  ;; /REFENTRY
+  20)
+
+(define %may-format-variablelist-as-table%
+  ;; REFENTRY may-format-variablelist-as-table
+  ;; PURP Format VariableLists as tables?
+  ;; DESC
+  ;; If '%may-format-variablelist-as-table%' is
+  ;; '#t', a 'VariableList' will be
+  ;; formatted as a table, if *all of*
+  ;; the terms are shorter than the specified
+  ;; 'TermLength'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+;; REFERENCE Navigation
+
+(define %header-navigation%
+  ;; REFENTRY header-navigation
+  ;; PURP Should navigation links be added to the top of each page?
+  ;; DESC
+  ;; If '#t', navigation links will be added to the top of each page.
+  ;; If '#f', no navigation links will be added. Note that this has
+  ;; no effect on '($user-header-navigation$)', which will still be
+  ;; called (but does nothing by default).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %footer-navigation%
+  ;; REFENTRY footer-navigation
+  ;; PURP Should navigation links be added to the bottom of each page?
+  ;; DESC
+  ;; If '#t', navigation links will be added to the bottom of each page.
+  ;; If '#f', no navigation links will be added. Note that this has
+  ;; no effect on '($user-footer-navigation$)' or '(nav-footer)', which 
+  ;; will still be called (but do nothing by default).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %gentext-nav-tblwidth% 
+  ;; REFENTRY gentext-nav-tblwidth
+  ;; PURP If using tables for navigation, how wide should the tables be?
+  ;; DESC
+  ;; If tables are used for navigation (see '%gentext-nav-use-tables%'),
+  ;; how wide should the tables be?
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "100%")
+
+(define %gentext-nav-use-ff%
+  ;; REFENTRY gentext-nav-use-ff
+  ;; PURP Add "fast-forward" to the navigation links?
+  ;; DESC
+  ;; Do you want "fast-forward" navigation?  Probably not is my guess.
+  ;; I'm not sure this works real well yet.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %gentext-nav-use-tables%
+  ;; REFENTRY gentext-nav-use-tables
+  ;; PURP Use tables to build the navigation headers and footers?
+  ;; DESC
+  ;; If true, HTML TABLEs will be used to format the header and footer
+  ;; navigation information.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE Verbatim Environments
+
+(define %indent-address-lines% 
+  ;; REFENTRY indent-address-lines
+  ;; PURP Indent lines in a 'Address'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-funcsynopsisinfo-lines% 
+  ;; REFENTRY indent-funcsynopsisinfo-lines
+  ;; PURP Indent lines in a 'FuncSynopsisInfo'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-literallayout-lines% 
+  ;; REFENTRY indent-literallayout-lines
+  ;; PURP Indent lines in a 'LiteralLayout'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-programlisting-lines%
+  ;; REFENTRY indent-programlisting-lines
+  ;; PURP Indent lines in a 'ProgramListing'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-screen-lines%
+  ;; REFENTRY indent-screen-lines
+  ;; PURP Indent lines in a 'Screen'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-synopsis-lines% 
+  ;; REFENTRY indent-synopsis-lines
+  ;; PURP Indent lines in a 'Synopsis'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %number-address-lines% 
+  ;; REFENTRY number-address-lines
+  ;; PURP Enumerate lines in a 'Address'?
+  ;; DESC
+  ;; If true, lines in each 'Address' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-funcsynopsisinfo-lines% 
+  ;; REFENTRY number-funcsynopsisinfo-lines
+  ;; PURP Enumerate lines in a 'FuncSynopsisInfo'?
+  ;; DESC
+  ;; If true, lines in each 'FuncSynopsisInfo' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-literallayout-lines% 
+  ;; REFENTRY number-literallayout-lines
+  ;; PURP Enumerate lines in a 'LiteralLayout'?
+  ;; DESC
+  ;; If true, lines in each 'LiteralLayout' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-programlisting-lines%
+  ;; REFENTRY number-programlisting-lines
+  ;; PURP Enumerate lines in a 'ProgramListing'?
+  ;; DESC
+  ;; If true, lines in each 'ProgramListing' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-screen-lines%
+  ;; REFENTRY number-screen-lines
+  ;; PURP Enumerate lines in a 'Screen'?
+  ;; DESC
+  ;; If true, lines in each 'Screen' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-synopsis-lines% 
+  ;; REFENTRY number-synopsis-lines
+  ;; PURP Enumerate lines in a 'Synopsis'?
+  ;; DESC
+  ;; If true, lines in each 'Synopsis' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%', 
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %linenumber-length% 
+  ;; REFENTRY linenumber-length
+  ;; PURP Width of line numbers in enumerated environments
+  ;; DESC
+  ;; Line numbers will be padded to '%linenumber-length%'
+  ;; characters.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  3)
+
+(define %linenumber-mod% 
+  ;; REFENTRY linenumber-mod
+  ;; PURP Controls line-number frequency in enumerated environments.
+  ;; DESC
+  ;; Every '%linenumber-mod%' line will be enumerated.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  5)
+
+(define %linenumber-padchar% 
+  ;; REFENTRY linenumber-padchar
+  ;; PURP Pad character in line numbers
+  ;; DESC
+  ;; Line numbers will be padded (on the left) with '%linenumber-padchar%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  " ")
+
+(define ($linenumber-space$) 
+  ;; REFENTRY linenumber-space
+  ;; PURP Returns the sosofo which separates line numbers from the text
+  ;; DESC
+  ;; The sosofo returned by '($linenumber-space$)' is placed
+  ;; between the line number and the corresponding line in 
+  ;; enumerated environments.
+  ;;
+  ;; Note: '%linenumber-padchar%'s are separated from lines
+  ;; that are not enumerated (because they don't match '%linenumber-mod%').
+  ;; In other words, '($linenumber-space$)' occurs
+  ;; on every line.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (make entity-ref name: "nbsp"))
+
+(define %shade-verbatim%  
+  ;; REFENTRY shade-verbatim
+  ;; PURP Should verbatim environments be shaded?
+  ;; DESC
+  ;; If true, a table with '($shade-verbatim-attr$)' attributes will be
+  ;; wrapped around each verbatim environment.  This gives the effect
+  ;; of a shaded verbatim environment.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define ($shade-verbatim-attr$)
+  ;; REFENTRY shade-verbatim-attr
+  ;; PURP Attributes used to create a shaded verbatim environment.
+  ;; DESC
+  ;; See '%shade-verbatim%'
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (list
+   (list "BORDER" "0")
+   (list "BGCOLOR" "#E0E0E0")
+   (list "WIDTH" ($table-width$))))
+
+(define %callout-default-col% 
+  ;; REFENTRY callout-default-col
+  ;; PURP Default column for callouts
+  ;; DESC
+  ;; If the coordinates of a callout include only a line number, the callout
+  ;; bug will appear in column '%callout-default-col%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  60)
+
+;; REFERENCE Labelling
+
+(define %chapter-autolabel% 
+  ;; REFENTRY chapter-autolabel
+  ;; PURP Are chapters enumerated?
+  ;; DESC
+  ;; If true, chapters will be enumerated.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %section-autolabel%
+  ;; REFENTRY section-autolabel
+  ;; PURP Are sections enumerated?
+  ;; DESC
+  ;; If true, unlabeled sections will be enumerated.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %label-preface-sections%
+  ;; REFENTRY label-preface-sections
+  ;; PURP Are sections in the Preface enumerated?
+  ;; DESC
+  ;; If true, unlabeled sections in the Preface will be enumerated
+  ;; if '%section-autolabel%' is true.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %qanda-inherit-numeration% 
+  ;; REFENTRY qanda-inherit-numeration
+  ;; PURP Should numbered questions inherit the surrounding numeration?
+  ;; DESC
+  ;; If true, question numbers are prefixed with the surrounding
+  ;; component or section number. Has no effect unless
+  ;; '%section-autolabel%' is also true.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE Tables
+
+(define %cals-table-class%
+  ;; REFENTRY cals-table-class
+  ;; PURP Class attribute for CALS tables
+  ;; DESC
+  ;; This value, if not '#f', will be used as the value of the CLASS
+  ;; attribute on CALS tables.  This allows the HTML stylesheet to
+  ;; distinguish between HTML tables generated from tables in the
+  ;; source document from HTML tables generated for other reasons
+  ;; (simplelists and navigation, for example).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "CALSTABLE")
+
+(define ($table-element-list$) 
+  ;; REFENTRY table-element-list
+  ;; PURP List of table element names
+  ;; DESC
+  ;; The list of table elements in the DTD.  
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (list (normalize "table") (normalize "informaltable")))
+
+(define ($table-width$)
+  ;; REFENTRY table-width
+  ;; PURP Calculate table width
+  ;; DESC
+  ;; This function is called to calculate the width of tables that should
+  ;; theoretically be "100%" wide. Unfortunately, in HTML, a 100% width 
+  ;; table in a list hangs off the right side of the browser window.  (Who's
+  ;; mistake was that!).  So this function provides a way to massage
+  ;; the width appropriately.
+  ;;
+  ;; This version is fairly dumb.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (if (has-ancestor-member? (current-node) '("LISTITEM"))
+      "90%"
+      "100%"))
+
+(define %simplelist-column-width% 
+  ;; REFENTRY simplelist-column-width
+  ;; PURP Width of columns in tabular simple lists
+  ;; DESC
+  ;; If SimpleLists are presented in a table, how wide should the table
+  ;; columns be?  If '#f', no width will be specified.
+  ;;
+  ;; If not #f, this value should be a string (it will be used in the WIDTH
+  ;; attribute on the TD for each table entry).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %epigraph-start-col%
+  ;; REFENTRY epigraph-start-col
+  ;; PURP Size of start indent for epigraphs.
+  ;; DESC
+  ;; Width of the table column which provides a starting indent for
+  ;; epigraphs, expressed as a percentage.
+  ;; AUTHOR Ola Lundqvist
+  ;; /REFENTRY
+  "45%")
+
+(define %epigraph-content-col%
+  ;; REFENTRY epigraph-content-col
+  ;; PURP Size of epigraph text column.
+  ;; DESC
+  ;; Width of the table column which contains the contents of
+  ;; epigraphs, expressed as a percentage.
+  ;; AUTHOR Ola Lundqvist
+  ;; /REFENTRY
+  "45%")
+
+(define %blockquote-start-col%
+  ;; REFENTRY blockquote-start-col
+  ;; PURP Size of start indent for blockquoted text.
+  ;; DESC
+  ;; Width of the table column which provides a starting indent for
+  ;; blockquoted text, expressed as a percentage.
+  ;; AUTHOR Ola Lundqvist
+  ;; /REFENTRY
+  "10%")
+
+(define %blockquote-end-col%
+  ;; REFENTRY blockquote-end-col
+  ;; PURP Size of end indent for blockquoted text.
+  ;; DESC
+  ;; Width of the table column which provides and end indent after
+  ;; blockquoted text, expressed as a percentage.
+  ;; AUTHOR Ola Lundqvist
+  ;; /REFENTRY
+  "10%")
+
+
+;; REFERENCE Bibliographies
+
+(define biblio-citation-check
+  ;; REFENTRY biblio-citation-check
+  ;; PURP Check citations
+  ;; DESC
+  ;; If true, the content of CITATIONs will be checked against possible
+  ;; biblioentries.  If the citation cannot be found, an error is issued
+  ;; and the citation is generated.  If the citation is found, it is generated
+  ;; with a cross reference to the appropriate biblioentry.
+  ;;
+  ;; A citation matches if the content of the citation element matches the
+  ;; ID, XREFLABEL, or leading ABBREV of a biblioentry.
+  ;;
+  ;; This setting may have significant performance implications on large
+  ;; documents, hence it is false by default.
+  ;;
+  ;; (This option can conveniently be set with '-V biblio-citation-check' 
+  ;; on the Jade command line).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define biblio-filter-used
+  ;; REFENTRY filter-used
+  ;; PURP Suppress unreferenced bibliography entries
+  ;; DESC
+  ;; If true, bibliography entries which are not cited are suppressed.
+  ;; A biblioentry is cited if an XREF or LINK matches its ID, or if
+  ;; a CITE element matches its
+  ;; ID, XREFLABEL, or leading ABBREV.
+  ;;
+  ;; A BIBLIOGRAPHY with no entries will still be output (making a whole
+  ;; component conditional would be _A LOT_ of work and seems unnecessary),
+  ;; but BIBLIDIVs with no entries will be suppressed.
+  ;;
+  ;; This setting may have significant performance implications,
+  ;; hence it is false by default.
+  ;;
+  ;; (This option can conveniently be set with '-V biblio-filter-used' on the 
+  ;; Jade command line).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define biblio-number
+  ;; REFENTRY biblio-number
+  ;; PURP Enumerate bibliography entries
+  ;; DESC
+  ;; If true, bibliography entries will be numbered.  If you cross-reference
+  ;; bibliography entries, you should probably use biblio-number or
+  ;; consistently use XREFLABEL or ABBREV.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define biblio-xref-title
+  ;; REFENTRY biblio-xref-title
+  ;; PURP Use the titles of bibliography entries in XREFs
+  ;; DESC
+  ;; If true, cross references to bibliography entries will use the
+  ;; title of the entry as the cross reference text. Otherwise, either
+  ;; the number (see 'biblio-number') or XREFLABEL/ABBREV will be used.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+;; REFERENCE OLinks
+
+(define %olink-fragid%
+  ;; REFENTRY olink-fragid
+  ;; PURP Portion of the URL which identifies the fragment identifier
+  ;; DESC
+  ;; Portion of the URL which identifies the fragment identifier
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "&#38;fragid=")
+
+(define %olink-outline-ext%
+  ;; REFENTRY olink-outline-ext
+  ;; PURP Extension for olink outline file
+  ;; DESC
+  ;; The extension used to find the outline information file.  When searching
+  ;; for outline information about a document, the extension is discarded
+  ;; from the system ID of the file and '%olinke-outline-ext%' is appended.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  ".olink")
+
+(define %olink-pubid% 
+  ;; REFENTRY olink-pubid
+  ;; PURP Portion of the URL which identifies the public identifier
+  ;; DESC
+  ;; Portion of the URL which identifies the public identifier
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "pubid=")
+
+(define %olink-resolution% 
+  ;; REFENTRY olink-resolution
+  ;; PURP URL script for OLink resolution
+  ;; DESC
+  ;; OLink resolution requires a server component, '%olink-resolution%'
+  ;; identifies that component.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "/cgi-bin/olink?")
+
+(define %olink-sysid% 
+  ;; REFENTRY olink-sysid
+  ;; PURP Portion of the URL which identifies the system identifier
+  ;; DESC
+  ;; Portion of the URL which identifies the system identifier.  System
+  ;; identifiers are only used if no public identifier is provided.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "sysid=")
+
+;; REFERENCE Graphics
+
+(define %graphic-default-extension% 
+  ;; REFENTRY graphic-default-extension
+  ;; PURP Default extension for graphic FILEREFs
+  ;; DESC
+  ;; The '%graphic-default-extension%' will be
+  ;; added to the end of all 'fileref' filenames on
+  ;; 'Graphic's if they do not end in one of the
+  ;; '%graphic-extensions%'.  Set this to '#f'
+  ;; to turn off this feature.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %stock-graphics-extension%
+  ;; REFENTRY stock-graphics-extension
+  ;; PURP Suffix for "stock" graphic files
+  ;; DESC
+  ;; The extension to for the graphic files which ship with the
+  ;; Modular DocBook Stylesheet distribution.  This applies to callout
+  ;; graphics and admonition graphics.  Should include the intervening
+  ;; period in the suffix, if any.
+  ;; /DESC
+  ;; AUTHOR Yann Dirson, Adam Di Carlo
+  ;; /REFENTRY
+  ".gif")
+
+(define %graphic-extensions% 
+  ;; REFENTRY graphic-extensions
+  ;; PURP List of graphic filename extensions
+  ;; DESC
+  ;; The list of extensions which may appear on a 'fileref'
+  ;; on a 'Graphic' which are indicative of graphic formats.
+  ;;
+  ;; Filenames that end in one of these extensions will not have
+  ;; the '%graphic-default-extension%' added to them.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  '("gif" "jpg" "jpeg" "png" "tif" "tiff" "eps" "epsf"))
+
+(define image-library
+  ;; REFENTRY image-library
+  ;; PURP Load image library database for additional info about images?
+  ;; DESC
+  ;; If true, an image library database is loaded and extra information
+  ;; about web graphics is retrieved from it.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define image-library-filename
+  ;; REFENTRY image-library-filename
+  ;; PURP Name of the image library database
+  ;; DESC
+  ;; If 'image-library' is true, then the database is loaded from
+  ;; 'image-library-filename'.  It's a current limitation that only a
+  ;; single database can be loaded.
+  ;; 
+  ;; The image library database is stored in a separate directory
+  ;; because it must be parsed with the XML declaration.  The only
+  ;; practical way to accomplish this with Jade, if you are processing a
+  ;; document that uses another declaration, is by having a catalog
+  ;; file in the directory that contains the image library that
+  ;; specifies the SGMLDECL.  (So if it was in the same directory
+  ;; as your document, your document would also be parsed with the
+  ;; XML declaration, which may not be correct.)
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "imagelib/imagelib.xml")
+
+;; REFERENCE HTML Parameters and Chunking
+
+(define %body-attr% 
+  ;; REFENTRY body-attr
+  ;; PURP What attributes should be hung off of BODY?
+  ;; DESC
+  ;; A list of the the BODY attributes that should be generated.
+  ;; The format is a list of lists, each interior list contains the
+  ;; name and value of a BODY attribute.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (list
+   (list "BGCOLOR" "#FFFFFF")
+   (list "TEXT" "#000000")
+   (list "LINK" "#0000FF")
+   (list "VLINK" "#840084")
+   (list "ALINK" "#0000FF")))
+
+(define %html-prefix% 
+  ;; REFENTRY html-prefix
+  ;; PURP Add the specified prefix to HTML output filenames
+  ;; DESC
+  ;; The specified prefix will be added to all HTML output filenames.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "")
+
+(define %html-use-lang-in-filename% 
+  ;; REFENTRY html-use-lang-in-filename
+  ;; PURP Add the source language code to the HTML output filename?
+  ;; DESC
+  ;; If '#t', the source language code (or the default language code, if
+  ;; none is specified), will be added to the filename of each HTML
+  ;; output file.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %html-ext% 
+  ;; REFENTRY html-ext
+  ;; PURP Default extension for HTML output files
+  ;; DESC
+  ;; The default extension for HTML output files.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  ".htm")
+
+(define %html-header-tags% 
+  ;; REFENTRY html-header-tags
+  ;; PURP What additional HEAD tags should be generated?
+  ;; DESC
+  ;; A list of the the HTML HEAD tags that should be generated.
+  ;; The format is a list of lists, each interior list consists
+  ;; of a tag name and a set of attribute/value pairs:
+  ;; '(("META" ("NAME" "name") ("CONTENT" "content")))
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  '())
+
+(define %html-pubid%
+  ;; REFENTRY html-pubid
+  ;; PURP What public ID are you declaring your HTML compliant with?
+  ;; DESC
+  ;; The public ID used in output HTML files.  If '#f', then no public ID
+  ;; is produced.  If both this and %html-sysid% are '#f', then no
+  ;; doctype declaration is produced.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (if %html40%
+      "-//W3C//DTD HTML 4.01 Transitional//EN"
+      #f))
+
+(define %html-sysid%
+  ;; REFENTRY html-sysid
+  ;; PURP What system ID are you declaring your HTML compliant with?
+  ;; DESC
+  ;; The system ID used in output HTML files.  If '#f', then no system ID
+  ;; is produced.  If both this and %html-pubid% are '#f', then no
+  ;; doctype declaration is produced.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (if %html40%
+      "http://www.w3.org/TR/html4/loose.dtd"
+      #f))
+
+(define %root-filename%
+  ;; REFENTRY root-filename
+  ;; PURP Name for the root HTML document
+  ;; DESC
+  ;; The filename of the root HTML document (e.g, "index").
+  ;; If '#f', then a default name will be selected based on the element
+  ;; type of the root element (e.g, book1.htm, set1.htm, c1.htm, etc.).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define html-index
+  ;; REFENTRY html-index
+  ;; PURP HTML indexing?
+  ;; DESC
+  ;; Turns on HTML indexing.  If true, then index data will be written
+  ;; to the file defined by 'html-index-filename'.  This data can be
+  ;; collated and turned into a DocBook index with bin/collateindex.pl.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define html-index-filename
+  ;; REFENTRY html-index-filename
+  ;; PURP Name of HTML index file
+  ;; DESC
+  ;; The name of the file to which index data will be written if
+  ;; 'html-index' is not '#f'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "HTML.index")
+
+(define html-manifest
+  ;; REFENTRY html-manifest
+  ;; PURP Write a manifest?
+  ;; DESC
+  ;; If not '#f' then the list of HTML files created by the stylesheet
+  ;; will be written to the file named by 'html-manifest-filename'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define html-manifest-filename
+  ;; REFENTRY html-manifest-filename
+  ;; PURP Name of HTML manifest file
+  ;; DESC
+  ;; The name of the file to which a manifest will be written if
+  ;; 'html-manifest' is not '#f'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "HTML.manifest")
+
+(define nochunks
+  ;; REFENTRY nochunks
+  ;; PURP Suppress chunking of output pages
+  ;; DESC
+  ;; If true, the entire source document is formatted as a single HTML
+  ;; document and output on stdout.
+  ;; (This option can conveniently be set with '-V nochunks' on the 
+  ;; Jade command line).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define rootchunk
+  ;; REFENTRY rootchunk
+  ;; PURP Make a chunk for the root element when nochunks is used
+  ;; DESC
+  ;; If true, a chunk will be created for the root element, even though
+  ;; nochunks is specified. This option has no effect if nochunks is not
+  ;; true.
+  ;; (This option can conveniently be set with '-V rootchunk' on the 
+  ;; Jade command line).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define use-output-dir
+  ;; REFENTRY use-output-dir
+  ;; PURP If an output-dir is specified, should it be used?
+  ;; DESC
+  ;; If true, chunks will be written to the 'output-dir' instead of
+  ;; the current directory.
+  ;; (This option can conveniently be set with '-V use-output-dir' on the 
+  ;; Jade command line).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %output-dir%
+  ;; REFENTRY output-dir
+  ;; PURP The directory to which HTML files should be written
+  ;; DESC
+  ;; The output directory can be set in two ways. An individual document
+  ;; can specify 'output-dir="directory"' in the dbhtml PI, or the stylesheet
+  ;; can specify the '%output-dir%'. If both are specified, the PI value
+  ;; will be used.
+  ;;
+  ;; Note: the output directory is ignored if 'use-output-dir' is not '#t'.
+  ;; (This allows the author to test stylesheets and documents without
+  ;; accidentally overwriting existing documents.)
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %stylesheet%
+  ;; REFENTRY stylesheet
+  ;; PURP Name of the stylesheet to use
+  ;; DESC
+  ;; The name of the stylesheet to place in the HTML LINK TAG, or '#f' to
+  ;; suppress the stylesheet LINK.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %stylesheet-type%
+  ;; REFENTRY stylesheet-type
+  ;; PURP The type of the stylesheet to use
+  ;; DESC
+  ;; The type of the stylesheet to place in the HTML LINK TAG.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "text/css")
+
+(define %use-id-as-filename%
+  ;; REFENTRY use-id-as-filename
+  ;; PURP Use ID attributes as name for component HTML files?
+  ;; DESC
+  ;; If '%use-id-as-filename%' is true, the stylesheet will use the 
+  ;; value of the ID attribute on a component as the base filename instead
+  ;; of using the auto-generated base.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %citerefentry-link%
+  ;; REFENTRY citerefentry-link
+  ;; PURP Generate URL links when cross-referencing RefEntrys?
+  ;; DESC
+  ;; If true, a web link will be generated, presumably
+  ;; to an online man->HTML gateway. The text of the link is
+  ;; generated by the $generate-citerefentry-link$ function.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+;; REFERENCE RefEntries and FuncSynopses
+
+(define %refentry-generate-name% 
+  ;; REFENTRY refentry-generate-name
+  ;; PURP Output NAME header before 'RefName'(s)?
+  ;; DESC
+  ;; If true, a "NAME" section title is output before the list
+  ;; of 'RefName's.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %refentry-xref-italic%
+  ;; REFENTRY refentry-xref-italic
+  ;; PURP Use italic text when cross-referencing RefEntrys?
+  ;; DESC
+  ;; If true, italics are used when cross-referencing RefEntrys, either
+  ;; with XRef or CiteRefEntry.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %refentry-xref-manvolnum%
+  ;; REFENTRY refentry-xref-manvolnum
+  ;; PURP Output manvolnum as part of RefEntry cross-reference?
+  ;; DESC
+  ;; If true, the manvolnum is used when cross-referencing RefEntrys, either
+  ;; with XRef or CiteRefEntry.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %funcsynopsis-decoration%
+  ;; REFENTRY funcsynopsis-decoration
+  ;; PURP Decorate elements of a FuncSynopsis?
+  ;; DESC
+  ;; If true, elements of the FuncSynopsis will be decorated (e.g. bold or
+  ;; italic).  The decoration is controlled by functions that can be redefined
+  ;; in a customization layer.  See 'edbsynop.dsl'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %funcsynopsis-style% 
+  ;; REFENTRY funcsynopsis-style
+  ;; PURP What style of 'FuncSynopsis' should be generated?
+  ;; DESC
+  ;; If '%funcsynopsis-style%' is 'ansi',
+  ;; ANSI-style function synopses are generated for a 'FuncSynopsis',
+  ;; otherwise K<![CDATA[&]]>R-style function synopses are generated.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'ansi)
+
+;; REFERENCE HTML Content and CSS
+
+(define %html40%
+  ;; REFENTRY html40
+  ;; PURP Generate HTML 4.0
+  ;; DESC
+  ;; If '%html40%' is true then the output more closely resembles HTML 4.0.
+  ;; In particular, the HTML table module includes COL, THEAD, TBODY, and TFOOT
+  ;; elements, and the output documents have a proper doctype declaration.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %css-decoration%
+  ;; REFENTRY css-decoration
+  ;; PURP Enable CSS decoration of elements
+  ;; DESC
+  ;; If '%css-decoration%' is turned on then HTML elements produced by the
+  ;; stylesheet may be decorated with STYLE attributes.  For example, the
+  ;; LI tags produced for list items may include a fragment of CSS in the
+  ;; STYLE attribute which sets the CSS property "list-style-type".
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %css-liststyle-alist%
+  ;; REFENTRY css-liststyle-alist
+  ;; PURP Map DocBook OVERRIDE and MARK attributes to CSS
+  ;; DESC
+  ;; If '%css-decoration%' is turned on then the list-style-type property of
+  ;; list items will be set to reflect the list item style selected in the
+  ;; DocBook instance.  This associative list maps the style type names used
+  ;; in your instance to the appropriate CSS names.  If no mapping exists,
+  ;; the name from the instance will be used.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  '(("bullet" "disc")
+    ("box" "square")))
+
+(define %fix-para-wrappers%
+  ;; REFENTRY fix-para-wrappers
+  ;; PURP Block element in para hack
+  ;; DESC
+  ;; Block elements are allowed in PARA in DocBook, but not in P in
+  ;; HTML.  With '%fix-para-wrappers%' turned on, the stylesheets attempt
+  ;; to avoid putting block elements in HTML P tags by outputting
+  ;; additional end/begin P pairs around them.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %spacing-paras%
+  ;; REFENTRY spacing-paras
+  ;; PURP Block-element spacing hack
+  ;; DESC
+  ;; Should extraneous "P" tags be output to force the correct vertical
+  ;; spacing around things like tables.  This is ugly because different
+  ;; browsers do different things.  Turning this one can also create
+  ;; illegal HTML.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %emphasis-propagates-style%
+  ;; REFENTRY emphasis-propagates-style
+  ;; PURP Support propagating emphasis role attributes to HTML
+  ;; DESC
+  ;; Should the role attribute of emphasis be propagated to HTML as
+  ;; a class attribute value?
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %phrase-propagates-style%
+  ;; REFENTRY phrase-propagates-style
+  ;; PURP Support propagating phrase role attributes to HTML
+  ;; DESC
+  ;; Should the role attribute of phrase be propagated to HTML as
+  ;; a class attribute value?
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE Object Rules
+
+(define %example-rules%
+  ;; REFENTRY example-rules
+  ;; PURP Specify rules before and after an Example
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'Example'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %figure-rules%
+  ;; REFENTRY figure-rules
+  ;; PURP Specify rules before and after an Figure
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'Figure'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %table-rules%
+  ;; REFENTRY table-rules
+  ;; PURP Specify rules before and after an Table
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'Table'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %equation-rules%
+  ;; REFENTRY equation-rules
+  ;; PURP Specify rules before and after an Equation
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'Equation'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %informalexample-rules%
+  ;; REFENTRY informalexample-rules
+  ;; PURP Specify rules before and after an InformalExample
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'InformalExample'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %informalfigure-rules%
+  ;; REFENTRY informalfigure-rules
+  ;; PURP Specify rules before and after an InformalFigure
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'InformalFigure'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %informaltable-rules%
+  ;; REFENTRY informaltable-rules
+  ;; PURP Specify rules before and after an InformalTable
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'InformalTable'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %informalequation-rules%
+  ;; REFENTRY informalequation-rules
+  ;; PURP Specify rules before and after an InformalEquation
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'InformalEquation'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+;; REFERENCE Miscellaneous
+
+(define %content-title-end-punct% 
+  ;; REFENTRY content-title-end-punct
+  ;; PURP List of punctuation chars at the end of a run-in head
+  ;; DESC
+  ;; If a run-in head ends in any of these characters, the
+  ;; '%default-title-end-punct%' is not used.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  '(#\. #\! #\? #\:))
+
+(define %honorific-punctuation%
+  ;; REFENTRY honorific-punctuation
+  ;; PURP Punctuation to follow honorifics in names
+  ;; DESC
+  ;; The honorific punctuation is placed after the honorific in
+  ;; a name. 
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  ".")
+
+(define %default-quadding%   
+  ;; REFENTRY default-quadding
+  ;; PURP The default quadding
+  ;; DESC
+  ;; At present, this is only used on paragraphs.  It specifies the
+  ;; value of the ALIGN attribute on the paragraph.  This would be better
+  ;; done with CSS, but not all browsers support it yet and this has been
+  ;; oft requested functionality.
+  ;;
+  ;; A value of #f suppresses the ALIGN attribute altogether.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %default-simplesect-level% 
+  ;; REFENTRY default-simplesect-level
+  ;; PURP Default section level for 'SimpleSect's.
+  ;; DESC
+  ;; If 'SimpleSect's appear inside other section-level
+  ;; elements, they are rendered at the appropriate section level, but if they
+  ;; appear in a component-level element, they are rendered at 
+  ;; '%default-simplesect-level%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  4)
+
+(define %default-title-end-punct% 
+  ;; REFENTRY default-title-end-punct
+  ;; PURP Default punctuation at the end of a run-in head.
+  ;; DESC
+  ;; The punctuation used at the end of a run-in head (e.g. on FORMALPARA).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  ".")
+
+(define %footnotes-at-end%
+  ;; REFENTRY footnotes-at-end
+  ;; PURP Should footnotes appear at the end of HTML pages?
+  ;; DESC
+  ;; If '#t', footnotes will be placed at the end of each HTML page
+  ;; instead of immediately following the place where they occur.
+  ;; Note: support for this feature is dependent on the processing
+  ;; performed by the (footer-navigation) function; if you replace
+  ;; that function, make sure that you're replacement calls
+  ;; (make-endnotes).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %link-mailto-url%
+  ;; REFENTRY link-mailto-url
+  ;; PURP Mailto URL for LINK REL=made
+  ;; DESC
+  ;; If not '#f', the '%link-mailto-url%' address will be used in a 
+  ;; LINK REL=made element in the HTML HEAD.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %show-comments%
+  ;; REFENTRY show-comments
+  ;; PURP Display Comment elements?
+  ;; DESC
+  ;; If true, comments will be displayed, otherwise they are suppressed.
+  ;; Comments here refers to the 'Comment' element, which will be renamed
+  ;; 'Remark' in DocBook V4.0, not SGML/XML comments which are unavailable.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %writing-mode%
+  ;; REFENTRY writing-mode
+  ;; PURP The writing mode
+  ;; DESC
+  ;; The writing mode is either 'left-to-right', or 
+  ;; 'right-to-left'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'left-to-right)
+
+(define ($object-titles-after$)
+  ;; REFENTRY object-titles-after
+  ;; PURP List of objects who's titles go after the object
+  ;; DESC
+  ;; Titles of formal objects (Figures, Equations, Tables, etc.)
+  ;; in this list will be placed below the object instead of above it.
+  ;;
+  ;; This is a list of element names, for example:
+  ;; '(list (normalize "figure") (normalize "table"))'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  '())
+
+(define firstterm-bold
+  ;; REFENTRY firstterm-bold
+  ;; PURP Make FIRSTTERM elements bold?
+  ;; DESC
+  ;; If '#t', FIRSTTERMs will be bold, to distinguish them from
+  ;; simple GLOSSTERMs.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(declare-initial-value writing-mode %writing-mode%)
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/html/dbpi.dsl b/html/dbpi.dsl
new file mode 100644 (file)
index 0000000..12ca0f6
--- /dev/null
@@ -0,0 +1,62 @@
+;; $Id: dbpi.dsl,v 1.2 2003/04/28 05:18:24 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+(define (pi-value component piname)
+  ;; Returns the value of the (?piname value) PI (if one exists)
+  ;; as a child of component, otherwise returns #f
+  ;;
+  (let loop ((nl (select-by-class (children component) 'pi)))
+    (if (node-list-empty? nl)
+       #f
+       (let ((pidata (node-property 'system-data (node-list-first nl))))
+         (if (and (> (string-length pidata) (string-length piname))
+                  (equal? piname
+                          (substring pidata 0 (string-length piname))))
+             (substring pidata
+                        (+ (string-length piname) 1)
+                        (string-length pidata))
+             (loop (node-list-rest nl)))))))
+
+(define (inherited-pi-value component piname)
+  (let loop ((value #f) (nd component))
+    (if (or value (node-list-empty? nd))
+       value
+       (loop (pi-value nd piname) (parent nd)))))
+
+(define (dbhtml-findvalue pi-field-list name)
+  ;; pi-field-list is '(pitarget name1 value1 name2 value2 ...)
+  (let loop ((slist (cdr pi-field-list)))
+    (if (or (null? slist)
+            (not (pair? slist)))
+       #f
+       (if (string=? (car slist) name)
+           (car (cdr slist))
+           (loop (cdr (cdr slist)))))))
+
+(define (dbhtml-value component name)
+  ;; Returns the value of "name='value'" in the &#60;?dbhtml ...> PI
+  (let loop ((nl (select-by-class (children component) 'pi)))
+    (if (node-list-empty? nl)
+       #f
+       (let* ((pidata (node-property 'system-data (node-list-first nl)))
+              (pilist (if (and (> (string-length pidata) 7)
+                               (string=? (substring pidata 0 7) "dbhtml "))
+                          (parse-starttag-pi pidata)
+                          '()))
+              (value  (if (null? pilist) #f (dbhtml-findvalue pilist name))))
+         (if value
+             value
+             (loop (node-list-rest nl)))))))
+
+(define (inherited-dbhtml-value component name)
+  (let loop ((value #f) (nd component))
+    (if (or value (node-list-empty? nd))
+       value
+       (loop (dbhtml-value nd name) (parent nd)))))
+
+;; EOF dbpi.dsl
+
+
diff --git a/html/dbprocdr.dsl b/html/dbprocdr.dsl
new file mode 100644 (file)
index 0000000..f853583
--- /dev/null
@@ -0,0 +1,69 @@
+;; $Id: dbprocdr.dsl,v 1.4 2004/09/23 20:34:58 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================= PROCEDURES =============================
+
+(define (PROCSTEP ilvl)
+  (if (> ilvl 1) 2.0em 1.8em))
+
+(element procedure 
+  (let ((titles (select-elements (children (current-node)) (normalize "title")))
+       (preamble (node-list-filter-by-not-gi (children (current-node))
+                                             (list (normalize "step"))))
+       (steps (node-list-filter-by-gi (children (current-node))
+                                      (list (normalize "step"))))
+       (id (attribute-string (normalize "id"))))
+    (make element gi: "DIV"
+         attributes: (list
+                      (list "CLASS" (gi)))
+         (if (not (node-list-empty? titles))
+             (make element gi: "P"
+                   (make element gi: "B"
+                         (make sequence
+                           (if id
+                               (make element gi: "A"
+                                     attributes: (list
+                                                  (list "NAME" id))
+                                     (empty-sosofo))
+                               (empty-sosofo))
+                           (with-mode title-mode
+                             (process-node-list titles)))))
+             (if id
+                 (make element gi: "A"
+                       attributes: (list
+                                    (list "NAME" id))
+                       (empty-sosofo))
+                 (empty-sosofo)))
+         (process-node-list preamble)
+         (make element gi: "OL"
+               attributes: (list
+                            (list "TYPE" ($proc-hierarch-number-format$ 1)))
+               (process-node-list steps)))))
+
+(element (procedure title) (empty-sosofo))
+
+(element substeps
+  (make element gi: "OL"
+       attributes: (list
+                    (list "CLASS" "SUBSTEPS")
+                    (list "TYPE" ($proc-hierarch-number-format$
+                                  (+ ($proc-step-depth$ (current-node)) 1))))
+       (process-children)))
+
+(element step
+  (let ((id (attribute-string (normalize "id"))))
+    (make sequence
+      (make element gi: "LI"
+            attributes: (list (list "CLASS" (gi)))
+           (if id
+               (make element gi: "A"
+                     attributes: (list
+                                  (list "NAME" id))
+                     (empty-sosofo))
+               (empty-sosofo))
+           (process-children)))))
+
+
diff --git a/html/dbqanda.dsl b/html/dbqanda.dsl
new file mode 100644 (file)
index 0000000..633b26e
--- /dev/null
@@ -0,0 +1,172 @@
+;; $Id: dbqanda.dsl,v 1.1 2003/03/25 19:53:41 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================== QANDASET ==============================
+
+(define (qanda-defaultlabel)
+  (normalize "number"))
+
+(define (qanda-section-level)
+  ;; FIXME: what if they nest inside each other?
+  (let* ((enclsect (ancestor-member (current-node)
+                                   (list (normalize "section")
+                                         (normalize "simplesect")
+                                         (normalize "sect5")
+                                         (normalize "sect4")
+                                         (normalize "sect3")
+                                         (normalize "sect2")
+                                         (normalize "sect1")
+                                         (normalize "refsect3")
+                                         (normalize "refsect2")
+                                         (normalize "refsect1")))))
+    (SECTLEVEL enclsect)))
+
+(define (qandadiv-section-level)
+  (let ((depth (length (hierarchical-number-recursive 
+                       (normalize "qandadiv")))))
+    (+ (qanda-section-level) depth)))
+
+(element qandaset
+  (let ((title (select-elements (children (current-node)) 
+                               (normalize "title")))
+       ;; process title and rest separately so that we can put the TOC
+       ;; in the rigth place...
+       (rest  (node-list-filter-by-not-gi (children (current-node))
+                                          (list (normalize "title")))))
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-node-list title)
+         (if ($generate-qandaset-toc$)
+             (process-qanda-toc)
+             (empty-sosofo))
+         (process-node-list rest))))
+
+(element (qandaset title)
+  (let* ((htmlgi  (string-append "H" (number->string 
+                                     (+ (qanda-section-level) 1)))))
+    (make element gi: htmlgi
+         attributes: (list (list "CLASS" (gi (current-node))))
+         (process-children))))
+
+(element qandadiv
+  (make element gi: "DIV"
+       attributes: (list (list "CLASS" (gi)))
+       (process-children)))
+
+(element (qandadiv title)
+  (let* ((hnr     (hierarchical-number-recursive (normalize "qandadiv")
+                                                (current-node)))
+        (number  (let loop ((numlist hnr) (number "") (sep ""))
+                   (if (null? numlist)
+                       number
+                       (loop (cdr numlist) 
+                             (string-append number
+                                            sep
+                                            (number->string (car numlist)))
+                             "."))))
+        (htmlgi  (string-append "H" (number->string 
+                                     (+ (qandadiv-section-level) 1)))))
+    (make element gi: htmlgi
+         (make element gi: "A"
+               attributes: (list (list "NAME" (element-id 
+                                               (parent (current-node)))))
+               (empty-sosofo))
+         (literal number ". ")
+         (process-children))))
+
+(element qandaentry
+  (make element gi: "DIV"
+       attributes: (list (list "CLASS" (gi)))
+       (process-children)))
+
+(element question
+  (let* ((chlist   (children (current-node)))
+        (firstch  (node-list-first chlist))
+        (restch   (node-list-rest chlist)))
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "P"
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               (make element gi: "B"
+                     (literal (question-answer-label (current-node)) " "))
+               (process-node-list (children firstch)))
+         (process-node-list restch))))
+
+(element answer
+  (let* ((inhlabel (inherited-attribute-string (normalize "defaultlabel")))
+        (deflabel (if inhlabel inhlabel (qanda-defaultlabel)))
+        (label    (attribute-string (normalize "label")))
+        (chlist   (children (current-node)))
+        (firstch  (node-list-first chlist))
+        (restch   (node-list-rest chlist)))
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "P"
+               (make element gi: "B"
+                     (literal (question-answer-label (current-node)) " "))
+               (process-node-list (children firstch)))
+         (process-node-list restch))))
+
+;; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
+
+(define (process-qanda-toc #!optional (node (current-node)))
+  (let* ((divs     (node-list-filter-by-gi (children node)
+                                          (list (normalize "qandadiv"))))
+        (entries  (node-list-filter-by-gi (children node)
+                                          (list (normalize "qandaentry"))))
+        (inhlabel (inherited-attribute-string (normalize "defaultlabel")))
+        (deflabel (if inhlabel inhlabel (qanda-defaultlabel))))
+    (make element gi: "DL"
+         (with-mode qandatoc
+           (process-node-list divs))
+         (with-mode qandatoc
+           (process-node-list entries)))))
+
+(mode qandatoc
+  (element qandadiv
+    (let ((title (select-elements (children (current-node))
+                                 (normalize "title"))))
+      (make sequence
+       (make element gi: "DT"
+             (process-node-list title))
+       (make element gi: "DD"
+             (process-qanda-toc)))))
+  
+  (element (qandadiv title)
+    (let* ((hnr     (hierarchical-number-recursive (normalize "qandadiv")
+                                                  (current-node)))
+          (number  (let loop ((numlist hnr) (number "") (sep ""))
+                     (if (null? numlist)
+                         number
+                         (loop (cdr numlist) 
+                               (string-append number
+                                              sep
+                                              (number->string (car numlist)))
+                               ".")))))
+      (make sequence
+       (literal number ". ")
+       (make element gi: "A"
+             attributes: (list (list "HREF" 
+                                     (href-to (parent (current-node)))))
+             (process-children)))))
+
+  (element qandaentry
+    (process-children))
+
+  (element question
+    (let* ((chlist   (children (current-node)))
+          (firstch  (node-list-first chlist)))
+      (make element gi: "DT"
+           (literal (question-answer-label (current-node)) " ")
+           (make element gi: "A"
+                 attributes: (list (list "HREF" (href-to (current-node))))
+                 (process-node-list (children firstch))))))
+  
+  (element answer
+    (empty-sosofo))
+)
diff --git a/html/dbrfntry.dsl b/html/dbrfntry.dsl
new file mode 100644 (file)
index 0000000..4c487eb
--- /dev/null
@@ -0,0 +1,170 @@
+;; $Id: dbrfntry.dsl,v 1.4 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; =========================== REFERENCE PAGES ==========================
+
+;;(element reference ($component$))
+
+(element reference
+  (let* ((refinfo  (select-elements (children (current-node)) 
+                                   (normalize "docinfo")))
+        (refintro (select-elements (children (current-node)) 
+                                   (normalize "partintro")))
+        (nl       (titlepage-info-elements 
+                   (current-node)
+                   refinfo
+                   (if %generate-partintro-on-titlepage%
+                       refintro
+                       (empty-node-list)))))
+    (html-document 
+     (with-mode head-title-mode 
+       (literal (element-title-string (current-node))))
+     (make sequence
+       (make element gi: "DIV"
+            attributes: (list (list "CLASS" (gi)))
+
+            (make element gi: "A"
+                  attributes: (list (list "NAME" (element-id)))
+                  (empty-sosofo))
+
+            (if %generate-reference-titlepage%
+                (make sequence
+                  (reference-titlepage nl 'recto)
+                  (reference-titlepage nl 'verso))
+                (empty-sosofo))
+
+            (if (not (generate-toc-in-front))
+                (process-children)
+                (empty-sosofo))
+            
+            (if (and (not (node-list-empty? refintro))
+                     (not %generate-partintro-on-titlepage%))
+                ($process-partintro$ refintro)
+                (empty-sosofo))
+            
+            (if (and %generate-reference-toc%
+                     (not %generate-reference-toc-on-titlepage%))
+                (make sequence
+                  (build-toc (current-node)
+                             (toc-depth (current-node))))
+                (empty-sosofo))
+            
+            (if (generate-toc-in-front)
+                (process-children)
+                (empty-sosofo)))))))
+
+;; If each RefEntry begins on a new page, this title is going to wind
+;; up on its own page, too, so make it a divtitlepage instead.  Otherwise,
+;; just let it be a component title.
+(element (reference title) 
+  (empty-sosofo))
+
+(mode refentry-head-title-mode
+  (default (process-children))
+
+  (element refnamediv
+    (let* ((refdesc (select-elements (children (current-node)) 
+                                    (normalize "refdescriptor")))
+          (refname (select-elements (children (current-node)) 
+                                    (normalize "refname")))
+          (title   (if (node-list-empty? refdesc)
+                       (node-list-first refname)
+                       (node-list-first refdesc))))
+      (process-node-list title)))
+
+  (element refdescriptor
+    (process-children))
+
+  (element refname
+    (process-children))
+
+  (element graphic (empty-sosofo))
+  (element inlinegraphic (empty-sosofo)))
+
+(define ($refentry-body$)
+  (let ((id (element-id (current-node))))
+    (make sequence 
+      (make element gi: "H1"
+           (make sequence
+             (make element gi: "A"
+                   attributes: (list (list "NAME" id))
+                   (empty-sosofo))
+             (element-title-sosofo (current-node))))
+      (process-children))))
+
+(element refentry
+  (html-document (with-mode refentry-head-title-mode
+                  (literal (element-title-string (current-node))))
+                ($refentry-body$)))
+
+(element refmeta (empty-sosofo))
+
+(element manvolnum 
+  ;; only called for xrefs and citerefentry
+  (if %refentry-xref-manvolnum%
+      (sosofo-append
+       (literal "(")
+       (process-children)
+       (literal ")"))
+      (empty-sosofo)))
+
+(element refmiscinfo (empty-sosofo))
+
+(element refentrytitle ($charseq$))
+
+(element refnamediv ($block-container$))
+
+(element refname
+  (make sequence
+    (if (and %refentry-generate-name% (first-sibling? (current-node)))
+       ($lowtitlewithsosofo$ 2 (literal (gentext-element-name 
+                                         (gi (current-node)))))
+       (empty-sosofo))
+    (make sequence
+         (process-children)
+         (if (last-sibling? (current-node))
+             (empty-sosofo)
+             (literal (gentext-intra-label-sep (gi (current-node))))))))
+
+(element refpurpose
+  (make sequence
+    (make entity-ref name: "nbsp")
+    (literal (dingbat "em-dash"))
+    (make entity-ref name: "nbsp")
+    (process-children)))
+       
+(element refdescriptor (empty-sosofo)) ;; TO DO: finish this
+
+(element refclass
+  (let ((role (attribute-string (normalize "role"))))
+    (make element gi: "P"
+         (make element gi: "B"
+               (literal
+                (if role
+                    (string-append role ": ")
+                    "")))
+         (process-children-trim))))
+
+(element refsynopsisdiv
+  (make element gi: "DIV"
+       attributes: (list (list "CLASS" (gi)))
+       (make element gi: "A"
+             attributes: (list (list "NAME" (element-id)))
+             (empty-sosofo))
+       (make element gi: "H2"
+             (element-title-sosofo (current-node)))
+       (process-children)))
+
+(element (refsynopsisdiv title) (empty-sosofo))
+
+(element refsect1 ($block-container$))
+(element (refsect1 title) ($lowtitle$ 2))
+(element refsect2 ($block-container$))
+(element (refsect2 title) ($lowtitle$ 3))
+(element refsect3 ($block-container$))
+(element (refsect3 title) ($lowtitle$ 4))
+
+
diff --git a/html/dbsect.dsl b/html/dbsect.dsl
new file mode 100644 (file)
index 0000000..151fc49
--- /dev/null
@@ -0,0 +1,160 @@
+;; $Id: dbsect.dsl,v 1.8 2003/03/25 19:53:41 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================== SECTIONS ==============================
+
+(define (SECTLEVEL #!optional (sect (current-node)))
+  (section-level-by-node (not nochunks) sect))
+
+;; BRIDGEHEAD isn't a proper section, but appears to be a section title
+(element bridgehead
+  (let* ((renderas (attribute-string "renderas"))
+        ;; the apparent section level
+        (hlevel
+         ;; if not real section level, then get the apparent level
+         ;; from "renderas"
+         (if renderas
+             (section-level-by-gi (not nochunks) (normalize renderas))
+             ;; else use the real level
+             (SECTLEVEL)))
+        (helem
+         (string-append "H" (number->string hlevel))))
+    (make element gi: helem
+         attributes: '(("CLASS" "BRIDGEHEAD"))
+         (make element gi: "A"
+               attributes: (list (list "NAME" (element-id)))
+               (empty-sosofo))
+         (process-children))))
+
+(define ($section-separator$) 
+  (let* (;; There are several situations in which we don't want a
+        ;; separator here:
+        ;; 1. This document is being chunked:
+        (chunks (not nochunks))
+        ;; 2. This node is the root element of the document:
+        (isroot (node-list=? (current-node) (sgml-root-element)))
+        ;; 3. This node is the first section in the root element
+        ;;    and no other content (except the *info elements and
+        ;;    the title) precedes it.  This means that the
+        ;;    titlepage-separator was the last thing we put out.
+        ;;    No one expects two separators in a row, or the Spanish
+        ;;    inquisition.
+        (s1ofrt  (node-list=? (parent (current-node)) (sgml-root-element)))
+        (precnd  (ipreced (current-node)))
+        (infond  (info-element (parent (current-node))))
+        (isfirst (or (equal? (gi precnd) (normalize "title"))
+                     (node-list=? precnd infond))))
+    (if (or chunks isroot isfirst)
+       (empty-sosofo)
+       (make empty-element gi: "HR"))))
+
+(define ($section$)
+  (html-document (with-mode head-title-mode 
+                  (literal (element-title-string (current-node))))
+                ($section-body$)))
+
+(define ($section-body$)
+  (make element gi: "DIV"
+       attributes: (list (list "CLASS" (gi)))
+       ($section-separator$)
+       ($section-title$)
+
+       (if (not (node-list-empty? (select-elements (children (current-node))
+                                                   (normalize "refentry"))))
+           (build-toc (current-node) 1)
+           (empty-sosofo))
+
+       (process-children)))
+
+(define ($section-title$)
+  (let* ((sect (current-node))
+        (info (info-element))
+        (subtitles (select-elements (children info) (normalize "subtitle")))
+        (renderas (inherited-attribute-string (normalize "renderas") sect))
+        ;; the apparent section level
+        (hlevel
+         ;; if not real section level, then get the apparent level
+         ;; from "renderas"
+         (if renderas
+             (section-level-by-gi (not nochunks) (normalize renderas))
+             ;; else use the real level
+             (SECTLEVEL)))
+        (h1elem
+         (string-append "H" (number->string hlevel)))
+        (h2elem
+         (string-append "H" (number->string (+ hlevel 1))))
+        (name (element-id))
+        (isep (gentext-intra-label-sep (gi sect)))
+        (nsep (gentext-label-title-sep (gi sect))))
+    (make sequence
+      (make element gi: h1elem
+           attributes: (list (list "CLASS" (gi sect)))
+           (make element gi: "A"
+                 attributes: (list (list "NAME" name))
+                 (make sequence
+                   (if (string=? (element-label (current-node)) "")
+                       (empty-sosofo)
+                       (literal (element-label (current-node)) nsep))
+                   (element-title-sosofo sect))))
+      (if (node-list-empty? subtitles) 
+         (empty-sosofo)
+         (with-mode subtitle-mode
+           (make element gi: h2elem
+                 (process-node-list subtitles))))
+      ($proc-section-info$ info))))
+
+(define ($proc-section-info$ info)
+  (cond ((equal? (gi) (normalize "sect1"))
+        ($sect1-info$ info))
+       ((equal? (gi) (normalize "sect2"))
+        ($sect2-info$ info))
+       ((equal? (gi) (normalize "sect3"))
+        ($sect3-info$ info))
+       ((equal? (gi) (normalize "sect4"))
+        ($sect4-info$ info))
+       ((equal? (gi) (normalize "sect5"))
+        ($sect5-info$ info))
+       ((equal? (gi) (normalize "section"))
+        ($section-info$ info))
+       ((equal? (gi) (normalize "refsect1"))
+        ($refsect1-info$ info))
+       ((equal? (gi) (normalize "refsect2"))
+        ($refsect2-info$ info))
+       ((equal? (gi) (normalize "refsect3"))
+        ($refsect3-info$ info))
+       (else (empty-sosofo))))
+
+(define ($sect1-info$ info) (empty-sosofo))
+(define ($sect2-info$ info) (empty-sosofo))
+(define ($sect3-info$ info) (empty-sosofo))
+(define ($sect4-info$ info) (empty-sosofo))
+(define ($sect5-info$ info) (empty-sosofo))
+(define ($section-info$ info) (empty-sosofo))
+(define ($refsect1-info$ info) (empty-sosofo))
+(define ($refsect2-info$ info) (empty-sosofo))
+(define ($refsect3-info$ info) (empty-sosofo))
+
+(element section ($section$))
+(element (section title) (empty-sosofo))
+
+(element sect1 ($section$))
+(element (sect1 title) (empty-sosofo))
+
+(element sect2 ($section$))
+(element (sect2 title) (empty-sosofo))
+
+(element sect3 ($section$))
+(element (sect3 title) (empty-sosofo))
+
+(element sect4 ($section$))
+(element (sect4 title) (empty-sosofo))
+
+(element sect5 ($section$))
+(element (sect5 title) (empty-sosofo))
+
+(element simplesect ($section$))
+(element (simplesect title) (empty-sosofo))
+
diff --git a/html/dbsynop.dsl b/html/dbsynop.dsl
new file mode 100644 (file)
index 0000000..f4f7a7e
--- /dev/null
@@ -0,0 +1,201 @@
+;; $Id: dbsynop.dsl,v 1.3 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================= SYNTAX DEFINITIONS =========================
+
+(element synopsis ($verbatim-display$ %indent-synopsis-lines%
+                                     %number-synopsis-lines%))
+(element cmdsynopsis ($paragraph$))
+
+;; Support for ARG provided by James Bostock, augmented by norm
+;;
+
+(element (cmdsynopsis command)
+  (make sequence
+    (if (first-sibling? (current-node))
+       (empty-sosofo)
+       (make empty-element gi: "BR"))
+    (next-match)
+    (literal " ")))
+
+(element group
+  (let ((choice (attribute-string (normalize "choice")))
+       (rep    (attribute-string (normalize "rep")))
+       (sepchar (if (inherited-attribute-string (normalize "sepchar"))
+                    (inherited-attribute-string (normalize "sepchar"))
+                    " ")))
+    (make sequence
+      (if (equal? (absolute-child-number (current-node)) 1)
+         (empty-sosofo)
+         (literal sepchar))
+      (cond
+       ((equal? choice (normalize "plain"))
+       (literal %arg-choice-plain-open-str%))
+       ((equal? choice (normalize "req"))
+       (literal %arg-choice-req-open-str%))
+       ((equal? choice (normalize "opt"))
+       (literal %arg-choice-opt-open-str%))
+       (else (literal %arg-choice-def-open-str%)))
+      (process-children)
+      (cond
+       ((equal? choice (normalize "plain"))
+       (literal %arg-choice-plain-close-str%))
+       ((equal? choice (normalize "req"))
+       (literal %arg-choice-req-close-str%))
+       ((equal? choice (normalize "opt"))
+       (literal %arg-choice-opt-close-str%))
+       (else (literal %arg-choice-def-close-str%)))
+      (cond
+       ((equal? rep (normalize "repeat"))
+       (literal %arg-rep-repeat-str%))
+       ((equal? rep (normalize "norepeat"))
+       (literal %arg-rep-norepeat-str%))
+       (else (literal %arg-rep-def-str%))))))
+
+(element arg
+  (let ((choice (attribute-string (normalize "choice")))
+       (rep    (attribute-string (normalize "rep")))
+       (sepchar (if (inherited-attribute-string (normalize "sepchar"))
+                    (inherited-attribute-string (normalize "sepchar"))
+                    " ")))
+    (make sequence
+      (if (equal? (absolute-child-number (current-node)) 1)
+         (empty-sosofo)
+         (literal sepchar))
+      (cond
+       ((equal? choice (normalize "plain"))
+       (literal %arg-choice-plain-open-str%))
+       ((equal? choice (normalize "req")) (literal %arg-choice-req-open-str%))
+       ((equal? choice (normalize "opt")) (literal %arg-choice-opt-open-str%))
+       (else (literal %arg-choice-def-open-str%)))
+      (process-children)
+      (cond
+       ((equal? rep (normalize "repeat")) (literal %arg-rep-repeat-str%))
+       ((equal? rep (normalize "norepeat")) (literal %arg-rep-norepeat-str%))
+       (else (literal %arg-rep-def-str%)))
+      (cond
+       ((equal? choice (normalize "plain")) (literal %arg-choice-plain-close-str%))
+       ((equal? choice (normalize "req")) (literal %arg-choice-req-close-str%))
+       ((equal? choice (normalize "opt")) (literal %arg-choice-opt-close-str%))
+       (else (literal %arg-choice-def-close-str%))))))
+
+
+(element (group arg)
+  (let ((choice (attribute-string (normalize "choice")))
+       (rep    (attribute-string (normalize "rep"))))
+    (make sequence
+      (if (not (first-sibling? (current-node)))
+         (literal %arg-or-sep%)
+         (empty-sosofo))
+      (process-children))))
+
+(element sbr 
+  (make empty-element gi: "BR"))
+
+;; ----------------------------------------------------------------------
+;; Syntax highlighting...
+
+(define (funcsynopsis-function #!optional (sosofo (process-children)))
+  (make element gi: "B"
+       attributes: '(("CLASS" "FSFUNC"))
+       sosofo))
+
+(define (paramdef-parameter #!optional (sosofo (process-children)))
+  (make element gi: "VAR"
+       attributes: '(("CLASS" "PDPARAM"))
+       sosofo))
+
+;; ----------------------------------------------------------------------
+
+(element synopfragmentref 
+  (let* ((target (element-with-id (attribute-string (normalize "linkend"))))
+        (snum   (child-number target)))
+    (make element gi: "I"
+         (make element gi: "A"
+               attributes: (list
+                            (list "HREF" (href-to target)))
+               (literal "(" (number->string snum) ")"))
+         (process-children))))
+
+(element synopfragment
+  (let ((id   (element-id (current-node)))
+       (snum (child-number (current-node))))
+    (make element gi: "P"
+         (make element gi: "A"
+               attributes: (list
+                            (list "NAME" id))
+               (literal "(" (number->string snum) ")"))
+         (make entity-ref name: "nbsp")
+         (process-children))))
+
+(element funcsynopsis ($informal-object$))
+
+(element funcsynopsisinfo ($verbatim-display$ %indent-funcsynopsisinfo-lines%
+                                             %number-funcsynopsisinfo-lines%))
+
+(element funcprototype 
+  (let ((paramdefs (select-elements (children (current-node)) (normalize "paramdef"))))
+    (make sequence
+      (make element gi: "P"
+           (make element gi: "CODE"
+                 (process-children)
+                 (if (equal? %funcsynopsis-style% 'kr)
+                     (with-mode kr-funcsynopsis-mode
+                       (process-node-list paramdefs))
+                     (empty-sosofo)))))))
+
+(element funcdef
+  (make element gi: "CODE"
+       attributes: '(("CLASS" "FUNCDEF"))
+       (process-children)))
+
+(element (funcdef function)
+  (if %funcsynopsis-decoration%
+      (funcsynopsis-function)
+      (process-children)))
+
+(element void 
+  (if (equal? %funcsynopsis-style% 'ansi)
+      (literal "(void);")
+      (literal "();")))
+
+(element varargs (literal "(...);"))
+
+(element paramdef
+  (let ((param (select-elements (children (current-node)) (normalize "parameter"))))
+    (make sequence
+      (if (equal? (child-number (current-node)) 1)
+         (literal "(")
+         (empty-sosofo))
+      (if (equal? %funcsynopsis-style% 'ansi)
+         (process-children)
+         (process-node-list param))
+      (if (equal? (gi (ifollow (current-node))) (normalize "paramdef"))
+         (literal ", ")
+         (literal ");")))))
+  
+(element (paramdef parameter)
+  (make sequence
+    (if %funcsynopsis-decoration%
+       (paramdef-parameter)
+       (process-children))
+    (if (equal? (gi (ifollow (current-node))) (normalize "parameter"))
+       (literal ", ")
+       (empty-sosofo))))
+
+(element funcparams 
+  (make sequence 
+    (literal "(")
+    (process-children)
+    (literal ")")))
+
+(mode kr-funcsynopsis-mode
+  (element paramdef
+    (make sequence
+      (make empty-element gi: "BR")
+      (process-children) 
+      (literal ";"))))
+
diff --git a/html/dbtable.dsl b/html/dbtable.dsl
new file mode 100644 (file)
index 0000000..91387b0
--- /dev/null
@@ -0,0 +1,494 @@
+;; $Id: dbtable.dsl,v 1.6 2003/02/11 01:20:04 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+;; Table support completely reimplemented by norm 15/16 Nov 1997.
+;; Adapted from print support.
+;;
+;; ======================================================================
+;;
+;; This code is intended to implement the SGML Open Exchange Table Model
+;; (http://www.sgmlopen.org/sgml/docs/techpubs.htm) as far as is possible
+;; in HTML.  There are a few areas where this code probably fails to 
+;; perfectly implement the model:
+;;
+;; - Mixed column width units (4*+2pi) are not supported.
+;; - The behavior that results from mixing relative units with 
+;;   absolute units has not been carefully considered.
+;;
+;; ======================================================================
+;; 
+;; My goal in reimplementing the table model was to provide correct
+;; formatting in tables that use MOREROWS. The difficulty is that
+;; correct formatting depends on calculating the column into which
+;; an ENTRY will fall.
+;;
+;; This is a non-trivial problem because MOREROWS can hang down from
+;; preceding rows and ENTRYs may specify starting columns (skipping
+;; preceding ones).
+;;
+;; A simple, elegant recursive algorithm exists. Unfortunately it 
+;; requires calculating the column number of every preceding cell 
+;; in the entire table. Without memoization, performance is unacceptable
+;; even in relatively small tables (5x5, for example).
+;;
+;; In order to avoid recursion, the algorithm used below is one that
+;; works forward from the beginning of the table and "passes along"
+;; the relevant information (column number of the preceding cell and
+;; overhang from the MOREROWS in preceding rows).
+;;
+;; Unfortunately, this means that element construction rules
+;; can't always be used to fire the appropriate rule.  Instead,
+;; each TGROUP has to process each THEAD/BODY/FOOT explicitly.
+;; And each of those must process each ROW explicitly, then each
+;; ENTRY/ENTRYTBL explicitly.
+;;
+;; ----------------------------------------------------------------------
+;;
+;; I attempted to simplify this code by relying on inheritence from
+;; table-column flow objects, but that wasn't entirely successful.
+;; Horizontally spanning cells didn't seem to inherit from table-column
+;; flow objects that didn't specify equal spanning.  There seemed to
+;; be other problems as well, but they could have been caused by coding
+;; errors on my part.
+;; 
+;; Anyway, by the time I understood how I could use table-column
+;; flow objects for inheritence, I'd already implemented all the
+;; machinery below to "work it out by hand".  
+;;
+;; ======================================================================
+;; NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE 
+;; ----------------------------------------------------------------------
+;; A fairly large chunk of this code is in dbcommon.dsl!
+;; ======================================================================
+
+;; Default for COLSEP/ROWSEP if unspecified
+(define %cals-rule-default% "0")
+
+;; Default for VALIGN if unspecified
+(define %cals-valign-default% "TOP")
+
+;; ======================================================================
+;; Convert colwidth units into table-unit measurements
+
+(define (colwidth-length lenstr)
+  (if (string? lenstr)
+      (let ((number (length-string-number-part lenstr))
+           (units  (length-string-unit-part lenstr)))
+       (if (or (string=? units "*") (string=? number ""))
+           ;; relative units or no number, give up
+           0pt
+           (if (string=? units "")
+               ;; no units, default to pixels
+               (* (string->number number) 1px)
+               (let* ((unum  (string->number number))
+                      (uname (case-fold-down units)))
+                 (case uname
+                   (("mm") (* unum 1mm))
+                   (("cm") (* unum 1cm))
+                   (("in") (* unum 1in))
+                   (("pi") (* unum 1pi))
+                   (("pt") (* unum 1pt))
+                   (("px") (* unum 1px))
+                   ;; unrecognized units; use pixels
+                   (else   (* unum 1px)))))))
+      ;; lenstr is not a string...probably #f
+      0pt))
+
+(define (cals-relative-colwidth? colwidth)
+  (if (string? colwidth)
+      (let ((strlen (string-length colwidth)))
+       (if (string=? colwidth "*")
+           #t
+           (string=? (substring colwidth (- strlen 1) strlen) "*")))
+      #f))
+
+(define (cals-relative-colwidth colwidth)
+  (let ((number (length-string-number-part colwidth))
+       (units  (length-string-unit-part colwidth)))
+    (if (string=? units "*")
+       (if (string=? number "")
+           1
+           (string->number number))
+       0)))
+
+(define (cell-relative-colwidth cell relative)
+  ;; given a cell and a relative width, work out the HTML cell WIDTH attribute
+  (let* ((tgroup (find-tgroup cell))
+        (pgwide? (equal? (attribute-string (normalize "pgwide") (parent tgroup)) "1")))
+    (if (and (not pgwide?) %html40%)
+       ;; html4 allows widths like "1*", we don't wanna use 50% if pgwide is not on
+       (string-append (number->string relative) "*")
+       (let loop ((colspecs (select-elements (children tgroup)
+                                             (normalize "colspec")))
+                  (reltotal 0))
+         (if (not (node-list-empty? colspecs))
+             (loop (node-list-rest colspecs)
+                   (+ reltotal (cals-relative-colwidth 
+                                (colspec-colwidth 
+                                 (node-list-first colspecs)))))
+             (if (equal? reltotal 0)
+                 ""
+                 (string-append (number->string (round (* (/ relative reltotal) 100))) "%")))))))
+
+(define (cell-colwidth cell colnum)
+  ;; return the width of a cell, or "" if not specified
+  (let* ((entry            (ancestor-member cell (list (normalize "entry") 
+                                               (normalize "entrytbl"))))
+        (colspec   (find-colspec-by-number colnum))
+        (colwidth  (colspec-colwidth colspec))
+        (width     (round (/ (colwidth-length colwidth) 1px))))
+    (if (node-list-empty? colspec)
+       ""
+       (if (and (equal? (hspan entry) 1) colwidth)
+           (if (cals-relative-colwidth? colwidth)
+               (cell-relative-colwidth cell (cals-relative-colwidth colwidth))
+               (number->string width))
+           ""))))
+
+;; ======================================================================
+
+(define (cell-align cell colnum)
+  ;; horizontal alignment for the cell, or "" if not set; efficiency
+  ;; here is important
+  (let* ((entry            (ancestor-member cell (list (normalize "entry") 
+                                               (normalize "entrytbl"))))
+        (spanname  (attribute-string (normalize "spanname") entry)))
+    (if (attribute-string (normalize "align") entry)
+       (attribute-string (normalize "align") entry)
+       (if (and spanname (spanspec-align (find-spanspec spanname)))
+           (spanspec-align (find-spanspec spanname))
+           (if %html40%
+               ;; no need to set align explictly, let COL do the work
+               ""
+               (if (colspec-align (find-colspec-by-number colnum))
+                   (colspec-align (find-colspec-by-number colnum))
+                   (let ((tgroup (find-tgroup entry)))
+                     (if (tgroup-align tgroup)
+                         (tgroup-align tgroup)
+                         (normalize "left")))))))))
+
+(define (cell-valign cell colnum)
+  ;; vertical alignment for the cell, or "" if not set; efficiency
+  ;; here is important
+  (let ((entry     (ancestor-member cell (list (normalize "entry")
+                                               (normalize "entrytbl")))))
+    (if (attribute-string (normalize "valign") entry)
+       (attribute-string (normalize "valign") entry)
+       "")))
+
+(define ($table-frame$ table)
+  ;; determine the proper setting for the html 4 FRAME attribute
+  (let* ((wrapper   (parent (current-node)))
+        (frameattr (attribute-string (normalize "frame") wrapper)))
+    (if (and %html40% frameattr)
+       (cond
+        ((equal? frameattr (normalize "all"))
+         (list (list "FRAME" "border")))
+        ((equal? frameattr (normalize "bottom"))
+         (list (list "FRAME" "below")))
+        ((equal? frameattr (normalize "none"))
+         (list (list "FRAME" "void")))
+        ((equal? frameattr (normalize "sides"))
+         (list (list "FRAME" "vsides")))
+        ((equal? frameattr (normalize "top"))
+         (list (list "FRAME" "above")))
+        ((equal? frameattr (normalize "topbot"))
+         (list (list "FRAME" "hsides")))
+        (else '()))
+       '())))
+
+(define ($table-border$ table)
+  ;; determine the proper setting for the html 4 BORDER attribute (cell frames)
+  ;; FIXME: rules can be overriden by COLSPEC elements, use "group" value?
+  (let* ((wrapper   (parent (current-node)))
+        (rowsepattr (or (attribute-string (normalize "rowsep") (current-node))
+                        (attribute-string (normalize "rowsep") wrapper)))
+        (colsepattr (or (attribute-string (normalize "colsep") (current-node))
+                        (attribute-string (normalize "colsep") wrapper))))
+    (if (and %html40% (or rowsepattr colsepattr))
+       ;; remember there are actually 3 possible values: 0, 1, unset
+       (cond
+        ((and (equal? colsepattr "1") (equal? rowsepattr "1"))
+         (list (list "RULES" "all")))
+        ((and (equal? colsepattr "0") (equal? rowsepattr "0"))
+         (list (list "RULES" "none")))
+        ((and (equal? colsepattr "1") (equal? rowsepattr "0"))
+         (list (list "RULES" "cols")))
+        ((and (equal? colsepattr "0") (equal? rowsepattr "1"))
+         (list (list "RULES" "rows")))
+        (else '()))        ; if rowsep set but not colsep, ignore it
+       '())))
+
+;; ======================================================================
+;; Element rules
+
+(element tgroup
+  (let* ((wrapper   (parent (current-node)))
+        (frameattr (attribute-string (normalize "frame") wrapper))
+        (pgwide    (attribute-string (normalize "pgwide") wrapper)))
+    (make element gi: "TABLE"
+         attributes: (append
+                      (if (equal? frameattr (normalize "none"))
+                           '(("BORDER" "0"))
+                           '(("BORDER" "1")))
+                      ($table-frame$ (current-node))
+                       ($table-border$ (current-node))
+                      (if (equal? pgwide "1")
+                           (list (list "WIDTH" ($table-width$)))
+                           '())
+                      (if %cals-table-class%
+                          (list (list "CLASS" %cals-table-class%))
+                          '()))
+         ($process-colspecs$ (current-node))
+         (process-node-list (select-elements (children (current-node)) (normalize "thead")))
+         (process-node-list (select-elements (children (current-node)) (normalize "tbody")))
+         (process-node-list (select-elements (children (current-node)) (normalize "tfoot")))
+         (make-table-endnotes))))
+
+(element entrytbl ;; sortof like a tgroup...
+  (let* ((wrapper   (parent (parent (parent (parent (current-node))))))
+        ;;          table   tgroup  tbody   row  
+        (frameattr (attribute-string (normalize "frame") wrapper))
+        (tgrstyle  (attribute-string (normalize "tgroupstyle"))))
+    (make element gi: "TABLE"
+         attributes: (append
+                      (if (and (or (equal? frameattr (normalize "none"))
+                                    (equal? tgrstyle (normalize "noborder")))
+                                (not (equal? tgrstyle (normalize "border"))))
+                           '(("BORDER" "0"))
+                           '(("BORDER" "1")))
+                      ($table-frame$ (current-node))
+                      ($table-border$ (current-node))
+                      (if %cals-table-class%
+                          (list (list "CLASS" %cals-table-class%))
+                          '()))
+         ($process-colspecs$ (current-node))
+         (process-node-list (select-elements (children (current-node)) (normalize "thead")))
+         (process-node-list (select-elements (children (current-node)) (normalize "tbody"))))))
+
+(element colspec
+  ;; now handled by $process-colspecs$
+  (empty-sosofo))
+
+(element spanspec
+  (empty-sosofo))
+
+(element thead
+  ;; note that colspec/spanspec in thead isn't supported by HTML table model
+  (if %html40%
+      (make element gi: "THEAD"
+           ($process-table-body$ (current-node)))
+      ($process-table-body$ (current-node))))
+
+(element tfoot
+  ;; note that colspec/spanspec in tfoot isn't supported by HTML table model
+  (if %html40%
+      (make element gi: "TFOOT"
+           ($process-table-body$ (current-node)))
+      ($process-table-body$ (current-node))))
+
+(element tbody
+  (if %html40%
+      (make element gi: "TBODY"
+            attributes: (if (attribute-string (normalize "valign"))
+                            (list (list "VALIGN" (attribute-string (normalize "valign"))))
+                            '())
+           ($process-table-body$ (current-node)))
+      ($process-table-body$ (current-node))))
+
+(element row
+  (empty-sosofo)) ;; this should never happen, they're processed explicitly
+
+(element entry
+  (empty-sosofo)) ;; this should never happen, they're processed explicitly
+
+;; ======================================================================
+;; Functions that handle processing of table bodies, rows, and cells
+
+(define ($process-colspecs$ tgroup)
+  ;; given tgroup or entrytbl, convert the colspecs to HTML4 COL elements
+  (if (not %html40%)
+      (empty-sosofo)
+      (let ((cols (string->number (attribute-string (normalize "cols")))))
+       (let loop ((colnum 1))
+         (if (> colnum cols)
+             (empty-sosofo)
+             (make sequence
+               (let* ((colspec  (find-colspec-by-number colnum))
+                      (colwidth (colspec-colwidth colspec)))
+                 (if (node-list-empty? colspec)
+                     (make empty-element gi: "COL")
+                     (make empty-element gi: "COL"
+                           attributes:
+                           (append
+                            (if colwidth
+                                (list (list "WIDTH"
+                                            (if (cals-relative-colwidth? colwidth)
+                                                (cell-relative-colwidth colspec (cals-relative-colwidth colwidth))
+                                                (number->string (round (/ (colwidth-length colwidth) 1px))))))
+                                '())
+                            (if (attribute-string (normalize "align") colspec)
+                                (list (list "ALIGN" (attribute-string (normalize "align") colspec)))
+                                '())
+                            (if (attribute-string (normalize "char") colspec)
+                                (list (list "CHAR" (attribute-string (normalize "char") colspec)))
+                                '())
+                            (if (attribute-string (normalize "charoff") colspec)
+                                (list (list "CHAROFF" (attribute-string (normalize "charoff") colspec)))
+                                '())
+                            (if (attribute-string (normalize "colname") colspec)
+                                (list (list "TITLE" (attribute-string (normalize "colname") colspec)))
+                                '())))))
+               (loop (+ colnum 1))))))))
+
+(define ($process-table-body$ body)
+  (let* ((tgroup (find-tgroup body))
+        (cols   (string->number (attribute-string (normalize "cols") 
+                                                  tgroup))))
+    (let loop ((rows (select-elements (children body) (normalize "row")))
+              (overhang (constant-list 0 cols)))
+      (if (node-list-empty? rows)
+         (empty-sosofo)
+         (make sequence
+           ($process-row$ (node-list-first rows) overhang)
+           (loop (node-list-rest rows)
+                 (update-overhang (node-list-first rows) overhang)))))))
+
+(define ($process-row$ row overhang)
+  ;; FIXME: rowsep
+  (let* ((tgroup (find-tgroup row))
+        (rowcells (node-list-filter-out-pis (children row)))
+        (rowalign (attribute-string (normalize "valign") row))
+        (maxcol (string->number (attribute-string (normalize "cols") tgroup)))
+        (lastentry (node-list-last rowcells)))
+    (make element gi: "TR"
+         attributes: (append
+                      (if rowalign
+                          (list (list "VALIGN" rowalign))
+                          '())
+                      '())
+         (let loop ((cells rowcells)
+                    (prevcell (empty-node-list)))
+           (if (node-list-empty? cells)
+               (empty-sosofo)
+               (make sequence
+                 ($process-cell$ (node-list-first cells) 
+                                 prevcell overhang)
+                 (loop (node-list-rest cells) 
+                       (node-list-first cells)))))
+         
+         ;; add any necessary empty cells to the end of the row
+         (let loop ((colnum (overhang-skip overhang
+                                           (+ (cell-column-number 
+                                               lastentry overhang)
+                                              (hspan lastentry)))))
+           (if (> colnum maxcol)
+               (empty-sosofo)
+               (make sequence
+                 (make element gi: "TD"
+                       (make entity-ref name: "nbsp"))
+                 (loop (overhang-skip overhang (+ colnum 1)))))))))
+
+(define (empty-cell? entry) 
+  ;; Return #t if and only if entry is empty (or contains only PIs)
+  (let loop ((nl (children entry)))
+    (if (node-list-empty? nl)
+       #t
+       (let* ((node       (node-list-first nl))
+              (nodeclass  (node-property 'class-name node))
+              (nodechar   (if (equal? nodeclass 'data-char)
+                              (node-property 'char node)
+                              #f))
+              (whitespace? (and (equal? nodeclass 'data-char)
+                               (or (equal? nodechar #\space)
+                                   (equal? (data node) "&#09;")
+                                   (equal? (data node) "&#10;")
+                                   (equal? (data node) "&#13;")))))
+         (if (not (or (equal? (node-property 'class-name node) 'pi)
+                      whitespace?))
+             #f
+             (loop (node-list-rest nl)))))))
+
+(define ($process-cell$ entry preventry overhang)
+  (let* ((colnum (cell-column-number entry overhang))
+        (lastcellcolumn (if (node-list-empty? preventry)
+                            0
+                            (- (+ (cell-column-number preventry overhang)
+                                  (hspan preventry))
+                               1)))
+        (lastcolnum (if (> lastcellcolumn 0)
+                        (overhang-skip overhang lastcellcolumn)
+                        0))
+        (htmlgi (if (have-ancestor? (normalize "tbody") entry)
+                    "TD"
+                    "TH")))
+    (make sequence
+      (if (node-list-empty? (preced entry))
+         (if (attribute-string (normalize "id") (parent entry))
+             (make element gi: "A"
+                   attributes: (list
+                                (list
+                                 "NAME"
+                                 (attribute-string (normalize "id")
+                                                   (parent entry))))
+                   (empty-sosofo))
+             (empty-sosofo))
+         (empty-sosofo))
+
+      (if (attribute-string (normalize "id") entry)
+         (make element gi: "A"
+               attributes: (list
+                            (list
+                             "NAME"
+                             (attribute-string (normalize "id") entry)))
+               (empty-sosofo))
+         (empty-sosofo))
+
+      ;; This is a little bit complicated.  We want to output empty cells
+      ;; to skip over missing data.  We start count at the column number
+      ;; arrived at by adding 1 to the column number of the previous entry
+      ;; and skipping over any MOREROWS overhanging entrys.  Then for each
+      ;; iteration, we add 1 and skip over any overhanging entrys.
+      (let loop ((count (overhang-skip overhang (+ lastcolnum 1))))
+       (if (>= count colnum)
+           (empty-sosofo)
+           (make sequence
+             (make element gi: htmlgi
+                   (make entity-ref name: "nbsp")
+;;               (literal (number->string lastcellcolumn) ", ")
+;;               (literal (number->string lastcolnum) ", ")
+;;               (literal (number->string (hspan preventry)) ", ")
+;;               (literal (number->string colnum ", "))
+;;               ($debug-pr-overhang$ overhang)
+                   )
+             (loop (overhang-skip overhang (+ count 1))))))
+
+      ;; Now we've output empty cells for any missing entries, so we 
+      ;; are ready to output the cell for this entry...
+      (make element gi: htmlgi
+           attributes: (append
+                        (if (> (hspan entry) 1)
+                            (list (list "COLSPAN" (number->string (hspan entry))))
+                            '())
+                        (if (> (vspan entry) 1)
+                            (list (list "ROWSPAN" (number->string (vspan entry))))
+                            '())
+                        (if (and (not %html40%) (not (equal? (cell-colwidth entry colnum) "")))
+                            (list (list "WIDTH" (cell-colwidth entry colnum)))
+                            '())
+                        (if (not (equal? (cell-align entry colnum) ""))
+                            (list (list "ALIGN" (cell-align entry colnum)))
+                            '())
+                        (if (not (equal? (cell-valign entry colnum) ""))
+                            (list (list "VALIGN" (cell-valign entry colnum)))
+                            '()))
+           (if (empty-cell? entry) 
+               (make entity-ref name: "nbsp")
+               (if (equal? (gi entry) (normalize "entrytbl"))
+                   (process-node-list entry)
+                   (process-node-list (children entry))))))))
+
+;; EOF dbtable.dsl
+
diff --git a/html/dbtitle.dsl b/html/dbtitle.dsl
new file mode 100644 (file)
index 0000000..b56225c
--- /dev/null
@@ -0,0 +1,67 @@
+;; $Id: dbtitle.dsl,v 1.2 2003/01/15 08:24:13 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; So we can pass different sosofo's to this routine and get identical
+;; treatment (see REFNAME in dbrfntry.dsl)
+;;
+(define ($lowtitlewithsosofo$ tlevel sosofo)
+  (let ((tgi (cond
+             ((equal? tlevel 1) "H1")
+             ((equal? tlevel 2) "H2")
+             ((equal? tlevel 3) "H3")
+             ((equal? tlevel 4) "H4")
+             ((equal? tlevel 5) "H5")
+             (else "P"))))
+    (if (< tlevel 6)
+       (make element gi: tgi
+             sosofo)
+       (make element gi: "P"
+             (make element gi: "B"
+                   sosofo)))))
+
+(define ($lowtitle$ tlevel)
+  ($lowtitlewithsosofo$ tlevel (process-children)))
+
+(define ($runinhead$)
+  (let* ((title    (data (current-node)))
+        (titlelen (string-length title))
+        (lastchar (if (> titlelen 0)
+                      (string-ref title (- titlelen 1))
+                      "."))
+        (punct    (if (or (= titlelen 0) 
+                          (member lastchar %content-title-end-punct%))
+                      ""
+                      %default-title-end-punct%)))
+    (make element gi: "B"
+         (process-children)
+         (literal punct " "))))
+
+(element title 
+  (make element gi: "P"
+       (make element gi: "B"
+             (process-children-trim))))
+
+(element titleabbrev (empty-sosofo))
+
+(mode title-mode
+  (element title
+    (process-children)))
+
+(mode subtitle-mode
+  (element subtitle
+    (make sequence
+      (literal (if (first-sibling?)
+                  ""
+                  "; "))
+      (process-children))))
+
+(mode head-title-mode
+  ;; TITLE in an HTML HEAD
+  (default
+    (process-children))
+
+  (element graphic (empty-sosofo))
+  (element inlinegraphic (empty-sosofo)))
diff --git a/html/dbttlpg.dsl b/html/dbttlpg.dsl
new file mode 100644 (file)
index 0000000..ebeb5fa
--- /dev/null
@@ -0,0 +1,4588 @@
+;; $Id: dbttlpg.dsl,v 1.10 2004/10/10 11:55:10 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define (have-sibling? sibling-gi #!optional (node (current-node)))
+  (let loop ((nl (children (parent node))))
+    (if (node-list-empty? nl) 
+       #f
+       (if (equal? (gi (node-list-first nl)) sibling-gi)
+           #t
+           (loop (node-list-rest nl))))))
+
+(define (titlepage-content? elements gis)
+  (let giloop ((gilist gis))
+    (if (null? gilist)
+       #f
+       (if (not (node-list-empty? (node-list-filter-by-gi 
+                                   elements 
+                                   (list (car gilist)))))
+           #t
+           (giloop (cdr gilist))))))
+
+(define (titlepage-gi-list-by-elements elements nodelist) 
+  ;; Elements is a list of GIs.  Nodelist is a list of nodes.
+  ;; This function returns all of the nodes in nodelist that
+  ;; are in elements in the order they occur in elements.
+  (let loop ((gilist elements) (rlist (empty-node-list)))
+    (if (null? gilist)
+       rlist
+       (loop (cdr gilist) 
+             (node-list rlist (node-list-filter-by-gi 
+                               nodelist (list (car gilist))))))))
+
+(define (titlepage-gi-list-by-nodelist elements nodelist) 
+  ;; Elements is a list of GIs.  Nodelist is a list of nodes.
+  ;; This function returns all of the nodes in nodelist that
+  ;; are in elements in the order they occur in nodelist.
+  (let loop ((nl nodelist) (rlist (empty-node-list)))
+    (if (node-list-empty? nl)
+       rlist
+       (if (member (gi (node-list-first nl)) elements)
+           (loop (node-list-rest nl)
+                 (node-list rlist (node-list-first nl)))
+           (loop (node-list-rest nl) rlist)))))
+
+(define (titlepage-nodelist elements nodelist)
+  ;; We expand BOOKBIBLIO, BIBLIOMISC, and BIBLIOSET in the element
+  ;; list because that level of wrapper usually isn't significant.
+  (let ((exp-nodelist (expand-children nodelist (list (normalize "bookbiblio") 
+                                                     (normalize "bibliomisc")
+                                                     (normalize "biblioset")))))
+    (if %titlepage-in-info-order%
+       (titlepage-gi-list-by-nodelist elements exp-nodelist)
+       (titlepage-gi-list-by-elements elements exp-nodelist))))
+
+(define (titlepage-recto-legalnotice #!optional (node (current-node)))
+  (let ((notices     (select-elements 
+                     (children (parent node))
+                     (normalize "legalnotice")))
+       (copyrights  (select-elements 
+                     (children (parent node))
+                     (normalize "copyright"))))
+    (if (and %generate-legalnotice-link%
+            (not nochunks))
+       ;; Divert the contents of legal to another file.  It will be xref'd
+       ;; from the Copyright.
+       (if (first-sibling? node)
+           (make sequence
+             (make entity
+               system-id: (html-entity-file
+                           ($legalnotice-link-file$ node))
+               (html-doctype)
+               (make element gi: "HTML"
+                     (make element gi: "HEAD"
+                           ($standard-html-header$))
+                     (make element gi: "BODY" 
+                           attributes: %body-attr%
+                           (header-navigation node)
+                           ($semiformal-object$)
+                           (with-mode legal-notice-link-mode
+                             (process-node-list (node-list-rest notices)))
+                           (footer-navigation node))))
+             (if (node-list-empty? copyrights)
+                 (make element gi: "A"
+                       attributes: (list 
+                                    (list "HREF" 
+                                          ($legalnotice-link-file$
+                                           node)))
+                       (literal (gentext-element-name node)))
+                 (empty-sosofo)))
+           (empty-sosofo))
+       ($semiformal-object$))))
+
+(define (titlepage-recto-copyright #!optional (node (current-node)))
+  (let ((years (select-elements (descendants node)
+                               (normalize "year")))
+       (holders (select-elements (descendants node)
+                                 (normalize "holder")))
+       (legalnotice (select-elements (children (parent node))
+                                     (normalize "legalnotice"))))
+    (make element gi: "P"
+         attributes: (list
+                      (list "CLASS" (gi)))
+         (if (and %generate-legalnotice-link%
+                  (not nochunks)
+                  (not (node-list-empty? legalnotice)))
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list 
+                                  (list "HREF" 
+                                        ($legalnotice-link-file$
+                                         (node-list-first legalnotice))))
+                     (literal (gentext-element-name (gi node))))
+               (literal " ")
+               (dingbat-sosofo "copyright")
+               (literal " ")
+               (process-node-list years)
+               (literal " ")
+               (process-node-list holders))
+             (make sequence
+               (literal (gentext-element-name (gi node)))
+               (literal " ")
+               (dingbat-sosofo "copyright")
+               (literal " ")
+               (process-node-list years)
+               (literal " ")
+               (process-node-list holders))))))
+
+;; == Title pages for SETs ==============================================
+
+(define (set-titlepage-recto-elements)
+  (list (normalize "title")
+       (normalize "subtitle")
+       (normalize "graphic")
+       (normalize "mediaobject")
+       (normalize "corpauthor")
+       (normalize "authorgroup")
+       (normalize "author")
+       (normalize "editor")
+       (normalize "copyright")
+       (normalize "legalnotice")))
+
+(define (set-titlepage-verso-elements) '())
+
+(define (set-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (set-titlepage-recto-elements)
+                                  (set-titlepage-verso-elements))))
+
+(define (set-titlepage elements #!optional (side 'recto))
+  (let ((nodelist (titlepage-nodelist 
+                  (if (equal? side 'recto)
+                      (set-titlepage-recto-elements)
+                      (set-titlepage-verso-elements))
+                  elements)))
+    (if (set-titlepage-content? elements side)
+       (make element gi: "DIV"
+             attributes: '(("CLASS" "TITLEPAGE"))
+         (let loop ((nl nodelist) (lastnode (empty-node-list)))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (if (or (node-list-empty? lastnode)
+                         (not (equal? (gi (node-list-first nl))
+                                      (gi lastnode))))
+                     (set-titlepage-before (node-list-first nl) side)
+                     (empty-sosofo))
+                 (cond
+                  ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                   (set-titlepage-abbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                   (set-titlepage-abstract (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "address"))
+                   (set-titlepage-address (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                   (set-titlepage-affiliation (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                   (set-titlepage-artpagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "author"))
+                   (set-titlepage-author (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                   (set-titlepage-authorblurb (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                   (set-titlepage-authorgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                   (set-titlepage-authorinitials (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                   (set-titlepage-bibliomisc (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                   (set-titlepage-biblioset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                   (set-titlepage-bookbiblio (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                   (set-titlepage-citetitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                   (set-titlepage-collab (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                   (set-titlepage-confgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                   (set-titlepage-contractnum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                   (set-titlepage-contractsponsor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                   (set-titlepage-contrib (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                   (set-titlepage-recto-copyright (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                   (set-titlepage-corpauthor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                   (set-titlepage-corpname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "date"))
+                   (set-titlepage-date (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                   (set-titlepage-edition (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                   (set-titlepage-editor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                   (set-titlepage-firstname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                   (set-titlepage-graphic (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                   (set-titlepage-honorific (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                   (set-titlepage-indexterm (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                   (set-titlepage-invpartnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                   (set-titlepage-isbn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                   (set-titlepage-issn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                   (set-titlepage-issuenum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                   (set-titlepage-itermset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                   (set-titlepage-keywordset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                   (set-titlepage-recto-legalnotice (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                   (set-titlepage-lineage (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                   (set-titlepage-modespec (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                   (set-titlepage-modespec (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                   (set-titlepage-orgname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                   (set-titlepage-othercredit (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                   (set-titlepage-othername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                   (set-titlepage-pagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                   (set-titlepage-printhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                   (set-titlepage-productname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                   (set-titlepage-productnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                   (set-titlepage-pubdate (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                   (set-titlepage-publisher (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                   (set-titlepage-publishername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                   (set-titlepage-pubsnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                   (set-titlepage-releaseinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                   (set-titlepage-revhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                   (set-titlepage-seriesinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                   (set-titlepage-seriesvolnums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                   (set-titlepage-subjectset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                   (set-titlepage-subtitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                   (set-titlepage-surname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "title"))
+                   (set-titlepage-title (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                   (set-titlepage-titleabbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                   (set-titlepage-volumenum (node-list-first nl) side))
+                  (else
+                    (set-titlepage-default (node-list-first nl) side)))
+                 (loop (node-list-rest nl) (node-list-first nl)))))
+         (set-titlepage-separator side))
+       (empty-sosofo))))
+
+(define (set-titlepage-separator side)
+  (empty-sosofo))
+
+(define (set-titlepage-before node side)
+  (empty-sosofo))
+
+(define (set-titlepage-default node side)
+  (let ((foo (debug (string-append "No set-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (set-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode set-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode set-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (set-titlepage-abbrev node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-abstract node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-address node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-affiliation node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-artpagenums node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-author node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-authorblurb node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-authorgroup node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-authorinitials node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-bibliomisc node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-biblioset node side)
+  (set-titlepage node side))
+(define (set-titlepage-bookbiblio node side)
+  (set-titlepage node side))
+(define (set-titlepage-citetitle node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-collab node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-confgroup node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-contractnum node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-contractsponsor node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-contrib  node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-recto-copyright node side)
+  (set-titlepage-element node side))
+
+(define (set-titlepage-corpauthor node side)
+  (if (equal? side 'recto)
+      (set-titlepage-element node side)
+      (if (first-sibling? node)
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi node)))
+               (with-mode set-titlepage-verso-mode
+                 (process-node-list
+                  (select-elements (children (parent node))
+                                   (normalize "corpauthor")))))
+         (empty-sosofo))))
+
+(define (set-titlepage-corpname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-date node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-edition node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-editor node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-firstname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-graphic node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-honorific node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-indexterm node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-invpartnumber node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-isbn node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-issn node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-issuenum node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-itermset node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-keywordset node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-recto-legalnotice node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-lineage node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-mediaobject node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-modespec node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-orgname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-othercredit node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-othername node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-pagenums node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-printhistory node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-productname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-productnumber node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-pubdate node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-publisher node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-publishername node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-pubsnumber node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-releaseinfo node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-revhistory node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-seriesinfo node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-seriesvolnums node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-subjectset node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-subtitle node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-surname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-title node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-titleabbrev node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-volumenum node side)
+  (set-titlepage-element node side))
+
+(mode set-titlepage-recto-mode
+  (element para
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element abstract
+    (make element gi: "DIV"
+         ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               (literal author-name)))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element authorgroup
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make sequence
+           (make element gi: "A"
+               attributes: (list (list "NAME" (element-id)))
+               (empty-sosofo))
+           (process-children))))
+
+  (element copyright
+    (titlepage-recto-copyright))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element edition
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence
+       (if (first-sibling?) 
+           (make element gi: "H4"
+                 attributes: (list (list "CLASS" "EDITEDBY"))
+                 (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (literal editor-name)))))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string (normalize "fileref") nd))
+          (entattr (attribute-string (normalize "entityref") nd))
+          (entityref (if entattr
+                         (entity-system-id entattr)
+                         #f))
+          (format  (attribute-string (normalize "format")))
+          (align   (attribute-string (normalize "align")))
+          (attr    (append 
+                    (if align 
+                        (list (list "ALIGN" align)) 
+                        '())
+                    (if entityref
+                        (list (list "SRC" (graphic-file entityref)))
+                        (list (list "SRC" (graphic-file fileref))))
+                    (list (list "ALT" ""))
+                    )))
+      (if (or fileref entityref) 
+         (make empty-element gi: "IMG"
+               attributes: attr)
+         (empty-sosofo))))
+
+  (element legalnotice 
+    (titlepage-recto-legalnotice))
+  
+  (element (legalnotice title) (empty-sosofo))
+
+  (element pubdate
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element publisher
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element publishername
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pubsnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element releaseinfo
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element subtitle 
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children-trim)))
+
+  (element title 
+    (make element gi: "H1"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "A"
+               attributes: (list (list "NAME" (element-id)))
+               (with-mode title-mode
+                 (process-children-trim)))))
+
+  (element (formalpara title) ($runinhead$))
+)
+
+(mode set-titlepage-verso-mode
+  (element abstract ($semiformal-object$))
+  (element (abstract title) (empty-sosofo))
+  
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (literal (gentext-by))
+               (make entity-ref name: "nbsp")
+               (make sequence
+                 (make element gi: "A"
+                       attributes: (list (list "NAME" (element-id)))
+                       (empty-sosofo))
+                 (literal (author-list-string))))
+         (make sequence
+           (make element gi: "A"
+                 attributes: (list (list "NAME" (element-id)))
+                 (empty-sosofo))
+           (literal (author-list-string))))))
+
+  (element authorgroup
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-by))
+         (make entity-ref name: "nbsp")
+         (process-children-trim)))
+
+  (element copyright
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name (current-node)))
+         (make entity-ref name: "nbsp")
+         (dingbat-sosofo "copyright")
+         (make entity-ref name: "nbsp")
+         (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element edition
+    (make element gi: "P"
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (make sequence
+                 (literal (gentext-edited-by))
+                 (make entity-ref name: "nbsp")
+                 (literal (author-string))))
+         (literal (author-string)))))
+
+  (element legalnotice
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element pubdate
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name-space (gi (current-node))))
+         (process-children)))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element subtitle
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element title
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode title-mode
+           (process-children))))
+
+  (element (formalpara title) ($runinhead$))
+)
+
+;; == Title pages for BOOKs =============================================
+
+(define (book-titlepage-recto-elements)
+  (list (normalize "title")
+       (normalize "subtitle")
+       (normalize "graphic")
+       (normalize "mediaobject")
+       (normalize "corpauthor")
+       (normalize "authorgroup")
+       (normalize "author")
+       (normalize "editor")
+       (normalize "copyright")
+       (normalize "abstract")
+       (normalize "legalnotice")))
+
+(define (book-titlepage-verso-elements) '())
+
+(define (book-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (book-titlepage-recto-elements)
+                                  (book-titlepage-verso-elements))))
+
+(define (book-titlepage elements #!optional (side 'recto))
+  (let ((nodelist (titlepage-nodelist 
+                  (if (equal? side 'recto)
+                      (book-titlepage-recto-elements)
+                      (book-titlepage-verso-elements))
+                  elements)))
+    (if (book-titlepage-content? elements side)
+       (make element gi: "DIV"
+             attributes: '(("CLASS" "TITLEPAGE"))
+         (let loop ((nl nodelist) (lastnode (empty-node-list)))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (if (or (node-list-empty? lastnode)
+                         (not (equal? (gi (node-list-first nl))
+                                      (gi lastnode))))
+                     (book-titlepage-before (node-list-first nl) side)
+                     (empty-sosofo))
+                 (cond
+                  ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                   (book-titlepage-abbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                   (book-titlepage-abstract (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "address"))
+                   (book-titlepage-address (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                   (book-titlepage-affiliation (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                   (book-titlepage-artpagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "author"))
+                   (book-titlepage-author (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                   (book-titlepage-authorblurb (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                   (book-titlepage-authorgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                   (book-titlepage-authorinitials (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                   (book-titlepage-bibliomisc (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                   (book-titlepage-biblioset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                   (book-titlepage-bookbiblio (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                   (book-titlepage-citetitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                   (book-titlepage-collab (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                   (book-titlepage-confgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                   (book-titlepage-contractnum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                   (book-titlepage-contractsponsor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                   (book-titlepage-contrib (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                   (book-titlepage-recto-copyright (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                   (book-titlepage-corpauthor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                   (book-titlepage-corpname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "date"))
+                   (book-titlepage-date (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                   (book-titlepage-edition (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                   (book-titlepage-editor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                   (book-titlepage-firstname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                   (book-titlepage-graphic (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                   (book-titlepage-honorific (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                   (book-titlepage-indexterm (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                   (book-titlepage-invpartnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                   (book-titlepage-isbn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                   (book-titlepage-issn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                   (book-titlepage-issuenum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                   (book-titlepage-itermset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                   (book-titlepage-keywordset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                   (book-titlepage-recto-legalnotice (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                   (book-titlepage-lineage (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                   (book-titlepage-mediaobject (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                   (book-titlepage-modespec (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                   (book-titlepage-orgname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                   (book-titlepage-othercredit (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                   (book-titlepage-othername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                   (book-titlepage-pagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                   (book-titlepage-printhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                   (book-titlepage-productname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                   (book-titlepage-productnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                   (book-titlepage-pubdate (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                   (book-titlepage-publisher (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                   (book-titlepage-publishername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                   (book-titlepage-pubsnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                   (book-titlepage-releaseinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                   (book-titlepage-revhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                   (book-titlepage-seriesinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                   (book-titlepage-seriesvolnums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                   (book-titlepage-subjectset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                   (book-titlepage-subtitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                   (book-titlepage-surname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "title"))
+                   (book-titlepage-title (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                   (book-titlepage-titleabbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                   (book-titlepage-volumenum (node-list-first nl) side))
+                  (else
+                   (book-titlepage-default (node-list-first nl) side)))
+                 (loop (node-list-rest nl) (node-list-first nl)))))
+         (book-titlepage-separator side))
+       (empty-sosofo))))
+
+(define (book-titlepage-separator side)
+  (if (equal? side 'recto)
+      (make empty-element gi: "HR")
+      (empty-sosofo)))
+
+(define (book-titlepage-before node side)
+  (empty-sosofo))
+
+(define (book-titlepage-default node side)
+  (let ((foo (debug (string-append "No book-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (book-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode book-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode book-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (book-titlepage-abbrev node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-abstract node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-address node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-affiliation node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-artpagenums node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-author node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-authorblurb node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-authorgroup node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-authorinitials node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-bibliomisc node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-biblioset node side)
+  (book-titlepage node side))
+(define (book-titlepage-bookbiblio node side)
+  (book-titlepage node side))
+(define (book-titlepage-citetitle node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-collab node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-confgroup node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-contractnum node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-contractsponsor node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-contrib  node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-recto-copyright node side)
+  (book-titlepage-element node side))
+
+(define (book-titlepage-corpauthor node side)
+  (if (equal? side 'recto)
+      (book-titlepage-element node side)
+      (if (first-sibling? node)
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi node)))
+               (with-mode book-titlepage-verso-mode
+                 (process-node-list
+                  (select-elements (children (parent node)) 
+                                   (normalize "corpauthor")))))
+         (empty-sosofo))))
+
+(define (book-titlepage-corpname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-date node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-edition node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-editor node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-firstname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-graphic node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-honorific node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-indexterm node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-invpartnumber node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-isbn node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-issn node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-issuenum node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-itermset node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-keywordset node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-recto-legalnotice node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-lineage node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-mediaobject node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-modespec node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-orgname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-othercredit node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-othername node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-pagenums node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-printhistory node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-productname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-productnumber node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-pubdate node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-publisher node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-publishername node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-pubsnumber node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-releaseinfo node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-revhistory node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-seriesinfo node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-seriesvolnums node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-subjectset node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-subtitle node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-surname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-title node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-titleabbrev node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-volumenum node side)
+  (book-titlepage-element node side))
+
+(mode titlepage-address-mode
+  (default (process-children))
+
+  (element email
+    ($code-seq$
+     (make sequence
+       (literal "&#60;")
+       (make element gi: "A"
+            attributes: (list (list "HREF"
+                                    (string-append "mailto:"
+                                                   (data (current-node)))))
+            (process-children))
+       (literal "&#62;")))))
+
+(mode book-titlepage-recto-mode
+  (element abbrev
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element abstract
+    (make element gi: "DIV"
+         ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element artpagenums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               (literal author-name)))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element authorgroup
+    (process-children))
+
+  (element authorinitials
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element bibliomisc (process-children))
+  (element bibliomset (process-children))
+
+  (element collab
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element confgroup
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contractnum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contractsponsor
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contrib
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element copyright
+    (titlepage-recto-copyright))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element corpname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element date
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element edition
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence
+       (if (first-sibling?) 
+           (make element gi: "H4"
+                 attributes: (list (list "CLASS" "EDITEDBY"))
+                 (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (literal editor-name)))))
+
+  (element firstname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string (normalize "fileref") nd))
+          (entattr (attribute-string (normalize "entityref") nd))
+          (entityref (if entattr
+                         (entity-system-id entattr)
+                         #f))
+          (format  (attribute-string (normalize "format")))
+          (align   (attribute-string (normalize "align")))
+          (attr    (append 
+                    (if align 
+                        (list (list "ALIGN" align)) 
+                        '())
+                    (if entityref
+                        (list (list "SRC" (graphic-file entityref)))
+                        (list (list "SRC" (graphic-file fileref))))
+                    (list (list "ALT" ""))
+                    )))
+      (if (or fileref entityref) 
+         (make empty-element gi: "IMG"
+               attributes: attr)
+         (empty-sosofo))))
+
+  (element honorific
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element isbn
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element issn
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element issuenum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element jobtitle
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element keywordset (empty-sosofo))
+
+  (element legalnotice 
+    (titlepage-recto-legalnotice))
+  
+  (element (legalnotice title) (empty-sosofo))
+
+  (element lineage
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element orgname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element othercredit
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               (literal author-name)))
+       (process-node-list author-affil))))
+
+  (element othername
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pagenums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element printhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element productname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element productnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pubdate
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element publisher
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element publishername
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pubsnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element releaseinfo
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element seriesvolnums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element shortaffil
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element subjectset (empty-sosofo))
+
+  (element subtitle 
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children-trim)))
+
+  (element surname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element title 
+    (make element gi: "H1"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "A"
+               attributes: (list (list "NAME" (element-id)))
+               (with-mode title-mode
+                 (process-children-trim)))))
+
+  (element (formalpara title) ($runinhead$))
+
+  (element titleabbrev (empty-sosofo))
+  
+  (element volumenum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+)
+
+(mode book-titlepage-verso-mode
+  (element abbrev
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element abstract
+    (make element gi: "DIV"
+         ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element artpagenums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (literal (gentext-by))
+               (make entity-ref name: "nbsp")
+               (make sequence
+                 (make element gi: "A"
+                       attributes: (list (list "NAME" (element-id)))
+                       (empty-sosofo))
+                 (literal (author-list-string))))
+         (make sequence
+           (make element gi: "A"
+                 attributes: (list (list "NAME" (element-id)))
+                 (empty-sosofo))
+           (literal (author-list-string))))))
+
+  (element authorblurb
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element authorgroup
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-by))
+         (make entity-ref name: "nbsp")
+         (process-children-trim)))
+
+  (element authorinitials
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element bibliomisc (process-children))
+  (element bibliomset (process-children))
+
+  (element collab
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element confgroup
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contractnum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contractsponsor
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contrib
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element copyright
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name (current-node)))
+         (make entity-ref name: "nbsp")
+         (dingbat-sosofo "copyright")
+         (make entity-ref name: "nbsp")
+         (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element corpname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element date
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element edition
+    (make element gi: "P"
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (make sequence
+                 (literal (gentext-edited-by))
+                 (make entity-ref name: "nbsp")
+                 (literal (author-string))))
+         (literal (author-string)))))
+
+  (element firstname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string (normalize "fileref") nd))
+          (entattr (attribute-string (normalize "entityref") nd))
+          (entityref (if entattr
+                         (entity-system-id entattr)
+                         #f))
+          (format  (attribute-string (normalize "format")))
+          (align   (attribute-string (normalize "align")))
+          (attr    (append 
+                    (if align 
+                        (list (list "ALIGN" align)) 
+                        '())
+                    (if entityref
+                        (list (list "SRC" (graphic-file entityref)))
+                        (list (list "SRC" (graphic-file fileref))))
+                    (list (list "ALT" ""))
+                    )))
+      (if (or fileref entityref) 
+         (make empty-element gi: "IMG"
+               attributes: attr)
+         (empty-sosofo))))
+
+  (element honorific
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element isbn
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element issn
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element issuenum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element jobtitle
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element keywordset (empty-sosofo))
+
+  (element legalnotice
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element lineage
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element orgname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element othercredit
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               (literal author-name)))
+       (process-node-list author-affil))))
+
+  (element othername
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pagenums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element printhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element productname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element productnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pubdate
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name-space (gi (current-node))))
+         (process-children)))
+
+  (element publisher
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element publishername
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pubsnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element releaseinfo
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element seriesvolnums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element shortaffil
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element subjectset (empty-sosofo))
+
+  (element subtitle
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element surname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element title
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode title-mode
+           (process-children))))
+
+  (element (formalpara title) ($runinhead$))
+
+  (element titleabbrev (empty-sosofo))
+  
+  (element volumenum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+)
+
+(mode legal-notice-link-mode
+  (element legalnotice
+    ($semiformal-object$)))
+
+;; == Title pages for PARTs =============================================
+
+(define (part-titlepage-recto-elements)
+  (list (normalize "title")
+       (normalize "subtitle")))
+
+(define (part-titlepage-verso-elements)
+  '())
+
+(define (part-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (part-titlepage-recto-elements)
+                                  (part-titlepage-verso-elements))))
+
+(define (part-titlepage elements #!optional (side 'recto))
+  (let ((nodelist (titlepage-nodelist 
+                  (if (equal? side 'recto)
+                      (part-titlepage-recto-elements)
+                      (part-titlepage-verso-elements))
+                  elements))
+        ;; partintro is a special case...
+       (partintro (node-list-first
+                   (node-list-filter-by-gi elements 
+                                           (list (normalize "partintro"))))))
+    (if (part-titlepage-content? elements side)
+       (make element gi: "DIV"
+             attributes: '(("CLASS" "TITLEPAGE"))
+         (let loop ((nl nodelist) (lastnode (empty-node-list)))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (if (or (node-list-empty? lastnode)
+                         (not (equal? (gi (node-list-first nl))
+                                      (gi lastnode))))
+                     (part-titlepage-before (node-list-first nl) side)
+                     (empty-sosofo))
+                 (cond
+                  ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                   (part-titlepage-abbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                   (part-titlepage-abstract (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "address"))
+                   (part-titlepage-address (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                   (part-titlepage-affiliation (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                   (part-titlepage-artpagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "author"))
+                   (part-titlepage-author (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                   (part-titlepage-authorblurb (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                   (part-titlepage-authorgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                   (part-titlepage-authorinitials (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                   (part-titlepage-bibliomisc (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                   (part-titlepage-biblioset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                   (part-titlepage-bookbiblio (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                   (part-titlepage-citetitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                   (part-titlepage-collab (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                   (part-titlepage-confgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                   (part-titlepage-contractnum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                   (part-titlepage-contractsponsor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                   (part-titlepage-contrib (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                   (part-titlepage-recto-copyright (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                   (part-titlepage-corpauthor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                   (part-titlepage-corpname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "date"))
+                   (part-titlepage-date (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                   (part-titlepage-edition (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                   (part-titlepage-editor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                   (part-titlepage-firstname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                   (part-titlepage-graphic (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                   (part-titlepage-honorific (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                   (part-titlepage-indexterm (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                   (part-titlepage-invpartnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                   (part-titlepage-isbn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                   (part-titlepage-issn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                   (part-titlepage-issuenum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                   (part-titlepage-itermset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                   (part-titlepage-keywordset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                   (part-titlepage-recto-legalnotice (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                   (part-titlepage-lineage (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                   (part-titlepage-mediaobject (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                   (part-titlepage-modespec (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                   (part-titlepage-orgname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                   (part-titlepage-othercredit (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                   (part-titlepage-othername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                   (part-titlepage-pagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                   (part-titlepage-printhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                   (part-titlepage-productname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                   (part-titlepage-productnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                   (part-titlepage-pubdate (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                   (part-titlepage-publisher (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                   (part-titlepage-publishername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                   (part-titlepage-pubsnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                   (part-titlepage-releaseinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                   (part-titlepage-revhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                   (part-titlepage-seriesinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                   (part-titlepage-seriesvolnums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                   (part-titlepage-subjectset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                   (part-titlepage-subtitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                   (part-titlepage-surname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "title"))
+                   (part-titlepage-title (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                   (part-titlepage-titleabbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                   (part-titlepage-volumenum (node-list-first nl) side))
+                  (else
+                   (part-titlepage-default (node-list-first nl) side)))
+                 (loop (node-list-rest nl) (node-list-first nl)))))
+
+         ;; PartIntro is a special case
+         (if (and (equal? side 'recto)
+                  (not (node-list-empty? partintro))
+                  %generate-partintro-on-titlepage%)
+             ($process-partintro$ partintro)
+             (empty-sosofo))
+
+         (if (and %generate-part-toc%
+                  %generate-part-toc-on-titlepage%
+                  (equal? side 'recto))
+             (make display-group
+               (build-toc (current-node) (toc-depth (current-node))))
+             (empty-sosofo))
+
+         (part-titlepage-separator side))
+       (empty-sosofo))))
+
+(define (part-titlepage-separator side)
+  (empty-sosofo))
+
+(define (part-titlepage-before node side)
+  (empty-sosofo))
+
+(define (part-titlepage-default node side)
+  (let ((foo (debug (string-append "No part-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (part-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode part-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode part-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (part-titlepage-abbrev node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-abstract node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-address node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-affiliation node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-artpagenums node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-author node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-authorblurb node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-authorgroup node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-authorinitials node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-bibliomisc node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-biblioset node side)
+  (part-titlepage node side))
+(define (part-titlepage-bookbiblio node side)
+  (part-titlepage node side))
+(define (part-titlepage-citetitle node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-collab node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-confgroup node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-contractnum node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-contractsponsor node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-contrib  node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-recto-copyright node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-corpauthor node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-corpname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-date node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-edition node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-editor node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-firstname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-graphic node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-honorific node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-indexterm node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-invpartnumber node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-isbn node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-issn node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-issuenum node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-itermset node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-keywordset node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-recto-legalnotice node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-lineage node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-mediaobject node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-modespec node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-orgname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-othercredit node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-othername node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-pagenums node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-partintro node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-printhistory node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-productname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-productnumber node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-pubdate node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-publisher node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-publishername node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-pubsnumber node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-releaseinfo node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-revhistory node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-seriesinfo node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-seriesvolnums node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-subjectset node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-subtitle node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-surname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-title node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-titleabbrev node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-volumenum node side)
+  (part-titlepage-element node side))
+
+
+(mode part-titlepage-recto-mode
+  (element para
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element abstract
+    (make element gi: "DIV"
+         ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               (literal author-name)))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element authorgroup
+    (process-children))
+
+  (element copyright
+    (titlepage-recto-copyright))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element edition
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence
+       (if (first-sibling?) 
+           (make element gi: "H4"
+                 attributes: (list (list "CLASS" "EDITEDBY"))
+                 (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (literal editor-name)))))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string (normalize "fileref") nd))
+          (entattr (attribute-string (normalize "entityref") nd))
+          (entityref (if entattr
+                         (entity-system-id entattr)
+                         #f))
+          (format  (attribute-string (normalize "format")))
+          (align   (attribute-string (normalize "align")))
+          (attr    (append 
+                    (if align 
+                        (list (list "ALIGN" align)) 
+                        '())
+                    (if entityref
+                        (list (list "SRC" (graphic-file entityref)))
+                        (list (list "SRC" (graphic-file fileref))))
+                    (list (list "ALT" ""))
+                    )))
+      (if (or fileref entityref) 
+         (make empty-element gi: "IMG"
+               attributes: attr)
+         (empty-sosofo))))
+
+  (element legalnotice 
+    (titlepage-recto-legalnotice))
+  
+  (element (legalnotice title) (empty-sosofo))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element subtitle 
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children-trim)))
+
+  (element title
+    (let ((division (ancestor-member (current-node) (division-element-list))))
+      (make element gi: "H1"
+           attributes: (list (list "CLASS" (gi)))
+           (if (string=? (element-label division) "")
+               (empty-sosofo)
+               (literal (element-label division) 
+                        (gentext-label-title-sep (gi division))))
+           (with-mode title-mode
+             (process-children)))))
+
+  (element (formalpara title) ($runinhead$))
+)
+
+(mode part-titlepage-verso-mode
+  (element abstract ($semiformal-object$))
+  (element (abstract title) (empty-sosofo))
+  
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (literal (gentext-by))
+               (make entity-ref name: "nbsp")
+               (make sequence
+                 (make element gi: "A"
+                       attributes: (list (list "NAME" (element-id)))
+                       (empty-sosofo))
+                 (literal (author-list-string))))
+         (make sequence
+           (make element gi: "A"
+                 attributes: (list (list "NAME" (element-id)))
+                 (empty-sosofo))
+           (literal (author-list-string))))))
+
+  (element authorgroup
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-by))
+         (make entity-ref name: "nbsp")
+         (process-children-trim)))
+
+  (element copyright
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name (current-node)))
+         (make entity-ref name: "nbsp")
+         (dingbat-sosofo "copyright")
+         (make entity-ref name: "nbsp")
+         (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element edition
+    (make element gi: "P"
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (make sequence
+                 (literal (gentext-edited-by))
+                 (make entity-ref name: "nbsp")
+                 (literal (author-string))))
+         (literal (author-string)))))
+
+  (element legalnotice
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element pubdate
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name-space (gi (current-node))))
+         (process-children)))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element subtitle
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element title
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode title-mode
+           (process-children))))
+
+  (element (formalpara title) ($runinhead$))
+)
+
+;; == Title pages for ARTICLEs ==========================================
+;;
+;; Note: Article title pages are a little different in that they do not
+;; create their own simple-page-sequence.
+;;
+
+(define (article-titlepage-recto-elements)
+  (list (normalize "title")
+       (normalize "subtitle")
+       (normalize "corpauthor")
+       (normalize "authorgroup")
+       (normalize "author")
+       (normalize "releaseinfo")
+       (normalize "copyright")
+       (normalize "pubdate")
+       (normalize "revhistory")
+       (normalize "abstract")))
+
+(define (article-titlepage-verso-elements)
+  '())
+
+(define (article-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (article-titlepage-recto-elements)
+                                  (article-titlepage-verso-elements))))
+
+(define (article-titlepage elements #!optional (side 'recto))
+  (let ((nodelist (titlepage-nodelist 
+                  (if (equal? side 'recto)
+                      (article-titlepage-recto-elements)
+                      (article-titlepage-verso-elements))
+                  elements)))
+    (if (article-titlepage-content? elements side)
+       (make element gi: "DIV"
+             attributes: '(("CLASS" "TITLEPAGE"))
+         (let loop ((nl nodelist) (lastnode (empty-node-list)))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (if (or (node-list-empty? lastnode)
+                         (not (equal? (gi (node-list-first nl))
+                                      (gi lastnode))))
+                     (article-titlepage-before (node-list-first nl) side)
+                     (empty-sosofo))
+                 (cond
+                  ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                   (article-titlepage-abbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                   (article-titlepage-abstract (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "address"))
+                   (article-titlepage-address (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                   (article-titlepage-affiliation (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                   (article-titlepage-artpagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "author"))
+                   (article-titlepage-author (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                   (article-titlepage-authorblurb (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                   (article-titlepage-authorgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                   (article-titlepage-authorinitials (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                   (article-titlepage-bibliomisc (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                   (article-titlepage-biblioset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                   (article-titlepage-bookbiblio (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                   (article-titlepage-citetitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                   (article-titlepage-collab (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                   (article-titlepage-confgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                   (article-titlepage-contractnum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                   (article-titlepage-contractsponsor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                   (article-titlepage-contrib (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                   (article-titlepage-recto-copyright (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                   (article-titlepage-corpauthor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                   (article-titlepage-corpname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "date"))
+                   (article-titlepage-date (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                   (article-titlepage-edition (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                   (article-titlepage-editor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                   (article-titlepage-firstname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                   (article-titlepage-graphic (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                   (article-titlepage-honorific (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                   (article-titlepage-indexterm (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                   (article-titlepage-invpartnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                   (article-titlepage-isbn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                   (article-titlepage-issn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                   (article-titlepage-issuenum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                   (article-titlepage-itermset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                   (article-titlepage-keywordset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                   (article-titlepage-recto-legalnotice (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                   (article-titlepage-lineage (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                   (article-titlepage-mediaobject (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                   (article-titlepage-modespec (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                   (article-titlepage-orgname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                   (article-titlepage-othercredit (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                   (article-titlepage-othername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                   (article-titlepage-pagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                   (article-titlepage-printhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                   (article-titlepage-productname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                   (article-titlepage-productnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                   (article-titlepage-pubdate (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                   (article-titlepage-publisher (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                   (article-titlepage-publishername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                   (article-titlepage-pubsnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                   (article-titlepage-releaseinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                   (article-titlepage-revhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                   (article-titlepage-seriesinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                   (article-titlepage-seriesvolnums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                   (article-titlepage-subjectset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                   (article-titlepage-subtitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                   (article-titlepage-surname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "title"))
+                   (article-titlepage-title (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                   (article-titlepage-titleabbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                   (article-titlepage-volumenum (node-list-first nl) side))
+                  (else
+                   (article-titlepage-default (node-list-first nl) side)))
+                 (loop (node-list-rest nl) (node-list-first nl)))))
+         (article-titlepage-separator side))
+       (empty-sosofo))))
+
+(define (article-titlepage-separator side)
+  (make empty-element gi: "HR"))
+
+(define (article-titlepage-before node side)
+  (empty-sosofo))
+
+(define (article-titlepage-default node side)
+  (let ((foo (debug (string-append "No article-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (article-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode article-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode article-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (article-titlepage-abbrev node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-abstract node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-address node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-affiliation node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-artpagenums node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-author node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-authorblurb node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-authorgroup node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-authorinitials node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-bibliomisc node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-biblioset node side)
+  (article-titlepage node side))
+(define (article-titlepage-bookbiblio node side)
+  (article-titlepage node side))
+(define (article-titlepage-citetitle node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-collab node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-confgroup node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-contractnum node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-contractsponsor node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-contrib  node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-recto-copyright node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-corpauthor node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-corpname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-date node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-edition node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-editor node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-firstname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-graphic node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-honorific node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-indexterm node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-invpartnumber node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-isbn node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-issn node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-issuenum node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-itermset node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-keywordset node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-recto-legalnotice node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-lineage node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-mediaobject node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-modespec node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-orgname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-othercredit node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-othername node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-pagenums node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-partintro node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-printhistory node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-productname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-productnumber node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-pubdate node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-publisher node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-publishername node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-pubsnumber node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-releaseinfo node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-revhistory node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-seriesinfo node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-seriesvolnums node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-subjectset node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-subtitle node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-surname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-title node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-titleabbrev node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-volumenum node side)
+  (article-titlepage-element node side))
+
+(mode article-titlepage-recto-mode
+  (element abbrev
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element abstract
+    (make element gi: "DIV"
+         ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element artpagenums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (make element gi: "A"
+                   attributes: (list (list "NAME" (element-id)))
+                   (literal author-name)))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element authorgroup
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "A"
+               attributes: (list (list "NAME" (element-id)))
+               (empty-sosofo))
+         (process-children)))
+
+  (element authorinitials
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element bibliomisc (process-children))
+  (element bibliomset (process-children))
+
+  (element collab
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element confgroup
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contractnum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contractsponsor
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contrib
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element copyright
+    (titlepage-recto-copyright))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element corpname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element date
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element edition
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence
+       (if (first-sibling?) 
+           (make element gi: "H4"
+                 attributes: (list (list "CLASS" "EDITEDBY"))
+                 (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (literal editor-name)))))
+
+  (element firstname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string (normalize "fileref") nd))
+          (entattr (attribute-string (normalize "entityref") nd))
+          (entityref (if entattr
+                         (entity-system-id entattr)
+                         #f))
+          (format  (attribute-string (normalize "format")))
+          (align   (attribute-string (normalize "align")))
+          (attr    (append 
+                    (if align 
+                        (list (list "ALIGN" align)) 
+                        '())
+                    (if entityref
+                        (list (list "SRC" (graphic-file entityref)))
+                        (list (list "SRC" (graphic-file fileref))))
+                    (list (list "ALT" ""))
+                    )))
+      (if (or fileref entityref) 
+         (make empty-element gi: "IMG"
+               attributes: attr)
+         (empty-sosofo))))
+
+  (element honorific
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element isbn
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element issn
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element issuenum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element jobtitle
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element keywordset (empty-sosofo))
+
+  (element legalnotice 
+    (titlepage-recto-legalnotice))
+  
+  (element (legalnotice title) (empty-sosofo))
+
+  (element lineage
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element orgname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element othercredit
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               (literal author-name)))
+       (process-node-list author-affil))))
+
+  (element othername
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pagenums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element printhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element productname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element productnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pubdate
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element publisher
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element publishername
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pubsnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element releaseinfo
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element seriesvolnums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element shortaffil
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element subjectset (empty-sosofo))
+
+  (element subtitle 
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children-trim)))
+
+  (element surname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element title 
+    (make element gi: "H1"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "A"
+               attributes: (list (list "NAME" (element-id)))
+               (with-mode title-mode
+                 (process-children-trim)))))
+
+  (element (formalpara title) ($runinhead$))
+
+  (element titleabbrev
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element volumenum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+)
+
+(mode article-titlepage-verso-mode
+  (element abbrev
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element abstract
+    (make element gi: "DIV"
+         ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element artpagenums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (literal (gentext-by))
+               (make entity-ref name: "nbsp")
+               (make sequence
+                 (make element gi: "A"
+                       attributes: (list (list "NAME" (element-id)))
+                       (empty-sosofo))
+                 (literal (author-list-string))))
+         (make sequence
+           (make element gi: "A"
+                 attributes: (list (list "NAME" (element-id)))
+                 (empty-sosofo))
+           (literal (author-list-string))))))
+
+  (element authorblurb
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element authorgroup
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-by))
+         (make entity-ref name: "nbsp")
+         (process-children-trim)))
+
+  (element authorinitials
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element bibliomisc (process-children))
+  (element bibliomset (process-children))
+
+  (element collab
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element confgroup
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contractnum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contractsponsor
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element contrib
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element copyright
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name (current-node)))
+         (make entity-ref name: "nbsp")
+         (dingbat-sosofo "copyright")
+         (make entity-ref name: "nbsp")
+         (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element corpname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element date
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element edition
+    (make element gi: "P"
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (make sequence
+                 (literal (gentext-edited-by))
+                 (make entity-ref name: "nbsp")
+                 (literal (author-string))))
+         (literal (author-string)))))
+
+  (element firstname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string (normalize "fileref") nd))
+          (entattr (attribute-string (normalize "entityref") nd))
+          (entityref (if entattr
+                         (entity-system-id entattr)
+                         #f))
+          (format  (attribute-string (normalize "format")))
+          (align   (attribute-string (normalize "align")))
+          (attr    (append 
+                    (if align 
+                        (list (list "ALIGN" align)) 
+                        '())
+                    (if entityref
+                        (list (list "SRC" (graphic-file entityref)))
+                        (list (list "SRC" (graphic-file fileref))))
+                    (list (list "ALT" ""))
+                    )))
+      (if (or fileref entityref) 
+         (make empty-element gi: "IMG"
+               attributes: attr)
+         (empty-sosofo))))
+
+  (element honorific
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element isbn
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element issn
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element issuenum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element jobtitle
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element keywordset (empty-sosofo))
+
+  (element legalnotice
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element lineage
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element orgname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element othercredit
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               (literal author-name)))
+       (process-node-list author-affil))))
+
+  (element othername
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pagenums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element printhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element productname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element productnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pubdate
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name-space (gi (current-node))))
+         (process-children)))
+
+  (element publisher
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element publishername
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element pubsnumber
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element releaseinfo
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element seriesvolnums
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element shortaffil
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element subjectset (empty-sosofo))
+
+  (element subtitle
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element surname
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+
+  (element title
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode title-mode
+           (process-children))))
+
+  (element (formalpara title) ($runinhead$))
+
+  (element titleabbrev
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+  
+  (element volumenum
+    (make element gi: "SPAN"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make empty-element gi: "BR")))
+)
+
+;; == Title pages for REFERENCEs ========================================
+
+(define (reference-titlepage-recto-elements)
+  (list (normalize "title") 
+       (normalize "subtitle")
+       (normalize "corpauthor") 
+       (normalize "authorgroup") 
+       (normalize "author") 
+       (normalize "editor")))
+
+(define (reference-titlepage-verso-elements)
+  '())
+
+(define (reference-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (reference-titlepage-recto-elements)
+                                  (reference-titlepage-verso-elements))))
+
+(define (reference-titlepage elements #!optional (side 'recto))
+  (let ((nodelist (titlepage-nodelist 
+                  (if (equal? side 'recto)
+                      (reference-titlepage-recto-elements)
+                      (reference-titlepage-verso-elements))
+                  elements))
+        ;; partintro is a special case...
+       (partintro (node-list-first
+                   (node-list-filter-by-gi elements 
+                                           (list (normalize "partintro"))))))
+    (if (reference-titlepage-content? elements side)
+       (make element gi: "DIV"
+             attributes: '(("CLASS" "TITLEPAGE"))
+         (let loop ((nl nodelist) (lastnode (empty-node-list)))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (if (or (node-list-empty? lastnode)
+                         (not (equal? (gi (node-list-first nl))
+                                      (gi lastnode))))
+                     (reference-titlepage-before (node-list-first nl) side)
+                     (empty-sosofo))
+                 (cond
+                  ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                   (reference-titlepage-abbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                   (reference-titlepage-abstract (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "address"))
+                   (reference-titlepage-address (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                   (reference-titlepage-affiliation (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                   (reference-titlepage-artpagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "author"))
+                   (reference-titlepage-author (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                   (reference-titlepage-authorblurb (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                   (reference-titlepage-authorgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                   (reference-titlepage-authorinitials (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                   (reference-titlepage-bibliomisc (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                   (reference-titlepage-biblioset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                   (reference-titlepage-bookbiblio (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                   (reference-titlepage-citetitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                   (reference-titlepage-collab (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                   (reference-titlepage-confgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                   (reference-titlepage-contractnum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                   (reference-titlepage-contractsponsor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                   (reference-titlepage-contrib (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                   (reference-titlepage-recto-copyright (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                   (reference-titlepage-corpauthor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                   (reference-titlepage-corpname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "date"))
+                   (reference-titlepage-date (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                   (reference-titlepage-edition (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                   (reference-titlepage-editor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                   (reference-titlepage-firstname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                   (reference-titlepage-graphic (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                   (reference-titlepage-honorific (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                   (reference-titlepage-indexterm (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                   (reference-titlepage-invpartnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                   (reference-titlepage-isbn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                   (reference-titlepage-issn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                   (reference-titlepage-issuenum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                   (reference-titlepage-itermset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                   (reference-titlepage-keywordset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                   (reference-titlepage-recto-legalnotice (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                   (reference-titlepage-lineage (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                   (reference-titlepage-mediaobject (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                   (reference-titlepage-modespec (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                   (reference-titlepage-orgname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                   (reference-titlepage-othercredit (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                   (reference-titlepage-othername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                   (reference-titlepage-pagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                   (reference-titlepage-printhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                   (reference-titlepage-productname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                   (reference-titlepage-productnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                   (reference-titlepage-pubdate (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                   (reference-titlepage-publisher (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                   (reference-titlepage-publishername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                   (reference-titlepage-pubsnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                   (reference-titlepage-releaseinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                   (reference-titlepage-revhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                   (reference-titlepage-seriesinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                   (reference-titlepage-seriesvolnums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                   (reference-titlepage-subjectset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                   (reference-titlepage-subtitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                   (reference-titlepage-surname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "title"))
+                   (reference-titlepage-title (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                   (reference-titlepage-titleabbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                   (reference-titlepage-volumenum (node-list-first nl) side))
+                  (else
+                   (reference-titlepage-default (node-list-first nl) side)))
+                 (loop (node-list-rest nl) (node-list-first nl)))))
+
+         ;; PartIntro is a special case
+         (if (and (equal? side 'recto)
+                  (not (node-list-empty? partintro))
+                  %generate-partintro-on-titlepage%)
+             ($process-partintro$ partintro)
+             (empty-sosofo))
+
+         (if (and %generate-reference-toc%
+                  %generate-reference-toc-on-titlepage%
+                  (equal? side 'recto))
+             (make display-group
+               (build-toc (current-node)
+                          (toc-depth (current-node))))
+             (empty-sosofo))
+
+         (reference-titlepage-separator side))
+       (empty-sosofo))))
+
+(define (reference-titlepage-separator side)
+  (empty-sosofo))
+
+(define (reference-titlepage-before node side)
+  (empty-sosofo))
+
+(define (reference-titlepage-default node side)
+  (let ((foo (debug (string-append "No reference-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (reference-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode reference-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode reference-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (reference-titlepage-abbrev node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-abstract node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-address node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-affiliation node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-artpagenums node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-author node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-authorblurb node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-authorgroup node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-authorinitials node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-bibliomisc node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-biblioset node side)
+  (reference-titlepage node side))
+(define (reference-titlepage-bookbiblio node side)
+  (reference-titlepage node side))
+(define (reference-titlepage-citetitle node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-collab node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-confgroup node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-contractnum node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-contractsponsor node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-contrib  node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-recto-copyright node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-corpauthor node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-corpname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-date node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-edition node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-editor node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-firstname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-graphic node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-honorific node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-indexterm node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-invpartnumber node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-isbn node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-issn node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-issuenum node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-itermset node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-keywordset node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-recto-legalnotice node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-lineage node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-mediaobject node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-modespec node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-orgname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-othercredit node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-othername node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-pagenums node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-printhistory node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-productname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-productnumber node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-pubdate node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-publisher node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-publishername node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-pubsnumber node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-releaseinfo node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-revhistory node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-seriesinfo node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-seriesvolnums node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-subjectset node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-subtitle node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-surname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-title node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-titleabbrev node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-volumenum node side)
+  (reference-titlepage-element node side))
+
+(mode reference-titlepage-recto-mode
+  (element para
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element abstract
+    (make element gi: "DIV"
+         ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (make sequence
+               (make element gi: "A"
+                     attributes: (list (list "NAME" (element-id)))
+                     (empty-sosofo))
+               (literal author-name)))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element authorgroup
+    (process-children))
+
+  (element copyright
+    (titlepage-recto-copyright))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element edition
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence
+       (if (first-sibling?) 
+           (make element gi: "H4"
+                 attributes: (list (list "CLASS" "EDITEDBY"))
+                 (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make element gi: "H3"
+             attributes: (list (list "CLASS" (gi)))
+             (literal editor-name)))))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string (normalize "fileref") nd))
+          (entattr (attribute-string (normalize "entityref") nd))
+          (entityref (if entattr
+                         (entity-system-id entattr)
+                         #f))
+          (format  (attribute-string (normalize "format")))
+          (align   (attribute-string (normalize "align")))
+          (attr    (append 
+                    (if align 
+                        (list (list "ALIGN" align)) 
+                        '())
+                    (if entityref
+                        (list (list "SRC" (graphic-file entityref)))
+                        (list (list "SRC" (graphic-file fileref))))
+                    (list (list "ALT" ""))
+                    )))
+      (if (or fileref entityref) 
+         (make empty-element gi: "IMG"
+               attributes: attr)
+         (empty-sosofo))))
+
+  (element legalnotice 
+    (titlepage-recto-legalnotice))
+  
+  (element (legalnotice title) (empty-sosofo))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element subtitle 
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children-trim)))
+
+  (element title
+    (let ((ref (ancestor-member (current-node)
+                               (list (normalize "reference")))))
+      (make element gi: "H1"
+           attributes: (list (list "CLASS" (gi)))
+           (literal (element-label ref)
+                    (gentext-label-title-sep (gi ref)))
+           (with-mode title-mode
+             (process-children)))))
+
+  (element (formalpara title) ($runinhead$))
+)
+
+(mode reference-titlepage-verso-mode
+  (element abstract ($semiformal-object$))
+  (element (abstract title) (empty-sosofo))
+  
+  (element address 
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode titlepage-address-mode 
+           ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (literal (gentext-by))
+               (make entity-ref name: "nbsp")
+               (make sequence
+                 (make element gi: "A"
+                       attributes: (list (list "NAME" (element-id)))
+                       (empty-sosofo))
+                 (literal (author-list-string))))
+         (make sequence
+           (make element gi: "A"
+                 attributes: (list (list "NAME" (element-id)))
+                 (empty-sosofo))
+           (literal (author-list-string))))))
+
+  (element authorgroup
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-by))
+         (make entity-ref name: "nbsp")
+         (process-children-trim)))
+
+  (element copyright
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name (current-node)))
+         (make entity-ref name: "nbsp")
+         (dingbat-sosofo "copyright")
+         (make entity-ref name: "nbsp")
+         (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element edition
+    (make element gi: "P"
+         (process-children)
+         (make entity-ref name: "nbsp")
+         (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+         (make element gi: "P"
+               attributes: (list (list "CLASS" (gi)))
+               (make sequence
+                 (literal (gentext-edited-by))
+                 (make entity-ref name: "nbsp")
+                 (literal (author-string))))
+         (literal (author-string)))))
+
+  (element legalnotice
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element pubdate
+    (make element gi: "P"
+         attributes: (list (list "CLASS" (gi)))
+         (literal (gentext-element-name-space (gi (current-node))))
+         (process-children)))
+
+  (element revhistory
+    (make element gi: "DIV"
+         attributes: (list (list "CLASS" (gi)))
+         (make element gi: "TABLE"
+               attributes: (list
+                            (list "WIDTH" ($table-width$))
+                            (list "BORDER" "0"))
+               (make sequence
+                 (make element gi: "TR"
+                       (make element gi: "TH"
+                             attributes: '(("ALIGN" "LEFT") 
+                                           ("VALIGN" "TOP")
+                                           ("COLSPAN" "3"))
+                             (make element gi: "B"
+                                   (literal (gentext-element-name 
+                                             (gi (current-node)))))))
+                 (process-children)))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node)) 
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node)) 
+                                     (normalize "revremark"))))
+      (make sequence
+      (make element gi: "TR"
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revnumber))
+                 (make sequence
+                   (literal (gentext-element-name-space 
+                             (gi (current-node))))
+                   (process-node-list revnumber))
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revdate))
+                 (process-node-list revdate)
+                 (empty-sosofo)))
+       (make element gi: "TD"
+             attributes: (list
+                          (list "ALIGN" "LEFT"))
+             (if (not (node-list-empty? revauthor))
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor))
+                 (empty-sosofo))))
+       (make element gi: "TR"
+           (make element gi: "TD"
+                 attributes: (list
+                              (list "ALIGN" "LEFT")
+                              (list "COLSPAN" "3"))
+                 (if (not (node-list-empty? revremark))
+                     (process-node-list revremark)
+                     (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+
+  (element subtitle
+    (make element gi: "H3"
+         attributes: (list (list "CLASS" (gi)))
+         (process-children)))
+
+  (element title
+    (make element gi: "H2"
+         attributes: (list (list "CLASS" (gi)))
+         (with-mode title-mode
+           (process-children))))
+
+  (element (formalpara title) ($runinhead$))
+)
diff --git a/html/dbverb.dsl b/html/dbverb.dsl
new file mode 100644 (file)
index 0000000..30ef4f7
--- /dev/null
@@ -0,0 +1,218 @@
+;; $Id: dbverb.dsl,v 1.5 2003/01/15 08:24:14 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define ($inpre$)
+  (let ((wrapper (ancestor-member (current-node)
+                                 (list (normalize "address")
+                                       (normalize "funcsynopsisinfo")
+                                       (normalize "literallayout")
+                                       (normalize "programlisting")
+                                       (normalize "screen")
+                                       (normalize "synopsis")))))
+    (if (or (and (equal? wrapper "literallayout")
+                (not (equal? (attribute-string "class" wrapper)
+                             (normalize "monospaced"))))
+           (equal? wrapper "address"))
+       #f
+       #t)))
+
+(define ($format-indent$ indent)
+  ;; This code is made complex by the fact that we need an additional
+  ;; wrapper and we have to translate spaces into nbsp entity-refs,
+  ;; if we aren't in a PRE.
+  ;; 
+  (if ($inpre$)
+      (literal indent)
+      (make element gi: "CODE"
+           ($sp-to-nbsp-sosofo$ indent))))
+
+(define ($format-linenumber$ linenumber)
+  ;; This code is made complex by the fact that we need an additional
+  ;; wrapper and we have to translate spaces into nbsp entity-refs,
+  ;; if we aren't in a PRE.
+  ;; 
+  (if (equal? (remainder linenumber %linenumber-mod%) 0)
+      (if ($inpre$)
+         (make sequence
+           (literal (pad-string (format-number linenumber "1") 
+                                %linenumber-length% %linenumber-padchar%))
+           ($linenumber-space$))
+         (make element gi: "CODE"
+               ($sp-to-nbsp-sosofo$ 
+                (pad-string (format-number linenumber "1") 
+                            %linenumber-length% %linenumber-padchar%))
+               ($linenumber-space$)))
+      (if ($inpre$)
+         (make sequence
+           (literal (pad-string "" %linenumber-length% " "))
+           ($linenumber-space$))
+         (make element gi: "CODE"
+               ($sp-to-nbsp-sosofo$ 
+                (pad-string "" %linenumber-length% " "))
+               ($linenumber-space$)))))
+
+(define ($line-start$ indent line-numbers? #!optional (line-number 1))
+  (make sequence
+    (if indent
+       ($format-indent$ indent)
+       (empty-sosofo))
+    (if line-numbers?
+       ($format-linenumber$ line-number)
+       (empty-sosofo))))
+
+(define ($sp-to-nbsp-sosofo$ string)
+  ;; Given a string, return it as a sosofo, but replace spaces with 
+  ;; nbsp entity-refs.
+  (make sequence
+    (let loop ((charlist (string->list string))
+              (res (empty-sosofo)))
+      (if (null? charlist)
+         res
+         (loop
+          (cdr charlist)
+          (let ((c (car charlist)))
+            (if (equal? c #\ )
+                (sosofo-append res
+                               (make entity-ref name: "nbsp"))
+                (sosofo-append res (literal (list->string (list c)))))))))))
+
+(define ($verbatim-display$ indent line-numbers?)
+  (let ((content (make element gi: "PRE"
+                      attributes: (list
+                                   (list "CLASS" (gi)))
+                      (if (or indent line-numbers?)
+                          ($verbatim-line-by-line$ indent line-numbers?)
+                          (process-children)))))
+    (if %shade-verbatim%
+       (make element gi: "TABLE"
+             attributes: ($shade-verbatim-attr$)
+             (make element gi: "TR"
+                   (make element gi: "TD"
+                         content)))
+       (make sequence
+         (para-check)
+         content
+         (para-check 'restart)))))
+
+(define ($verbatim-line-by-line$ indent line-numbers?)
+  (let ((expanded-content
+        ;; this is the content with
+        ;; inlinemediaobject/imageobject[@format='linespecific']
+        ;; expanded
+        (let loop ((kl (children (current-node))) (rl (empty-node-list)))
+          (if (node-list-empty? kl)
+              rl
+              (if (equal? (gi (node-list-first kl))
+                          (normalize "inlinemediaobject"))
+                  (let* ((imgobj (node-list-filter-by-gi
+                                  (children (node-list-first kl))
+                                  (list (normalize "imageobject"))))
+                         (datobj (node-list-filter-by-gi
+                                  (children imgobj)
+                                  (list (normalize "imagedata")))))
+                    (if (and (not (node-list-empty? imgobj))
+                             (not (node-list-empty? datobj))
+                             (equal? (attribute-string (normalize "format") datobj)
+                                     (normalize "linespecific")))
+                        (loop (node-list-rest kl)
+                              (node-list rl (string->nodes (include-characters
+                                                            (if (attribute-string (normalize "fileref") datobj)
+                                                                (attribute-string (normalize "fileref") datobj)
+                                                                (entity-generated-system-id (attribute-string (normalize "entityref") datobj)))))))
+                        (loop (node-list-rest kl)
+                              (node-list rl (node-list-first kl)))))
+                  (loop (node-list-rest kl) (node-list rl (node-list-first kl))))))))
+    (make sequence
+      ($line-start$ indent line-numbers? 1)
+      (let loop ((kl expanded-content)
+                (linecount 1)
+                (res (empty-sosofo)))
+       (if (node-list-empty? kl)
+           res
+           (loop
+            (node-list-rest kl)
+            (if (char=? (node-property 'char (node-list-first kl)
+                                       default: #\U-0000) #\U-000D)
+                (+ linecount 1)
+                linecount)
+            (let ((c (node-list-first kl)))
+              (if (char=? (node-property 'char c default: #\U-0000) 
+                          #\U-000D)
+                  (sosofo-append res
+                                 (process-node-list c)
+                                 ($line-start$ indent 
+                                               line-numbers?
+                                               (+ linecount 1)))
+                  (sosofo-append res (process-node-list c))))))))))
+
+(define ($linespecific-display$ indent line-numbers?)
+  (make element gi: "P"
+       attributes: (list (list "CLASS" (gi)))
+       (make sequence
+         ($line-start$ indent line-numbers? 1)
+         (let loop ((kl (children (current-node)))
+                    (linecount 1)
+                    (res (empty-sosofo)))
+           (if (node-list-empty? kl)
+               res
+               (loop
+                (node-list-rest kl)
+                (if (char=? (node-property 'char (node-list-first kl)
+                                           default: #\U-0000) #\U-000D)
+                    (+ linecount 1)
+                    linecount)
+                (let ((c (node-list-first kl)))
+                  (if (char=? (node-property 'char c default: #\U-0000) 
+                              #\U-000D)
+                      (sosofo-append res
+                                     (make empty-element gi: "br")
+                                     (process-node-list c)
+                                     ($line-start$ indent 
+                                                   line-numbers? 
+                                                   (+ linecount 1)))
+                      (if (char=? (node-property 'char c default: #\U-0000) 
+                                  #\U-0020)
+                          (sosofo-append res
+                                         (make entity-ref name: "nbsp"))
+                          (sosofo-append res (process-node-list c)))))))))))
+
+(element literallayout
+  (if (equal? (attribute-string "class") (normalize "monospaced"))
+      ($verbatim-display$
+       %indent-literallayout-lines%
+       (or %number-literallayout-lines%
+          (equal? (attribute-string (normalize "linenumbering"))
+                  (normalize "numbered"))))
+      ($linespecific-display$
+       %indent-literallayout-lines%
+       (or %number-literallayout-lines%
+          (equal? (attribute-string (normalize "linenumbering"))
+                  (normalize "numbered"))))))
+
+(element address
+  ($linespecific-display$
+   %indent-address-lines%
+   (or %number-address-lines%
+       (equal? (attribute-string (normalize "linenumbering"))
+              (normalize "numbered")))))
+
+(element programlisting
+  ($verbatim-display$
+   %indent-programlisting-lines%
+   (or %number-programlisting-lines%
+       (equal? (attribute-string (normalize "linenumbering"))
+              (normalize "numbered")))))
+
+(element screen
+  ($verbatim-display$
+   %indent-screen-lines%
+   (or %number-screen-lines%
+       (equal? (attribute-string (normalize "linenumbering"))
+              (normalize "numbered")))))
+
+(element screenshot (process-children))
+(element screeninfo (empty-sosofo))
+
diff --git a/html/docbook.dsl b/html/docbook.dsl
new file mode 100644 (file)
index 0000000..f7f2828
--- /dev/null
@@ -0,0 +1,242 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+
+<!ENTITY % dbl10n.ent SYSTEM "../common/dbl10n.ent">
+%dbl10n.ent;
+
+<!ENTITY dbl10n.dsl  SYSTEM "../common/dbl10n.dsl">
+
+<!ENTITY dblib.dsl
+  PUBLIC "-//Norman Walsh//DOCUMENT DSSSL Library V2//EN" CDATA DSSSL>
+
+<!ENTITY dbparam.dsl  SYSTEM "dbparam.dsl" CDATA DSSSL>
+
+<!ENTITY VERSION SYSTEM "../VERSION">
+
+<!ENTITY dbcommon.dsl SYSTEM "../common/dbcommon.dsl">
+<!ENTITY dbctable.dsl SYSTEM "../common/dbtable.dsl">
+<!ENTITY dbadmon.dsl  SYSTEM "dbadmon.dsl">
+<!ENTITY dbautoc.dsl  SYSTEM "dbautoc.dsl">
+<!ENTITY dbbibl.dsl   SYSTEM "dbbibl.dsl">
+<!ENTITY dbblock.dsl  SYSTEM "dbblock.dsl">
+<!ENTITY dbcallou.dsl SYSTEM "dbcallou.dsl">
+<!ENTITY dbcompon.dsl SYSTEM "dbcompon.dsl">
+<!ENTITY dbdivis.dsl  SYSTEM "dbdivis.dsl">
+<!ENTITY dbfootn.dsl  SYSTEM "dbfootn.dsl">
+<!ENTITY dbgloss.dsl  SYSTEM "dbgloss.dsl">
+<!ENTITY dbgraph.dsl  SYSTEM "dbgraph.dsl">
+<!ENTITY dbhtml.dsl   SYSTEM "dbhtml.dsl">
+<!ENTITY dbindex.dsl  SYSTEM "dbindex.dsl">
+<!ENTITY dbinfo.dsl   SYSTEM "dbinfo.dsl">
+<!ENTITY dbinline.dsl SYSTEM "dbinline.dsl">
+<!ENTITY dblink.dsl   SYSTEM "dblink.dsl">
+<!ENTITY dblists.dsl  SYSTEM "dblists.dsl">
+<!ENTITY dblot.dsl    SYSTEM "dblot.dsl">
+<!ENTITY dbmath.dsl   SYSTEM "dbmath.dsl">
+<!ENTITY dbmsgset.dsl SYSTEM "dbmsgset.dsl">
+<!ENTITY dbnavig.dsl  SYSTEM "dbnavig.dsl">
+<!ENTITY dbchunk.dsl  SYSTEM "dbchunk.dsl">
+<!ENTITY dbpi.dsl     SYSTEM "dbpi.dsl">
+<!ENTITY dbprocdr.dsl SYSTEM "dbprocdr.dsl">
+<!ENTITY dbqanda.dsl  SYSTEM "dbqanda.dsl">
+<!ENTITY dbrfntry.dsl SYSTEM "dbrfntry.dsl">
+<!ENTITY dbsect.dsl   SYSTEM "dbsect.dsl">
+<!ENTITY dbsynop.dsl  SYSTEM "dbsynop.dsl">
+<!ENTITY dbefsyn.dsl  SYSTEM "dbefsyn.dsl">
+<!ENTITY dbtable.dsl  SYSTEM "dbtable.dsl">
+<!ENTITY dbtitle.dsl  SYSTEM "dbtitle.dsl">
+<!ENTITY dbttlpg.dsl  SYSTEM "dbttlpg.dsl">
+<!ENTITY dbverb.dsl   SYSTEM "dbverb.dsl">
+<!ENTITY version.dsl  SYSTEM "version.dsl">
+]>
+
+<style-sheet>
+<style-specification id="docbook" 
+    use="af bg bs ca cs da de el en es et eu fi fr hu id it ja ko nl nn no pl pt ptbr ro ru sk sl sr sv tr uk xh zhcn zhtw dbparam dblib">
+
+<style-specification-body>
+
+;; $Id: docbook.dsl,v 1.9 2004/10/09 21:36:35 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(declare-flow-object-class element
+  "UNREGISTERED::James Clark//Flow Object Class::element")
+
+(declare-flow-object-class empty-element
+  "UNREGISTERED::James Clark//Flow Object Class::empty-element")
+
+(declare-flow-object-class document-type
+  "UNREGISTERED::James Clark//Flow Object Class::document-type")
+
+(declare-flow-object-class processing-instruction
+  "UNREGISTERED::James Clark//Flow Object Class::processing-instruction")
+
+(declare-flow-object-class entity
+  "UNREGISTERED::James Clark//Flow Object Class::entity")
+
+(declare-flow-object-class entity-ref
+  "UNREGISTERED::James Clark//Flow Object Class::entity-ref")
+
+(declare-flow-object-class formatting-instruction
+  "UNREGISTERED::James Clark//Flow Object Class::formatting-instruction")
+
+(declare-characteristic preserve-sdata?
+  "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" #t)
+
+(define debug
+  (external-procedure "UNREGISTERED::James Clark//Procedure::debug"))
+
+(define read-entity
+  (external-procedure "UNREGISTERED::James Clark//Procedure::read-entity"))
+
+(define all-element-number
+  (external-procedure "UNREGISTERED::James Clark//Procedure::all-element-number"))
+
+(root
+ (make sequence
+;   (literal
+;    (debug (node-property 'gi
+;                        (node-property 'document-element (current-node)))))
+;(define (docelem node)
+;  (node-propety 'document-element 
+;    (node-property 'grove-root node)))
+   (process-children)
+   (with-mode manifest
+     (process-children))
+   (if html-index
+       (with-mode htmlindex
+        (process-children))
+       (empty-sosofo))))
+
+(mode manifest
+  ;; this mode is really just a hack to get at the root element
+  (root (process-children))
+
+  (default 
+    (if (node-list=? (current-node) (sgml-root-element))
+       (if html-manifest
+           (make entity
+             system-id: (html-entity-file html-manifest-filename)
+             (make sequence
+               (let loop ((node (current-node)))
+                 (if (node-list-empty? node)
+                     (empty-sosofo)
+                     (make sequence
+                       (make formatting-instruction data: (html-file node))
+                       (make formatting-instruction data: "
+")
+                       (loop (next-chunk-element node)))))
+               (let loop ((nl (select-elements (descendants (current-node))
+                                               (normalize "legalnotice"))))
+                 (if (node-list-empty? nl)
+                     (empty-sosofo)
+                     (make sequence
+                       (if (and %generate-legalnotice-link%
+                                (not nochunks)
+                                (first-sibling? (node-list-first nl))
+                                ;; Hack: only book legal notices are diverted
+                                (have-ancestor? (normalize "bookinfo")
+                                                (node-list-first nl)))
+                           (make sequence
+                             (make formatting-instruction
+                               data: ($legalnotice-link-file$ (node-list-first nl)))
+                             (make formatting-instruction data: "
+"))
+                           (empty-sosofo))
+                       (loop (node-list-rest nl)))))))
+           (empty-sosofo))
+       (empty-sosofo))))
+
+;; Make text that comes from unimplemented tags easy to spot
+(default
+  (make element gi: "FONT"
+       attributes: '(("COLOR" "RED"))
+       (process-children)))
+
+&dbcommon.dsl;  <!-- Common ("stock") stylesheet functions                 -->
+&dbctable.dsl;  <!-- Common stylesheet functions for tables                -->
+
+&dbl10n.dsl;    <!-- Stylesheet-local localization -->
+
+&dbadmon.dsl;   <!-- Admonitions                                           -->
+&dbautoc.dsl;   <!-- Automatic TOC generation                              -->
+&dbbibl.dsl;    <!-- Bibliographies                                        -->
+&dbblock.dsl;   <!-- Miscellaneous block elements                          -->
+&dbcallou.dsl;  <!-- Callouts                                              -->
+&dbcompon.dsl;  <!-- Components; chapter-level elements                    -->
+&dbdivis.dsl;   <!-- Divisions; Sets, Books, Articles, Parts               -->
+&dbfootn.dsl;   <!-- Footnotes                                             -->
+&dbgloss.dsl;   <!-- Glossaries                                            -->
+&dbgraph.dsl;   <!-- Graphics                                              -->
+&dbhtml.dsl;    <!-- HTML specific things                                  -->
+&dbindex.dsl;   <!-- Indexes                                               -->
+&dbinfo.dsl;    <!-- Infopools (SetInfo, BookInfo, Sect1Info, etc.)        -->
+&dbinline.dsl;  <!-- Inline elements                                       -->
+&dblink.dsl;    <!-- Links                                                 -->
+&dblists.dsl;   <!-- Lists                                                 -->
+&dblot.dsl;     <!-- Lists of Tables (ToC, LoT, etc.)                      -->
+&dbmath.dsl;    <!-- Math (Equations)                                      -->
+&dbmsgset.dsl;  <!-- MsgSet                                                -->
+&dbnavig.dsl;   <!-- Navigation                                            -->
+&dbchunk.dsl;   <!-- Chunking                                              -->
+&dbpi.dsl;      <!-- HTML PIs (dbhtml)                                     -->
+&dbprocdr.dsl;  <!-- Procedures                                            -->
+&dbqanda.dsl;   <!-- QandASet                                              -->
+&dbrfntry.dsl;  <!-- References and RefEntrys                              -->
+&dbsect.dsl;    <!-- Sections                                              -->
+&dbsynop.dsl;   <!-- Synopsis                                              -->
+&dbefsyn.dsl;   <!-- ClassSynopsis                                         -->
+&dbtable.dsl;   <!-- Tables                                                -->
+&dbtitle.dsl;   <!-- Titles                                                -->
+&dbttlpg.dsl;   <!-- Title Page                                            -->
+&dbverb.dsl;    <!-- Verbatim (ProgramListing, LiteralLayout, etc.)        -->
+&version.dsl;   <!-- Version                                               -->
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="dbparam" document="dbparam.dsl">
+<external-specification id="dblib" document="dblib.dsl">
+
+<external-specification id="af" document="dbl1af">
+<external-specification id="bg" document="dbl1bg">
+<external-specification id="bs" document="dbl1bs">
+<external-specification id="ca" document="dbl1ca">
+<external-specification id="cs" document="dbl1cs">
+<external-specification id="da" document="dbl1da">
+<external-specification id="de" document="dbl1de">
+<external-specification id="el" document="dbl1el">
+<external-specification id="en" document="dbl1en">
+<external-specification id="eu" document="dbl1eu">
+<external-specification id="es" document="dbl1es">
+<external-specification id="et" document="dbl1et">
+<external-specification id="fi" document="dbl1fi">
+<external-specification id="fr" document="dbl1fr">
+<external-specification id="hu" document="dbl1hu">
+<external-specification id="id" document="dbl1id">
+<external-specification id="it" document="dbl1it">
+<external-specification id="ja" document="dbl1ja">
+<external-specification id="ko" document="dbl1ko">
+<external-specification id="nl" document="dbl1nl">
+<external-specification id="nn" document="dbl1nn">
+<external-specification id="no" document="dbl1no">
+<external-specification id="pl" document="dbl1pl">
+<external-specification id="pt" document="dbl1pt">
+<external-specification id="ptbr" document="dbl1ptbr">
+<external-specification id="ro" document="dbl1ro">
+<external-specification id="ru" document="dbl1ru">
+<external-specification id="sk" document="dbl1sk">
+<external-specification id="sl" document="dbl1sl">
+<external-specification id="sr" document="dbl1sr">
+<external-specification id="sv" document="dbl1sv">
+<external-specification id="tr" document="dbl1tr">
+<external-specification id="uk" document="dbl1uk">
+<external-specification id="xh" document="dbl1xh">
+<external-specification id="zhcn" document="dbl1zhcn">
+<external-specification id="zhtw" document="dbl1zhtw">
+
+</style-sheet>
+
+
diff --git a/html/version.dsl b/html/version.dsl
new file mode 100644 (file)
index 0000000..e6186f6
--- /dev/null
@@ -0,0 +1,14 @@
+;; $Id: version.dsl,v 1.2 2004/07/11 06:21:01 nyraghu Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://www.nwalsh.com/docbook/dsssl/
+;;
+
+;; If **ANY** change is made to this file, you _MUST_ alter the
+;; following definition:
+
+(define (stylesheet-version)
+  (string-append
+   "Modular DocBook HTML Stylesheet Version "
+   ;; Trim off bounding white space.
+   (strip "&VERSION;")))
diff --git a/images/ChangeLog b/images/ChangeLog
new file mode 100644 (file)
index 0000000..ec6bbfc
--- /dev/null
@@ -0,0 +1,13 @@
+2001-12-06  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Make.images, Makefile: image converstion make improvements; if you want to tweak the image conversion stuff, do that in Make.images and that will affect the subdirs too; also, a clean rule
+
+2001-12-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * .cvsignore, Makefile: New file.
+
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * caution.gif, home.gif, important.gif, next.gif, note.gif, prev.gif, tip.gif, toc-blank.gif, toc-minus.gif, toc-plus.gif, up.gif, warning.gif: 
+       New file.
+
diff --git a/images/Make.images b/images/Make.images
new file mode 100644 (file)
index 0000000..277a2d5
--- /dev/null
@@ -0,0 +1,10 @@
+GIF    := $(wildcard *.gif)
+EPS    := $(GIF:.gif=.eps)
+PDF    := $(GIF:.gif=.pdf)
+
+%.eps: %.gif
+       convert $< $@
+
+%.pdf: %.eps
+       epstopdf --outfile=$@ $<
+
diff --git a/images/callouts/1.eps b/images/callouts/1.eps
new file mode 100644 (file)
index 0000000..dc21230
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (1.eps)
+%%CreationDate: (Fri Nov  5 11:45:40 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFF794391010399CF7FFFFFFE73100000829000031E7FFF7310000008CCE00000031
+F78C00004AE7F7CE000000008C3100000000A5CE000000003108000000009CCE00000000
+0808000000009CCE000000000831000000009CCE00000000318C000000009CCE00000000
+8CF7310000008CB500000031F7FFE72900000000000031E7FFFFFFF78C3108083994F7FF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/1.gif b/images/callouts/1.gif
new file mode 100644 (file)
index 0000000..9ee74a0
Binary files /dev/null and b/images/callouts/1.gif differ
diff --git a/images/callouts/1.pdf b/images/callouts/1.pdf
new file mode 100644 (file)
index 0000000..738102d
Binary files /dev/null and b/images/callouts/1.pdf differ
diff --git a/images/callouts/10.eps b/images/callouts/10.eps
new file mode 100644 (file)
index 0000000..2216376
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (10.eps)
+%%CreationDate: (Fri Nov  5 11:45:40 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFFF9C391810398CF7FFFFFFEF3910180008291031DEFFFF3908B5B529DEBDE75229
+F7A521EFFFB5B5B50073DE008C4A0008CEB5D6730031FF2131180000CEB5F7630018FF39
+08180000CEB5EF630021FF39004A0000CEB5CE840039FF1831A50000CEB58CD61094CE00
+8CFF3900BD9C10BDF7D63129F7FFEF3900000000080029DEFFFFFFFF943908082994F7FF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/10.gif b/images/callouts/10.gif
new file mode 100644 (file)
index 0000000..08a248e
Binary files /dev/null and b/images/callouts/10.gif differ
diff --git a/images/callouts/10.pdf b/images/callouts/10.pdf
new file mode 100644 (file)
index 0000000..c579840
Binary files /dev/null and b/images/callouts/10.pdf differ
diff --git a/images/callouts/2.eps b/images/callouts/2.eps
new file mode 100644 (file)
index 0000000..9b55ba4
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (2.eps)
+%%CreationDate: (Fri Nov  5 11:45:40 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFF794391010399CF7FFFFFFE73100002921000031E7FFF7310021D6E7EFC6100031
+F78C0000A5D60021F78C00008C3100008C7B0000DEB500003108000000000031F7730000
+0808000000004AE7B508000008310000008CF77B00000000318C00006BF7633131180000
+8CF731009CE7E7E7E77B0031F7FFE73100000000000031E7FFFFFFF78C3108083994F7FF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/2.gif b/images/callouts/2.gif
new file mode 100644 (file)
index 0000000..b2e589a
Binary files /dev/null and b/images/callouts/2.gif differ
diff --git a/images/callouts/2.pdf b/images/callouts/2.pdf
new file mode 100644 (file)
index 0000000..3d84950
Binary files /dev/null and b/images/callouts/2.pdf differ
diff --git a/images/callouts/3.eps b/images/callouts/3.eps
new file mode 100644 (file)
index 0000000..01cbf4f
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (3.eps)
+%%CreationDate: (Fri Nov  5 11:45:40 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFF794391010399CF7FFFFFFE73100083939080031E7FFF7310010DED6DECE100031
+F78C000073E70810FF6B00008C31000010290010FF6B0000310800000000ADE7D6080000
+0808000000003963F76B0000083100005A8C0000CEB50000318C00008CEF3139EF840000
+8CF7310010ADF7F7AD080031F7FFE72900000800000031E7FFFFFFF78C3108103194F7FF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/3.gif b/images/callouts/3.gif
new file mode 100644 (file)
index 0000000..d2bf185
Binary files /dev/null and b/images/callouts/3.gif differ
diff --git a/images/callouts/3.pdf b/images/callouts/3.pdf
new file mode 100644 (file)
index 0000000..63642c0
Binary files /dev/null and b/images/callouts/3.pdf differ
diff --git a/images/callouts/4.eps b/images/callouts/4.eps
new file mode 100644 (file)
index 0000000..b53d038
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (4.eps)
+%%CreationDate: (Fri Nov  5 11:45:40 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFFFAD5229294AA5FFFFFFFFF74A00000029100039E7FFFF4A0000004AFF73000039
+F7AD00000010E7FF73000000944A000000ADA5EF73000000311800005AE710F773000000
+08180021EF7329F78C180000084A0063FFFFFFFFFFA5000031A50000000000F773000000
+8CF73900000000DE6B000029F7FFEF3900000000000029DEFFFFFFF79C311008318CF7FF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/4.gif b/images/callouts/4.gif
new file mode 100644 (file)
index 0000000..a0f99af
Binary files /dev/null and b/images/callouts/4.gif differ
diff --git a/images/callouts/4.pdf b/images/callouts/4.pdf
new file mode 100644 (file)
index 0000000..6579b82
Binary files /dev/null and b/images/callouts/4.pdf differ
diff --git a/images/callouts/5.eps b/images/callouts/5.eps
new file mode 100644 (file)
index 0000000..28c3753
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (5.eps)
+%%CreationDate: (Fri Nov  5 11:45:40 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFFF9C391810398CF7FFFFFFEF3908292921290831DEFFFF390039FFEFEFEF4A0029
+F7A5000039FF0800000000008C4A000039FFADCE840800003118000039FF844AE79C0000
+08180000218400008CEF0000084A0000105A000094E7000031A5000031FF4A21DE940000
+8CFF39000084EFF7A5100029F7FFEF3900000808000029DEFFFFFFFF94390808318CF7FF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/5.gif b/images/callouts/5.gif
new file mode 100644 (file)
index 0000000..6c5b373
Binary files /dev/null and b/images/callouts/5.gif differ
diff --git a/images/callouts/5.pdf b/images/callouts/5.pdf
new file mode 100644 (file)
index 0000000..7497d8d
Binary files /dev/null and b/images/callouts/5.pdf differ
diff --git a/images/callouts/6.eps b/images/callouts/6.eps
new file mode 100644 (file)
index 0000000..c0d4341
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (6.eps)
+%%CreationDate: (Fri Nov  5 11:45:41 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFFFAD5229294AA5FFFFFFFFF74A00001829000039E7FFFF4A0000A5EFE7C6080039
+F7AD000073EF1818EF390000944A0000C6A529390800000031180000E7EFCECECE100000
+08180000DECE0008EF730000084A0000BDA50000CE84000031A500006BEF2121F74A0000
+8CF739000094F7F784000029F7FFEF3900000808000029DEFFFFFFF79C390808318CF7FF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/6.gif b/images/callouts/6.gif
new file mode 100644 (file)
index 0000000..4eed904
Binary files /dev/null and b/images/callouts/6.gif differ
diff --git a/images/callouts/6.pdf b/images/callouts/6.pdf
new file mode 100644 (file)
index 0000000..9e09a3e
Binary files /dev/null and b/images/callouts/6.pdf differ
diff --git a/images/callouts/7.eps b/images/callouts/7.eps
new file mode 100644 (file)
index 0000000..e438204
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (7.eps)
+%%CreationDate: (Fri Nov  5 11:45:41 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFFFB55229294AADF7FFFFFFF75210181018101039E7FFFF5A00ADFFFFFFFFD60031
+F7BD000000000018E75A0000945A0000000000B5BD00000039310000000052F731000000
+083100000000D6B500000000085A00000039FF520000000031B50000008CF70800000000
+8CFF4A0000B5B50000000029F7FFEF4200000000000029E7FFFFFFFF9C390808298CF7FF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/7.gif b/images/callouts/7.gif
new file mode 100644 (file)
index 0000000..6ffb734
Binary files /dev/null and b/images/callouts/7.gif differ
diff --git a/images/callouts/7.pdf b/images/callouts/7.pdf
new file mode 100644 (file)
index 0000000..78efe1b
Binary files /dev/null and b/images/callouts/7.pdf differ
diff --git a/images/callouts/8.eps b/images/callouts/8.eps
new file mode 100644 (file)
index 0000000..890d446
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (8.eps)
+%%CreationDate: (Fri Nov  5 11:45:41 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFFFAD52292152A5FFFFFFFFEF4A00001021000039E7FFFF420000A5DED6BD100031
+F7A500004AF71000E7730000944A000042F71008EF6B00003118000000B5E7DED6080000
+081800005AF7524AEF6B0000084A0000A5BD0000ADBD000031A5000073EF2921E7840000
+94FF42000894E7EF94080031F7FFEF4A00000000000039EFFFFFFFFFA54A212142A5FFFF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/8.gif b/images/callouts/8.gif
new file mode 100644 (file)
index 0000000..dbe8ef0
Binary files /dev/null and b/images/callouts/8.gif differ
diff --git a/images/callouts/8.pdf b/images/callouts/8.pdf
new file mode 100644 (file)
index 0000000..ad5d6f3
Binary files /dev/null and b/images/callouts/8.pdf differ
diff --git a/images/callouts/9.eps b/images/callouts/9.eps
new file mode 100644 (file)
index 0000000..9a6e50e
--- /dev/null
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (9.eps)
+%%CreationDate: (Fri Nov  5 11:45:41 2004)
+%%BoundingBox: 0 0 12 12
+%%HiResBoundingBox: 0 0 12 12
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 12 12
+userdict begin
+DisplayImage
+0 0
+12 12
+12.000000
+12 12
+1
+1
+1
+8
+FFFFFFAD52292152ADF7FFFFFFF74200001010000039EFFFFF4A0008ADD6E7A5000039
+F7AD000073DE0818F75A0000944A0000A5AD0000D6A50000391800007BDE0818F7BD0000
+0818000010BDEFE7E7B500000842000000080808D694000031A5000042F7214AFF390000
+8CF7390000ADFFEF6B000029F7FFEF3100000800000031DEFFFFFFFF94311008318CF7FF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/callouts/9.gif b/images/callouts/9.gif
new file mode 100644 (file)
index 0000000..36038c6
Binary files /dev/null and b/images/callouts/9.gif differ
diff --git a/images/callouts/9.pdf b/images/callouts/9.pdf
new file mode 100644 (file)
index 0000000..756251c
Binary files /dev/null and b/images/callouts/9.pdf differ
diff --git a/images/callouts/ChangeLog b/images/callouts/ChangeLog
new file mode 100644 (file)
index 0000000..6e52466
--- /dev/null
@@ -0,0 +1,13 @@
+2001-12-06  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: image converstion make improvements; if you want to tweak the image conversion stuff, do that in Make.images and that will affect the subdirs too; also, a clean rule
+
+2001-12-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * .cvsignore, Makefile: New file.
+
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * 1.gif, 10.gif, 2.gif, 3.gif, 4.gif, 5.gif, 6.gif, 7.gif, 8.gif, 9.gif: 
+       New file.
+
diff --git a/images/caution.eps b/images/caution.eps
new file mode 100644 (file)
index 0000000..3f4b400
--- /dev/null
@@ -0,0 +1,553 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (caution.eps)
+%%CreationDate: (Fri Nov  5 11:45:35 2004)
+%%BoundingBox: 0 0 24 24
+%%HiResBoundingBox: 0 0 24 24
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 24 24
+userdict begin
+DisplayImage
+0 0
+24 24
+12.000000
+24 24
+1
+0
+0
+256
+000000
+080800
+101000
+181800
+212100
+313100
+424200
+5A5A00
+636300
+6B6B00
+737300
+7B7B00
+848400
+848473
+8C8C00
+8C8C73
+8C8C8C
+949400
+949473
+94947B
+9C9C00
+9C9C73
+9C9C7B
+9C9C94
+9C9C9C
+A5A500
+A5A563
+A5A59C
+A5A5A5
+B5B500
+B5B55A
+B5B563
+B5B5B5
+BDBD00
+BDBD63
+CECE00
+CECECE
+D6D600
+D6D6CE
+D6D6D6
+DEDE00
+DEDE31
+DEDE39
+DEDE42
+E7E700
+E7E731
+E7E739
+E7E7E7
+EFEF00
+EFEFEF
+F7F700
+F7F710
+F7F718
+F7F731
+F7F7F7
+FFFF00
+FFFF10
+FFFF18
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
+2F313A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A240D1B313A3A3A3A3A3A3A3A3A
+3A3A3A3A3A3A3A3A3A3A24122B1E17313A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A2F0D2B
+32341F1C313A3A3A3A3A3A3A3A3A3A3A3A3A3A3A240D35323232321F1B313A3A3A3A3A3A
+3A3A3A3A3A3A3A24122A32322C3032341E1C313A3A3A3A3A3A3A3A3A3A3A24132A32321D
+05082C32381E1C313A3A3A3A3A3A3A3A3A24122E3232320A00031D3232381E18313A3A3A
+3A3A3A3A2F0D2B323232320A00031D323232341F1C313A3A3A3A3A240D35323232323214
+02052532323232321F1B313A3A3A24122A3232323232321D02062C3232323232341E1C31
+3A2F0D2B323232323232322303072C323232323232341A203A311C1E343232323232322C
+0309303232323232322A13243A3A311B1F3232323232322C080E3232323232322D12243A
+3A3A3A311C1F3432323232250B112C323232322D10243A3A3A3A3A3A311B1E383232320C
+0004213232322A12243A3A3A3A3A3A3A3A311C1E3832321904062532322E16243A3A3A3A
+3A3A3A3A3A3A311C1E343232252C32322A16243A3A3A3A3A3A3A3A3A3A3A3A311B1F3232
+3232322D12243A3A3A3A3A3A3A3A3A3A3A3A3A3A311C1F3432322D10243A3A3A3A3A3A3A
+3A3A3A3A3A3A3A3A3A311B1E382A12243A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A311C
+1A13243A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3120243A3A3A3A3A3A3A3A3A3A
+
+end
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/caution.gif b/images/caution.gif
new file mode 100644 (file)
index 0000000..9cc2e15
Binary files /dev/null and b/images/caution.gif differ
diff --git a/images/caution.pdf b/images/caution.pdf
new file mode 100644 (file)
index 0000000..95ee6fa
Binary files /dev/null and b/images/caution.pdf differ
diff --git a/images/home.eps b/images/home.eps
new file mode 100644 (file)
index 0000000..8fcd3ef
--- /dev/null
@@ -0,0 +1,551 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (home.eps)
+%%CreationDate: (Fri Nov  5 11:45:35 2004)
+%%BoundingBox: 0 0 35 15
+%%HiResBoundingBox: 0 0 35 15
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 35 15
+userdict begin
+DisplayImage
+0 0
+35 15
+12.000000
+35 15
+1
+0
+0
+256
+108C10
+218C21
+299429
+319C31
+429C42
+4AA54A
+63AD63
+73BD73
+84BD84
+8CC68C
+94CE94
+A5CEA5
+B5DEB5
+C6DEC6
+CEE7CE
+D6EFD6
+E7EFE7
+EFF7EF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+121212121212121212121212121212121212121212121212121212121212121212121212
+121212121212121212121212121212121212121212121212121212121212121212121212
+121212121212121212121212121212121212121212121212121212121212121212121210
+0C0D0E120E0D0C1012121212121212121212121212121212121212121212121212121206
+021212110207121212121212121212121212121212121212121212121212121212120804
+12121204081212120E0E1212120E110E0E12100C121212110C1112121212121212080412
+121204081212040B0B0312100105080008070208120F040D031012121212121208010808
+080108120C061212060B12040C120808120C0412070C1208091212121212120804121212
+04081208081212080812040C120808120D0412040608080C121212121212080412121204
+08120B071212070B12040C120808120C0412060B12121212121212121207021112120207
+1210040F10041012020C120707120C02120D0211100A1212121212100C0D0E120E0D0C10
+1210090910120F0D0C110C0D100D0C10120D080B12121212121212121212121212121212
+121212121212121212121212121212121212121212121212121212121212121212121212
+121212121212121212121212121212121212121212121212121212121212121212121212
+121212121212121212121212121212121212121212
+end
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/home.gif b/images/home.gif
new file mode 100644 (file)
index 0000000..55e1d59
Binary files /dev/null and b/images/home.gif differ
diff --git a/images/home.pdf b/images/home.pdf
new file mode 100644 (file)
index 0000000..3fc4ca9
Binary files /dev/null and b/images/home.pdf differ
diff --git a/images/important.eps b/images/important.eps
new file mode 100644 (file)
index 0000000..61e6fb7
--- /dev/null
@@ -0,0 +1,553 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (important.eps)
+%%CreationDate: (Fri Nov  5 11:45:35 2004)
+%%BoundingBox: 0 0 24 24
+%%HiResBoundingBox: 0 0 24 24
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 24 24
+userdict begin
+DisplayImage
+0 0
+24 24
+12.000000
+24 24
+1
+0
+0
+256
+000000
+080808
+101010
+181818
+292929
+393939
+424231
+424242
+4A4A4A
+525252
+5A5A29
+636318
+636352
+636363
+6B6B42
+6B6B6B
+737352
+7B7B7B
+848484
+8C8C18
+8C8C39
+8C8C7B
+8C8C8C
+94945A
+94948C
+949494
+9C9C5A
+9C9C63
+9C9C7B
+9C9C9C
+A5A563
+A5A584
+A5A594
+A5A59C
+A5A5A5
+ADAD21
+ADAD39
+ADAD6B
+ADAD7B
+ADAD84
+ADAD8C
+ADADA5
+ADADAD
+B5B54A
+B5B552
+B5B58C
+B5B5B5
+BDBD08
+BDBD5A
+BDBD84
+BDBD9C
+BDBDBD
+C6C608
+C6C65A
+C6C6C6
+CECE73
+CECECE
+D6D618
+D6D652
+D6D663
+D6D66B
+D6D6D6
+DEDE00
+DEDE21
+DEDE31
+DEDE39
+DEDE52
+DEDEDE
+E7E708
+E7E721
+E7E729
+E7E731
+E7E75A
+E7E763
+E7E77B
+E7E7E7
+EFEF00
+EFEF10
+EFEF31
+EFEF42
+EFEFEF
+F7F710
+F7F718
+F7F731
+F7F739
+F7F74A
+F7F7F7
+FFFF00
+FFFF08
+FFFF10
+FFFF21
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+5B5B5B5B5B5B5B5B5B5B4B4B4B4B4B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B4B36221922
+2222192238565B5B5B5B5B5B5B5B5B5B5B5633161F404D4D4D4D4D321C16385B5B5B5B5B
+5B5B5B5B4B191E495757575757575757573A1A22565B5B5B5B5B5B5619314D5757575757
+5757575757574D262E5B5B5B5B5B56193157575757574C14103E5757575757571B2E5B5B
+5B5B38254D57575757571400000A4D57575757574D1E435B5B4B21495757575757570D00
+0005405757575757573A295B5B382857575757575757120000094E575757575757571C4B
+5B2241575757575757572300000B595757575757575728384B224D575757575757572F02
+0013575757575757575744194B224D575757575757573904022457575757575757574419
+4B224D575757575757573F05022B575757575757575744194B224D575757575757574607
+033B575757575757575744194B224D575757575757574F160F4A57575757575757574422
+5B2E405757575757575747141039595757575757575728385B3D1F575757575757571100
+0009475757575757574F204B5B56213A575757575757100000063F575757575758302E5B
+5B5B3D1E4D57575757573E0E0C2F5757575757573C22505B5B5B5B22265757575757575A
+4E5757575757575716385B5B5B5B5B5B221B4D57575757575757575757583C12385B5B5B
+5B5B5B5B5B221A354F575757575757574F2C19365B5B5B5B5B5B5B5B5B5B3D2215284444
+4444371C152A4B5B5B5B5B5B5B5B5B5B5B5B5B5B4B361919191922384B5B5B5B5B5B5B5B
+
+end
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/important.gif b/images/important.gif
new file mode 100644 (file)
index 0000000..25e40c7
Binary files /dev/null and b/images/important.gif differ
diff --git a/images/important.pdf b/images/important.pdf
new file mode 100644 (file)
index 0000000..7f68994
Binary files /dev/null and b/images/important.pdf differ
diff --git a/images/next.eps b/images/next.eps
new file mode 100644 (file)
index 0000000..ab7f37b
--- /dev/null
@@ -0,0 +1,551 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (next.eps)
+%%CreationDate: (Fri Nov  5 11:45:35 2004)
+%%BoundingBox: 0 0 35 15
+%%HiResBoundingBox: 0 0 35 15
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 35 15
+userdict begin
+DisplayImage
+0 0
+35 15
+12.000000
+35 15
+1
+0
+0
+256
+008400
+108C10
+218C21
+299429
+319C31
+429C42
+4AA54A
+52AD52
+63AD63
+6BB56B
+84BD84
+8CC68C
+94CE94
+A5CEA5
+ADD6AD
+B5DEB5
+C6DEC6
+CEE7CE
+D6EFD6
+E7EFE7
+EFF7EF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+151515151515151515151515151515151515151515151515151515151515151515151515
+151515151515151515151515151515151515151515151515151515151515151515151515
+151515151515151515151515151515151515151515151515151515151515151515151515
+1515100F13151512100F1315151515151515151515151515151515151515151515151515
+151204011315150A0A151515151515151515151515091115151515151515151515151515
+150A040415150F1015151210151515151515151505101515151515151515151515151515
+0A13020915100F150F070F0413070115080C0D02070D151515151515151515151515150A
+1511010E0F1015041315051115040A0A1515051015151515151515151515151515150A15
+150E010C1015000A0A0A12151000101515051015151515151515151515151515150A1515
+15070010150212151515150A0A0415150510151515151515151515151515151306101515
+15040F150A071512100E0F15040B15050A1115151515151515151515151511100F131515
+131315150D0A1013101113100F13110A1015151515151515151515151515151515151515
+151515151515151515151515151515151515151515151515151515151515151515151515
+151515151515151515151515151515151515151515151515151515151515151515151515
+151515151515151515151515151515151515151515
+end
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/next.gif b/images/next.gif
new file mode 100644 (file)
index 0000000..8c502e7
Binary files /dev/null and b/images/next.gif differ
diff --git a/images/next.pdf b/images/next.pdf
new file mode 100644 (file)
index 0000000..3a36b0a
Binary files /dev/null and b/images/next.pdf differ
diff --git a/images/note.eps b/images/note.eps
new file mode 100644 (file)
index 0000000..8676af6
--- /dev/null
@@ -0,0 +1,296 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (note.eps)
+%%CreationDate: (Fri Nov  5 11:45:35 2004)
+%%BoundingBox: 0 0 24 24
+%%HiResBoundingBox: 0 0 24 24
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 24 24
+userdict begin
+DisplayImage
+0 0
+24 24
+12.000000
+24 24
+1
+1
+1
+8
+FFFFFFFFFFFFFFFFFFFFE7E7E7E7E7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBDA594
+A5A5A594A5CEFFFFFFFFFFFFFFFFFFFFFFFFEFC68CA5D6E7EFEFEFE7C69494CEFFFFFFFF
+FFFFFFFFFFE794A5DEFFFFFFFFFFFFFFFFFFCE94B5FFFFFFFFFFFFFFEFA5B5FFFFFFFFFF
+FFFFFFFFFFFFFFEFA5BDFFFFFFFFFFEF94BDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF94BDFF
+FFFFFFCEA5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFA5DEFFFFFFA5DEFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFCEA5FFFFCEA5FFFFFFFFFFC6BDB5BDB5BDDEE7E7E7E7E7FFFFA5
+E7FFA5DEEFD6D6A58CB5CEDED6CE8C84A5A5A5A59494E7B5CEE7A5E79494B5CEFFFFE7CE
+94C6CE73BDDEDEDED694CEDE94E7A5D694E7FFFFFFEF94635A4A527B94BDB5B5BDC6EFE7
+94DEA5D694E7FFFFFFBD7BCEDEDEA594FFEFFFEFFFFFFFDE94E7A5DE8CE7FFFFEF947394
+B5BD8CA5FFFFFFFFFFFFFFE794E7A5DE947BA5EFEF6B7BD6CEC67BDEFFFFFFFFFFFFFFE7
+A5FFB5D6FFFFB594CE6BBD8C7363BDFFFFFFFFFFFFFFFFA5CEFFD6A5FFFFEFC67B527394
+84C6FFFFFFFFFFFFFFFFEFA5EFFFFFA5CEFFFFFFDEE7DEE7DEFFFFFFFFFFFFFFFFFFBDBD
+FFFFFFD6A5E7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCEA5EFFFFFFFFFB5A5FFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFF8CCEFFFFFFFFFFFFBD94EFFFFFFFFFFFFFFFFFFFFFFFCE8CCEFFFF
+FFFFFFFFFFFFB594C6EFFFFFFFFFFFFFFFE7B594C6FFFFFFFFFFFFFFFFFFFFD6A58CA5DE
+DEE7DECEA58CB5E7FFFFFFFFFFFFFFFFFFFFFFFFFFDECE94949494A5CEEFFFFFFFFFFFFF
+FFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/note.gif b/images/note.gif
new file mode 100644 (file)
index 0000000..7322e8e
Binary files /dev/null and b/images/note.gif differ
diff --git a/images/note.pdf b/images/note.pdf
new file mode 100644 (file)
index 0000000..796e43e
Binary files /dev/null and b/images/note.pdf differ
diff --git a/images/prev.eps b/images/prev.eps
new file mode 100644 (file)
index 0000000..66d6904
--- /dev/null
@@ -0,0 +1,551 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (prev.eps)
+%%CreationDate: (Fri Nov  5 11:45:35 2004)
+%%BoundingBox: 0 0 35 15
+%%HiResBoundingBox: 0 0 35 15
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 35 15
+userdict begin
+DisplayImage
+0 0
+35 15
+12.000000
+35 15
+1
+0
+0
+256
+008400
+108C10
+218C21
+299429
+319C31
+429C42
+4AA54A
+52AD52
+6BB56B
+73BD73
+84BD84
+8CC68C
+94CE94
+A5CEA5
+ADD6AD
+C6DEC6
+CEE7CE
+D6EFD6
+E7EFE7
+EFF7EF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+141414141414141414141414141414141414141414141414141414141414141414141414
+141414141414141414141414141414141414141414141414141414141414141414141414
+141414141414141414141414141414141414141414141414141414141414141414141414
+141414120F0F0F0F14141414141414141414141414141414141414141414141414141414
+14141409030F090212141414141414141414141414141414141414141414141414141414
+14140A051414030A140F140F141410101414141414141414141414141414141414141414
+140A051414020C10000A030F080C0A081202091410061214141414141414141414141414
+0A020A060A14140014121203141401140D06140D1214141414141414141414141414140A
+0514141414140014140F020A0A0A141401120A1414141414141414141414141414140A05
+14141414140014141202141414141409070F141414141414141414141414141414090314
+1414141200121414040D140F12141202141414141414141414141414141414120F0F1014
+1414100F0F1414120B0A1213141410141414141414141414141414141414141414141414
+141414141414141414141414141414141414141414141414141414141414141414141414
+141414141414141414141414141414141414141414141414141414141414141414141414
+141414141414141414141414141414141414141414
+end
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/prev.gif b/images/prev.gif
new file mode 100644 (file)
index 0000000..0894d9e
Binary files /dev/null and b/images/prev.gif differ
diff --git a/images/prev.pdf b/images/prev.pdf
new file mode 100644 (file)
index 0000000..faf3cca
Binary files /dev/null and b/images/prev.pdf differ
diff --git a/images/tip.eps b/images/tip.eps
new file mode 100644 (file)
index 0000000..7224745
--- /dev/null
@@ -0,0 +1,296 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (tip.eps)
+%%CreationDate: (Fri Nov  5 11:45:35 2004)
+%%BoundingBox: 0 0 25 24
+%%HiResBoundingBox: 0 0 25 24
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 25 24
+userdict begin
+DisplayImage
+0 0
+25 24
+12.000000
+25 24
+1
+1
+1
+8
+FFFFFFFFFFFFFFFFFFFFE7E7E7E7E7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7C6A5
+94A5A5A594A5CEF7FFFFFFFFFFFFFFFFFFFFFFFFF7BD94A5CEE7F7E7F7E7C69494CEFFFF
+FFFFFFFFFFFFFFFFE794A5DEFFFFFFFFFFFFFFFFFFCE94A5FFFFFFFFFFFFFFFFF794BDF7
+FFFFFFFFFFFFFFFFFFFFFFE7A5B5FFFFFFFFFFFFF794BDFFFFFFFFFFFFE7A5E7FFFFFFFF
+FFFF94BDFFFFFFFFFFCEA5F7FFFFFFFFFFF77B216BE7FFFFFFFFFFE7A5DEFFFFFFE7A5E7
+FFFFFFFFFFFFF773105AE7FFFFFFFFFFFFCEA5FFFFFFCEB5FFFFFFFFFFFFFFFFDEA5DEFF
+FFFFFFFFFFFFF794E7FFFFA5DEFFFFFFFFFFFFFF8C7B7BB5FFFFFFFFFFFFFFFFB5CEFFE7
+A5F7FFFFFFFFFFFFFF2100006BF7FFFFFFFFFFFFFFE794FFE7A5F7FFFFFFFFFFFFFF9439
+006BF7FFFFFFFFFFFFFFE794FFE7A5E7FFFFFFFFFFFFFFF763006BF7FFFFFFFFFFFFFFE7
+94FFE7A5F7FFFFFFFFFFFFFFF763006BF7FFFFFFFFFFFFFFE794FFE7A5E7FFFFFFFFFFFF
+FFF763006BF7FFFFFFFFFFFFFFDE94FFFFB5CEFFFFFFFFFFFFFFF763006BF7FFFFFFFFFF
+FFFFA5CEFFFFDEA5FFFFFFFFFFFFFFF763006BF7FFFFFFFFFFFFE7A5E7FFFFF7A5CEFFFF
+FFFFFFFFF763006BF7FFFFFFFFFFFFBDBDFFFFFFFFDEA5E7FFFFFFFFFFF773217BF7FFFF
+FFFFFFCEA5E7FFFFFFFFFFA5A5FFFFFFFFFFFFDEC6CEFFFFFFFFFFFF8CCEFFFFFFFFFFFF
+FFB594E7FFFFFFFFFFFFFFFFFFFFFFCE8CCEFFFFFFFFFFFFFFFFFFA594C6F7FFFFFFFFFF
+FFFFE7B594C6FFFFFFFFFFFFFFFFFFFFFFDE948CA5DEE7E7E7CE9494A5E7FFFFFFFFFFFF
+FFFFFFFFFFFFFFFFE7CE94949494A5CEE7FFFFFFFFFFFFFFFFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/tip.gif b/images/tip.gif
new file mode 100644 (file)
index 0000000..f062955
Binary files /dev/null and b/images/tip.gif differ
diff --git a/images/tip.pdf b/images/tip.pdf
new file mode 100644 (file)
index 0000000..9daad9a
Binary files /dev/null and b/images/tip.pdf differ
diff --git a/images/toc-blank.eps b/images/toc-blank.eps
new file mode 100644 (file)
index 0000000..aa64e59
--- /dev/null
@@ -0,0 +1,300 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (toc-blank.eps)
+%%CreationDate: (Fri Nov  5 11:45:36 2004)
+%%BoundingBox: 0 0 15 9
+%%HiResBoundingBox: 0 0 15 9
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 15 9
+userdict begin
+DisplayImage
+0 0
+15 9
+12.000000
+15 9
+1
+0
+0
+16
+000000
+800000
+008000
+808000
+000080
+800080
+008080
+C0C0C0
+808080
+FF0000
+00FF00
+FFFF00
+0000FF
+FF00FF
+00FFFF
+FFFFFF
+0F0F0F0F080F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F080F
+0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F080F080F080F080F
+080F080F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F080F0F0F0F0F0F0F0F0F0F0F0F0F
+0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F080F0F0F0F0F0F0F0F0F0F
+end
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/toc-blank.gif b/images/toc-blank.gif
new file mode 100644 (file)
index 0000000..6c65e3a
Binary files /dev/null and b/images/toc-blank.gif differ
diff --git a/images/toc-blank.pdf b/images/toc-blank.pdf
new file mode 100644 (file)
index 0000000..da88652
Binary files /dev/null and b/images/toc-blank.pdf differ
diff --git a/images/toc-minus.eps b/images/toc-minus.eps
new file mode 100644 (file)
index 0000000..81f82d0
--- /dev/null
@@ -0,0 +1,283 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (toc-minus.eps)
+%%CreationDate: (Fri Nov  5 11:45:36 2004)
+%%BoundingBox: 0 0 15 9
+%%HiResBoundingBox: 0 0 15 9
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 15 9
+userdict begin
+DisplayImage
+0 0
+15 9
+12.000000
+15 9
+1
+1
+1
+8
+848484848484848484FFFFFFFFFFFF84FFFFFFFFFFFFFF84FFFFFFFFFFFF84FFFFFFFF
+FFFFFF84FFFFFFFFFFFF84FFFFFFFFFFFFFF84FFFFFFFFFFFF84FF0000000000FF84FF84
+FF84FF8484FFFFFFFFFFFFFF84FFFFFFFFFFFF84FFFFFFFFFFFFFF84FFFFFFFFFFFF84FF
+FFFFFFFFFFFF84FFFFFFFFFFFF848484848484848484FFFFFFFFFFFFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/toc-minus.gif b/images/toc-minus.gif
new file mode 100644 (file)
index 0000000..40ebe61
Binary files /dev/null and b/images/toc-minus.gif differ
diff --git a/images/toc-minus.pdf b/images/toc-minus.pdf
new file mode 100644 (file)
index 0000000..9aa2dd6
Binary files /dev/null and b/images/toc-minus.pdf differ
diff --git a/images/toc-plus.eps b/images/toc-plus.eps
new file mode 100644 (file)
index 0000000..05df6df
--- /dev/null
@@ -0,0 +1,283 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (toc-plus.eps)
+%%CreationDate: (Fri Nov  5 11:45:36 2004)
+%%BoundingBox: 0 0 15 9
+%%HiResBoundingBox: 0 0 15 9
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 15 9
+userdict begin
+DisplayImage
+0 0
+15 9
+12.000000
+15 9
+1
+1
+1
+8
+848484848484848484FFFFFFFFFFFF84FFFFFFFFFFFFFF84FFFFFFFFFFFF84FFFFFF00
+FFFFFF84FFFFFFFFFFFF84FFFFFF00FFFFFF84FFFFFFFFFFFF84FF0000000000FF84FF84
+FF84FF8484FFFFFF00FFFFFF84FFFFFFFFFFFF84FFFFFF00FFFFFF84FFFFFFFFFFFF84FF
+FFFFFFFFFFFF84FFFFFFFFFFFF848484848484848484FFFFFFFFFFFFend
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/toc-plus.gif b/images/toc-plus.gif
new file mode 100644 (file)
index 0000000..3e9e7d5
Binary files /dev/null and b/images/toc-plus.gif differ
diff --git a/images/toc-plus.pdf b/images/toc-plus.pdf
new file mode 100644 (file)
index 0000000..46f5c8b
Binary files /dev/null and b/images/toc-plus.pdf differ
diff --git a/images/up.eps b/images/up.eps
new file mode 100644 (file)
index 0000000..e0fd951
--- /dev/null
@@ -0,0 +1,551 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (up.eps)
+%%CreationDate: (Fri Nov  5 11:45:36 2004)
+%%BoundingBox: 0 0 35 15
+%%HiResBoundingBox: 0 0 35 15
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 35 15
+userdict begin
+DisplayImage
+0 0
+35 15
+12.000000
+35 15
+1
+0
+0
+256
+008400
+108C10
+218C21
+299429
+319C31
+429C42
+63AD63
+6BB56B
+84BD84
+8CC68C
+94CE94
+B5DEB5
+C6DEC6
+CEE7CE
+D6EFD6
+E7EFE7
+EFF7EF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111
+1111111111111111110F0B0C0D110D0C0B10111111111111111111111111111111111111
+1111111111111111110603111110040E1111111111111111111111111111111111111111
+111111111111111108051111110811110E0F0D0F11111111111111111111111111111111
+11111111111111080511111108110E05060B050B11111111111111111111111111111111
+11111111111108051111110811110808110F021111111111111111111111111111111111
+111111111108051111110811110808111100111111111111111111111111111111111111
+1111111108051111110911110808110F0211111111111111111111111111111111111111
+1111110F010C110C0A111108040F070A1111111111111111111111111111111111111111
+1111111009080C1111110806080B11111111111111111111111111111111111111111111
+111111111111111111080811111111111111111111111111111111111111111111111111
+111111111111110E07070E11111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111
+end
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/up.gif b/images/up.gif
new file mode 100644 (file)
index 0000000..e899a27
Binary files /dev/null and b/images/up.gif differ
diff --git a/images/up.pdf b/images/up.pdf
new file mode 100644 (file)
index 0000000..576c928
Binary files /dev/null and b/images/up.pdf differ
diff --git a/images/warning.eps b/images/warning.eps
new file mode 100644 (file)
index 0000000..dce82d1
--- /dev/null
@@ -0,0 +1,553 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (warning.eps)
+%%CreationDate: (Fri Nov  5 11:45:36 2004)
+%%BoundingBox: 0 0 24 24
+%%HiResBoundingBox: 0 0 24 24
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image.  The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+  %
+  % Get a DirectClass packet.
+  %
+  % Parameters:
+  %   red.
+  %   green.
+  %   blue.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+  %
+  % Display a DirectClass image.
+  %
+  systemdict /colorimage known
+  {
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { DirectClassPacket } false 3 colorimage
+  }
+  {
+    %
+    % No colorimage operator;  convert to grayscale.
+    %
+    columns rows 8
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { GrayDirectClassPacket } image
+  } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+  %
+  % Get a DirectClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   red
+  %   green
+  %   blue
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile color_packet readhexstring pop pop
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet;  convert to grayscale.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  color_packet 0 get 0.299 mul
+  color_packet 1 get 0.587 mul add
+  color_packet 2 get 0.114 mul add
+  cvi
+  /gray_packet exch def
+  compression 0 eq
+  {
+    /number_pixels 1 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add def
+  } ifelse
+  0 1 number_pixels 1 sub
+  {
+    pixels exch gray_packet put
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+  %
+  % Get a PseudoClass packet.
+  %
+  % Parameters:
+  %   index: index into the colormap.
+  %   length: number of pixels minus one of this color (optional).
+  %
+  currentfile byte readhexstring pop 0 get
+  /offset exch 3 mul def
+  /color_packet colormap offset 3 getinterval def
+  compression 0 eq
+  {
+    /number_pixels 3 def
+  }
+  {
+    currentfile byte readhexstring pop 0 get
+    /number_pixels exch 1 add 3 mul def
+  } ifelse
+  0 3 number_pixels 1 sub
+  {
+    pixels exch color_packet putinterval
+  } for
+  pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+  %
+  % Display a PseudoClass image.
+  %
+  % Parameters:
+  %   class: 0-PseudoClass or 1-Grayscale.
+  %
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  class 0 gt
+  {
+    currentfile buffer readline pop
+    token pop /depth exch def pop
+    /grays columns 8 add depth sub depth mul 8 idiv string def
+    columns rows depth
+    [
+      columns 0 0
+      rows neg 0 rows
+    ]
+    { currentfile grays readhexstring pop } image
+  }
+  {
+    %
+    % Parameters:
+    %   colors: number of colors in the colormap.
+    %   colormap: red, green, blue color packets.
+    %
+    currentfile buffer readline pop
+    token pop /colors exch def pop
+    /colors colors 3 mul def
+    /colormap colors string def
+    currentfile colormap readhexstring pop pop
+    systemdict /colorimage known
+    {
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { PseudoClassPacket } false 3 colorimage
+    }
+    {
+      %
+      % No colorimage operator;  convert to grayscale.
+      %
+      columns rows 8
+      [
+        columns 0 0
+        rows neg 0 rows
+      ]
+      { GrayPseudoClassPacket } image
+    } ifelse
+  } ifelse
+} bind def
+
+/DisplayImage
+{
+  %
+  % Display a DirectClass or PseudoClass image.
+  %
+  % Parameters:
+  %   x & y translation.
+  %   x & y scale.
+  %   label pointsize.
+  %   image label.
+  %   image columns & rows.
+  %   class: 0-DirectClass or 1-PseudoClass.
+  %   compression: 0-none or 1-RunlengthEncoded.
+  %   hex color packets.
+  %
+  gsave
+  /buffer 512 string def
+  /byte 1 string def
+  /color_packet 3 string def
+  /pixels 768 string def
+
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  x y translate
+  currentfile buffer readline pop
+  token pop /x exch def
+  token pop /y exch def pop
+  currentfile buffer readline pop
+  token pop /pointsize exch def pop
+  /Times-Roman findfont pointsize scalefont setfont
+  x y scale
+  currentfile buffer readline pop
+  token pop /columns exch def
+  token pop /rows exch def pop
+  currentfile buffer readline pop
+  token pop /class exch def pop
+  currentfile buffer readline pop
+  token pop /compression exch def pop
+  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+  grestore
+} bind def
+%%EndProlog
+%%Page:  1 1
+%%PageBoundingBox: 0 0 24 24
+userdict begin
+DisplayImage
+0 0
+24 24
+12.000000
+24 24
+1
+0
+0
+256
+080000
+100000
+180000
+210000
+290000
+310000
+420000
+4A0000
+520000
+5A0000
+6B0000
+730000
+7B0000
+840000
+8C0000
+940000
+947B7B
+9C5252
+9C5A5A
+9C7B7B
+A50000
+A53939
+A54A4A
+A58484
+A59494
+A5A5A5
+AD0000
+AD3131
+AD9494
+B50000
+B52929
+B58C8C
+B59C9C
+B5A5A5
+B5B5B5
+BD0000
+BDADAD
+BDB5B5
+C60000
+C61010
+C61818
+C6C6C6
+CE0000
+CE1010
+CE1818
+CE2929
+D60000
+D62929
+D6D6D6
+DE0000
+DEDEDE
+E70000
+E72121
+E7E7E7
+EF0000
+EF0808
+EFEFEF
+F70000
+F7F7F7
+FF0000
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+FFFFFF
+3C3C3C3C3C3C3C32303030303030303030383C3C3C3C3C3C3C3C3C3C3C3C29111E1B1E1B
+1E1B1E1B1B1C383C3C3C3C3C3C3C3C3C3C221637393939393939393939281C383C3C3C3C
+3C3C3C3829153739393939393939393939392817383C3C3C3C3C3C291237393939393939
+393939393939392819383C3C3C3C2215373939393939391D0F2E3939393939392817383C
+3C2916373939393939392304010937393939393939281C38321137393939393939390F01
+01042E393939393939392821301B39393939393939391A02010631393939393939393710
+301E39393939393939392603000837393939393939393710301B39393939393939393105
+010B39393939393939393710301E39393939393939393307010E39393939393939393710
+301B39393939393939393908011439393939393939393710301E3939393939393939390A
+021A39393939393939393710301B393939393939393939230D2E39393939393939393710
+301E3939393939393939330C081A39393939393939393710321B39393939393939391A01
+010631393939393939392D18382028393939393939391D030107333939393939392F1332
+3C382028393939393939391D0D2A3939393939392F17323C3C3C381C2739393939393939
+393939393939393410323C3C3C3C3C3A22273939393939393939393939392F10383C3C3C
+3C3C3C3C381C28393939393939393939392F17323C3C3C3C3C3C3C3C3C38202837333733
+373337332D10323C3C3C3C3C3C3C3C3C3C3C3A24131313131313131318323C3C3C3C3C3C
+
+end
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/images/warning.gif b/images/warning.gif
new file mode 100644 (file)
index 0000000..a587079
Binary files /dev/null and b/images/warning.gif differ
diff --git a/images/warning.pdf b/images/warning.pdf
new file mode 100644 (file)
index 0000000..e86c595
Binary files /dev/null and b/images/warning.pdf differ
diff --git a/lib/ChangeLog b/lib/ChangeLog
new file mode 100644 (file)
index 0000000..a521bda
--- /dev/null
@@ -0,0 +1,36 @@
+2004-10-24  <petere78@users.sourceforge.net>
+
+       * dblib.dsl: Revision 1.6 completely broke PI processing, so back that out for now.
+
+2003-04-29  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dblib.dsl: Fix my-debug so it actually returns what you ask it to.
+
+2003-04-28  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dblib.dsl: Make PI parsing more robust by rewriting parse-pi-attribute and a fix
+       in parse-starttag-pi.  I'm still not entirely happy with the PI
+       parsing, its probably a little flakey, but it shouldn't completely
+       bail out when it hits data its not expecting.  Closes Debian Bug#186886.
+
+2003-04-26  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dblib.dsl: Fix a typo in the param docs
+
+2003-04-05  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dblib.dsl: xsl stylesheet refers to pica as "pc" rather than "pi", so we allow
+       either one as a pica
+
+2002-05-12  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dblib.dsl: Bugs #429663 and #474328 fixed (allow external linespecific content to be indented and numbered). Eight bit or unicode external linespecific content may be problematic though.
+
+2001-07-10  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dblib.dsl: Bug fix: (strip) was returning the empty string for any string one character long
+
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dblib.dsl: New file.
+
diff --git a/lib/dblib.dsl b/lib/dblib.dsl
new file mode 100644 (file)
index 0000000..a896cb2
--- /dev/null
@@ -0,0 +1,1858 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
+
+<style-sheet>
+<style-specification>
+<style-specification-body>
+
+;; $Id: dblib.dsl,v 1.8 2004/10/24 01:09:35 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+;; This file contains a general library of DSSSL functions.
+;;
+
+;; If **ANY** change is made to this file, you _MUST_ alter the
+;; following definition:
+
+;; REFERENCE Library Version
+
+(define %library-version%
+  ;; REFENTRY version
+  ;; PURP Defines the library version string
+  ;; DESC
+  ;; Defines the library version string.
+  ;; /DESC
+  ;; /REFENTRY
+  "Modular DocBook Stylesheet Library")
+
+;; === Book intro, for dsl2man ==========================================
+
+<![CDATA[
+;; DOCINFO
+;; <title>DSSSL Library</title>
+;; <subtitle>Part of the Modular DocBook Stylesheet distribution</subtitle>
+;; <author><firstname>Norman</firstname><surname>Walsh</surname>
+;; </author>
+;; <edition>$Revision: 1.8 $</edition>
+;; <copyright><year>1997</year><year>1998</year><year>1999</year>
+;; <holder>Norman Walsh</holder></copyright>
+;; <legalnotice>
+;; <para>
+;; This software may be distributed under the same terms as Jade:
+;; </para>
+;; <para>
+;; Permission is hereby granted, free of charge, to any person
+;; obtaining a copy of this software and associated documentation
+;; files (the &ldquo;Software&rdquo;), to deal in the Software without
+;; restriction, including without limitation the rights to use,
+;; copy, modify, merge, publish, distribute, sublicense, and/or
+;; sell copies of the Software, and to permit persons to whom the
+;; Software is furnished to do so, subject to the following
+;; conditions:
+;; </para>
+;; <para>
+;; The above copyright notice and this permission notice shall be
+;; included in all copies or substantial portions of the Software.
+;; </para>
+;; <para>
+;; Except as contained in this notice, the names of individuals
+;; credited with contribution to this software shall not be used in
+;; advertising or otherwise to promote the sale, use or other
+;; dealings in this Software without prior written authorization
+;; from the individuals in question.
+;; </para>
+;; <para>
+;; Any stylesheet derived from this Software that is publically
+;; distributed will be identified with a different name and the
+;; version strings in any derived Software will be changed so that
+;; no possibility of confusion between the derived package and this
+;; Software will exist.
+;; </para>
+;; </legalnotice>
+;; <legalnotice>
+;; <para>
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+;; OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT.  IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+;; CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+;; OTHER DEALINGS IN THE SOFTWARE.
+;; </para>
+;; </legalnotice>
+;; <legalnotice>
+;; <para>Please direct all questions, bug reports, or suggestions for changes
+;; to Norman Walsh, &lt;<literal>ndw@nwalsh.com</literal>&gt;.
+;; </para>
+;; <para>
+;; See <ulink url="http://nwalsh.com/docbook/dsssl/">http://nwalsh.com/docbook/dsssl/</ulink> for more information.</para>
+;; </legalnotice>
+;; /DOCINFO
+]]>
+
+;; === Some additional units ============================================
+
+(define-unit pi (/ 1in 6))              ;pica
+(define-unit pc (/ 1in 6))              ;pica, another name
+(define-unit pt (/ 1in 72))             ;point
+(define-unit px (/ 1in 96))             ;pixel
+
+;; REFERENCE ISO/IEC 10179
+
+(define (node-list-reduce nl proc init)
+  ;; REFENTRY node-list-reduce
+  ;; PURP Implements node-list-reduce as per ISO/IEC 10179:1996
+  ;; DESC
+  ;; Implements 'node-list-reduce' as per ISO/IEC 10179:1996
+  ;; /DESC
+  ;; AUTHOR From ISO/IEC 10179:1996
+  ;; /REFENTRY
+  (if (node-list-empty? nl)
+      init
+      (node-list-reduce (node-list-rest nl)
+                        proc
+                        (proc init (node-list-first nl)))))
+
+(define (node-list-last nl)
+  ;; REFENTRY node-list-last
+  ;; PURP Implements node-list-last as per ISO/IEC 10179:1996
+  ;; DESC
+  ;; Implements 'node-list-last' as per ISO/IEC 10179:1996
+  ;; /DESC
+  ;; AUTHOR From ISO/IEC 10179:1996
+  ;; /REFENTRY
+  (node-list-ref nl
+                (- (node-list-length nl) 1)))
+
+(define (node-list-first-element nodelist)
+  ;; REFENTRY node-list-first-element
+  ;; PURP Return the first element node in a node list
+  ;; DESC
+  ;; This function returns the first node in a node list which is
+  ;; an element (as opposed to a PI or anything else that might appear
+  ;; in a node list).
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((nl nodelist))
+    (if (node-list-empty? nl)
+       (empty-node-list)
+       (if (gi (node-list-first nl))
+           (node-list-first nl)
+           (loop (node-list-rest nl))))))
+
+(define (node-list-last-element nodelist)
+  ;; REFENTRY node-list-last-element
+  ;; PURP Return the last element node in a node list
+  ;; DESC
+  ;; This function returns the last node in a node list which is
+  ;; an element (as opposed to a PI or anything else that might appear
+  ;; in a node list).
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((el (empty-node-list)) (nl nodelist))
+    (if (node-list-empty? nl)
+       el
+       (if (gi (node-list-first nl))
+           (loop (node-list-first nl) (node-list-rest nl))
+           (loop el (node-list-rest nl))))))
+
+(define (ipreced nl)
+  ;; REFENTRY ipreced
+  ;; PURP Implements ipreced as per ISO/IEC 10179:1996
+  ;; DESC
+  ;; Implements 'ipreced' as per ISO/IEC 10179:1996
+  ;; /DESC
+  ;; AUTHOR From ISO/IEC 10179:1996
+  ;; /REFENTRY
+  (node-list-map (lambda (snl)
+                (let loop ((prev (empty-node-list))
+                           (rest (siblings snl)))
+                  (cond ((node-list-empty? rest)
+                         (empty-node-list))
+                        ((node-list=? (node-list-first rest) snl)
+                         prev)
+                        (else
+                         (loop (node-list-first rest)
+                               (node-list-rest rest))))))
+                nl))
+
+
+(define (ifollow nl)
+  ;; REFENTRY ifollow
+  ;; PURP Implements ifollow as per ISO/IEC 10179:1996
+  ;; DESC
+  ;; Implements 'ifollow' as per ISO/IEC 10179:1996
+  ;; /DESC
+  ;; AUTHOR From ISO/IEC 10179:1996
+  ;; /REFENTRY
+  (node-list-map (lambda (snl)
+                  (let loop ((rest (siblings snl)))
+                    (cond ((node-list-empty? rest)
+                           (empty-node-list))
+                          ((node-list=? (node-list-first rest) snl)
+                           (node-list-first (node-list-rest rest)))
+                          (else
+                           (loop (node-list-rest rest))))))
+                nl))
+
+(define (siblings snl)
+  ;; REFENTRY siblings
+  ;; PURP Implements siblings as per ISO/IEC 10179:1996
+  ;; DESC
+  ;; Implements 'siblings' as per ISO/IEC 10179:1996
+  ;; /DESC
+  ;; AUTHOR From ISO/IEC 10179:1996
+  ;; /REFENTRY
+  (children (parent snl)))
+
+(define (string->list str)
+  ;; REFENTRY string-2-list
+  ;; PURP Converts a string into a list of characters.
+  ;; DESC
+  ;; Implements 'string->list' as per ISO/IEC 10179:1996
+  ;; (clause 8.5.9.9).
+  ;; /DESC
+  ;; AUTHOR David Megginson
+  ;; EMAIL dmeggins@uottawa.ca
+  ;; /REFENTRY
+  (let loop ((chars '())
+            (k (- (string-length str) 1)))
+    (if (< k 0)
+       chars
+       (loop (cons (string-ref str k) chars) (- k 1)))))
+
+(define (list->string chars)
+  ;; REFENTRY list-2-string
+  ;; PURP Converts a list of characters into a string
+  ;; DESC
+  ;; Implements 'list->string' as per ISO/IEC 10179:1996
+  ;; (clause 8.5.9.9).
+  ;; /DESC
+  ;; AUTHOR David Megginson
+  ;; EMAIL dmeggins@uottawa.ca
+  ;; /REFENTRY
+  (let loop ((cl chars)
+            (str ""))
+    (if (null? cl)
+       str
+       (loop (cdr cl)
+             (string-append str (string (car cl)))))))
+
+;; ======================================================================
+
+(define (map f #!rest xs)
+  ;; REFENTRY map
+  ;; PURP Implements map
+  ;; DESC
+  ;; Implements map
+  ;; /DESC
+  ;; AUTHOR From Mulberry Tech. site (need better attribution)
+  ;; /REFENTRY
+  (let ((map1 (lambda (f xs)           ; bootstrap version for unary F
+               (let loop ((xs xs))
+                 (if (null? xs)
+                     '()
+                     (cons (f (car xs))
+                           (loop (cdr xs))))))))
+    (cond ((null? xs)
+          '())
+         ((null? (cdr xs))
+          (map1 f (car xs)))
+         (else
+          (let loop ((xs xs))
+            (if (null? (car xs))
+                '()
+                (cons (apply f (map1 car xs))
+                      (loop (map1 cdr xs)))))))))
+
+(define (absolute-child-number #!optional (nd (current-node)))
+  ;; REFENTRY absolute-child-number
+  ;; PURP Returns the absolute child number of the specified node
+  ;; DESC
+  ;; Returns the child number, regardless of gi, of 'snl' within its
+  ;; parent.
+  ;;
+  ;; Isn't there a better way to get this?
+  ;; ARGS
+  ;; ARG snl
+  ;; The node (singleton node list) whose child number is desired.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; /REFENTRY
+  (+ (node-list-length (preced nd)) 1))
+
+;; REFERENCE Debug
+
+(define (my-debug x #!optional return-value)
+  ;; REFENTRY my-debug
+  ;; PURP A debugging function more helpful than (debug)
+  ;; DESC
+  ;; A version of debug that tries to print information more helpful
+  ;; than "unknown object ...".  Will need extending for any further
+  ;; types added to Jade which don't have useful print methods.
+  ;; (Should yield more information extracted from each type.)
+  ;; ARGS
+  ;; ARG x
+  ;; The object about which debugging information is desired.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; AUTHOR Tony Graham
+  ;; /REFENTRY
+  (let ((msg (debug (cond ((node-list? x)
+                          (if (node-list-empty? x)
+                              (list 'empty-node-list x)
+                              (list (if (named-node-list? x)
+                                        'named-node-list
+                                        'node-list)
+                                    (node-list-length x) x)))
+                         ((sosofo? x)
+                          (list 'sosofo x))
+                         ((procedure? x)
+                          (list 'procedure x))
+                         ((style? x)
+                          (list 'style x))
+                         ((address? x)
+                          (list 'address x))
+                         ((color? x)
+                          (list 'color x))
+                         ((color-space? x)
+                          (list 'color-space x))
+                         ((display-space? x)
+                          (list 'display-space x))
+                         ((inline-space? x)
+                          (list 'inline-space x))
+                         ((glyph-id? x)
+                          (list 'glyph-id x))
+                         ((glyph-subst-table? x)
+                          (list 'glyph-subst-table x))
+                         (else x)))))
+    return-value))
+
+;; REFERENCE Miscellaneous
+
+(define (string-with-space string #!optional (space " ")) 
+  ;; REFENTRY string-with-space
+  ;; PURP Returns string with a space appended or the empty string
+  ;; DESC
+  ;; If 'string' is not the empty string, returns 'string' with a
+  ;; 'space' appended.  If 'string' is empty, or is not a '(string?)',
+  ;; returns 'string' unmodified.
+  ;; ARGS
+  ;; ARG 'string'
+  ;; The string onto which a space should be appended.
+  ;; /ARG
+  ;; ARG 'space' o
+  ;; If specified, the space to append.  Defaults to a single space.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; /REFENTRY
+  (if (string? string)
+      (if (equal? string "")
+         string
+         (string-append string space))
+      string))
+
+;; ======================================================================
+
+(define (split str #!optional (whitespace '(#\space)))
+  ;; REFENTRY split
+  ;; PURP Splits string at whitespace and returns the resulting list of tokens
+  ;; DESC
+  ;; Given a string containing delimited tokens, return a list
+  ;; of the tokens in string form.
+  ;; ARGS
+  ;; ARG 'str'
+  ;; The string to split.
+  ;; /ARG
+  ;; ARG 'whitespace' o
+  ;; A list of characters that should
+  ;; be treated as whitespace.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; AUTHOR David Megginson
+  ;; EMAIL dmeggins@uottawa.ca
+  ;; /REFENTRY
+  (let loop ((characters (string->list str)) ; Top-level recursive loop.
+            (current-word '())
+            (tokens '()))
+
+    ; If there are no characters left,
+    ; then we're done!
+    (cond ((null? characters)
+          ; Is there a token in progress?
+          (if (null? current-word)
+              (reverse tokens)
+              (reverse (cons (list->string (reverse current-word))
+                             tokens))))
+         ; If there are characters left,
+         ; then keep going.
+         (#t
+          (let ((c (car characters))
+                (rest (cdr characters)))
+            ; Are we reading a space?
+            (cond ((member c whitespace)
+                   (if (null? current-word)
+                       (loop rest '() tokens)
+                       (loop rest
+                             '()
+                             (cons (list->string (reverse current-word))
+                                   tokens))))
+                  ; We are reading a non-space
+                  (#t
+                   (loop rest (cons c current-word) tokens))))))))
+
+;; ======================================================================
+
+(define (strip str #!optional (stripchars '(#\space #\&#RE #\U-0009)))
+  ;; REFENTRY strip
+  ;; PURP Strip leading and trailing characters off of a string
+  ;; DESC
+  ;; Strips leading and trailing characters in the 'stripchars' list
+  ;; off of a string and returns the stripped string.
+  ;; ARGS
+  ;; ARG 'str'
+  ;; The string to strip
+  ;; /ARG
+  ;; ARG 'stripchars' o
+  ;; A list of characters that should
+  ;; be stripped.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; /REFENTRY
+  (let* ((startpos (let loop ((count 0))
+                    (if (>= count (string-length str))
+                        (string-length str)
+                        (if (member (string-ref str count) stripchars)
+                            (loop (+ count 1))
+                            count))))
+        (tailstr  (substring str startpos (string-length str)))
+        (endpos   (let loop ((count (- (string-length tailstr) 1)))
+                    (if (< count 1)
+                        0
+                        (if (member (string-ref tailstr count) stripchars)
+                            (loop (- count 1))
+                            count)))))
+    (if (or (< endpos 0)
+           (string=? tailstr ""))
+       ""
+       (substring tailstr 0 (+ endpos 1)))))
+
+;; ======================================================================
+
+(define (join slist #!optional (space " "))
+  ;; REFENTRY join
+  ;; PURP Joins a list of strings together
+  ;; DESC
+  ;; Given a list of strings and a space string, returns the string
+  ;; that results from joining all the strings in the list together,
+  ;; separated by space.
+  ;; ARGS
+  ;; ARG 'slist'
+  ;; The list of strings.
+  ;; /ARG
+  ;; ARG 'space' o
+  ;; The string to place between each member of the list.  Defaults to
+  ;; a single space.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; AUTHOR David Carlisle
+  ;; /REFENTRY
+  (letrec ((loop (lambda (l result)
+                  (if (null? l) 
+                      result
+                      (loop (cdr l) (cons space (cons (car l) result)))))))
+    (if (null? slist)
+       ""
+       (apply string-append (cons (car slist) 
+                                  (loop (reverse (cdr slist)) '() ))))))
+
+;; ======================================================================
+
+(define (pad-string string length padchar)
+  ;; REFENTRY pad-string
+  ;; PURP Pads a string, in front, to the specified length
+  ;; DESC
+  ;; Returns 'string', padded in front with 'padchar' to at least 'length'
+  ;; Returns 'string' unmodified if 'string' is not a '(string?)',
+  ;; 'padchar' is not a '(string?)', 'padchar' is the empty string, or if
+  ;; 'string' is already greater than or equal to 'length' in length.
+  ;; ARGS
+  ;; ARG 'string'
+  ;; The string to pad.
+  ;; /ARG
+  ;; ARG 'length'
+  ;; The desired length.
+  ;; /ARG
+  ;; ARG 'padchar'
+  ;; The character (string, actually) to use as padding.  If 'padchar' is
+  ;; longer than 1 character, the resulting string may be longer than
+  ;; 'length' when returned.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; /REFENTRY
+  (if (and (string? string) 
+          (string? padchar) 
+          (> (string-length padchar) 0))
+      (let loop ((s string) (count (- length (string-length string))))
+       (if (<= count 0)
+           s
+           (loop (string-append padchar s) 
+                 (- count (string-length padchar)))))
+      string))
+
+;; ======================================================================
+
+(define (match-split string target)
+  ;; REFENTRY match-split
+  ;; PURP Splits string at target and returns the resulting list of tokens
+  ;; DESC
+  ;; Splits string at every occurance of target and returns the result
+  ;; as a list.  Note that 'match-split' returns the occurances of 'target'
+  ;; in the list of tokens.
+  ;; ARGS
+  ;; ARG 'string'
+  ;; The string to split.
+  ;; /ARG
+  ;; ARG 'target'
+  ;; The string which is a delimiter between tokens
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; EXAMPLE
+  ;; '"this is a test"' split at '"is"' returns
+  ;; '("th" "is" " " "is" " a test")'
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (if (string? string)
+      (let loop ((result '()) (current "") (rest string))
+       (if (< (string-length rest) (string-length target))
+           (append result (if (equal? (string-append current rest) "")
+                              '()
+                              (list (string-append current rest))))
+           (if (equal? target (substring rest 0 (string-length target)))
+               (loop (append result 
+                             (if (equal? current "")
+                                 '()
+                                 (list current))
+                             (list target))
+                     ""
+                     (substring rest (string-length target) 
+                                (string-length rest)))
+               (loop result
+                     (string-append current (substring rest 0 1))
+                     (substring rest 1 (string-length rest))))))
+      (list string)))
+
+(define (match-split-string-list string-list target)
+  ;; REFENTRY match-split-string-list
+  ;; PURP Splits each string in a list of strings and returns the concatenated result list
+  ;; DESC
+  ;; Splits each string in 'string-list' at 'target' with '(match-split)',
+  ;; concatenates the results, and returns a single list of tokens.
+  ;; ARGS
+  ;; ARG string-list
+  ;; The list of strings to split.
+  ;; /ARG
+  ;; ARG target
+  ;; The string which is a delimiter between tokens.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((result '()) (sl string-list))
+    (if (null? sl)
+       result
+       (loop (append result (match-split (car sl) target))
+             (cdr sl)))))
+
+(define (match-split-list string target-list)
+  ;; REFENTRY match-split-list
+  ;; PURP Splits a string at a list of targets and returns the resulting list of tokens
+  ;; DESC
+  ;; Splits 'string' at every target in 'target-list' with '(match-split)',
+  ;; returning the whole collection of tokens as a list.
+  ;; ARGS
+  ;; ARG string
+  ;; The string to split.
+  ;; /ARG
+  ;; ARG target-list
+  ;; A list of target strings which are the delimters between tokens.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((result (list string)) (tlist target-list))
+    (if (null? tlist)
+       result
+       (loop (match-split-string-list result (car tlist))
+             (cdr tlist)))))
+
+;; ======================================================================
+
+(define (assoc-objs alist)
+  ;; REFENTRY assoc-objs
+  ;; PURP Returns a list of the objects in an associative list
+  ;; DESC
+  ;; Returns a list of the objects in an associative list.
+  ;; ARGS
+  ;; ARG alist
+  ;; The associative list. An associative list is a list of lists
+  ;; where each interior list is a pair of elements.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; EXAMPLE
+  ;; '(assoc-objs (("a" "b") ("c" "d")))' returns '("a" "c")'
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (let loop ((result '()) (al alist))
+    (if (null? al)
+       result
+       (loop (append result (list (car (car al)))) (cdr al)))))
+
+(define (assoc obj alist)
+  ;; REFENTRY assoc
+  ;; PURP Returns the association of an object in an associative list
+  ;; DESC
+  ;; Given an associative list, returns the pair that has 'obj' as a 'car'
+  ;; or '#f' if no such pair exists.
+  ;; ARGS
+  ;; ARG obj
+  ;; The associative key to locate.
+  ;; /ARG
+  ;; ARG alist
+  ;; The associative list.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; EXAMPLE
+  ;; '(assoc "a" (("a" "b") ("c" "d")))' returns  '("a" "b")'
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (let loop ((al alist))
+    (if (null? al)
+       #f
+       (if (equal? obj (car (car al)))
+           (car al)
+           (loop (cdr al))))))
+
+(define (match-substitute-sosofo string assoc-list)
+  ;; REFENTRY match-substitute-sosofo
+  ;; PURP Return matching sosofo from associative list
+  ;; DESC
+  ;; Given a string and an associative list of strings and sosofos,
+  ;; return the sosofo of the matching string, or return the literal
+  ;; string as a sosofo.
+  ;;
+  ;; (This function is used for a particular task in the DocBook stylesheets.
+  ;; It may not be particularly general, but it's in 'dblib.dsl' because
+  ;; there is nothing DTD-specific about it.)
+  ;; /DESC
+  ;; /REFENTRY
+  (if (assoc string assoc-list)
+      (car (cdr (assoc string assoc-list)))
+      (literal string)))
+
+(define (string-list-sosofo string-list assoc-list)
+  ;; REFENTRY string-list-sosofo
+  ;; PURP Build sosofo from a list of strings and an associative list
+  ;; DESC
+  ;; Take a list of strings and an associative list that maps strings
+  ;; to sosofos and return an appended sosofo.
+  ;;
+  ;; (This function is used for a particular task in the DocBook stylesheets.
+  ;; It may not be particularly general, but it's in 'dblib.dsl' because
+  ;; there is nothing DTD-specific about it.)
+  ;; /DESC
+  ;; EXAMPLE
+  ;; Given the string list '("what is " "1" " " "+" " " "1")'
+  ;; and the associative list 
+  ;; '(("1" (literal "one")) ("2" (literal "two")) ("+" (literal "plus")))',
+  ;; '(string-list-sosofo)' returns the sequence of sosofos
+  ;; equivalent to '(literal "what is one plus one")'.
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (if (null? string-list)
+      (empty-sosofo)
+      (sosofo-append (match-substitute-sosofo (car string-list) assoc-list)
+                    (string-list-sosofo (cdr string-list) assoc-list))))
+
+;; ======================================================================
+
+(define (repl-substring? string target pos)
+  ;; REFENTRY repl-substring-p
+  ;; PURP Returns true if the specified substring can be replaced
+  ;; DESC
+  ;; Returns '#t' if 'target' occurs at 'pos' in 'string'.
+  ;; /DESC
+  ;; /REFENTRY
+  (let* ((could-match (<= (+ pos (string-length target)) 
+                        (string-length string)))
+        (match (if could-match 
+                   (substring string pos (+ pos (string-length target))) "")))
+    (and could-match (string=? match target))))
+
+(define (repl-substring string target repl pos)
+  ;; REFENTRY repl-substring
+  ;; PURP Replace substring in a string
+  ;; DESC
+  ;; Replaces 'target' with 'repl' in 'string' at 'pos'.
+  ;; /DESC
+  ;; /REFENTRY
+  (let ((matches (repl-substring? string target pos)))
+    (if matches
+       (string-append
+        (substring string 0 pos)
+        repl
+        (substring string 
+                   (+ pos (string-length target)) 
+                   (string-length string)))
+       string)))
+
+(define (repl-substring-list? string replace-list pos)
+  ;; REFENTRY repl-substring-list-p
+  ;; PURP Perform repl-substring? with a list of target/replacement pairs
+  ;; DESC
+  ;; Returns '#t' if any target in 'replace-list' occurs at 'pos' in 'string'.
+  ;; ARGS
+  ;; ARG 'string'
+  ;; The string in which replacement should be tested.
+  ;; /ARG
+  ;; ARG 'replace-list'
+  ;; A list of target/replacement pairs.  This list is just a list of
+  ;; strings, treated as pairs.  For example, '("was" "x" "is" "y")'.
+  ;; In this example, 'was' may be replaced by 'x' and 'is' may be
+  ;; replaced by 'y'.
+  ;; /ARG
+  ;; ARG 'pos'
+  ;; The location within 'string' where the test will occur.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; EXAMPLE
+  ;; '(repl-substring-list? "this is it" ("was" "x" "is" "y") 2)'
+  ;; returns '#t': "is" could be replaced by "y".
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (let loop ((list replace-list))
+    (let ((target (car list))
+         (repl   (car (cdr list)))
+         (rest   (cdr (cdr list))))
+      (if (repl-substring? string target pos)
+         #t
+         (if (null? rest)
+             #f
+             (loop rest))))))
+
+(define (repl-substring-list-target string replace-list pos)
+  ;; REFENTRY repl-substring-list-target
+  ;; PURP Return the target that matches in a string
+  ;; DESC
+  ;; Returns the target in 'replace-list' that matches in 'string' at 'pos'
+  ;; See also 'repl-substring-list?'.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((list replace-list))
+    (let ((target (car list))
+         (repl   (car (cdr list)))
+         (rest   (cdr (cdr list))))
+      (if (repl-substring? string target pos)
+         target
+         (if (null? rest)
+             #f
+             (loop rest))))))
+
+(define (repl-substring-list-repl string replace-list pos)
+  ;; REFENTRY repl-substring-list-repl
+  ;; PURP Return the replacement that would be used in the string
+  ;; DESC
+  ;; Returns the replacement in 'replace-list' that would be used for the
+  ;; target that matches in 'string' at 'pos'
+  ;; See also 'repl-substring-list?'.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((list replace-list))
+    (let ((target (car list))
+         (repl   (car (cdr list)))
+         (rest   (cdr (cdr list))))
+      (if (repl-substring? string target pos)
+         repl
+         (if (null? rest)
+             #f
+             (loop rest))))))
+
+(define (repl-substring-list string replace-list pos)
+  ;; REFENTRY repl-substring-list
+  ;; PURP Replace the first target in the replacement list that matches
+  ;; DESC
+  ;; Replaces the first target in 'replace-list' that matches in 'string'
+  ;; at 'pos' with its replacement.
+  ;; See also 'repl-substring-list?'.
+  ;; /DESC
+  ;; /REFENTRY
+  (if (repl-substring-list? string replace-list pos)
+      (let ((target (repl-substring-list-target string replace-list pos))
+           (repl   (repl-substring-list-repl string replace-list pos)))
+       (repl-substring string target repl pos))
+      string))
+
+(define (string-replace string target repl)
+  ;; REFENTRY string-replace
+  ;; PURP Replace all occurances of a target substring in a string
+  ;; DESC
+  ;; Replaces all occurances of 'target' in 'string' with 'repl'.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((str string) (pos 0))
+    (if (>= pos (string-length str))
+       str
+       (loop (repl-substring str target repl pos) 
+             (if (repl-substring? str target pos)
+                 (+ (string-length repl) pos)
+                 (+ 1 pos))))))
+
+(define (string-replace-list string replace-list)
+  ;; REFENTRY string-replace-list
+  ;; PURP Replace a list of target substrings in a string
+  ;; DESC
+  ;; Replaces, in 'string', all occurances of each target in
+  ;; 'replace-list' with its replacement.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((str string) (pos 0))
+    (if (>= pos (string-length str))
+       str
+       (loop (repl-substring-list str replace-list pos) 
+             (if (repl-substring-list? str replace-list pos)
+                 (+ (string-length 
+                     (repl-substring-list-repl str replace-list pos)) 
+                    pos)
+                 (+ 1 pos))))))
+
+;; ======================================================================
+
+(define (ancestor-member nd gilist)
+  ;; REFENTRY ancestor-member
+  ;; PURP Returns the first ancestor in a list of GIs
+  ;; DESC
+  ;; Returns the first ancestor of 'nd' whose GI is a member of 'gilist'.
+  ;; /DESC
+  ;; /REFENTRY
+  (if (node-list-empty? nd)
+      (empty-node-list)
+      (if (member (gi nd) gilist)
+         nd
+         (ancestor-member (parent nd) gilist))))
+
+(define (has-ancestor-member? nd gilist)
+  ;; REFENTRY has-ancestor-member-p
+  ;; PURP Returns true if the specified node has one of a set of GIs as an ancestor
+  ;; DESC
+  ;; Returns '#t' if 'nd' has an ancestor whose GI is a member of 'gilist'.
+  ;; /DESC
+  ;; /REFENTRY
+  (not (node-list-empty? (ancestor-member nd gilist))))
+
+;; ======================================================================
+
+(define (descendant-of? ancestor child)
+  ;; REFENTRY descendant-of-p
+  ;; PURP Returns true if the child is some descendant of the specified node
+  ;; DESC
+  ;; Returns '#t' if 'child' is a descendant of 'ancestor'.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((c child))
+    (if (node-list-empty? c)
+       #f
+       (if (node-list=? ancestor c)
+           #t
+           (loop (parent c))))))
+
+;; ======================================================================
+
+(define (expand-children nodelist gilist)
+  ;; REFENTRY expand-children
+  ;; PURP Expand selected nodes in a node list
+  ;; DESC
+  ;; Given a node-list, 'expand-children' replaces all of the members
+  ;; of the node-list whose GIs are members of 'gilist' with 
+  ;; '(children)'.
+  ;;
+  ;; This function can be used to selectively 
+  ;; flatten the hierarchy of a document.
+  ;; /DESC
+  ;; EXAMPLE
+  ;; Suppose that the node list is '(BOOKINFO PREFACE PART APPENDIX)'.
+  ;; '(expand-children nl ("PART"))' might return
+  ;; '(BOOKINFO PREFACE CHAPTER CHAPTER APPENDIX)'.
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (let loop ((nl nodelist) (result (empty-node-list)))
+    (if (node-list-empty? nl)
+       result
+       (if (member (gi (node-list-first nl)) gilist)
+           (loop (node-list-rest nl) 
+                 (node-list result (children (node-list-first nl))))
+           (loop (node-list-rest nl)
+                 (node-list result (node-list-first nl)))))))
+
+;; ======================================================================
+
+(define (directory-depth pathname)
+  ;; REFENTRY directory-depth
+  ;; PURP Count the directory depth of a path name
+  ;; DESC
+  ;; Returns the number of directory levels in 'pathname'
+  ;;
+  ;; The pathname must end in a filename.
+  ;; Further, this function assumes that directories in a pathname are 
+  ;; separated by forward slashes ("/").
+  ;; /DESC
+  ;; EXAMPLE
+  ;; "filename" => 0, 
+  ;; "foo/filename" => 1, 
+  ;; "foo/bar/filename => 2, 
+  ;; "foo/bar/../filename => 1.
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (let loop ((count 0) (pathlist (match-split pathname "/")))
+    (if (null? pathlist)
+       (- count 1) ;; pathname should always end in a filename
+       (if (or (equal? (car pathlist) "/") (equal? (car pathlist) "."))
+           (loop count (cdr pathlist))
+           (if (equal? (car pathlist) "..")
+               (loop (- count 1) (cdr pathlist))
+               (loop (+ count 1) (cdr pathlist)))))))
+
+
+(define (file-extension filespec) 
+  ;; REFENTRY file-extension
+  ;; PURP Return the extension of a filename
+  ;; DESC
+  ;; Returns the extension of a filename.  The extension is the last
+  ;; "."-delimited part of the name.  Returns "" if there is no period
+  ;; in the filename.
+  ;; /DESC
+  ;; /REFENTRY
+  (if (string? filespec)
+      (let* ((pathparts (match-split filespec "/"))
+            (filename  (list-ref pathparts (- (length pathparts) 1)))
+            (fileparts (match-split filename "."))
+            (extension (list-ref fileparts (- (length fileparts) 1))))
+       (if (> (length fileparts) 1)
+           extension
+           ""))
+      ""))
+
+;; ======================================================================
+
+(define (copy-string string num)
+  ;; REFENTRY copy-string
+  ;; PURP Return a string duplicated a specified number of times
+  ;; DESC
+  ;; Copies 'string' 'num' times and returns the result.
+  ;; /DESC
+  ;; EXAMPLE
+  ;; (copy-string "x" 3) returns "xxx"
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (if (<= num 0)
+      ""
+      (let loop ((str string) (count (- num 1)))
+       (if (<= count 0)
+           str
+           (loop (string-append str string) (- count 1))))))
+
+;; ======================================================================
+
+(define (node-list-filter-by-gi nodelist gilist)
+  ;; REFENTRY node-list-filter-by-gi
+  ;; PURP Returns selected elements from a node list
+  ;; DESC
+  ;; Returns a node list containing all the nodes from 'nodelist' whose
+  ;; GIs are members of 'gilist'.  The order of nodes in the node list
+  ;; is preserved.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((result (empty-node-list)) (nl nodelist))
+    (if (node-list-empty? nl)
+       result
+       (if (member (gi (node-list-first nl)) gilist)
+           (loop (node-list result (node-list-first nl)) 
+                 (node-list-rest nl))
+           (loop result (node-list-rest nl))))))
+
+;; ======================================================================
+
+(define (node-list-filter-by-not-gi nodelist gilist)
+  ;; REFENTRY node-list-filter-by-not-gi
+  ;; PURP Returns selected elements from a node list
+  ;; DESC
+  ;; Returns a node list containing all the nodes from 'nodelist' whose
+  ;; GIs are NOT members of 'gilist'.  The order of nodes in the node list
+  ;; is preserved.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((result (empty-node-list)) (nl nodelist))
+    (if (node-list-empty? nl)
+       result
+       (if (member (gi (node-list-first nl)) gilist)
+           (loop result (node-list-rest nl))
+           (loop (node-list result (node-list-first nl))
+                 (node-list-rest nl))))))
+
+;; ======================================================================
+
+(define (node-list-filter-out-pis nodelist)
+  ;; REFENTRY node-list-filter-out-pis
+  ;; PURP Returns the nodelist with all PIs removed
+  ;; DESC
+  ;; Returns a node list containing all the nodes from 'nodelist' that
+  ;; are not PIs.  The order of nodes in the node list is preserved.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((result (empty-node-list)) (nl nodelist))
+    (if (node-list-empty? nl)
+       result
+       (if (equal? (node-property 'class-name (node-list-first nl)) 'pi)
+           (loop result (node-list-rest nl))
+           (loop (node-list result (node-list-first nl))
+                 (node-list-rest nl))))))
+
+;; ======================================================================
+
+(define (node-list-filter-elements nodelist)
+  ;; REFENTRY node-list-filter-elements
+  ;; PURP Returns the elements in 'nodelist'
+  ;; DESC
+  ;; Returns the elements in 'nodelist'
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((result (empty-node-list)) (nl nodelist))
+    (if (node-list-empty? nl)
+       result
+       (if (equal? (node-property 'class-name (node-list-first nl)) 'element)
+           (loop (node-list result (node-list-first nl))
+                 (node-list-rest nl))
+           (loop result (node-list-rest nl))))))
+
+;; ======================================================================
+
+(define (component-descendant-node-list inputnd complist)
+  ;; REFENTRY component-descendant-node-list
+  ;; PURP Find all 'inputnd's within an ancestor element
+  ;; DESC
+  ;; Finds the first ancestor of 'inputnd' in 'complist' and then returns
+  ;; a node list of all the 'inputnd's within (that are descendants of) 
+  ;; that ancestor.
+  ;; /DESC
+  ;; /REFENTRY
+  (let ((nd (ancestor-member inputnd complist)))
+    (select-elements (descendants nd) (gi inputnd))))
+
+(define (component-child-number inputnd complist)
+  ;; REFENTRY component-child-number
+  ;; PURP Find child-number within a component
+  ;; DESC
+  ;; Finds the first ancestor of 'inputnd' in 'complist' and then counts 
+  ;; all the elements of type 'inputnd' from that point on and returns
+  ;; the number of 'inputnd'.  (This is like a 'recursive-child-number'
+  ;; starting at the first parent of 'inputnd' in 'complist'.)
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((nl (component-descendant-node-list inputnd complist))
+            (num 1))
+    (if (node-list-empty? nl)
+       0
+       (if (node-list=? (node-list-first nl) inputnd)
+           num
+           (if (string=? (gi (node-list-first nl)) (gi inputnd))
+               (loop (node-list-rest nl) (+ num 1))
+               (loop (node-list-rest nl) num))))))
+
+(define (component-list-descendant-node-list inputnd inputlist complist)
+  ;; REFENTRY component-descendant-list-node-list
+  ;; PURP Find all elements of a list of elements in a component
+  ;; DESC
+  ;; Finds the first ancestor of 'inputnd' in 'complist' and
+  ;; then returns a list of all the elements in 'inputlist' 
+  ;; within that component.
+  ;;
+  ;; WARNING: this requires walking over *all* the descendants
+  ;; of the ancestor node. This may be *slow*.
+  ;; /DESC
+  ;; /REFENTRY
+  (let ((nd (ancestor-member inputnd complist)))
+    (let loop ((nl (descendants nd)) (result (empty-node-list)))
+      (if (node-list-empty? nl)
+         result
+         (if (member (gi (node-list-first nl)) inputlist)
+             (loop (node-list-rest nl) 
+                   (node-list result (node-list-first nl)))
+             (loop (node-list-rest nl) 
+                   result))))))
+
+(define (component-list-child-number inputnd inputlist complist)
+  ;; REFENTRY component-list-child-number
+  ;; PURP Find child-number of a list of children within a component
+  ;; DESC
+  ;; Finds the first ancestor of 'inputnd' in 'complist' and
+  ;; then counts all the elements of the types in 'inputlist'
+  ;; from that point on and returns the number of 'inputnd'.
+  ;;
+  ;; If the node is not found, 0 is returned.
+  ;;
+  ;; WARNING: this requires walking over *all* the descendants
+  ;; of the ancestor node. This may be *slow*.
+  ;; /DESC
+  ;; /REFENTRY
+    (let loop ((nl (component-list-descendant-node-list
+                   inputnd inputlist complist))
+              (num 1))
+      (if (node-list-empty? nl)
+         0
+         (if (node-list=? (node-list-first nl) inputnd)
+             num
+             (loop (node-list-rest nl) (+ num 1))))))
+
+;; ======================================================================
+
+(define (expt b n)
+  ;; REFENTRY expt
+  ;; PURP Exponentiation
+  ;; DESC
+  ;; Returns 'b' raised to the 'n'th power for integer 'n' >= 0.
+  ;; /DESC
+  ;; /REFENTRY
+  ;; 
+  (if (<= n 0)
+      1
+      (* b (expt b (- n 1)))))
+
+;; ======================================================================
+
+(define (list-member-find element elementlist)
+  ;; REFENTRY list-member-find
+  ;; PURP Returns the index of an element in a list
+  ;; DESC
+  ;; Returns the index of 'element' in the list 'elementlist'. The
+  ;; first element in a list has index 0.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((elemlist elementlist) (count 0))
+    (if (null? elemlist)
+       -1
+       (if (equal? element (car elemlist))
+           count
+           (loop (cdr elemlist) (+ count 1))))))
+
+;; ======================================================================
+
+(define default-uppercase-list
+  ;; REFENTRY
+  ;; PURP The default list of uppercase characters
+  ;; DESC
+  ;; The default list of uppercase characters.  The order and sequence
+  ;; of characters
+  ;; in this list must match the order and sequence in 
+  ;; 'default-lowercase-list'.
+  ;; /DESC
+  ;; /REFENTRY
+  '(#\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M
+    #\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z))
+
+(define default-lowercase-list
+  ;; REFENTRY
+  ;; PURP The default list of lowercase characters
+  ;; DESC
+  ;; The default list of lowercase characters.  The order and sequence
+  ;; of characters
+  ;; in this list must match the order and sequence in 
+  ;; 'default-uppercase-list'.
+  ;; /DESC
+  ;; /REFENTRY
+  '(#\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k #\l #\m
+    #\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z))
+
+
+(define (case-fold-down-char ch #!optional (uc-list default-uppercase-list)
+                                          (lc-list default-lowercase-list))
+  ;; REFENTRY
+  ;; PURP Return the lowercase form of a single character
+  ;; DESC
+  ;; Returns the lowercase form of 'ch' if 'ch' is a member of
+  ;; the uppercase list, otherwise return 'ch'.
+  ;;
+  ;; The implied mapping from uppercase to lowercase in the two lists is
+  ;; one-to-one.  The first element of the uppercase list is the uppercase
+  ;; form of the first element of the lowercase list, and vice versa.
+  ;; ARGS
+  ;; ARG 'ch'
+  ;; The character to fold down.
+  ;; /ARG
+  ;; ARG 'uc-list' o
+  ;; The list of uppercase letters. The default is the list of English 
+  ;; uppercase letters.
+  ;; /ARG
+  ;; ARG 'lc-list' o
+  ;; The list of lowercase letters. The default is the list of English 
+  ;; lowercase letters.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; /REFENTRY
+  (let ((idx (list-member-find ch uc-list)))
+    (if (>= idx 0)
+       (list-ref lc-list idx)
+       ch)))
+
+(define (case-fold-up-char ch #!optional (uc-list default-uppercase-list)
+                                        (lc-list default-lowercase-list))
+  ;; REFENTRY
+  ;; PURP Return the uppercase form of a single character
+  ;; DESC
+  ;; Returns the uppercase form of 'ch' if 'ch' is a member of
+  ;; 'lowercase-list', otherwise return 'ch'.
+  ;;
+  ;; The implied mapping from uppercase to lowercase in the two lists is
+  ;; one-to-one.  The first element of the uppercase list is the uppercase
+  ;; form of the first element of the lowercase list, and vice versa.
+  ;; ARGS
+  ;; ARG 'ch'
+  ;; The character to fold down.
+  ;; /ARG
+  ;; ARG 'uc-list' o
+  ;; The list of uppercase letters. The default is the list of English 
+  ;; uppercase letters.
+  ;; /ARG
+  ;; ARG 'lc-list' o
+  ;; The list of lowercase letters. The default is the list of English 
+  ;; lowercase letters.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; /REFENTRY
+  (let ((idx (list-member-find ch lc-list)))
+    (if (>= idx 0)
+       (list-ref uc-list idx)
+       ch)))
+
+(define (case-fold-down-charlist charlist)
+  ;; REFENTRY case-fold-down-charlist
+  ;; PURP Return the list of characters, shifted to lowercase
+  ;; DESC
+  ;; Shifts all of the characters in 'charlist' to lowercase with
+  ;; 'case-fold-down-char'.
+  ;; /DESC
+  ;; /REFENTRY
+  (if (null? charlist)
+      '()
+      (cons (case-fold-down-char (car charlist)) 
+           (case-fold-down-charlist (cdr charlist)))))
+
+(define (case-fold-up-charlist charlist)
+  ;; REFENTRY case-fold-up-charlist
+  ;; PURP Return the list of characters, shifted to uppercase
+  ;; DESC
+  ;; Shifts all of the characters in 'charlist' to uppercase with
+  ;; 'case-fold-up-char'.
+  ;; /DESC
+  ;; /REFENTRY
+  (if (null? charlist)
+      '()
+      (cons (case-fold-up-char (car charlist)) 
+           (case-fold-up-charlist (cdr charlist)))))
+
+(define (case-fold-down str)
+  ;; REFENTRY case-fold-down
+  ;; PURP Shift a string to lowercase
+  ;; DESC
+  ;; Returns 'str' in lowercase.
+  ;; /REFENTRY
+  (if (string? str)
+      (apply string (case-fold-down-charlist (string->list str)))
+      str))
+
+(define (case-fold-up str)
+  ;; REFENTRY case-fold-up
+  ;; PURP Shift a string to uppercase
+  ;; DESC
+  ;; Returns 'str' in uppercase.
+  ;; /REFENTRY
+  (if (string? str)
+      (apply string (case-fold-up-charlist (string->list str)))
+      str))
+
+;; ======================================================================
+
+(define (find-first-char string skipchars findchars #!optional (pos 0))
+  ;; REFENTRY find-first-char
+  ;; PURP Find the first occurance of a character in a string
+  ;; DESC
+  ;; Finds first character in 'string' that is in 'findchars', skipping all
+  ;; occurances of characters in 'skipchars'.  Search begins at 'pos'.  If
+  ;; no such characters are found, returns -1.
+  ;;
+  ;; If skipchars is empty, skip anything not in findchars
+  ;; If skipchars is #f, skip nothing
+  ;; If findchars is empty, the first character not in skipchars is matched
+  ;; It is an error if findchars is not a string.
+  ;; It is an error if findchars is empty and skipchars is not a non-empty
+  ;; string.
+  ;; /DESC
+  ;; /REFENTRY
+  (let ((skiplist (if (string? skipchars)
+                     (string->list skipchars)
+                     '()))
+       (findlist (string->list findchars)))
+    (if (and (null? skiplist) (null? findlist))
+       ;; this is an error
+       -2
+       (if (or (>= pos (string-length string)) (< pos 0))
+           -1
+           (let ((ch (string-ref string pos)))
+             (if (null? skiplist) 
+                 ;; try to find first
+                 (if (member ch findlist)
+                     pos
+                     (if (string? skipchars)
+                         (find-first-char string 
+                                          skipchars findchars (+ 1 pos))
+                         -1))
+                 ;; try to skip first
+                 (if (member ch skiplist)
+                     (find-first-char string skipchars findchars (+ 1 pos))
+                     (if (or (member ch findlist) (null? findlist))
+                         pos
+                         -1))))))))
+
+;; ======================================================================
+
+(define (parse-measurement measure)
+  ;; REFENTRY parse-measurement
+  ;; PURP Parse a string containing a measurement and return the magnitude and units
+  ;; DESC
+  ;; Parse a string containing a measurement, e.g., '"3pi"' or '"2.5in"',
+  ;; and return the magnitude and units: '(3 "pi")' or '(2.5 "in")'.
+  ;;
+  ;; Either element of the list may be '#f' if the string cannot reasonably
+  ;; be parsed as a measurement.  Leading and trailing spaces are ignored.
+  ;; /DESC
+  ;; /REFENTRY
+  (let* ((magstart  (find-first-char measure " " "0123456789."))
+        (unitstart (find-first-char measure " 0123456789." ""))
+        (unitend   (find-first-char measure "" " " unitstart))
+        (magnitude (if (< magstart 0)
+                       #f
+                       (if (< unitstart 0)
+                           (substring measure 
+                                      magstart 
+                                      (string-length measure))
+                           (substring measure magstart unitstart))))
+        (unit      (if (< unitstart 0)
+                       #f
+                       (if (< unitend 0)
+                           (substring measure 
+                                      unitstart 
+                                      (string-length measure))
+                           (substring measure unitstart unitend)))))
+  (list magnitude unit)))
+
+(define unit-conversion-alist
+  ;; REFENTRY
+  ;; PURP Defines the base length of specific unit names
+  ;; DESC
+  ;; This list identifies the length of each unit.
+  ;; /DESC
+  ;; /REFENTRY
+  (list
+   '("default" 1pi)
+   '("mm" 1mm)
+   '("cm" 1cm)
+   '("in" 1in)
+   '("pi" 1pi)
+   '("pc" 1pi)
+   '("pt" 1pt)
+   '("px" 1px)
+   '("barleycorn" 2pi)))
+
+(define (measurement-to-length measure)
+  ;; REFENTRY measurement-to-length
+  ;; PURP Convert a measurement to a length
+  ;; DESC
+  ;; Given a string containing a measurement, return that measurement
+  ;; as a length.
+  ;; /DESC
+  ;; EXAMPLES
+  ;; '"2.5cm"' returns 2.5cm as a length.  '"3.4barleycorn"' returns
+  ;; 6.8pi.
+  ;; /EXAMPLES
+  ;; /REFENTRY
+  (let* ((pm (car (parse-measurement measure)))
+        (pu (car (cdr (parse-measurement measure))))
+        (magnitude (if pm pm "1"))
+        (units     (if pu pu (if pm "pt" "default")))
+        (unitconv  (assoc units unit-conversion-alist))
+        (factor    (if unitconv (car (cdr unitconv)) 1pt)))
+    (* (string->number magnitude) factor)))
+
+;; ======================================================================
+
+(define (dingbat usrname)
+  ;; REFENTRY dingbat
+  ;; PURP Map dingbat names to Unicode characters
+  ;; DESC
+  ;; Map a dingbat name to the appropriate Unicode character.
+  ;; /DESC
+  ;; /REFENTRY
+  ;; Print dingbats and other characters selected by name
+  (let ((name (case-fold-down usrname)))
+    (case name
+      ;; For backward compatibility
+      (("box")                         "\white-square;")
+      (("checkbox")            "\white-square;")
+      ;; \check-mark prints the wrong symbol (in Jade 0.8 RTF backend)
+      (("check")               "\heavy-check-mark;") 
+      (("checkedbox")          "\ballot-box-with-check;")
+      (("dash")                        "\em-dash;")
+      (("copyright")           "\copyright-sign")
+
+      ;; Straight out of Unicode
+      (("raquo")                "\U-00BB;")
+      (("laquo")                "\U-00AB;")
+      (("rsaquo")               "\U-203A;")
+      (("lsaquo")               "\U-2039;")
+      (("lsquo")               "\U-2018;")
+      (("rsquo")               "\U-2019;")
+      (("ldquo")               "\U-201C;")
+      (("rdquo")               "\U-201D;")
+      (("ldquor")              "\U-201E;")
+      (("rdquor")              "\U-201D;")
+      (("en-dash")             "\en-dash;")
+      (("em-dash")             "\em-dash;")
+      (("en-space")            "\U-2002;")
+      (("em-space")            "\U-2003;")
+      (("bullet")              "\bullet;")
+      (("black-square")                "\black-square;")
+      (("white-square")                "\white-square;")
+      ;; \ballot-box name doesn't work (in Jade 0.8 RTF backend)
+      ;; and \white-square looks better than \U-2610; anyway
+      (("ballot-box")          "\white-square;")
+      (("ballot-box-with-check")       "\ballot-box-with-check;")
+      (("ballot-box-with-x")   "\ballot-box-with-x;")
+      ;; \check-mark prints the wrong symbol (in Jade 0.8 RTF backend)
+      (("check-mark")          "\heavy-check-mark;") 
+      ;; \ballot-x prints out the wrong symbol (in Jade 0.8 RTF backend)
+      (("ballot-x")            "\heavy-check-mark;")
+      (("copyright-sign")      "\copyright-sign;")
+      (("registered-sign")     "\registered-sign;")
+      (else "\bullet;"))))
+
+;; ======================================================================
+
+(define (nth-node nl k)
+  ;; REFENTRY nth-node
+  ;; PURP Return a specific node in a node list (by numeric index)
+  ;; DESC
+  ;; Returns the 'k'th node in 'nl'.  The first node in the node list
+  ;; has the index "1".
+  ;; /DESC
+  ;; /REFENTRY
+  (if (equal? k 1)
+      (node-list-first nl)
+      (nth-node (node-list-rest nl) (- k 1))))
+
+;; ======================================================================
+
+(define (constant-list value length)
+  ;; REFENTRY constant-list
+  ;; PURP Returns a list of the specified value
+  ;; DESC
+  ;; Return a list containing 'length' elements, each of 'value'.
+  ;; /DESC
+  ;; AUTHOR David Carlisle
+  ;; EXAMPLE
+  ;; '(constant-list 0 4)' returns '(0 0 0 0)'
+  ;; /EXAMPLE
+  ;; /REFENTRY
+   (let loop ((count (abs length)) (result '()))
+     (if (equal? count 0)
+         result
+         (loop (- count 1) (cons value  result)))))
+
+(define (list-head inputlist k)
+  ;; REFENTRY list-head
+  ;; PURP Return the head of a list
+  ;; DESC
+  ;; Returns the list that contains the first 'k' elements of 'inputlist'.
+  ;; /DESC
+  ;; EXAMPLE
+  ;; '(list-head (1 2 3 4) 2)' returns '(1 2)'.
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (let loop ((l inputlist) (count k) (result '()))
+    (if (<= count 0)
+       result
+       (loop (cdr l) (- count 1) (append result (list (car l)))))))
+
+(define (list-put vlist ordinal value #!optional (span 1))
+  ;; REFENTRY list-put
+  ;; PURP Replace a specific member of a list
+  ;; DESC
+  ;; Replaces the 'ordinal'th value of 'vlist' with 'value'.  If 'span' > 1,
+  ;; replaces 'ordinal' to 'ordinal+span-1' values starting at 'ordinal'.
+  ;; /DESC
+  ;; EXAMPLE
+  ;; '(list-put (1 2 3 4 5) 2 0 2)' returns '(1 0 0 4 5)'.
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (let loop ((result vlist) (count span) (k ordinal))
+    (if (equal? count 0)
+       result
+       (let ((head (list-head result (- k 1)))
+             (tail (list-tail result k)))
+         (loop (append head (list value) tail) (- count 1) (+ k 1))))))
+
+(define (decrement-list-members vlist #!optional (decr 1) (floor 0))
+  ;; REFENTRY decrement-list-members
+  ;; PURP Decrement each member of a list
+  ;; DESC
+  ;; Decrement all the values of a list by 'decr', not to fall below 'floor'.
+  ;; ARGS
+  ;; ARG 'vlist'
+  ;; The list of values.  All the values of this list should be numeric.
+  ;; /ARG
+  ;; ARG 'decr' o
+  ;; The amount by which each element of the list should be decremented.
+  ;; The default is 1.
+  ;; /ARG
+  ;; ARG 'floor' o
+  ;; The value below which each member of the list is not allowed to fall.
+  ;; The default is 0.
+  ;; /ARG
+  ;; /ARGS
+  ;; /DESC
+  ;; AUTHOR David Carlisle
+  ;; EXAMPLE
+  ;; '(decrement-list-members (0 1 2 3 4 5))' => '(0 0 1 2 3 4)'.
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (map (lambda (a) 
+        (if (<= a (+ decr floor))
+            floor
+            (- a decr)))
+       vlist))
+
+;; ======================================================================
+
+(define (sgml-root-element #!optional (grove-node (current-node)))
+  ;; REFENTRY
+  ;; PURP Returns the node that is the root element of the current document
+  ;; DESC
+  ;; Returns the node that is the root element of the current document
+  ;; /DESC
+  ;; /REFENTRY
+  (node-property 'document-element (node-property 'grove-root grove-node)))
+
+(define (sgml-root-element? node)
+  ;; REFENTRY
+  ;; PURP Test if a node is the root element
+  ;; DESC
+  ;; Returns '#t' if node is the root element of the current document.
+  ;; /DESC
+  ;; /REFENTRY
+  (node-list=? node (sgml-root-element node)))
+
+;; ======================================================================
+
+(define (length-string-number-part lenstr)
+  ;; REFENTRY length-string-number-part
+  ;; PURP Returns the numeric part of a length string
+  ;; DESC
+  ;; Given a length as a string, return the numeric part.
+  ;; /DESC
+  ;; EXAMPLE
+  ;; '"100pt"' returns '"100"'. '"30"' returns '"30"'.  
+  ;; '"in"' returns '""'.
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (let ((digits '(#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9 #\.)))
+    (let loop ((chars (string->list lenstr))
+              (number-part ""))
+      (if (or (null? chars) (not (member (car chars) digits)))
+         number-part
+         (loop (cdr chars) (string-append number-part 
+                                          (string (car chars))))))))
+
+(define (length-string-unit-part lenstr)
+  ;; REFENTRY length-string-unit-part
+  ;; PURP Returns the unit part of a length string
+  ;; DESC
+  ;; Given a length as a string, return the units part.
+  ;; /DESC
+  ;; EXAMPLE
+  ;; '"100pt"' returns '"pt"'. '"30"' returns '""'.  
+  ;; '"in"' returns '"in"'.
+  ;; /EXAMPLE
+  ;; /REFENTRY
+  (let ((number-part (length-string-number-part lenstr))
+       (strlen (string-length lenstr)))
+    (if (equal? (string-length number-part) strlen)
+       ""
+       (substring lenstr (string-length number-part) strlen))))
+
+;; ======================================================================
+
+(define (normalize str)
+  ;; REFENTRY normalize
+  ;; PURP Normalize the str according to the SGML declaration in effect
+  ;; DESC
+  ;; Performs SGML general name normalization on the string;
+  ;; used to compare attribute names and generic identifiers correctly
+  ;; according to the SGML declaration in effect; this is necessary
+  ;; since XML is case-sensitive but the reference concrete syntax and
+  ;; many SGML DTDs are not.
+  ;; /DESC
+  ;; AUTHOR Chris Maden
+  ;; /REFENTRY
+  (if (string? str)
+      (general-name-normalize str
+                             (current-node))
+      str))
+
+;; ======================================================================
+
+(define (node-list->string nodelist)
+  ;; REFENTRY node-2-string
+  ;; PURP Return a string representation of the node list
+  ;; DESC
+  ;; Builds a string representation of the node list and returns it.
+  ;; The representation is 
+  ;;
+  ;; "gi(firstchildgi()secondchildgi(firstgrandchildgi())) secondgi()..."
+  ;;
+  ;; This is a debugging function, in case that wasn't obvious...
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((nl nodelist) (res ""))
+    (if (node-list-empty? nl)
+       res
+       (loop (node-list-rest nl)
+             (string-append res 
+                            (if (gi (node-list-first nl))
+                                (string-append
+                                 (gi (node-list-first nl))
+                                 "("
+                                 (node-list->string 
+                                  (children (node-list-first nl)))
+                                 ")")
+                                ""))))))
+
+;; ======================================================================
+
+(define (include-file fileref)
+  ;; REFENTRY include-file
+  ;; PURP Return the literal content of fileref
+  ;; DESC
+  ;; Opens and loads fileref with (read-entity); returns the content
+  ;; of fileref as a (literal).  Trims the last trailing newline off
+  ;; the file so that "the right thing" happens in asis environments.
+  ;; /DESC
+  ;; /REFENTRY
+  (literal (include-characters fileref)))
+
+;; ======================================================================
+
+(define (include-characters fileref)
+  ;; REFENTRY include-characters
+  ;; PURP Return the character content of fileref
+  ;; DESC
+  ;; Opens and loads fileref with (read-entity); returns the content
+  ;; of fileref as characters.  Trims the last trailing newline off
+  ;; the file so that "the right thing" happens in asis environments.
+  ;; /DESC
+  ;; /REFENTRY
+  (let* ((newline #\U-000D)
+        (file-content  (read-entity fileref))
+        (file-length   (string-length file-content))
+        ;; If the last char is a newline, drop it, otherwise print it...
+        (content       (if (equal? newline (string-ref file-content
+                                                       (- file-length 1)))
+                           (substring file-content 0 (- file-length 1))
+                           file-content)))
+    content))
+
+;; ======================================================================
+
+(define (url-encode-char ch)
+  ;; REFENTRY url-encode-char
+  ;; PURP Returns the url-encoded equivalent of a character
+  ;; DESC
+  ;; Converts 'ch' to a properly encoded URL character.
+  ;; /DESC
+  ;; /REFENTRY
+  (cond ((char=? ch #\space)  "%20") ; space
+       ((char=? ch #\U-0026) "%26") ; ampersand
+       ((char=? ch #\?)      "%3F") ; question
+       ((char=? ch #\{)      "%7B") ; open curly
+       ((char=? ch #\})      "%7D") ; close curly
+       ((char=? ch #\|)      "%7C") ; vertical bar
+       ((char=? ch #\\)      "%5C") ; backslash
+       ((char=? ch #\/)      "%2F") ; slash
+       ((char=? ch #\^)      "%5E") ; caret
+       ((char=? ch #\~)      "%7E") ; tilde
+       ((char=? ch #\[)      "%5B") ; open square
+       ((char=? ch #\])      "%5D") ; close square
+       ((char=? ch #\`)      "%60") ; backtick
+       ((char=? ch #\%)      "%25") ; percent
+       ((char=? ch #\+)      "%2B") ; plus
+       (else (string ch))))
+
+(define (url-encode-string str)
+  ;; REFENTRY url-encode-string
+  ;; PURP Returns str with all special characters %-encoded
+  ;; DESC
+  ;; Converts 'str' to a properly encoded URL string.  Returns str unchanged
+  ;; if it is not a string.
+  ;; /DESC
+  ;; /REFENTRY
+  (if (string? str)
+      (let loop ((charlist (string->list str)) (url ""))
+       (if (null? charlist)
+           url
+           (loop (cdr charlist) 
+                 (string-append url (url-encode-char (car charlist))))))
+      str))
+
+;; ======================================================================
+
+(define (system-id-filename target)
+  ;; REFENTRY system-id-filename
+  ;; PURP Returns the filename part of the system id of target
+  ;; DESC
+  ;; The entity-generated-system-id of target seems to begin with a
+  ;; keyword, usually OSFILE on my system, in angle brackets.
+  ;; This function removes the leading OSFILE bit.
+  ;; /DESC
+  ;; /REFENTRY
+  (let* ((sysid  (entity-generated-system-id target))
+        (fnbits (split sysid '(#\>)))
+        (fntail (cdr fnbits)))
+    (join fntail "\U-0061;")))
+
+;; ======================================================================
+
+(define (trim-string str string-list)
+  ;; REFENTRY trim-string
+  ;; PURP Trims the tail off of a string
+  ;; DESC
+  ;; If 'str' ends with any of the strings in 'string-list', trim that
+  ;; string off and return the base string.
+  ;; E.g., '(trim-string "filename.sgm" '(".sgm" ".xml" ".sgml"))
+  ;; returns "filename".
+  ;; /DESC
+  ;; /REFENTRY
+  (let ((strlen (string-length str)))
+    (let loop ((sl string-list))
+      (if (null? sl)
+         str
+         (if (equal? 
+              (substring str (- strlen (string-length (car sl))) strlen)
+              (car sl))
+             (substring str 0 (- strlen (string-length (car sl))))
+             (loop (cdr sl)))))))
+
+;; ======================================================================
+
+(define (string-index source target)
+  ;; REFENTRY string-index
+  ;; PURP Finds first occurance of 'target' in 'source'
+  ;; DESC
+  ;; Returns the position of the first occurance of 'target' in 'source',
+  ;; or -1 if it does not occur.
+  ;; /DESC
+  ;; /REFENTRY
+  (let loop ((str source) (pos 0))
+    (if (< (string-length str) (string-length target))
+       -1
+       (if (string=? (substring str 0 (string-length target)) target)
+           pos
+           (loop (substring str 1 (string-length str))
+                 (+ pos 1))))))
+
+;; ======================================================================
+
+(define (parse-pi-attribute pivalues #!optional (skip #f))
+  (let* ((equalpos (string-index pivalues "="))
+        (name     (substring pivalues 0 equalpos))
+        (quotchar (substring pivalues (+ equalpos 1) (+ equalpos 2)))
+        (rest     (substring pivalues 
+                             (+ equalpos 2) 
+                             (string-length pivalues)))
+        (quotpos  (string-index rest quotchar))
+        (value    (substring rest 0 quotpos))
+        (morevals (strip (substring rest 
+                                    (+ quotpos 1) 
+                                    (string-length rest)))))
+    (if skip
+       morevals
+       (list name value))))
+
+(define (parse-skip-pi-attribute pivalues)
+  (parse-pi-attribute pivalues #t))
+
+(define (parse-starttag-pi pi)
+  ;; REFENTRY parse-starttag-pi
+  ;; PURP Parses a structured PI and returns a list of values
+  ;; DESC
+  ;; It has become common practice to give PIs structured values.  The
+  ;; result is a PI that looks a lot like a start tag with attributes:
+  ;;
+  ;; &#60;?pitarget name1="value1" name2='value2' name3="value '3'">
+  ;; 
+  ;; This function parses a PI with this form and returns a list. The
+  ;; list contains the pitarget and each of the name/value pairs:
+  ;;
+  ;; ("pitarget" "name1" "value1" "name2" "value2" "name3" "value '3'")
+  ;; /DESC
+  ;; /REFENTRY
+  (let* ((strippi (strip pi))
+        (spacepos (string-index strippi " ")))
+    (if (< spacepos 0)
+       (list strippi)
+       (let* ((pitarget (substring strippi 0 spacepos))
+              (pivalues (strip (substring strippi 
+                                          (+ spacepos 1)
+                                          (string-length strippi)))))
+         (let loop ((values pivalues) (result (list pitarget)))
+           (if (string=? values "")
+               result
+               (loop (parse-skip-pi-attribute values)
+                     (append result (parse-pi-attribute values)))))))))
+
+;; ======================================================================
+
+(define (string->nodes s)
+  ;; Escape XML characters...
+  (let* ((achars (string-replace s "&#38;" "&#38;#38;#38;"))
+        (bchars (string-replace achars "&#60;" "&#38;#38;#60;"))
+        (cchars (string-replace bchars "&#62;" "&#38;#38;#62;")))
+    (let ((doc (string-append "&#60;literal>&#60;!DOCTYPE doc [ &#60;!ELEMENT "
+                             "doc - - (#PCDATA)> ]>&#60;doc>" cchars ";&#60;/doc>")))
+      (children (node-property 'docelem (sgml-parse doc))))))
+
+;; ======================================================================
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/olink/ChangeLog b/olink/ChangeLog
new file mode 100644 (file)
index 0000000..0243ae3
--- /dev/null
@@ -0,0 +1,4 @@
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * olink.dsl: New file.
+
diff --git a/olink/olink.dsl b/olink/olink.dsl
new file mode 100644 (file)
index 0000000..72b4f25
--- /dev/null
@@ -0,0 +1,175 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification id="olink" use="docbook">
+<style-specification-body>
+
+;; $Id: olink.dsl,v 1.1 2001/04/02 21:40:28 nwalsh Exp $
+
+(define %doctype-pubid% "-//Norman Walsh//DTD DocBook OLink Summary V1.1//EN")
+
+(root 
+ (make sequence
+   (make document-type
+     name: "div"
+     public-id: %doctype-pubid%)
+   (with-mode olink-mode (process-children))))
+
+(define (attrs #!optional (nd (current-node)))
+  (let* ((id   (attribute-string (normalize "id") nd))
+        (arch (inherited-attribute-string (normalize "arch") nd))
+        (conformance (inherited-attribute-string 
+                      (normalize "conformance") nd))
+        (os        (inherited-attribute-string (normalize "os") nd))
+        (revision  (inherited-attribute-string (normalize "revision") nd))
+        (userlevel (inherited-attribute-string (normalize "userlevel") nd))
+        (vendor    (inherited-attribute-string (normalize "vendor") nd))
+        (label     (element-label nd #t))
+        (gielem    (case-fold-down (gi nd)))
+        (giname    (gentext-element-name (gi nd)))
+        (href      (href-to nd)))
+    (append
+     (list (list "type" gielem))
+     (list (list "name" giname))
+     (list (list "href" href))
+     (if id (list (list "id" id)) '())
+     (if (equal? label "") '() (list (list "label" label)))
+     (if arch (list (list "arch" arch)) '())
+     (if conformance (list (list "conformance" conformance)) '())
+     (if os (list (list "os" os)) '())
+     (if revision (list (list "revision" revision)) '())
+     (if userlevel (list (list "userlevel" userlevel)) '())
+     (if vendor (list (list "vendor" vendor)) '()))))
+
+(define (div #!optional (nd (current-node)))
+  (let* ((attributes (attrs nd))
+        (xreflabel  (attribute-string (normalize "xreflabel") nd))
+        (title      (if xreflabel
+                        xreflabel
+                        (element-title nd))))
+    (make element gi: "div"
+         attributes: attributes
+         (make element gi: "ttl"
+               (if (string? title)
+                   (literal title)
+                   (with-mode olink-title-mode
+                     (process-node-list title))))
+         (process-children))))
+
+(define (obj #!optional (nd (current-node)))
+  (let* ((attributes (attrs nd))
+        (title (element-title nd)))
+    (make sequence
+      (make element gi: "obj"
+           attributes: attributes
+           (make element gi: "ttl"
+                 (if (string? title)
+                     (literal title)
+                     (with-mode olink-title-mode
+                       (process-node-list title))))
+           (process-children)))))
+
+(mode olink-mode
+  (default
+    ;; process only the element children
+    (let ((elem (let loop ((nl (children (current-node))) 
+                          (elem (empty-node-list)))
+                 (if (node-list-empty? nl)
+                     elem
+                     (if (equal? (node-property 'class-name 
+                                                (node-list-first nl)) 
+                                 'element)
+                         (loop (node-list-rest nl)
+                               (node-list elem (node-list-first nl)))
+                         (loop (node-list-rest nl) elem))))))
+      (if (node-list-empty? elem)
+         (empty-sosofo)
+         (process-node-list elem))))
+
+  (element set (div))
+  (element book (div))
+  (element preface (div))
+  (element chapter (div))
+  (element appendix (div))
+  (element part (div))
+  (element reference (div))
+  (element article (div))
+  (element refentry (div))
+
+  (element section (div))
+  (element sect1 (div))
+  (element sect2 (div))
+  (element sect3 (div))
+  (element sect4 (div))
+  (element sect5 (div))
+
+  (element refsect1 (div))
+  (element refsect2 (div))
+  (element refsect3 (div))
+
+  (element figure (obj))
+  (element example (obj))
+  (element table (obj))
+  (element equation 
+    (if (node-list-empty? (select-elements (children (current-node))
+                                          (normalize "title")))
+       (empty-sosofo)
+       (obj)))
+)
+
+(mode olink-title-mode
+  (default (process-children))
+
+  (element computeroutput
+    (make element gi: "tt"
+         (process-children)))
+  
+  (element emphasis 
+    (make element gi: "it"
+         (process-children)))
+  
+  (element filename 
+    (make element gi: "it"
+         (process-children)))
+  
+  (element function 
+    (make element gi: "it"
+         (process-children)))
+  
+  (element literal 
+    (make element gi: "tt"
+         (process-children)))
+  
+  (element markup 
+    (make element gi: "tt"
+         (process-children)))
+  
+  (element quote
+    (make element gi: "qt"
+         (process-children)))
+  
+  (element replaceable 
+    (make element gi: "it"
+         (process-children)))
+  
+  (element subscript
+    (make element gi: "sub"
+         (process-children)))
+  
+  (element superscript 
+    (make element gi: "sup"
+         (process-children)))
+  
+  (element userinput 
+    (make element gi: "tt"
+         (process-children)))
+)
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/packaging/docbook-style-dsssl.Makefile b/packaging/docbook-style-dsssl.Makefile
new file mode 100644 (file)
index 0000000..d16b2d7
--- /dev/null
@@ -0,0 +1,46 @@
+BINDIR = /usr/bin
+DESTDIR = /usr/share/sgml/docbook/dsssl-stylesheets-1.74b
+
+all: install
+
+install: install-bin install-dtd install-dsl install-img install-misc
+
+install-bin:
+       mkdir -p $(BINDIR)
+       install bin/collateindex.pl $(BINDIR)
+
+install-dtd:
+       mkdir -p $(DESTDIR)/dtds/{decls,dbdsssl,html,imagelib,olink}
+       cp dtds/decls/docbook.dcl $(DESTDIR)/dtds/decls
+       cp dtds/decls/xml.dcl $(DESTDIR)/dtds/decls
+       cp dtds/dbdsssl/dbdsssl.dtd $(DESTDIR)/dtds/dbdsssl
+       cp dtds/html/dbhtml.dtd $(DESTDIR)/dtds/html
+       cp dtds/html/ISOlat1.gml $(DESTDIR)/dtds/html
+       cp dtds/imagelib/imagelib.dtd $(DESTDIR)/dtds/imagelib
+       cp dtds/olink/olinksum.dtd $(DESTDIR)/dtds/olink
+
+install-dsl:
+       mkdir -p $(DESTDIR)/{lib,common,html,print,olink}
+       cp lib/dblib.dsl $(DESTDIR)/lib
+       cp common/*.dsl $(DESTDIR)/common
+       cp common/*.ent $(DESTDIR)/common
+       cp html/*.dsl $(DESTDIR)/html
+       cp lib/dblib.dsl $(DESTDIR)/lib
+       cp print/*.dsl $(DESTDIR)/print
+       cp olink/*.dsl $(DESTDIR)/olink
+
+install-img:
+       mkdir -p $(DESTDIR)/images/callouts
+       cp images/*.gif $(DESTDIR)/images
+       cp images/callouts/*.gif $(DESTDIR)/images/callouts
+
+#install-test:
+#      mkdir -p $(DESTDIR)/test/{cases,imagelib,xml}
+#      cp test/*.* $(DESTDIR)/test
+#      cp test/cases/*.* $(DESTDIR)/test/cases
+#      cp test/imagelib/*.* $(DESTDIR)/test/imagelib
+#      cp test/xml/*.* $(DESTDIR)/test/xml
+
+install-misc:
+       cp catalog $(DESTDIR)
+       cp VERSION $(DESTDIR)
diff --git a/packaging/docbook-style-dsssl.changes b/packaging/docbook-style-dsssl.changes
new file mode 100644 (file)
index 0000000..8321f55
--- /dev/null
@@ -0,0 +1,3 @@
+* Fri Aug 31 18:32:31 UTC 2012 - tracy.graydon@intel.com
+- TIVI-153: Add docbook-style-dssl as dependency for iputils
+- Imported from MeeGo trunk 
diff --git a/packaging/docbook-style-dsssl.spec b/packaging/docbook-style-dsssl.spec
new file mode 100644 (file)
index 0000000..6f721ef
--- /dev/null
@@ -0,0 +1,89 @@
+#specfile originally created for Fedora, modified for Moblin Linux
+Name: docbook-style-dsssl
+Version: 1.79
+Release: 5
+Group: Applications/Text
+
+Summary: Norman Walsh's modular stylesheets for DocBook
+
+License: Freely redistributable without restriction
+URL: http://docbook.sourceforge.net/
+
+%define openjadever 1.3.2
+Requires: openjade = %{openjadever}
+Requires: docbook-dtds >= 1.0-19
+Requires: sgml-common >= 0.5
+Requires: openjade = %{openjadever}
+Conflicts: docbook-utils < 0.6.9-4
+
+BuildRoot: %{_tmppath}/%{name}-%{version}
+
+BuildArch: noarch
+Source0: http://prdownloads.sourceforge.net/docbook/docbook-dsssl-%{version}.tar.gz
+Source1: %{name}.Makefile
+
+
+%description
+These DSSSL stylesheets allow to convert any DocBook document to another
+printed (for example, RTF or PostScript) or online (for example, HTML) format.
+They are highly customizable.
+
+%prep
+%setup -q -n docbook-dsssl-%{version}
+cp %{SOURCE1} Makefile
+
+
+%build
+
+
+%install
+DESTDIR=$RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
+make install BINDIR=$DESTDIR/usr/bin DESTDIR=$DESTDIR/usr/share/sgml/docbook/dsssl-stylesheets-%{version}
+cd ..
+ln -s dsssl-stylesheets-%{version} $DESTDIR/usr/share/sgml/docbook/dsssl-stylesheets
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr (-,root,root)
+%doc BUGS README ChangeLog WhatsNew
+/usr/bin/collateindex.pl
+/usr/share/sgml/docbook/dsssl-stylesheets-%{version}
+/usr/share/sgml/docbook/dsssl-stylesheets
+
+
+%post
+rel=$(echo /etc/sgml/sgml-docbook-3.0-*.cat)
+rel=${rel##*-}
+rel=${rel%.cat}
+for centralized in /etc/sgml/*-docbook-*.cat
+do
+  /usr/bin/install-catalog --remove $centralized \
+    /usr/share/sgml/docbook/dsssl-stylesheets-*/catalog \
+    >/dev/null 2>/dev/null
+done
+
+for centralized in /etc/sgml/*-docbook-*$rel.cat
+do
+  /usr/bin/install-catalog --add $centralized \
+    /usr/share/sgml/openjade-%{openjadever}/catalog \
+    > /dev/null 2>/dev/null
+  /usr/bin/install-catalog --add $centralized \
+    /usr/share/sgml/docbook/dsssl-stylesheets-%{version}/catalog \
+    > /dev/null 2>/dev/null
+done
+
+
+%preun
+if [ "$1" = "0" ]; then
+  for centralized in /etc/sgml/*-docbook-*.cat
+  do   /usr/bin/install-catalog --remove $centralized /usr/share/sgml/openjade-%{openjadever}/catalog > /dev/null 2>/dev/null
+    /usr/bin/install-catalog --remove $centralized /usr/share/sgml/docbook/dsssl-stylesheets-%{version}/catalog > /dev/null 2>/dev/null
+  done
+fi
+exit 0
+
diff --git a/print/ChangeLog b/print/ChangeLog
new file mode 100644 (file)
index 0000000..17e1726
--- /dev/null
@@ -0,0 +1,327 @@
+2004-10-10  <petere78@users.sourceforge.net>
+
+       * dbadmon.dsl: Fix for bug #522140: Keep admonition titles and contents together when
+       graphics are used.
+
+       * dbcallou.dsl: Synchronized $callout-verbatim-display$ with $verbatim-display$; fixes
+       bug #517520 (callout ignores width of programlisting)
+
+       * dbttlpg.dsl: Give othercredit some useful rendering in print output, by copying over the
+       author rendering.  Fix author-list-string for authorgroups that contain
+       both authors and othercredits.  (bug #1038081)
+
+2004-10-09  <petere78@users.sourceforge.net>
+
+       * dbprint.dsl, dbverb.dsl: Patch #571688: Fixes excessive after spacing when a listitem contains
+       multiple paras or verbatim environments.  Patches originally by Tim Waugh
+       and Tammy Fox.
+
+       * docbook.dsl: New Bulgarian translation by Viktor Vasilev (SF patch #1040075)
+
+2004-09-17  <petere78@users.sourceforge.net>
+
+       * docbook.dsl: Bosnian translation by Kemal Skripic
+
+2004-09-14  <petere78@users.sourceforge.net>
+
+       * dbblock.dsl: Fix for bug #502066: Empty ulinks don't generate footnotes, so they should
+       be omitted from the footnote counting.  Patch by Bruce A. Mah.
+
+       * dbprint.dsl: Fix for bug #529969: Make italic monospace and strong monospace inherit
+       verbatim-size-factor.  Patch by David Aumueller.
+
+2004-07-11  <nyraghu@users.sourceforge.net>
+
+       * version.dsl: Closes Bug 912831: the last character of VERSION was being cut off.
+
+2003-12-05  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbdivis.dsl: fix a bug when multiple elements in $generate-book-lot-list$ had content; whitespace and comment updates
+
+2003-04-29  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbcompon.dsl: Finding the subtitle for a component should use the parent title if
+       set; this is consistent with how the title is already set;
+       closes SF bug 613773.
+
+       * dbcompon.dsl: Suppress some cases where components were restarting page numbering,
+       fix from Ian Castle; closes SF bug 439751.
+
+       * dbparam.dsl: Correct reference to undefined variable
+       "admon-graphic-default-extension".
+
+       * dbttlpg.dsl: Add elements to print version of article-titlepage-recto-elements so
+       that it matches the HTML version, fixes SF bug 626909.
+
+2003-04-26  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbparam.dsl: rename parameter admon-graphic-default-extension to
+       %admon-graphics-extension% for consistency
+
+       * dbparam.dsl: Note that %admon-graphics-path% requires the trailing directory separator
+        --
+
+       * dbparam.dsl: %admon-graphics-extension% will use the old name,
+       admon-graphic-default-extension, if set
+
+2003-03-25  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * db31.dsl, dbblock.dsl, dbcompon.dsl, dbgraph.dsl, dbinline.dsl, dbqanda.dsl, dbsect.dsl, docbook.dsl: 
+       move data from db31 into its proper component files
+
+2003-03-24  Jirka Kosek <kosek@users.sourceforge.net>
+
+       * dbttlpg.dsl: Added support for revdescription inside revison on titlepages
+
+2003-03-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: Don't hardcode DSSSL file list, use $(wildcard *.dsl); clean is cleaner
+
+2003-02-17  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbblock.dsl, dbtitle.dsl: More cases where process-children-trim should be used.
+
+       * dbcompon.dsl: Add some comments in the ARTICLE element.
+
+       * dblists.dsl: In process-listitem-content replace (process-node-list (children
+       (current-node))) with (process-children-trim) -- we need to be
+       trimming whitespace.  Some retabbing.
+
+       * dbprint.dsl: $paragraph$ should use (process-children-trim); this fixes a space
+       indent in RTF output on all PARAs marked up like:
+          <para>
+       Content ...
+
+       * dbtable.dsl: Remove the %cals-cell-before-column-margin% hack for TeX backend, it's
+       not needed anymore.
+
+2003-02-13  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbblock.dsl: element footnote/para uses default-text-style; set lines: wrap for the
+       case of endnotes within verbatim 'asis' environments, but it doesn't
+       seem to actually help (cf test programlisting.004)
+
+2003-02-07  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbttlpg.dsl: some space over copyright; fixes Bug #542681
+
+2003-01-21  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbparam.dsl: correct discussion of possible settings for %paper-type% and %visual-acuity%
+
+2003-01-15  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbadmon.dsl, dbautoc.dsl, dbblock.dsl, dbcallou.dsl, dbdivis.dsl, dbefsyn.dsl, dbgloss.dsl, dbgraph.dsl, dbindex.dsl, dbinfo.dsl, dbinline.dsl, dblink.dsl, dblists.dsl, dblot.dsl, dbmath.dsl, dbmsgset.dsl, dbprint.dsl, dbprocdr.dsl, dbrfntry.dsl, dbsect.dsl, dbsynop.dsl, dbtable.dsl, dbtitle.dsl, dbverb.dsl, docbook.dsl, notoc.dsl, plain.dsl: 
+       update docbook URL to http://docbook.sourceforge.net/projects/dsssl/;
+       N.B.: credit for the group option and repeating goes to John Daily
+
+       * dbblock.dsl, dbparam.dsl: parameters for %formal-object-title-font-weight%
+       %table-title-font-weight%, reviewed and tested, sourceforge patch #599366
+
+       * dblink.dsl: xref to varlistentry using the term, patch from Jens Emmerich; closes
+       bug 520561
+
+       * dbsect.dsl: make <section> appear correctly in the PDF bookmark hierarchy; also
+       fix font size selection for section titles
+       
+       corrects sourceforge bugs 589247 and 524028; patch from Carsten Haese
+       appreciated
+
+       * dbsynop.dsl: Patch #562401 <group choice="opt" rep="repeat">, elipsis should be
+       outside of group, reference test cmdsynopsis.003
+
+2002-12-16  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * dbblock.dsl, dbparam.dsl: %epigraph-start-indent% and %epigraph-end-indent% parameters allows
+       customization of epigraph positioning; %blockquote-start-indent% and
+       %blockquote-end-indent% parameters allows customization control of the
+       blockquote positioning
+
+2002-08-08  Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+       * Makefile: clean rule
+
+2002-06-29  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbblock.dsl: Patch #473114: Footnote inherit font family
+
+2002-06-09  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbbibl.dsl, dbttlpg.dsl: Fix bug #502337: remove 'by' from copyright statements
+
+2002-05-22  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbblock.dsl: Support attribution on blockquote
+
+       * dbinfo.dsl: Support chapterinfo, prefaceinfo, and appendixinfo
+
+2002-05-12  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbttlpg.dsl: Bug #494693: bad formalpara formatting on title pages
+
+       * dbverb.dsl: Bugs #429663 and #474328 fixed (allow external linespecific content to be indented and numbered). Eight bit or unicode external linespecific content may be problematic though.
+
+2002-05-09  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dblink.dsl: Allow xref to refnamediv
+
+       * dblists.dsl: Bug #469318: fix variablelist indents
+
+2002-04-29  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbefsyn.dsl, dbverb.dsl: Format synopsis elements correctly outside of classsynopsis
+
+2002-03-21  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbautoc.dsl: Find titles in any context
+
+2002-03-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbefsyn.dsl: Support freestanding {method,field,constructor,destructor}synopsis
+
+2002-02-20  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbblock.dsl: Bug #429331: center figure title if image is centered
+
+2002-02-11  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbdivis.dsl, dbttlpg.dsl: Patch #502637: avoid blank page between title page recto/verso
+
+       * dbsect.dsl: Add section-info function
+
+2001-12-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbindex.dsl: Patch #468644: Fix font sizes in index
+
+       * dbprint.dsl: Bug #465133: Insufficient conditions on is-first-para
+
+       * dbttlpg.dsl: Bug #465136: Verso authorgroup broken for editors--still broken but a little better
+
+       * dbttlpg.dsl: Patch #470589: Abstracts indents should be relative
+
+2001-11-30  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dblink.dsl: Patch #473113: No footnote ulink when text matches
+
+       * dbsect.dsl: Patch #473116: Section levels
+
+       * dbttlpg.dsl: Patch #473115: Heading levels for parts
+
+       * docbook.dsl: Fix typo that causes the print stylesheet to break.
+
+       * docbook.dsl: New file.
+
+2001-11-27  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbgloss.dsl, dbindex.dsl: Attempt to handle glossary and index in article correctly
+
+2001-11-14  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * docbook.dsl: branches:  1.5.2;
+       Added Basque, Nynorsk, Ukranian, and Xhosa
+
+2001-11-03  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbinline.dsl: Support pubwork=article on citetitle
+
+2001-10-13  Jirka Kosek <kosek@users.sourceforge.net>
+
+       * dbinline.dsl: Fixed bug #470840 - added support for methodname.
+
+2001-10-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbverb.dsl: Support linenumbering attribute on verbatim environments
+
+2001-09-29  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbadmon.dsl: Bug #449775: remove broken keep-with-next properties
+
+       * dbcallou.dsl: Bug #449494: make callouts work even if they appear on the last line of a verbatim environment
+
+2001-09-23  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dblink.dsl: Patch #461352, fix bug with ulink-footnotes and bop-footnotes simultaneously
+
+2001-08-30  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * db31.dsl: Fix XML/SGML discrepancy wrt normalization of notation names; move some common stuff into dbcommon
+
+2001-08-06  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbadmon.dsl: Patches #441806, keep with next in admonitions
+
+       * dbinline.dsl: Support 'bold' and 'strong' roles on emphasis in the expected way, added %{emphasis,phrase}-propagates-style% parameters
+
+       * docbook.dsl: Patches #439975, support OpenJade two-sided characteristics
+
+2001-08-01  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbttlpg.dsl: Don't suppress keywordset if it's put on the title page
+
+2001-07-07  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbdivis.dsl: Don't restart page numbering on ToC pages
+
+       * notoc.dsl: Bug #439065, use correct parameters
+
+2001-07-05  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbparam.dsl: Patch #420012, Add colon to content-title-end-punct
+
+2001-07-04  <uid48421@users.sourceforge.net>
+
+       * db31.dsl: Bug #426745, don't make first para of question and answer bold
+
+       * dbblock.dsl: Bug #436220, fix table footnotes when bop-footnotes is #t
+
+       * dbgloss.dsl, dblists.dsl, dbrfntry.dsl, dbtitle.dsl: 
+       Bug #420015: set heading-level appropriately in glossary
+
+       * dblists.dsl: Bug #418633, attempt to fix indentation in variablelists
+
+       * docbook.dsl: Added Afrikaans and Turkish
+
+2001-05-11  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * docbook.dsl: Support Serbian and Traditional Chinese
+
+2001-05-03  Jirka Kosek <kosek@users.sourceforge.net>
+
+       * dbinline.dsl: Added support for class="xmlpi" and class="emptytag" in <sgmltag>.
+       Element and attribute names displayed in monospace, same way as in HTML by XSL.
+
+2001-04-27  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * db31.dsl: Handle display? property correctly on imagedata graphics
+
+2001-04-24  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * db31.dsl: Bug #418474: only output a space after the qanda label if the label isn't empty
+
+2001-04-21  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbautoc.dsl: Make top-level entries in the TOC 'keep-with-next'
+
+2001-04-16  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbttlpg.dsl: Bug #414681: add heading-level to set and book titles
+
+2001-04-15  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * dbblock.dsl: Force upright posture and default quadding in footnote text
+
+       * dblists.dsl: Format variablelist title in the table when a variablelist is formatted with a table
+
+2001-04-04  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * Makefile: New file.
+
+2001-04-03  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * db31.dsl: Fix bug 412548, allow WMF in media objects
+
+2001-04-02  Norman Walsh <nwalsh@users.sourceforge.net>
+
+       * .cvsignore, catalog, db31.dsl, dbadmon.dsl, dbautoc.dsl, dbbibl.dsl, dbblock.dsl, dbcallou.dsl, dbcompon.dsl, dbdivis.dsl, dbefsyn.dsl, dbgloss.dsl, dbgraph.dsl, dbindex.dsl, dbinfo.dsl, dbinline.dsl, dblink.dsl, dblists.dsl, dblot.dsl, dbmath.dsl, dbmsgset.dsl, dbparam.dsl, dbprint.dsl, dbprocdr.dsl, dbrfntry.dsl, dbsect.dsl, dbsynop.dsl, dbtable.dsl, dbtitle.dsl, dbttlpg.dsl, dbverb.dsl, docbook.dsl, notoc.dsl, plain.dsl, version.dsl: 
+       Initial checkins
+
diff --git a/print/XREF b/print/XREF
new file mode 100644 (file)
index 0000000..3ec54e8
--- /dev/null
@@ -0,0 +1,2 @@
+Symbol             Defined In                    Used In                       
+================== ============================= =============================
diff --git a/print/catalog b/print/catalog
new file mode 100644 (file)
index 0000000..f5ce23a
--- /dev/null
@@ -0,0 +1,3 @@
+CATALOG "../catalog"
+
+
diff --git a/print/dbadmon.dsl b/print/dbadmon.dsl
new file mode 100644 (file)
index 0000000..a765847
--- /dev/null
@@ -0,0 +1,161 @@
+;; $Id: dbadmon.dsl,v 1.5 2004/10/10 14:18:40 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================ ADMONITIONS =============================
+
+(define ($graphical-admonition$)
+  (let* ((adm       (current-node))
+        (title     (select-elements (children adm) 
+                                    (normalize "title")))
+        (title?    (not (node-list-empty? title)))
+        (adm-title (if title?
+                       (with-mode title-sosofo-mode
+                         (process-node-list (node-list-first title)))
+                       (literal (gentext-element-name adm))))
+        (graphic   (make external-graphic
+                     display?: #f
+                     entity-system-id: ($admon-graphic$)))
+        (f-child   (node-list-first (children (current-node))))
+        (r-child   (node-list-rest (children (current-node)))))
+    (make display-group
+      space-before: %block-sep%
+      space-after: %block-sep%
+      start-indent: (+ (inherited-start-indent) ($admon-graphic-width$))
+      font-family-name: %admon-font-family%
+      font-size: (- %bf-size% 1pt)
+      font-weight: 'medium
+      font-posture: 'upright
+      line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%)
+      (if title?
+         (make display-group
+           (make paragraph
+             first-line-start-indent: (- ($admon-graphic-width$))
+             keep-with-next?: #t
+             (make line-field
+               field-width: ($admon-graphic-width$)
+               graphic)
+             (make sequence
+               font-family-name: %title-font-family%
+               font-weight: 'bold
+               adm-title))
+           (process-children))
+         (make display-group
+           (make paragraph
+             first-line-start-indent: (- ($admon-graphic-width$))
+             (make line-field
+               field-width: ($admon-graphic-width$)
+               graphic)
+             (process-node-list (children f-child)))
+           (process-node-list r-child))))))
+
+(define ($admonition$)
+  (if %admon-graphics%
+      ($graphical-admonition$)
+      (make display-group
+       space-before: %block-sep%
+       space-after: %block-sep%
+       start-indent: (if %admon-graphics%
+                         (inherited-start-indent)
+                         (+ (inherited-start-indent) (* (ILSTEP) 2)))
+       font-size: (- %bf-size% 1pt)
+       font-weight: 'medium
+       font-posture: 'upright
+       font-family-name: %admon-font-family%
+       line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%)
+       (process-children))))
+
+(define ($admonpara$)
+  (let* ((title     (select-elements 
+                    (children (parent (current-node))) (normalize "title")))
+        (has-title (not (node-list-empty? title)))
+        (adm-title (if has-title 
+                       (make sequence
+                         (with-mode title-sosofo-mode
+                           (process-node-list (node-list-first title)))
+                         (literal (gentext-label-title-sep 
+                                   (gi (parent (current-node))))))
+                       (literal
+                        (gentext-element-name 
+                         (parent (current-node)))
+                        (gentext-label-title-sep 
+                         (gi (parent (current-node))))))))
+    (make paragraph
+      space-before: %para-sep%
+      space-after: %para-sep%
+      (if (and (not %admon-graphics%) (= (child-number) 1))
+         (make sequence
+           font-family-name: %title-font-family%
+           font-weight: 'bold
+           adm-title)
+         (empty-sosofo))
+      (process-children-trim))))
+
+(element important ($admonition$))
+(element (important title) (empty-sosofo))
+(element (important para) ($admonpara$))
+(element (important simpara) ($admonpara$))
+
+(element note ($admonition$))
+(element (note title) (empty-sosofo))
+(element (note para) ($admonpara$))
+(element (note simpara) ($admonpara$))
+
+(element tip ($admonition$))
+(element (tip title) (empty-sosofo))
+(element (tip para) ($admonpara$))
+(element (tip simpara) ($admonpara$))
+
+;; perils are given special treatment by generating a centered title
+;;   and throwing a box around them
+;; note that the paragraph indents are set by the box characteristics
+;;
+(define ($peril$)
+  (let* ((title     (select-elements 
+                    (children (current-node)) (normalize "title")))
+        (has-title (not (node-list-empty? title)))
+        (adm-title (if has-title 
+                       (make sequence
+                         (with-mode title-sosofo-mode
+                           (process-node-list (node-list-first title))))
+                       (literal
+                        (gentext-element-name 
+                         (current-node)))))
+        (hs (HSIZE 2)))
+  (if %admon-graphics%
+      ($graphical-admonition$)
+      (make display-group
+       space-before: %block-sep%
+       space-after: %block-sep%
+       font-family-name: %admon-font-family%
+       font-size: (- %bf-size% 1pt)
+       font-weight: 'medium
+       font-posture: 'upright
+       line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%)
+       (make box
+         display?: #t
+         box-type: 'border
+         line-thickness: 2pt
+         start-indent: (+ (inherited-start-indent) (* 2 (ILSTEP)) 2pt)
+         end-indent: (inherited-end-indent)
+         (make paragraph
+           space-before: %para-sep%
+           space-after: %para-sep%
+           start-indent: 1em
+           end-indent: 1em
+           font-family-name: %title-font-family%
+           font-weight: 'bold
+           font-size: hs
+           line-spacing: (* hs %line-spacing-factor%)
+           quadding: 'center
+           keep-with-next?: #t
+           adm-title)
+         (process-children))))))
+
+(element caution ($peril$))
+(element (caution title) (empty-sosofo))
+
+(element warning ($peril$))
+(element (warning title) (empty-sosofo))
diff --git a/print/dbautoc.dsl b/print/dbautoc.dsl
new file mode 100644 (file)
index 0000000..2197c4a
--- /dev/null
@@ -0,0 +1,179 @@
+;; $Id: dbautoc.dsl,v 1.4 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================== TABLE OF CONTENTS =========================
+
+(define %toc-indent% 2pi)
+(define %toc-spacing-factor% 0.4)
+
+;; Returns the depth of auto TOC that should be made at the nd-level
+(define (toc-depth nd)
+  (if (string=? (gi nd) (normalize "book"))
+      7
+      1))
+
+(define (format-page-number)
+  (current-node-page-number-sosofo))
+
+;; Prints the TOC title if first? is true, otherwise does nothing
+(define (toc-title first?)
+  (let ((hsize (if (or (equal? (gi (current-node)) (normalize "article"))
+                      (equal? (gi (current-node)) (normalize "part")))
+                  (HSIZE 3)
+                  (HSIZE 4))))
+    (if first?
+       (make paragraph
+         font-family-name: %title-font-family%
+         font-weight: 'bold
+         font-size: hsize
+         line-spacing: (* hsize %line-spacing-factor%)
+         space-before: (* hsize %head-before-factor%)
+         space-after: (* hsize %head-after-factor%)
+         start-indent: 0pt
+         first-line-start-indent: 0pt
+         quadding: %component-title-quadding%
+         heading-level: (if %generate-heading-level% 1 0)
+         keep-with-next?: #t
+         (literal (gentext-element-name (normalize "toc"))))
+       (empty-sosofo))))
+
+;; Prints the TOC title if first? is true, otherwise does nothing
+(define (lot-title first? lotgi)
+  (if first?
+      (make paragraph
+       font-family-name: %title-font-family%
+       font-weight: 'bold
+       font-size: (HSIZE 4)
+       line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+       space-before: (* (HSIZE 4) %head-before-factor%)
+       space-after: (* (HSIZE 4) %head-after-factor%)
+       start-indent: 0pt
+       first-line-start-indent: 0pt
+       quadding: %component-title-quadding%
+       heading-level: (if %generate-heading-level% 1 0)
+       keep-with-next?: #t
+       (literal ($lot-title$ lotgi)))
+      (empty-sosofo)))
+
+;; Print the TOC entry for tocentry  
+(define ($toc-entry$ tocentry level)
+  (make paragraph
+    start-indent: (+ %body-start-indent%
+                    (* %toc-indent% level))
+    first-line-start-indent: (* -1 %toc-indent%)
+    font-weight: (if (= level 1) 'bold 'medium)
+    space-before: (if (= level 1) (* %toc-spacing-factor% 6pt) 0pt)
+    space-after: (if (= level 1) (* %toc-spacing-factor% 6pt) 0pt)
+    keep-with-next?: (if (= level 1) #t #f)
+    quadding: 'start
+    (make link
+      destination: (node-list-address tocentry)
+      (make sequence
+       (if (equal? (element-label tocentry) "")
+           (empty-sosofo)
+           (make sequence
+             (element-label-sosofo tocentry)
+             (literal (gentext-label-title-sep (gi tocentry)))))
+       (element-title-sosofo tocentry)))
+    (if (and (= level 1)
+            ;; ??? %chapter-title-page-separate%
+            %page-number-restart%)
+       (empty-sosofo)    ;; Don't need the leader etc then
+       (make sequence
+         (make leader (literal "."))
+         (make link
+           destination: (node-list-address tocentry)
+           (make sequence
+             (if %page-number-restart%
+                 (literal
+                  (string-append
+                   (if (= level 1)
+                       (element-label tocentry #t)
+                       (substring (element-label tocentry #t)
+                                  0 (string-index (element-label tocentry #t) ".")))
+                   (gentext-intra-label-sep "_pagenumber")))
+                 (empty-sosofo))
+             (with-mode toc-page-number-mode
+               (process-node-list tocentry))))))))
+
+;; Build a TOC starting at nd reaching down depth levels.
+;; The optional arguments are used on recursive calls to build-toc
+;; and shouldn't be set by the initial caller...
+;;
+(define (build-toc nd depth #!optional (first? #t) (level 1))
+  (let* ((toclist (toc-list-filter
+                  (node-list-filter-by-gi (children nd)
+                                          (append (division-element-list)
+                                                  (component-element-list)
+                                                  (section-element-list))))))
+    (if (or (<= depth 0)
+           (node-list-empty? toclist))
+       (empty-sosofo)
+       (make sequence
+         (toc-title first?)
+         (let loop ((nl toclist))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (sosofo-append
+                 ($toc-entry$ (node-list-first nl) level)
+                 (build-toc (node-list-first nl) (- depth 1) #f (+ level 1))
+                 (loop (node-list-rest nl)))))))))
+
+;; Print the LOT entry
+(define ($lot-entry$ tocentry)
+  (make paragraph
+    start-indent: (+ %body-start-indent% %toc-indent%)
+    first-line-start-indent: (* -1 %toc-indent%)
+    font-weight: 'medium
+    space-before: 0pt
+    space-after: 0pt
+    quadding: 'start
+    (make link
+      destination: (node-list-address tocentry)
+      (make sequence
+       (if (equal? (element-label tocentry) "")
+           (empty-sosofo)
+           (make sequence
+             (element-label-sosofo tocentry #t)
+             (literal (gentext-label-title-sep (gi tocentry)))))
+       (element-title-sosofo tocentry)))
+    (make leader (literal "."))
+    (make link
+      destination: (node-list-address tocentry)
+      (make sequence
+       (if %page-number-restart%
+           (make sequence
+            (literal (substring (element-label tocentry #t)
+                       0 (string-index (element-label tocentry #t) "-")))
+            (literal (gentext-intra-label-sep "_pagenumber")))
+           (empty-sosofo))
+       (with-mode toc-page-number-mode
+         (process-node-list tocentry))))))
+
+;; Build a LOT starting at nd for all the lotgi's it contains.
+;; The optional arguments are used on recursive calls to build-toc
+;; and shouldn't be set by the initial caller...
+;;
+(define (build-lot nd lotgi #!optional (first? #t))
+  (let* ((lotlist (select-elements (descendants nd)
+                                  (normalize lotgi))))
+    (if (node-list-empty? lotlist)
+       (empty-sosofo)
+       (make sequence
+         (lot-title first? lotgi)
+         (let loop ((nl lotlist))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (if (string=? (gi (node-list-first nl)) lotgi)
+                     ($lot-entry$ (node-list-first nl))
+                     (empty-sosofo))
+                 (build-lot (node-list-first nl) lotgi #f)
+                 (loop (node-list-rest nl)))))))))
+
+(mode toc-page-number-mode
+  (default
+    (format-page-number)))
diff --git a/print/dbbibl.dsl b/print/dbbibl.dsl
new file mode 100644 (file)
index 0000000..38340a9
--- /dev/null
@@ -0,0 +1,868 @@
+;; $Id: dbbibl.dsl,v 1.2 2002/06/09 12:04:09 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ......................... BIBLIOGRAPHY PARAMS .........................
+
+;; these should be in dbparam...
+(define %biblsep% ", ")
+(define %biblend% ".")
+
+(define %biblioentry-in-entry-order% #t)
+
+;; .................... BIBLIOGRAPHY and BIBLIODIV ......................
+
+(define (bibliography-content)
+  ;; Note that the code below works for both the case where the bibliography
+  ;; has BIBLIODIVs and the case where it doesn't, by the slightly subtle
+  ;; fact that if it does, then allentries will be (empty-node-list).
+  (let* ((allbibcontent (children (current-node)))
+        (prebibcontent (node-list-filter-by-not-gi 
+                        allbibcontent
+                        (list (normalize "biblioentry")
+                              (normalize "bibliomixed"))))
+        (allentries    (node-list-filter-by-gi 
+                        allbibcontent
+                        (list (normalize "biblioentry")
+                              (normalize "bibliomixed"))))
+        (entries       (if biblio-filter-used
+                           (biblio-filter allentries)
+                           allentries)))
+    (make sequence
+      (process-node-list prebibcontent)
+      (process-node-list entries))))
+
+(element (book bibliography)
+  (make simple-page-sequence
+    page-n-columns: %page-n-columns%
+    page-number-restart?: (or %page-number-restart% 
+                             (book-start?) 
+                             (first-chapter?))
+    page-number-format: ($page-number-format$)
+    use: default-text-style
+    left-header:   ($left-header$)
+    center-header: ($center-header$)
+    right-header:  ($right-header$)
+    left-footer:   ($left-footer$)
+    center-footer: ($center-footer$)
+    right-footer:  ($right-footer$)
+    start-indent: %body-start-indent%
+    input-whitespace-treatment: 'collapse
+    quadding: %default-quadding%
+    (make sequence
+      ($component-title$)
+      (bibliography-content))
+    (make-endnotes)))
+
+(element bibliography
+  ;; A bibliography that's inside something else...
+  (let* ((sect   (ancestor-member (current-node) 
+                                 (append (section-element-list)
+                                         (component-element-list))))
+        (hlevel (+ (SECTLEVEL sect) 1))
+        (hs     (HSIZE (- 4 hlevel))))
+    (make sequence
+      (make paragraph
+       font-family-name: %title-font-family%
+       font-weight:  (if (< hlevel 5) 'bold 'medium)
+       font-posture: (if (< hlevel 5) 'upright 'italic)
+       font-size: hs
+       line-spacing: (* hs %line-spacing-factor%)
+       space-before: (* hs %head-before-factor%)
+       space-after:  (* hs %head-after-factor%)
+       start-indent: (if (or (>= hlevel 3)
+                             (member (gi) (list (normalize "refsect1") 
+                                                (normalize "refsect2") 
+                                                (normalize "refsect3"))))
+                         %body-start-indent%
+                         0pt)
+       first-line-start-indent: 0pt
+       quadding: %section-title-quadding%
+       keep-with-next?: #t
+       heading-level: (if %generate-heading-level% (+ hlevel 1) 0)
+       (element-title-sosofo (current-node)))
+      (bibliography-content))))
+
+(element (bibliography title) (empty-sosofo))
+
+(element bibliodiv
+  (let* ((allentries (node-list-filter-by-gi (children (current-node))
+                                            (list (normalize "biblioentry")
+                                                  (normalize "bibliomixed"))))
+        (entries (if biblio-filter-used
+                     (biblio-filter allentries)
+                     allentries)))
+    (if (and biblio-filter-used (node-list-empty? entries))
+       (empty-sosofo)
+       (make display-group
+         space-before: %block-sep%
+         space-after: %block-sep%
+         start-indent: %body-start-indent%
+         (make sequence
+           ($section-title$)
+           (process-node-list entries))))))
+
+(element (bibliodiv title) (empty-sosofo))
+
+;; ..................... BIBLIOGRAPHY ENTRIES .........................
+
+(define (biblioentry-inline-sep node rest)
+  ;; Output the character that should separate inline node from rest
+  (cond 
+   ((and (equal? (gi node) (normalize "title"))
+        (equal? (gi (node-list-first rest)) (normalize "subtitle")))
+    (make sequence
+      font-posture: 'italic
+      (literal ": ")))
+   (else
+    (literal %biblsep%))))
+
+(define (biblioentry-inline-end blocks)
+  ;; Output the character that should occur at the end of inline
+  (literal %biblend%))
+
+(define (biblioentry-block-sep node rest)
+  ;; Output the character that should separate block node from rest
+  (empty-sosofo))
+
+(define (biblioentry-block-end)
+  ;; Output the character that should occur at the end of block
+  (empty-sosofo))
+
+(element biblioentry
+  (let* ((expanded-children   (expand-children 
+                              (children (current-node))
+                              (biblioentry-flatten-elements)))
+        (all-inline-children (if %biblioentry-in-entry-order%
+                                 (titlepage-gi-list-by-nodelist
+                                  (biblioentry-inline-elements)
+                                  expanded-children)
+                                 (titlepage-gi-list-by-elements
+                                  (biblioentry-inline-elements)
+                                  expanded-children)))
+        (block-children      (if %biblioentry-in-entry-order%
+                                 (titlepage-gi-list-by-nodelist
+                                  (biblioentry-block-elements)
+                                  expanded-children)
+                                 (titlepage-gi-list-by-elements
+                                  (biblioentry-block-elements)
+                                  expanded-children)))
+        (leading-abbrev      (if (equal? (normalize "abbrev")
+                                         (gi (node-list-first 
+                                              all-inline-children)))
+                                 (node-list-first all-inline-children)
+                                 (empty-node-list)))
+        (inline-children     (if (node-list-empty? leading-abbrev)
+                                 all-inline-children
+                                 (node-list-rest all-inline-children)))
+        (has-leading-abbrev? (not (node-list-empty? leading-abbrev)))
+        (xreflabel           (if (or has-leading-abbrev? biblio-number)
+                                 #f
+                                 (attribute-string (normalize "xreflabel")))))
+    (make display-group
+      (make paragraph
+       space-before: %para-sep%
+       space-after: %para-sep%
+       start-indent: (+ (inherited-start-indent) 2pi)
+       first-line-start-indent: -2pi
+
+       (if (or biblio-number xreflabel has-leading-abbrev?)
+           (make sequence
+             (literal "[")
+
+             (if biblio-number 
+                 (literal (number->string (bibentry-number (current-node))))
+                 (empty-sosofo))
+       
+             (if xreflabel
+                 (literal xreflabel)
+                 (empty-sosofo))
+       
+             (if has-leading-abbrev?
+                 (with-mode biblioentry-inline-mode 
+                   (process-node-list leading-abbrev))
+                 (empty-sosofo))
+
+             (literal "]\no-break-space;"))
+           (empty-sosofo))
+       
+       (let loop ((nl inline-children))
+         (if (node-list-empty? nl)
+             (empty-sosofo)
+             (make sequence
+               (with-mode biblioentry-inline-mode
+                 (process-node-list (node-list-first nl)))
+               (if (node-list-empty? (node-list-rest nl))
+                   (biblioentry-inline-end block-children)
+                   (biblioentry-inline-sep (node-list-first nl)
+                                         (node-list-rest nl)))
+               (loop (node-list-rest nl))))))
+
+      (make display-group
+       start-indent: (+ (inherited-start-indent) 2pi)
+       (let loop ((nl block-children))
+         (if (node-list-empty? nl)
+             (empty-sosofo)
+             (make sequence
+               (with-mode biblioentry-block-mode
+                 (process-node-list (node-list-first nl)))
+               (if (node-list-empty? (node-list-rest nl))
+                   (biblioentry-block-end)
+                   (biblioentry-block-sep (node-list-first nl)
+                                          (node-list-rest nl)))
+               (loop (node-list-rest nl)))))))))
+
+(mode biblioentry-inline-mode
+  (element abbrev
+    (make sequence
+      (process-children)))
+
+  (element affiliation
+    (let ((inline-children (node-list-filter-by-not-gi 
+                           (children (current-node))
+                           (list (normalize "address")))))
+      (let loop ((nl inline-children))
+       (if (node-list-empty? nl)
+           (empty-sosofo)
+           (make sequence
+             (process-node-list (node-list-first nl))
+             (if (node-list-empty? (node-list-rest nl))
+                 (empty-sosofo)
+                 (literal ", "))
+             (loop (node-list-rest nl)))))))
+
+  (element artpagenums
+    (make sequence
+      (process-children)))
+
+  (element author
+    (literal (author-list-string)))
+
+  (element authorgroup
+    (process-children))
+
+  (element authorinitials
+    (make sequence
+      (process-children)))
+
+  (element collab
+    (let* ((nl (children (current-node)))
+          (collabname (node-list-first nl))
+          (affil (node-list-rest nl)))
+      (make sequence
+       (process-node-list collabname)
+       (if (node-list-empty? affil)
+           (empty-sosofo)
+           (let loop ((nl affil))
+             (if (node-list-empty? nl)
+                 (empty-sosofo)
+                 (make sequence
+                   (literal ", ")
+                   (process-node-list (node-list-first nl))
+                   (loop (node-list-rest nl)))))))))
+
+  (element (collab collabname)
+    (process-children))
+
+  (element confgroup
+    (let ((inline-children (node-list-filter-by-not-gi 
+                           (children (current-node))
+                           (list (normalize "address")))))
+      (let loop ((nl inline-children))
+       (if (node-list-empty? nl)
+           (empty-sosofo)
+           (make sequence
+             (process-node-list (node-list-first nl))
+             (if (node-list-empty? (node-list-rest nl))
+                 (empty-sosofo)
+                 (literal ", "))
+             (loop (node-list-rest nl)))))))
+
+  (element contractnum
+    (process-children))
+
+  (element contractsponsor
+    (process-children))
+
+  (element contrib
+    (process-children))
+
+  (element copyright
+    ;; Just print the year(s)
+    (let ((years (select-elements (children (current-node))
+                                 (normalize "year"))))
+      (process-node-list years)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element corpauthor
+    (make sequence
+      (process-children)))
+
+  (element corpname
+    (make sequence
+      (process-children)))
+
+  (element date
+    (make sequence
+      (process-children)))
+
+  (element edition
+    (make sequence
+      (process-children)))
+
+  (element editor
+    (make sequence
+      (literal (gentext-edited-by))
+      (literal " ")
+      (literal (author-list-string))))
+
+  (element firstname
+    (make sequence
+      (process-children)))
+
+  (element honorific
+    (make sequence
+      (process-children)))
+
+  (element invpartnumber
+    (make sequence
+      (process-children)))
+
+  (element isbn
+    (make sequence
+      (process-children)))
+
+  (element issn
+    (make sequence
+      (process-children)))
+
+  (element issuenum
+    (make sequence
+      (process-children)))
+
+  (element lineage
+    (make sequence
+      (process-children)))
+
+  (element orgname
+    (make sequence
+      (process-children)))
+
+  (element othercredit
+    (literal (author-list-string)))
+
+  (element othername
+    (make sequence
+      (process-children)))
+
+  (element pagenums
+    (make sequence
+      (process-children)))
+
+  (element productname
+    (make sequence
+      ($charseq$)
+; this is actually a problem since "trade" is the default value for
+; the class attribute. we can put this back in in DocBook 5.0, when
+; class becomes #IMPLIED
+;      (if (equal? (attribute-string "class") (normalize "trade"))
+;        (literal "\trade-mark-sign;")
+;        (empty-sosofo))
+      ))
+  
+  (element productnumber
+    (make sequence
+      (process-children)))
+
+  (element pubdate
+    (make sequence
+      (process-children)))
+
+  (element publisher
+    (let ((pubname (select-elements (children (current-node))
+                                   (normalize "publishername")))
+         (cities  (select-elements (descendants (current-node))
+                                   (normalize "city"))))
+    (make sequence
+      (process-node-list pubname)
+      (if (node-list-empty? cities)
+         (empty-sosofo)
+         (literal ", "))
+      (process-node-list cities))))
+
+  (element publishername
+    (make sequence
+      (process-children)))
+
+  (element (publisher address city)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element pubsnumber
+    (make sequence
+      (process-children)))
+
+  (element releaseinfo
+    (make sequence
+      (process-children)))
+
+  (element seriesvolnums
+    (make sequence
+      (process-children)))
+
+  (element subtitle
+    (make sequence
+      font-posture: 'italic
+      (process-children)))
+
+  (element surname
+    (make sequence
+      (process-children)))
+
+  (element title
+    (make sequence
+      font-posture: 'italic
+      (process-children)))
+
+  (element titleabbrev
+    (make sequence
+      (process-children)))
+
+  (element volumenum
+    (make sequence
+      (process-children)))
+
+  (element (bibliomixed title) 
+      (make sequence
+       font-posture: 'italic
+       (process-children)))
+
+  
+  (element (bibliomixed subtitle) 
+    (make sequence
+      font-posture: 'italic
+      (process-children)))
+
+  (element (biblioset title)
+    (let ((rel (case-fold-up 
+               (inherited-attribute-string (normalize "relation")))))
+      (cond
+       ((equal? rel "ARTICLE") (make sequence
+                                (literal (gentext-start-quote))
+                                (process-children)
+                                (literal (gentext-end-quote))))
+       (else (make sequence
+              font-posture: 'italic
+              (process-children))))))
+
+  (element (bibliomset title)
+    (let ((rel (case-fold-up 
+               (inherited-attribute-string (normalize "relation")))))
+      (cond
+       ((equal? rel "ARTICLE") (make sequence
+                                (literal (gentext-start-quote))
+                                (process-children)
+                                (literal (gentext-end-quote))))
+       (else        (make sequence
+                     font-posture: 'italic
+                     (process-children))))))
+)
+
+(mode biblioentry-block-mode
+  (element abstract
+    (make display-group
+      (process-children)))
+
+  (element (abstract title)
+    (make paragraph
+      font-weight: 'bold
+      (process-children)))
+
+  (element address
+    ($linespecific-display$ %indent-address-lines% %number-address-lines%))
+
+  (element authorblurb
+    (make display-group
+      (process-children)))
+
+  (element printhistory
+    (make display-group
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       font-weight: 'bold
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (make table-column
+         column-number: 1
+         width: (/ (- %body-width% (inherited-start-indent)) 3))
+       (make table-column
+         column-number: 2
+         width: (/ (- %body-width% (inherited-start-indent)) 3))
+       (make table-column
+         column-number: 3
+         width: (/ (- %body-width% (inherited-start-indent)) 3))
+       (process-children))))
+
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node))
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (node-list-filter-by-gi
+                     (descendants (current-node))
+                     (list (normalize "revremark")
+                           (normalize "revdescription")))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 (make sequence
+                   (literal (gentext-element-name-space (current-node)))
+                   (process-node-list revnumber)))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           (if (not (node-list-empty? revdate))
+             (make paragraph
+               (process-node-list revdate))
+             (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 (make sequence
+                   (literal (gentext-revised-by))
+                   (process-node-list revauthor)))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           (if (not (node-list-empty? revremark))
+               (make paragraph
+                 space-after: %block-sep%
+                 (process-node-list revremark))
+               (empty-sosofo)))))))
+
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesinfo
+    ;; This is a nearly biblioentry recursively...
+    (let* ((expanded-children   (expand-children 
+                                (children (current-node))
+                                (biblioentry-flatten-elements)))
+          (all-inline-children (if %biblioentry-in-entry-order%
+                                   (titlepage-gi-list-by-nodelist
+                                    (biblioentry-inline-elements)
+                                    expanded-children)
+                                   (titlepage-gi-list-by-elements
+                                    (biblioentry-inline-elements)
+                                    expanded-children)))
+          (block-children      (if %biblioentry-in-entry-order%
+                                   (titlepage-gi-list-by-nodelist
+                                    (biblioentry-block-elements)
+                                    expanded-children)
+                                   (titlepage-gi-list-by-elements
+                                    (biblioentry-block-elements)
+                                    expanded-children)))
+          (inline-children     all-inline-children))
+      (make display-group
+       (make paragraph
+         space-before: %para-sep%
+         space-after: %para-sep%
+         start-indent: (+ (inherited-start-indent) 2pi)
+         first-line-start-indent: -2pi
+         
+         (let loop ((nl inline-children))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (with-mode biblioentry-inline-mode
+                   (process-node-list (node-list-first nl)))
+                 (if (node-list-empty? (node-list-rest nl))
+                     (biblioentry-inline-end block-children)
+                     (biblioentry-inline-sep (node-list-first nl)
+                                             (node-list-rest nl)))
+                 (loop (node-list-rest nl))))))
+       
+       (make display-group
+         start-indent: (+ (inherited-start-indent) 2pi)
+         (let loop ((nl block-children))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (with-mode biblioentry-block-mode
+                   (process-node-list (node-list-first nl)))
+                 (if (node-list-empty? (node-list-rest nl))
+                     (biblioentry-block-end)
+                     (biblioentry-block-sep (node-list-first nl)
+                                            (node-list-rest nl)))
+                 (loop (node-list-rest nl)))))))))
+)
+
+(element bibliomixed 
+  (let* ((all-inline-children (children (current-node)))
+        (leading-abbrev      (if (equal? (normalize "abbrev")
+                                         (gi (node-list-first 
+                                              all-inline-children)))
+                                 (node-list-first all-inline-children)
+                                 (empty-node-list)))
+        (inline-children     (if (node-list-empty? leading-abbrev)
+                                 all-inline-children
+                                 (node-list-rest all-inline-children)))
+        (has-leading-abbrev? (not (node-list-empty? leading-abbrev)))
+        (xreflabel           (if (or has-leading-abbrev? biblio-number)
+                                 #f
+                                 (attribute-string (normalize "xreflabel")))))
+    (make paragraph
+      space-before: %para-sep%
+      space-after: %para-sep%
+      start-indent: (+ (inherited-start-indent) 2pi)
+      first-line-start-indent: -2pi
+
+      (if (or biblio-number xreflabel has-leading-abbrev?)
+         (make sequence
+           (literal "[")
+
+           (if biblio-number 
+               (literal (number->string (bibentry-number (current-node))))
+               (empty-sosofo))
+           
+           (if xreflabel
+               (literal xreflabel)
+               (empty-sosofo))
+           
+           (if has-leading-abbrev?
+               (with-mode biblioentry-inline-mode 
+                 (process-node-list leading-abbrev))
+               (empty-sosofo))
+           
+           (literal "]\no-break-space;"))
+         (empty-sosofo))
+
+      (with-mode biblioentry-inline-mode
+       (process-children)))))
+
+;; ....................... BIBLIOGRAPHY ELEMENTS .......................
+
+;; These are element construction rules for bibliography elements that 
+;; may occur outside of a BIBLIOENTRY or BIBLIOMIXED.
+
+(element bibliomisc (process-children))
+(element bibliomset (process-children))
+(element biblioset (process-children))
+(element bookbiblio (process-children))
+
+(element street ($charseq$))
+(element pob ($charseq$))
+(element postcode ($charseq$))
+(element city ($charseq$))
+(element state ($charseq$))
+(element country ($charseq$))
+(element phone ($charseq$))
+(element fax ($charseq$))
+(element otheraddr ($charseq$))
+(element affiliation ($charseq$))
+(element shortaffil ($charseq$))
+(element jobtitle ($charseq$))
+(element orgdiv ($charseq$))
+(element artpagenums ($charseq$))
+
+(element author
+  (make sequence
+    (literal (author-list-string))))
+
+(element authorgroup (process-children))
+
+(element collab (process-children))
+(element collabname ($charseq$))
+(element authorinitials ($charseq$))
+(element confgroup (process-children))
+(element confdates ($charseq$))
+(element conftitle ($charseq$))
+(element confnum ($charseq$))
+(element confsponsor ($charseq$))
+(element contractnum ($charseq$))
+(element contractsponsor ($charseq$))
+
+(element copyright
+  (make paragraph
+    (make sequence
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children-trim))))
+
+(element year
+  (make sequence
+    (process-children)
+    (if (not (last-sibling? (current-node)))
+       (literal ", ")
+       (literal " "))))
+
+(element holder ($charseq$))
+
+(element corpauthor
+  (make sequence
+    (literal (author-list-string))))
+
+(element corpname ($charseq$))
+(element date ($charseq$))
+(element edition ($charseq$))
+(element editor ($charseq$))
+(element isbn ($charseq$))
+(element issn ($charseq$))
+(element invpartnumber ($charseq$))
+(element issuenum ($charseq$))
+
+(element legalnotice ($semiformal-object$))
+(element (legalnotice title) (empty-sosofo))
+
+(element modespec (empty-sosofo))
+
+(element orgname ($charseq$))
+
+(element othercredit
+  (make sequence
+    (literal (author-list-string))))
+
+(element pagenums ($charseq$))
+(element contrib ($charseq$))
+
+(element firstname ($charseq$))
+(element honorific ($charseq$))
+(element lineage ($charseq$))
+(element othername ($charseq$))
+(element surname ($charseq$))
+
+(element printhistory (empty-sosofo))
+
+(element productname
+  (make sequence
+    ($charseq$)
+; this is actually a problem since "trade" is the default value for
+; the class attribute. we can put this back in in DocBook 5.0, when
+; class becomes #IMPLIED
+;    (if (equal? (attribute-string "class") (normalize "trade"))
+;      (literal "\trade-mark-sign;")
+;      (empty-sosofo))
+))
+
+(element productnumber ($charseq$))
+(element pubdate ($charseq$))
+(element publisher (process-children))
+(element publishername ($charseq$))
+(element pubsnumber ($charseq$))
+(element releaseinfo (empty-sosofo))
+(element revision ($charseq$))
+(element revnumber ($charseq$))
+(element revremark ($charseq$))
+(element revdescription ($block-container$))
+(element seriesvolnums ($charseq$))
+(element volumenum ($charseq$))
+
+;; The (element (bookinfo revhistory)) construction rule is in dbinfo.dsl
+;; It calls $book-revhistory$...
+(define ($book-revhistory$)
+  (make sequence
+    (make paragraph
+      use: title-style
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      space-before: (* (HSIZE 3) %head-before-factor%)
+      space-after: (* (HSIZE 1) %head-before-factor%)
+      (literal (gentext-element-name (current-node))))
+    (make table
+      before-row-border: #f
+      (process-children))))
+
+(element (revhistory revision)
+  (let ((revnumber (select-elements (descendants (current-node))
+                                   (normalize "revnumber")))
+       (revdate   (select-elements (descendants (current-node))
+                                   (normalize "date")))
+       (revauthor (select-elements (descendants (current-node))
+                                   (normalize "authorinitials")))
+       (revremark (node-list-filter-by-gi
+                   (descendants (current-node))
+                   (list (normalize "revremark")
+                         (normalize "revdescription")))))
+    (make sequence
+      (make table-row
+       (make table-cell
+         column-number: 1
+         n-columns-spanned: 1
+         n-rows-spanned: 1
+         (if (not (node-list-empty? revnumber))
+             (make paragraph
+               (make sequence
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber)))
+             (empty-sosofo)))
+       (make table-cell
+         column-number: 2
+         n-columns-spanned: 1
+         n-rows-spanned: 1
+         (if (not (node-list-empty? revdate))
+             (make paragraph
+               (process-node-list revdate))
+             (empty-sosofo)))
+       (make table-cell
+         column-number: 3
+         n-columns-spanned: 1
+         n-rows-spanned: 1
+         (if (not (node-list-empty? revauthor))
+             (make paragraph
+               (make sequence
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor)))
+             (empty-sosofo))))
+      (make table-row
+       cell-after-row-border: #f
+       (make table-cell
+         column-number: 1
+         n-columns-spanned: 3
+         n-rows-spanned: 1
+         (if (not (node-list-empty? revremark))
+             (make paragraph
+               space-after: %block-sep%
+               (process-node-list revremark))
+             (empty-sosofo)))))))
+
+(element (revision revnumber) (process-children-trim))
+(element (revision date) (process-children-trim))
+(element (revision authorinitials) (process-children-trim))
+(element (revision revremark) (process-children-trim))
+(element (revision revdescription) (process-children))
diff --git a/print/dbblock.dsl b/print/dbblock.dsl
new file mode 100644 (file)
index 0000000..4ee4912
--- /dev/null
@@ -0,0 +1,689 @@
+;; $Id: dbblock.dsl,v 1.13 2004/09/14 09:49:58 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(element revhistory ($book-revhistory$))
+
+(element highlights ($block-container$))
+
+(element (para blockquote)
+  (let* ((attrib       (select-elements (children (current-node))
+                                       (normalize "attribution")))
+        (paras        (node-list-filter-by-not-gi
+                       (children (current-node))
+                       (list (normalize "attribution")))))
+    (make sequence
+      (make paragraph
+       first-line-start-indent: 0pt ;; workaround a bug/feature?
+       ;; W/o the preceding line, the first-line-start-indent of the enclosing
+       ;; paragraph will apply to the paragraphs in this blockquote which is
+       ;; probably not wanted..
+       font-size: (* %bf-size% %smaller-size-factor%)
+       line-spacing: (* %bf-size% %line-spacing-factor%
+                        %smaller-size-factor%)
+       space-before: %para-sep%
+        start-indent: (+ (inherited-start-indent) %blockquote-start-indent%)
+        end-indent: %blockquote-end-indent%
+       (process-node-list paras))
+      (if (node-list-empty? attrib)
+         (empty-sosofo)
+         (make paragraph
+           font-size: (* %bf-size% %smaller-size-factor%)
+           line-spacing: (* %bf-size% %line-spacing-factor%
+                          %smaller-size-factor%)
+           space-before: 0pt
+           end-indent: 1em
+           quadding: 'end
+           (make sequence
+             (literal "\em-dash;")
+             (process-node-list attrib)))))))
+
+(element blockquote
+  (let* ((attrib       (select-elements (children (current-node))
+                                       (normalize "attribution")))
+        (paras        (node-list-filter-by-not-gi
+                       (children (current-node))
+                       (list (normalize "attribution")))))
+    (make sequence
+      (make paragraph
+       font-size: (* %bf-size% %smaller-size-factor%)
+       line-spacing: (* %bf-size% %line-spacing-factor%
+                        %smaller-size-factor%)
+       space-before: %para-sep%
+        start-indent: (+ (inherited-start-indent) %blockquote-start-indent%)
+        end-indent: %blockquote-end-indent%
+       (process-node-list paras))
+      (if (node-list-empty? attrib)
+         (empty-sosofo)
+         (make paragraph
+           font-size: (* %bf-size% %smaller-size-factor%)
+           line-spacing: (* %bf-size% %line-spacing-factor%
+                            %smaller-size-factor%)
+           space-before: 0pt
+           end-indent: 1em
+           quadding: 'end
+           (make sequence
+             (literal "\em-dash;")
+             (process-node-list attrib)))))))
+
+(element (blockquote para)
+  (if (absolute-last-sibling? (current-node))
+      (make paragraph
+       space-before: %para-sep%
+       space-after: 0pt
+       quadding: %default-quadding%
+       (process-children-trim))
+      ($paragraph$)))
+
+(element epigraph
+  (let* ((addln-indent %epigraph-start-indent%)
+        (attrib       (select-elements (children (current-node))
+                                       (normalize "attribution")))
+        (paras        (node-list-filter-by-not-gi
+                       (children (current-node))
+                       (list (normalize "attribution")))))
+    (make display-group
+      start-indent: (+ %body-start-indent% addln-indent)
+      end-indent: %epigraph-end-indent%
+      font-posture: 'italic
+      (process-node-list paras)
+      (if (node-list-empty? attrib)
+         (empty-sosofo)
+         (make paragraph
+           space-before: 0pt
+           quadding: 'end
+           (process-node-list attrib))))))
+
+(element attribution
+  ($charseq$))
+
+(element (epigraph para)
+  (if (absolute-last-sibling? (current-node))
+      (make paragraph
+       space-before: %para-sep%
+       space-after: 0pt
+       quadding: %default-quadding%
+       (process-children-trim))
+      ($paragraph$)))
+
+(element para ($paragraph$))
+(element simpara ($paragraph$))
+
+(element formalpara ($para-container$))
+
+(element (formalpara title) ($runinhead$))
+(element (formalpara para) (make sequence (process-children-trim)))
+
+(element sidebar 
+  (make box
+    display?: #t
+    box-type: 'border
+    line-thickness: 1pt
+    start-indent: (inherited-start-indent)
+    end-indent: (inherited-end-indent)
+    (if (node-list-empty? (select-elements (children (current-node))
+                                          (normalize "title")))
+       (make display-group
+         start-indent: 2pt
+         end-indent: 2pt
+         space-before: %block-sep%
+         space-after: %block-sep%
+         (process-children))
+       (make display-group
+         start-indent: 2pt
+         end-indent: 2pt
+         space-before: 0pt
+         space-after: %block-sep%
+         (make sequence
+           (let* ((object (current-node))
+                  (title  (select-elements (children object) 
+                                           (normalize "title")))
+                  (nsep   (gentext-label-title-sep (gi object))))
+             (make paragraph
+               font-weight: 'bold
+               space-before: %block-sep%
+               space-after: %para-sep%
+               keep-with-next?: #t
+               (literal (gentext-element-name object))
+               (if (string=? (element-label object) "")
+                   (literal nsep)
+                   (literal " " (element-label object) nsep))
+               (process-node-list (children title))))
+           (process-children))))))
+
+(element (sidebar title) (empty-sosofo))
+
+(element abstract 
+  (make display-group
+    space-before: %block-sep%
+    space-after: %block-sep%
+    start-indent: %body-start-indent%
+    (process-children)))
+
+(element authorblurb ($block-container$))
+
+(element ackno ($paragraph$))
+
+(define ($inline-object$)
+  (process-children))
+
+(define ($informal-object$ #!optional (rule-before? #f) (rule-after? #f))
+  (make display-group
+    start-indent: (+ %block-start-indent% (inherited-start-indent))
+    space-before: %block-sep%
+    space-after: %block-sep%
+    (if rule-before?
+       (make rule
+         orientation: 'horizontal
+         line-thickness: %object-rule-thickness%
+         display-alignment: 'center
+         space-after: (/ %block-sep% 2)
+         keep-with-next?: #t)
+       (empty-sosofo))
+    (process-children)
+    (if rule-after?
+       (make rule
+         orientation: 'horizontal
+         line-thickness: %object-rule-thickness%
+         display-alignment: 'center
+         space-before: (/ %block-sep% 2)
+         keep-with-previous?: #t)
+       (empty-sosofo))))
+
+(define (object-title-after #!optional (node (current-node))) 
+  (if (member (gi node) ($object-titles-after$))
+      #t
+      #f))
+
+(define (float-object node)
+  ;; you could redefine this to make only figures float, or only tables,
+  ;; or whatever...
+  #t)
+
+(define (named-formal-objects)
+  (list (normalize "figure")
+       (normalize "table")
+       (normalize "example")
+       (normalize "equation")))
+
+(define ($formal-object$ #!optional (rule-before? #f) (rule-after? #f))
+  (let* ((object-sosofo (make paragraph
+                         space-before: 0pt
+                         space-after: 0pt
+                         start-indent: (+ %block-start-indent% 
+                                          (inherited-start-indent))
+                         keep-with-next?: (object-title-after)
+                         (process-children)))
+        (title-sosofo  (with-mode formal-object-title-mode
+                         (process-node-list 
+                          (select-elements (children (current-node))
+                                           (normalize "title")))))
+        (sosofo        (make display-group
+                         space-before: %block-sep%
+                         space-after: %block-sep%
+                         (if rule-before?
+                             (make rule
+                               orientation: 'horizontal
+                               line-thickness: %object-rule-thickness%
+                               display-alignment: 'center
+                               space-after: (/ %block-sep% 2)
+                               keep-with-next?: #t)
+                             (empty-sosofo))
+                         (if (object-title-after)
+                           (make sequence
+                             object-sosofo
+                             title-sosofo)
+                           (make sequence
+                             title-sosofo
+                             object-sosofo))
+                         (if rule-after?
+                             (make rule
+                               orientation: 'horizontal
+                               line-thickness: %object-rule-thickness%
+                               display-alignment: 'center
+                               space-before: (/ %block-sep% 2)
+                               keep-with-previous?: #t)
+                             (empty-sosofo)))))
+    (if (and (equal? (print-backend) 'tex)
+            formal-object-float
+            (float-object (current-node)))
+       (make page-float
+         sosofo)
+       sosofo)))
+
+(define ($semiformal-object$)
+  (if (node-list-empty? (select-elements (children (current-node))
+                                        (normalize "title")))
+      ($informal-object$)
+      ($formal-object$)))
+
+(mode formal-object-title-mode
+  (element title
+    (let* ((object (parent (current-node)))
+          (nsep   (gentext-label-title-sep (gi object))))
+      (make paragraph
+       font-weight: %formal-object-title-font-weight%
+       space-before: (if (object-title-after (parent (current-node)))
+                         %para-sep%
+                         0pt)
+       space-after: (if (object-title-after (parent (current-node)))
+                        0pt
+                        %para-sep%)
+       start-indent: (+ %block-start-indent% (inherited-start-indent))
+       keep-with-next?: (not (object-title-after (parent (current-node))))
+       (if (member (gi object) (named-formal-objects))
+           (make sequence
+             (literal (gentext-element-name object))
+             (if (string=? (element-label object) "")
+                 (literal nsep)
+                 (literal " " (element-label object) nsep)))
+           (empty-sosofo))
+       (process-children))))
+)
+
+(element example
+  ($formal-object$ %example-rules% %example-rules%))
+
+(element (example title) (empty-sosofo)) ; don't show caption below example
+
+(element informalexample
+  ($informal-object$ %informalexample-rules% %informalexample-rules%))
+
+(element informalfigure
+  ($informal-object$ %informalfigure-rules% %informalfigure-rules%))
+
+(element (figure title) (empty-sosofo)) ; don't show caption below figure
+
+(element figure
+  ;; FIXME: this is a bit crude...
+  (let* ((mediaobj (select-elements (children (current-node))
+                                   (normalize "mediaobject")))
+        (imageobj (select-elements (children mediaobj)
+                                   (normalize "imageobject")))
+        (image    (select-elements (children imageobj)
+                                   (normalize "imagedata")))
+        (graphic  (select-elements (children (current-node))
+                                   (normalize "graphic")))
+        (align    (if (node-list-empty? image)
+                      (if (node-list-empty? graphic)
+                          #f
+                          (attribute-string (normalize "align")
+                                            (node-list-first graphic)))
+                      (attribute-string (normalize "align") (node-list-first image))))
+        (dalign  (cond ((equal? align (normalize "center"))
+                        'center)
+                       ((equal? align (normalize "right"))
+                        'end)
+                       (else
+                        'start))))
+    (if align
+       (make display-group
+         quadding: dalign
+         ($formal-object$ %figure-rules% %figure-rules%))
+       ($formal-object$ %figure-rules% %figure-rules%))))
+
+(element informaltable 
+  ($informal-object$ %informaltable-rules% %informaltable-rules%))
+
+(element table 
+  ;; can't be a "formal-object" because it requires special handling for
+  ;; the PGWIDE attribute
+  (let* ((nsep   (gentext-label-title-sep (gi)))
+        (pgwide (attribute-string (normalize "pgwide")))
+        (indent (lambda () (if (not (equal? pgwide "1"))
+                               (+ %block-start-indent% 
+                                  (inherited-start-indent))
+                               %cals-pgwide-start-indent%)))
+        (rule-before? %table-rules%)
+        (rule-after? %table-rules%)
+        (title-sosofo (make paragraph
+                        font-weight: %table-title-font-weight%
+                        space-before: (if (object-title-after)
+                                          %para-sep%
+                                          0pt)
+                        space-after: (if (object-title-after)
+                                         0pt
+                                         %para-sep%)
+                        start-indent: (indent)
+                         keep-with-next?: (not (object-title-after))
+                         (literal (gentext-element-name (current-node)))
+                         (if (string=? (element-label) "")
+                             (literal nsep)
+                             (literal " " (element-label) nsep))
+                         (element-title-sosofo)))
+         (table-sosofo (make display-group
+                         font-weight: 'bold
+                         space-before: 0pt
+                         space-after: 0pt
+                         start-indent: (indent)
+                         keep-with-next?: (object-title-after)
+                         (process-children)))
+         (table (make display-group
+                  start-indent: (+ %block-start-indent%
+                                   (inherited-start-indent))
+                  space-before: %block-sep%
+                  space-after: %block-sep%
+                  (if rule-before?
+                      (make rule
+                        orientation: 'horizontal
+                        line-thickness: %object-rule-thickness%
+                        display-alignment: 'center
+                        space-after: (/ %block-sep% 2)
+                        keep-with-next?: #t)
+                      (empty-sosofo))
+                  (if (object-title-after)
+                      (make sequence
+                        table-sosofo
+                        title-sosofo)
+                      (make sequence
+                        title-sosofo
+                        table-sosofo))
+                  (if rule-after?
+                      (make rule
+                        orientation: 'horizontal
+                        line-thickness: %object-rule-thickness%
+                        display-alignment: 'center
+                        space-before: (/ %block-sep% 2)
+                        keep-with-previous?: #t)
+                      (empty-sosofo)))))
+    (if (and (equal? (print-backend) 'tex)
+            formal-object-float
+            (float-object (current-node)))
+       (make page-float
+         table)
+       table)))
+
+(element (table title) (empty-sosofo))
+
+(element comment
+  (if %show-comments%
+      (make paragraph
+       start-indent: 0pt
+       first-line-start-indent: -10pt
+       font-posture: 'italic
+       font-size: (* (inherited-font-size) 0.9)
+       (make sequence
+         (make line-field 
+           field-width: 10pt
+           quadding: 'end
+           (literal "*"))
+         (process-children)))
+      (empty-sosofo)))
+
+;; In DocBook V4.0 comment became remark
+(element remark
+  (if %show-comments%
+      (make paragraph
+       start-indent: 0pt
+       first-line-start-indent: -10pt
+       font-posture: 'italic
+       font-size: (* (inherited-font-size) 0.9)
+       (make sequence
+         (make line-field 
+           field-width: 10pt
+           quadding: 'end
+           (literal "*"))
+         (process-children)))
+      (empty-sosofo)))
+
+;; ======================================================================
+;; Handle footnotes in the body...
+
+(define %footnote-field-width% 1.6em)
+(define %footnote-number-restarts% #t)
+(define %footnote-endnote-break% #f)
+
+(define (count-footnote? footnote)
+  ;; don't count footnotes in comments (unless you're showing comments)
+  ;; or footnotes in tables which are handled locally in the table
+  ;; or footnotes for empty ulinks which don't need a footnote
+  (if (or (and (has-ancestor-member? footnote (list (normalize "comment")))
+              (not %show-comments%))
+         (has-ancestor-member? footnote (list (normalize "tgroup")))
+          (and (has-ancestor-member? footnote (list (normalize "ulink")))
+               (node-list-empty? (children footnote))
+               %footnote-ulinks%))
+      #f
+      #t))
+
+(define (footnote-number footnote)
+  ;; This is more complex than it at first appears because footnotes 
+  ;; can be in Comments which may be suppressed.
+  (let* ((root-list (if %footnote-number-restarts%
+                           (component-element-list)
+                           (list (normalize "book"))))
+        (footnotes (if %footnote-ulinks%
+                       (component-list-descendant-node-list
+                        footnote
+                        (list (normalize "ulink") (normalize "footnote"))
+                        root-list)
+                       (component-descendant-node-list
+                        footnote
+                        root-list)))
+        (fn-number (let loop ((nl footnotes) (num 1))
+                     (if (node-list-empty? nl)
+                         0
+                         (if (node-list=? (node-list-first nl) footnote)
+                             num
+                             (if (count-footnote? (node-list-first nl))
+                                 (loop (node-list-rest nl) (+ num 1))
+                                 (loop (node-list-rest nl) num)))))))
+    (format-number fn-number "1")))
+             
+(element footnote 
+  (if (and (equal? (print-backend) 'tex) bop-footnotes)
+      (make sequence
+       ($ss-seq$ + (literal (footnote-number (current-node))))
+       (make page-footnote (process-children)))
+      ($ss-seq$ + (literal (footnote-number (current-node))))))
+
+(element (footnote para)
+  ;; Note: this can only get called if the backend is 'tex
+  ;; If the backend is anything else, footnote never calls process
+  ;; children except in endnote-mode, so this doesn't get called.
+  (let ((fnnum (footnote-number (parent (current-node)))))
+    (if (= (child-number) 1)
+       (make paragraph
+         use: default-text-style
+         font-size: (* %footnote-size-factor% %bf-size%)
+         quadding: %default-quadding%
+         line-spacing: (* (* %footnote-size-factor% %bf-size%)
+                          %line-spacing-factor%)
+         space-before: %para-sep%
+         space-after: %para-sep%
+         start-indent: %footnote-field-width%
+         first-line-start-indent: (- %footnote-field-width%)
+         lines: 'wrap                  ; doesn't seem to work
+         (make line-field
+           field-width: %footnote-field-width%
+           (literal fnnum 
+                    (gentext-label-title-sep (normalize "footnote"))))
+         (process-children-trim))
+       (make paragraph
+         use: default-text-style
+         font-size: (* %footnote-size-factor% %bf-size%)
+         quadding: %default-quadding%
+         line-spacing: (* (* %footnote-size-factor% %bf-size%)
+                          %line-spacing-factor%)
+         space-before: %para-sep%
+         space-after: %para-sep%
+         start-indent: %footnote-field-width%
+         lines: 'wrap                  ; doesn't seem to work
+         (process-children-trim)))))
+
+(define (non-table-footnotes footnotenl)
+  (let loop ((nl footnotenl) (result (empty-node-list)))
+    (if (node-list-empty? nl)
+       result
+       (if (has-ancestor-member? (node-list-first nl) 
+                                 (list (normalize "tgroup")))
+           (loop (node-list-rest nl) 
+                 result)
+           (loop (node-list-rest nl)
+                 (node-list result (node-list-first nl)))))))
+
+(define (make-endnote-header)
+  (let ((headsize (if (equal? (gi) (normalize "refentry"))
+                     (HSIZE 2)
+                     (HSIZE 3)))
+       (indent   (lambda () (if (equal? (gi) (normalize "refentry"))
+                                %body-start-indent%
+                                0pt))))
+    (make paragraph
+      break-before: %footnote-endnote-break%
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      font-size: headsize
+      line-spacing: (* headsize %line-spacing-factor%)
+      space-before: (* headsize %head-before-factor%)
+      space-after: (* headsize %head-after-factor%)
+      start-indent: (indent)
+      quadding: 'start
+      keep-with-next?: #t
+      (literal (gentext-endnotes)))))
+
+(define (make-endnotes #!optional (node (current-node)))
+  (let* ((allfootnotes (if %footnote-ulinks%
+                          (node-list-filter-by-gi
+                           (descendants node)
+                           (list (normalize "footnote") (normalize "ulink")))
+                          (select-elements (descendants node) 
+                                           (normalize "footnote"))))
+        (footnotes    (let loop ((nl (non-table-footnotes allfootnotes))
+                                 (fnlist (empty-node-list)))
+                        (if (node-list-empty? nl)
+                            fnlist
+                            (if (count-footnote? (node-list-first nl))
+                                (loop (node-list-rest nl) 
+                                      (node-list fnlist (node-list-first nl)))
+                                (loop (node-list-rest nl)
+                                      fnlist))))))
+    (if (or (node-list-empty? footnotes) 
+           (and (equal? (print-backend) 'tex)
+                bop-footnotes))
+       (empty-sosofo)
+       (if (or (equal? (gi node) (normalize "reference"))
+               (equal? (gi node) (normalize "part")))
+           (empty-sosofo) ;; Each RefEntry/Component does its own...
+           (make sequence
+             (make-endnote-header)
+             (with-mode endnote-mode
+               (process-node-list footnotes)))))))
+
+(mode endnote-mode
+  (element footnote
+    (make sequence
+      start-indent: %body-start-indent%
+      (process-children)))
+
+  (element (footnote para)
+    (let ((fnnum  (footnote-number (parent (current-node)))))
+      (if (= (child-number) 1)
+         (make paragraph
+; I'm not sure this really makes sense in the endnote case...
+;          font-size: (* %footnote-size-factor% %bf-size%)
+;          line-spacing: (* (* %footnote-size-factor% %bf-size%)
+;                           %line-spacing-factor%)
+           space-before: %para-sep%
+           start-indent: (+ (inherited-start-indent) %footnote-field-width%)
+           first-line-start-indent: (- %footnote-field-width%)
+           (make line-field
+             field-width: %footnote-field-width%
+             (literal fnnum 
+                      (gentext-label-title-sep (normalize "footnote"))))
+           (process-children-trim))
+         (make paragraph
+           font-size: (* %footnote-size-factor% %bf-size%)
+           line-spacing: (* (* %footnote-size-factor% %bf-size%)
+                            %line-spacing-factor%)
+           start-indent: (+ (inherited-start-indent) %footnote-field-width%)
+           space-before: %para-sep%
+           (process-children-trim)))))
+
+  (element ulink
+    (if %footnote-ulinks%
+       (let ((fnnum  (footnote-number (current-node))))
+         (make paragraph
+;          font-size: (* %footnote-size-factor% %bf-size%)
+;          line-spacing: (* (* %footnote-size-factor% %bf-size%)
+;                           %line-spacing-factor%)
+           space-before: %para-sep%
+           start-indent: (+ (inherited-start-indent) %footnote-field-width%)
+           first-line-start-indent: (- %footnote-field-width%)
+           (make line-field
+             field-width: %footnote-field-width%
+             (literal fnnum 
+                      (gentext-label-title-sep (normalize "footnote"))))
+           (literal (attribute-string "url"))))
+       (next-match))))
+
+;; ======================================================================
+;; Handle table footnotes
+
+(define (table-footnote-number footnote)
+  (format-number (component-child-number footnote 
+                                        ($table-element-list$)) "a"))
+
+(element (entry footnote)
+  ($ss-seq$ + (literal (table-footnote-number (current-node)))))
+
+(element (entry para footnote)
+  ($ss-seq$ + (literal (table-footnote-number (current-node)))))
+
+(define (make-table-endnote-header)
+  (make paragraph
+    font-family-name: %body-font-family%
+    font-weight: 'medium
+    font-size: %bf-size%
+    start-indent: 0pt
+    quadding: 'start
+    (literal (gentext-table-endnotes))))
+
+(define (make-table-endnotes)
+  (let* ((footnotes (select-elements (descendants (current-node)) 
+                                    (normalize "footnote")))
+        (headsize (HSIZE 3))
+        (tgroup (ancestor-member (current-node) (list (normalize "tgroup"))))
+        (cols   (string->number (attribute-string (normalize "cols") tgroup))))
+    (if (node-list-empty? footnotes) 
+       (empty-sosofo)
+       (make table-row
+         (make table-cell
+           n-columns-spanned: cols
+           cell-before-row-margin: %cals-cell-before-row-margin%
+           cell-after-row-margin: %cals-cell-after-row-margin%
+           cell-before-column-margin: %cals-cell-before-column-margin%
+           cell-after-column-margin: %cals-cell-after-column-margin%
+           start-indent: %cals-cell-content-start-indent%
+           end-indent: %cals-cell-content-end-indent%
+           (make-table-endnote-header)
+           (with-mode table-footnote-mode
+             (process-node-list footnotes)))))))
+
+(mode table-footnote-mode
+  (element footnote
+    (make display-group
+      font-family-name: %body-font-family%
+      font-weight: 'medium
+      font-size: %bf-size%
+      start-indent: 0pt
+      quadding: 'start
+      (process-children)))
+
+  (element (footnote para)
+    (let ((fnnum (table-footnote-number (parent (current-node)))))
+      (if (= (child-number) 1)
+         (make paragraph
+           start-indent: %footnote-field-width%
+           first-line-start-indent: (- %footnote-field-width%)
+           (make line-field
+             field-width: %footnote-field-width%
+             (literal fnnum 
+                      (gentext-label-title-sep (normalize "footnote"))))
+           (process-children-trim))
+         (make paragraph
+           start-indent: %footnote-field-width%
+           (process-children-trim))))))
+
diff --git a/print/dbcallou.dsl b/print/dbcallou.dsl
new file mode 100644 (file)
index 0000000..e16f1c0
--- /dev/null
@@ -0,0 +1,221 @@
+;; $Id: dbcallou.dsl,v 1.4 2004/10/10 14:04:48 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; The support provided below is a little primitive because there's no way
+;; to do line-addressing in Jade.
+;;
+;; CO's are supported with the CO element or, in SCREENCO and 
+;; PROGRAMLISTINGCO only, AREAs.
+;;
+;; Notes on the use of AREAs:
+;;
+;; - Processing is very slow. Jade loops through each AREA for
+;;   every column on every line.
+;; - Only the LINECOLUMN units are supported, and they are #IMPLIED
+;; - If a COORDS only specifies a line, the %callout-default-col% will
+;;   be used for the column.
+;; - If the column is beyond the end of the line, that will work OK, but
+;;   if more than one callout has to get placed beyond the end of the same
+;;   line, that doesn't work so well.
+;; - Embedded tabs foul up the column counting.
+;; - Embedded markup fouls up the column counting.
+;; - Embedded markup with embedded line breaks fouls up the line counting.
+;; - The callout bugs occur immediately before the LINE COLUMN specified.
+;; - You can't point to an AREASET, that doesn't make any sense
+;;   since it would imply a one-to-many link
+;;
+;; There's still no support for a stylesheet drawing the callouts on a
+;; GRAPHIC, and I don't think there ever will be.
+;;
+
+(element areaspec (empty-sosofo))
+(element area (empty-sosofo))
+(element areaset (empty-sosofo))
+
+(element co
+  ($callout-mark$ (current-node)))
+
+(element programlistingco ($informal-object$))
+(element screenco ($informal-object$))
+(element graphicco ($informal-object$))
+
+(element (screenco screen) 
+  ($callout-verbatim-display$ %indent-screen-lines% %number-screen-lines%))
+
+(element (programlistingco programlisting) 
+  ($callout-verbatim-display$ %indent-programlisting-lines%
+                             %number-programlisting-lines%))
+
+;; ----------------------------------------------------------------------
+
+(define ($callout-bug$ conumber)
+  (if (and conumber %callout-fancy-bug%)
+      (case conumber
+       ((1) (literal "\dingbat-negative-circled-sans-serif-digit-one;"))
+       ((2) (literal "\dingbat-negative-circled-sans-serif-digit-two;"))
+       ((3) (literal "\dingbat-negative-circled-sans-serif-digit-three;"))
+       ((4) (literal "\dingbat-negative-circled-sans-serif-digit-four;"))
+       ((5) (literal "\dingbat-negative-circled-sans-serif-digit-five;"))
+       ((6) (literal "\dingbat-negative-circled-sans-serif-digit-six;"))
+       ((7) (literal "\dingbat-negative-circled-sans-serif-digit-seven;"))
+       ((8) (literal "\dingbat-negative-circled-sans-serif-digit-eight;"))
+       ((9) (literal "\dingbat-negative-circled-sans-serif-digit-nine;"))
+       (else (make sequence
+               font-weight: 'bold
+               (literal "(" (format-number conumber "1") ")"))))
+      (make sequence
+       font-weight: 'bold
+       (if conumber
+           (literal "(" (format-number conumber "1") ")")
+           (literal "(??)")))))
+
+(define ($callout-mark$ co)
+  ;; Print the callout mark for co
+  (if (equal? (gi co) (normalize "co"))
+      ($callout-bug$ (if (node-list-empty? co)
+                        #f
+                        (child-number co)))
+      (let ((areanum (if (node-list-empty? co)
+                        #f
+                        (if (equal? (gi (parent co)) (normalize "areaset"))
+                            (absolute-child-number (parent co))
+                            (absolute-child-number co)))))
+       ($callout-bug$ (if (node-list-empty? co)
+                          #f
+                          areanum)))))
+
+(define ($look-for-callout$ line col #!optional (eol? #f))
+  ;; Look to see if a callout should be printed at line col, and print
+  ;; it if it should
+  (let* ((areaspec (select-elements (children (parent (current-node)))
+                                   (normalize "areaspec")))
+        (areas    (expand-children (children areaspec) 
+                                   (list (normalize "areaset")))))
+    (let loop ((areanl areas))
+      (if (node-list-empty? areanl)
+         (empty-sosofo)
+         (make sequence
+           (if ($callout-area-match$ (node-list-first areanl) line col eol?)
+               ($callout-area-format$ (node-list-first areanl) line col eol?)
+               (empty-sosofo))
+           (loop (node-list-rest areanl)))))))
+
+(define ($callout-area-match$ area line col eol?)
+  ;; Does AREA area match line col?
+  (let* ((coordlist (split (attribute-string (normalize "coords") area)))
+        (aline (string->number (car coordlist)))
+        (acol  (if (null? (cdr coordlist))
+                   #f
+                   (string->number (car (cdr coordlist)))))
+        (units (if (inherited-attribute-string (normalize "units") area)
+                   (inherited-attribute-string (normalize "units") area)
+                   (normalize "linecolumn"))))
+    (and (equal? units (normalize "linecolumn"))
+        (or
+         (and (equal? line aline)
+              (equal? col acol))
+         (and (equal? line aline)
+              eol? 
+              (or (not acol) (> acol col)))))))
+
+(define ($callout-area-format$ area line col eol?)
+  ;; Format AREA area at the appropriate place
+  (let* ((coordlist (split (attribute-string (normalize "coords") area)))
+        (aline (string->number (car coordlist)))
+        (acol  (if (null? (cdr coordlist))
+                   #f
+                   (string->number (car (cdr coordlist))))))
+    (if (and (equal? line aline)
+            eol? 
+            (or (not acol) (> acol col)))
+       (make sequence
+         (let loop ((atcol col))
+           (if (>= atcol (if acol acol %callout-default-col%))
+               (empty-sosofo)
+               (make sequence
+                 (literal "\no-break-space;")
+                 (loop (+ atcol 1)))))
+         ($callout-mark$ area))
+       ($callout-mark$ area))))
+
+(define ($callout-linespecific-content$ indent line-numbers?)
+  ;; Print linespecific content in a callout with line numbers
+  (make sequence
+    ($line-start$ indent line-numbers? 1)
+    (let loop ((kl (children (current-node)))
+              (linecount 1)
+              (colcount 1)
+              (res (empty-sosofo)))
+      (if (node-list-empty? kl)
+         (sosofo-append res
+                        ($look-for-callout$ linecount colcount #t)
+                        (empty-sosofo))
+         (loop
+          (node-list-rest kl)
+          (if (char=? (node-property 'char (node-list-first kl)
+                                     default: #\U-0000) #\U-000D)
+              (+ linecount 1)
+              linecount)
+          (if (char=? (node-property 'char (node-list-first kl)
+                                     default: #\U-0000) #\U-000D)
+              1
+              (if (char=? (node-property 'char (node-list-first kl)
+                                         default: #\U-0000) #\U-0000)
+                  colcount
+                  (+ colcount 1)))
+          (let ((c (node-list-first kl)))
+            (if (char=? (node-property 'char c default: #\U-0000)
+                        #\U-000D)
+                (sosofo-append res
+                               ($look-for-callout$ linecount colcount #t)
+                               (process-node-list c)
+                               ($line-start$ indent
+                                             line-numbers?
+                                             (+ linecount 1)))
+                (sosofo-append res
+                               ($look-for-callout$ linecount colcount)
+                               (process-node-list c)))))))))
+
+(define ($callout-verbatim-display$ indent line-numbers?)
+  (let* ((width-in-chars (if (attribute-string "width")
+                            (string->number (attribute-string "width"))
+                            %verbatim-default-width%))
+        (fsize (lambda () (if (or (attribute-string (normalize "width"))
+                                  (not %verbatim-size-factor%))
+                              (/ (/ (- %text-width% (inherited-start-indent))
+                                    width-in-chars) 
+                                 0.7)
+                              (* (inherited-font-size) 
+                                 %verbatim-size-factor%))))
+        (vspace-before (if (INBLOCK?)
+                           0pt
+                           (if (INLIST?)
+                               %para-sep%
+                               %block-sep%)))
+        (vspace-after (if (INBLOCK?)
+                          0pt
+                          (if (INLIST?)
+                              0pt
+                              %block-sep%))))
+    (make paragraph
+      use: verbatim-style
+      space-before: (if (and (string=? (gi (parent)) (normalize "entry"))
+                            (absolute-first-sibling?))
+                       0pt
+                       vspace-before)
+      space-after:  (if (and (string=? (gi (parent)) (normalize "entry"))
+                            (absolute-last-sibling?))
+                       0pt
+                       vspace-after)
+      font-size: (fsize)
+      line-spacing: (* (fsize) %line-spacing-factor%)
+      start-indent: (if (INBLOCK?)
+                       (inherited-start-indent)
+                       (+ %block-start-indent% (inherited-start-indent)))
+      quadding: 'start
+      ($callout-linespecific-content$ indent line-numbers?))))
+
+;; EOF dbcallout.dsl
diff --git a/print/dbcompon.dsl b/print/dbcompon.dsl
new file mode 100644 (file)
index 0000000..17b1378
--- /dev/null
@@ -0,0 +1,520 @@
+;; $Id: dbcompon.dsl,v 1.5 2003/04/29 06:33:10 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ============================= COMPONENTS =============================
+;;
+;; in docbook, components are containers at the chapter/appendix level
+
+(define ($title-header-footer-element$)
+  (let* ((firstchild (node-list-first (children (current-node))))
+        (metainfo   (if (node-list-empty? firstchild)
+                        (empty-node-list)
+                        (if (member (gi firstchild) (info-element-list))
+                            firstchild
+                            (empty-node-list))))
+        (metatitle  (select-elements (children metainfo) (normalize "title")))
+        (metatabb   (select-elements (children metainfo) (normalize "titleabbrev")))
+        (title      (select-elements (children (current-node)) 
+                                     (normalize "title")))
+        (titleabb   (select-elements (children (current-node)) 
+                                     (normalize "titleabbrev"))))
+    (if (node-list-empty? metatabb)
+       (if (node-list-empty? titleabb)
+           (if (node-list-empty? metatitle)
+               title
+               metatitle)
+           titleabb)
+       metatabb)))
+  
+(define ($refentry-header-footer-element$)
+  (let* ((refdescriptor (node-list-first 
+                        (select-elements 
+                         (descendants (current-node)) (normalize "refdescriptor"))))
+        (refname       (node-list-first 
+                        (select-elements 
+                         (descendants (current-node)) (normalize "refname"))))
+         (refentrytitle (node-list-first 
+                        (select-elements 
+                         (descendants (current-node)) (normalize "refentrytitle")))))
+    (if (node-list-empty? refentrytitle)
+       (if (node-list-empty? refdescriptor)
+           refname
+           refdescriptor)
+       refentrytitle)))
+
+(define ($title-header-footer$)
+  (let* ((title (if (equal? (gi) (normalize "refentry"))
+                  ($refentry-header-footer-element$)
+                  ($title-header-footer-element$))))
+    (make sequence
+      font-posture: 'italic
+      (with-mode hf-mode 
+       (process-node-list title)))))
+
+(define ($page-number-header-footer$) 
+  (let ((component (ancestor-member (current-node) 
+                                   (append (division-element-list)
+                                           (component-element-list)))))
+    (make sequence
+      font-posture: 'italic
+      (literal 
+       (gentext-page)
+       (if %page-number-restart%
+          (if (or (equal? (gi component) (normalize "chapter"))
+                  (equal? (gi component) (normalize "appendix")))
+              (string-append
+               (element-label component #t)
+               (gentext-intra-label-sep "_pagenumber"))
+              "")
+          ""))
+      (page-number-sosofo))))
+
+(define (first-page-inner-header gi)
+  (empty-sosofo))
+
+(define (first-page-center-header gi)
+  (empty-sosofo))
+
+(define (first-page-outer-header gi)
+  (empty-sosofo))
+
+(define (page-inner-header gi)
+  (empty-sosofo))
+
+(define (page-center-header gi)
+  (empty-sosofo))
+
+(define (page-outer-header gi)
+  (cond
+   ((equal? (normalize gi) (normalize "dedication")) (empty-sosofo))
+   ((equal? (normalize gi) (normalize "lot")) (empty-sosofo))
+   ((equal? (normalize gi) (normalize "part")) (empty-sosofo))
+   ((equal? (normalize gi) (normalize "toc")) (empty-sosofo))
+   (else ($title-header-footer$))))
+
+(define (first-page-inner-footer gi)
+  (empty-sosofo))
+
+(define (first-page-center-footer gi)
+  (empty-sosofo))
+
+(define (first-page-outer-footer gi)
+  (cond
+   ((equal? (normalize gi) (normalize "dedication")) (empty-sosofo))
+   ((equal? (normalize gi) (normalize "part")) (empty-sosofo))
+   (else ($page-number-header-footer$))))
+
+(define (page-inner-footer gi)
+  (empty-sosofo))
+
+(define (page-center-footer gi)
+  (empty-sosofo))
+
+(define (page-outer-footer gi)
+  ($page-number-header-footer$))
+
+(define ($page-number-format$ #!optional (gi (gi)))
+  (cond
+   ((equal? (normalize gi) (normalize "toc")) "i")
+   ((equal? (normalize gi) (normalize "lot")) "i")
+   ((equal? (normalize gi) (normalize "preface")) "i")
+   (else "1")))
+
+(define ($left-header$ #!optional (gi (gi)))
+  (if-first-page
+   (if (equal? %writing-mode% 'left-to-right)
+       (first-page-inner-header gi)
+       (first-page-outer-header gi))
+   (if %two-side%
+       (if-front-page
+       (if (equal? %writing-mode% 'left-to-right)
+           (page-inner-header gi)
+           (page-outer-header gi))
+       (if (equal? %writing-mode% 'left-to-right)
+           (page-outer-header gi)
+           (page-inner-header gi)))
+       (if (equal? %writing-mode% 'left-to-right)
+          (page-inner-header gi)
+          (page-outer-header gi)))))
+
+(define ($center-header$ #!optional (gi (gi)))
+  (if-first-page
+   (first-page-center-header gi)
+   (page-center-header gi)))
+
+(define ($right-header$ #!optional (gi (gi)))
+  (if-first-page
+   (if (equal? %writing-mode% 'left-to-right)
+       (first-page-outer-header gi)
+       (first-page-inner-header gi))
+   (if %two-side%
+       (if-front-page
+       (if (equal? %writing-mode% 'left-to-right)
+           (page-outer-header gi)
+           (page-inner-header gi))
+       (if (equal? %writing-mode% 'left-to-right)
+           (page-inner-header gi)
+           (page-outer-header gi)))
+       (if (equal? %writing-mode% 'left-to-right)
+          (page-outer-header gi)
+          (page-inner-header gi)))))
+
+(define ($left-footer$ #!optional (gi (gi)))
+  (if-first-page
+   (if (equal? %writing-mode% 'left-to-right)
+       (first-page-inner-footer gi)
+       (first-page-outer-footer gi))
+   (if %two-side%
+       (if-front-page
+       (if (equal? %writing-mode% 'left-to-right)
+           (page-inner-footer gi)
+           (page-outer-footer gi))
+       (if (equal? %writing-mode% 'left-to-right)
+           (page-outer-footer gi)
+           (page-inner-footer gi)))
+       (if (equal? %writing-mode% 'left-to-right)
+          (page-inner-footer gi)
+          (page-outer-footer gi)))))
+
+(define ($center-footer$ #!optional (gi (gi)))
+  (if-first-page
+   (first-page-center-footer gi)
+   (page-center-footer gi)))
+
+(define ($right-footer$ #!optional (gi (gi)))
+  (if-first-page
+   (if (equal? %writing-mode% 'left-to-right)
+       (first-page-outer-footer gi)
+       (first-page-inner-footer gi))
+   (if %two-side%
+       (if-front-page
+       (if (equal? %writing-mode% 'left-to-right)
+           (page-outer-footer gi)
+           (page-inner-footer gi))
+       (if (equal? %writing-mode% 'left-to-right)
+           (page-inner-footer gi)
+           (page-outer-footer gi)))
+       (if (equal? %writing-mode% 'left-to-right)
+          (page-outer-footer gi)
+          (page-inner-footer gi)))))
+
+(define ($component$)
+  (make simple-page-sequence
+    page-n-columns: %page-n-columns%
+    page-number-restart?: (or %page-number-restart% 
+                             (first-chapter?))
+    page-number-format: ($page-number-format$)
+    use: default-text-style
+    left-header:   ($left-header$)
+    center-header: ($center-header$)
+    right-header:  ($right-header$)
+    left-footer:   ($left-footer$)
+    center-footer: ($center-footer$)
+    right-footer:  ($right-footer$)
+    start-indent: %body-start-indent%
+    input-whitespace-treatment: 'collapse
+    quadding: %default-quadding%
+    (make sequence
+      ($component-title$)
+      (process-children))
+    (make-endnotes)))
+
+(define ($component-title$)
+  (let* ((info (cond
+               ((equal? (gi) (normalize "appendix"))
+                (select-elements (children (current-node)) (normalize "docinfo")))
+               ((equal? (gi) (normalize "article"))
+                (node-list-filter-by-gi (children (current-node))
+                                        (list (normalize "artheader")
+                                              (normalize "articleinfo"))))
+               ((equal? (gi) (normalize "bibliography"))
+                (select-elements (children (current-node)) (normalize "docinfo")))
+               ((equal? (gi) (normalize "chapter"))
+                (select-elements (children (current-node)) (normalize "docinfo")))
+               ((equal? (gi) (normalize "dedication")) 
+                (empty-node-list))
+               ((equal? (gi) (normalize "glossary"))
+                (select-elements (children (current-node)) (normalize "docinfo")))
+               ((equal? (gi) (normalize "index"))
+                (select-elements (children (current-node)) (normalize "docinfo")))
+               ((equal? (gi) (normalize "preface"))
+                (select-elements (children (current-node)) (normalize "docinfo")))
+               ((equal? (gi) (normalize "reference"))
+                (select-elements (children (current-node)) (normalize "docinfo")))
+               ((equal? (gi) (normalize "setindex"))
+                (select-elements (children (current-node)) (normalize "docinfo")))
+               (else
+                (empty-node-list))))
+        (exp-children (if (node-list-empty? info)
+                          (empty-node-list)
+                          (expand-children (children info) 
+                                           (list (normalize "bookbiblio") 
+                                                 (normalize "bibliomisc")
+                                                 (normalize "biblioset")))))
+        (parent-titles (select-elements (children (current-node)) (normalize "title")))
+        (titles        (if (node-list-empty? parent-titles)
+                           (select-elements exp-children (normalize "title"))
+                           parent-titles))
+        (parent-subttl (select-elements (children (current-node)) (normalize "subtitle")))         
+        (subtitles     (if (node-list-empty? parent-subttl)
+                           (select-elements exp-children (normalize "subtitle"))
+                           parent-subttl)))
+    (make sequence
+      (make paragraph
+       font-family-name: %title-font-family%
+       font-weight: 'bold
+       font-size: (HSIZE 4)
+       line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+       space-before: (* (HSIZE 4) %head-before-factor%)
+       start-indent: 0pt
+       first-line-start-indent: 0pt
+       quadding: %component-title-quadding%
+       heading-level: (if %generate-heading-level% 1 0)
+       keep-with-next?: #t
+
+       (if (string=? (element-label) "")
+           (empty-sosofo)
+           (literal (gentext-element-name-space (current-node))
+                    (element-label)
+                    (gentext-label-title-sep (gi))))
+
+       (if (node-list-empty? titles)
+           (element-title-sosofo) ;; get a default!
+           (with-mode component-title-mode
+             (make sequence
+               (process-node-list titles)))))
+
+      (make paragraph
+       font-family-name: %title-font-family%
+       font-weight: 'bold
+       font-posture: 'italic
+       font-size: (HSIZE 3)
+       line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+       space-before: (* 0.5 (* (HSIZE 3) %head-before-factor%))
+       space-after: (* (HSIZE 4) %head-after-factor%)
+       start-indent: 0pt
+       first-line-start-indent: 0pt
+       quadding: %component-subtitle-quadding%
+       keep-with-next?: #t
+
+       (with-mode component-title-mode
+         (make sequence
+           (process-node-list subtitles)))))))
+
+(mode component-title-mode
+  (element title
+    (process-children))
+
+  (element subtitle
+    (process-children))
+)
+
+;; this is how we prevent the title in the header from acquiring the
+;;   display treatment that it receives in the body of the document
+;;
+(mode hf-mode
+  (element title
+    (let* ((component (ancestor-member (current-node) 
+                                      (component-element-list)))
+          (chaporapp (or (equal? (gi component) (normalize "chapter"))
+                         (equal? (gi component) (normalize "appendix")))))
+      (if %chap-app-running-heads%
+         (make sequence
+           (if (and chaporapp
+                    %chapter-autolabel%
+                    (or %chap-app-running-head-autolabel%
+                        (attribute-string (normalize "label") component)))
+               (literal (gentext-element-name-space component)
+                        (element-label component)
+                        (gentext-label-title-sep (gi component)))
+               (empty-sosofo))
+           (process-children-trim))
+         (empty-sosofo))))
+
+  (element titleabbrev
+    (if %chap-app-running-heads%
+       (make sequence
+         (if (or (have-ancestor? (normalize "chapter"))
+                 (have-ancestor? (normalize "appendix")))
+             (literal (gentext-element-name-space (parent))
+                      (element-label (parent))
+                      (gentext-label-title-sep (gi (parent))))
+             (empty-sosofo))
+         (process-children-trim))
+       (empty-sosofo)))
+
+  (element refentrytitle
+    (if %chap-app-running-heads%
+       (process-children-trim)
+       (empty-sosofo)))
+
+  (element refdescriptor
+    (if %chap-app-running-heads%
+       (process-children-trim)
+       (empty-sosofo)))
+
+  (element refname
+    (if %chap-app-running-heads%
+       (process-children-trim)
+       (empty-sosofo)))
+
+  ;; Graphics aren't allowed in headers and footers...
+  (element graphic
+    (empty-sosofo))
+
+  (element inlinegraphic
+    (empty-sosofo))
+)
+
+(element appendix ($component$))
+(element (article appendix) ($section$)) ;; this is a special case
+(element (appendix title) (empty-sosofo))
+
+(element chapter ($component$))
+(element (chapter title) (empty-sosofo))
+
+(element preface ($component$))
+(element (preface title) (empty-sosofo))
+
+(element colophon ($component$))
+
+;; Dedication is empty except in a special mode so that it can be
+;; reordered (made to come before the TOCs)
+(element dedication (empty-sosofo))
+(mode dedication-page-mode
+  (element dedication ($component$))
+  (element (dedication title) (empty-sosofo))
+)
+
+;; Articles are like components, except that if they may have much
+;; more formal title pages (created with article-titlepage).
+;;
+(element article
+  (let* ((info (node-list-filter-by-gi (children (current-node))
+                                      (list (normalize "artheader")
+                                            (normalize "articleinfo"))))
+        (nl   (titlepage-info-elements (current-node) info))
+        (article-titlepage (if %generate-article-titlepage-on-separate-page%
+                               (make sequence
+                                 (if (article-titlepage-content? nl 'recto)
+                                     (make simple-page-sequence
+                                       page-n-columns: %page-n-columns%
+                                       use: default-text-style
+                                       quadding: %default-quadding%
+                                       (article-titlepage nl 'recto))
+                                     (empty-sosofo))
+                                 (if (article-titlepage-content? nl 'verso)
+                                     (make simple-page-sequence
+                                       page-n-columns: %page-n-columns%
+                                       use: default-text-style
+                                       quadding: %default-quadding%
+                                       (article-titlepage nl 'verso))
+                                     (empty-sosofo)))
+                               (make sequence
+                                 (article-titlepage nl 'recto)
+                                 (article-titlepage nl 'verso)))))
+    (make sequence
+
+      ;; make the titlepage first if its on a separate page
+      (if (and %generate-article-titlepage% 
+              %generate-article-titlepage-on-separate-page%)
+         article-titlepage
+         (empty-sosofo))
+
+      ;; make the TOC on a separate page if requested and it's not
+      ;; already on the title page and it's supposed to be in front
+      (if (and %generate-article-toc% 
+              (not %generate-article-toc-on-titlepage%)
+              %generate-article-titlepage-on-separate-page%
+              (generate-toc-in-front))
+         (make simple-page-sequence
+           page-n-columns: %page-n-columns%
+            ;; FIXME: page restarting here and below is ill-considered
+           page-number-restart?: %article-page-number-restart%
+           page-number-format: ($page-number-format$ (normalize "toc"))
+           left-header:   ($left-header$ (normalize "toc"))
+           center-header: ($center-header$ (normalize "toc"))
+           right-header:  ($right-header$ (normalize "toc"))
+           left-footer:   ($left-footer$ (normalize "toc"))
+           center-footer: ($center-footer$ (normalize "toc"))
+           right-footer:  ($right-footer$ (normalize "toc"))
+           input-whitespace-treatment: 'collapse
+           use: default-text-style
+           quadding: %default-quadding%
+           (build-toc (current-node)
+                      (toc-depth (current-node))))
+         (empty-sosofo))
+
+      ;; start a new page for the article itself
+      (make simple-page-sequence
+       page-n-columns: %page-n-columns%
+       page-number-restart?: (or %article-page-number-restart% 
+                                 (book-start?))
+       page-number-format: ($page-number-format$)
+       use: default-text-style
+       left-header:   ($left-header$)
+       center-header: ($center-header$)
+       right-header:  ($right-header$)
+       left-footer:   ($left-footer$)
+       center-footer: ($center-footer$)
+       right-footer:  ($right-footer$)
+       start-indent: %body-start-indent%
+       input-whitespace-treatment: 'collapse
+       quadding: %default-quadding%
+
+       ;; ... and include the titlepage if there is one and it's not
+       ;; already generated on a separate page
+       (if (and %generate-article-titlepage% 
+                (not %generate-article-titlepage-on-separate-page%))
+           article-titlepage
+           (empty-sosofo))
+
+       ;; ... and include the TOC if it is in front and not already
+       ;; generated
+       (if (and %generate-article-toc% 
+                (generate-toc-in-front)
+                (not %generate-article-toc-on-titlepage%)
+                (not %generate-article-titlepage-on-separate-page%))
+           (make display-group
+             space-after: (* (HSIZE 3) %head-after-factor%)
+             (build-toc (current-node)
+                        (toc-depth (current-node))))
+           (empty-sosofo))
+
+       ;; .. and the contents of the article
+       (process-children)
+
+        ;; ... and the endnotes
+       (make-endnotes)
+
+       ;; ... and the TOC if it is supposed to be on the back and not
+       ;; on the titlepage nor on a separate pagee
+       (if (and %generate-article-toc% 
+                (not (generate-toc-in-front))
+                (not %generate-article-toc-on-titlepage%)
+                (not %generate-article-titlepage-on-separate-page%))
+           (make display-group
+             space-after: (* (HSIZE 3) %head-after-factor%)
+             (build-toc (current-node)
+                        (toc-depth (current-node))))
+           (empty-sosofo)))
+
+      ;; finally, produce the TOC if it is supposed to be at the end
+      ;; and on its own page
+      (if (and %generate-article-toc% 
+              (not %generate-article-toc-on-titlepage%)
+              %generate-article-titlepage-on-separate-page%
+              (not (generate-toc-in-front)))
+         (make simple-page-sequence
+           page-n-columns: %page-n-columns%
+           use: default-text-style
+           quadding: %default-quadding%
+           (build-toc (current-node)
+                      (toc-depth (current-node))))
+         (empty-sosofo)))))
+
+(element (article title) (empty-sosofo))
+
diff --git a/print/dbdivis.dsl b/print/dbdivis.dsl
new file mode 100644 (file)
index 0000000..faf7e6c
--- /dev/null
@@ -0,0 +1,224 @@
+;; $Id: dbdivis.dsl,v 1.5 2003/12/05 05:00:05 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================= DIVISIONS ==============================
+
+(element set
+  (let* ((setinfo  (select-elements (children (current-node)) 
+                                   (normalize "setinfo")))
+        (nl       (titlepage-info-elements (current-node) setinfo)))
+    (make sequence
+      (if %generate-set-titlepage%
+         (make simple-page-sequence
+           page-n-columns: %titlepage-n-columns%
+           input-whitespace-treatment: 'collapse
+           use: default-text-style
+           (set-titlepage nl 'recto)
+           (make display-group
+             break-before: 'page
+             (set-titlepage nl 'verso)))
+         (empty-sosofo))
+      
+      (if (not (generate-toc-in-front))
+         (process-children)
+         (empty-sosofo))
+
+      (if %generate-set-toc%
+         (make simple-page-sequence
+           page-n-columns: %page-n-columns%
+           page-number-format: ($page-number-format$ (normalize "toc"))
+           use: default-text-style
+           left-header:   ($left-header$ (normalize "toc"))
+           center-header: ($center-header$ (normalize "toc"))
+           right-header:  ($right-header$ (normalize "toc"))
+           left-footer:   ($left-footer$ (normalize "toc"))
+           center-footer: ($center-footer$ (normalize "toc"))
+           right-footer:  ($right-footer$ (normalize "toc"))
+           input-whitespace-treatment: 'collapse
+           (build-toc (current-node)
+                      (toc-depth (current-node))))
+         (empty-sosofo))
+           
+      (if (generate-toc-in-front)
+         (process-children)
+         (empty-sosofo)))))
+
+(element (set title) (empty-sosofo))
+
+(element book 
+  (let* ((bookinfo  (select-elements (children (current-node)) 
+                                    (normalize "bookinfo")))
+        (dedication (select-elements (children (current-node)) 
+                                     (normalize "dedication")))
+        (nl        (titlepage-info-elements (current-node) bookinfo)))
+    (make sequence
+      (if %generate-book-titlepage%
+         (make simple-page-sequence
+           page-n-columns: %titlepage-n-columns%
+           input-whitespace-treatment: 'collapse
+           use: default-text-style
+           (book-titlepage nl 'recto)
+           (make display-group
+             break-before: 'page
+             (book-titlepage nl 'verso)))
+         (empty-sosofo))
+
+      (if (node-list-empty? dedication)
+         (empty-sosofo)
+         (with-mode dedication-page-mode
+           (process-node-list dedication)))
+
+      (if (not (generate-toc-in-front))
+         (process-children)
+         (empty-sosofo))
+
+      (if %generate-book-toc%
+         (make simple-page-sequence
+           page-n-columns: %page-n-columns%
+           page-number-format: ($page-number-format$ (normalize "toc"))
+           use: default-text-style
+           left-header:   ($left-header$ (normalize "toc"))
+           center-header: ($center-header$ (normalize "toc"))
+           right-header:  ($right-header$ (normalize "toc"))
+           left-footer:   ($left-footer$ (normalize "toc"))
+           center-footer: ($center-footer$ (normalize "toc"))
+           right-footer:  ($right-footer$ (normalize "toc"))
+           input-whitespace-treatment: 'collapse
+           (build-toc (current-node)
+                      (toc-depth (current-node))))
+         (empty-sosofo))
+           
+      (let loop ((gilist ($generate-book-lot-list$)))
+       (if (null? gilist)
+           (empty-sosofo)
+           (if (not (node-list-empty? 
+                     (select-elements (descendants (current-node))
+                                      (car gilist))))
+               (make simple-page-sequence
+                 page-n-columns: %page-n-columns%
+                 page-number-format: ($page-number-format$ (normalize "lot"))
+                 use: default-text-style
+                 left-header:   ($left-header$ (normalize "lot"))
+                 center-header: ($center-header$ (normalize "lot"))
+                 right-header:  ($right-header$ (normalize "lot"))
+                 left-footer:   ($left-footer$ (normalize "lot"))
+                 center-footer: ($center-footer$ (normalize "lot"))
+                 right-footer:  ($right-footer$ (normalize "lot"))
+                 input-whitespace-treatment: 'collapse
+                 (build-lot (current-node) (car gilist)))
+               (loop (cdr gilist)))))
+
+      (if (generate-toc-in-front)
+         (process-children)
+         (empty-sosofo)))))
+
+(element (book title) (empty-sosofo))
+
+(element part
+  (let* ((partinfo  (select-elements (children (current-node)) 
+                                    (normalize "docinfo")))
+        (partintro (select-elements (children (current-node)) 
+                                    (normalize "partintro")))
+
+        (nl        (titlepage-info-elements 
+                    (current-node) 
+                    partinfo
+                    (if %generate-partintro-on-titlepage%
+                        partintro
+                        (empty-node-list)))))
+    (make sequence
+      (if %generate-part-titlepage%
+         (make simple-page-sequence
+           page-n-columns: %titlepage-n-columns%
+           input-whitespace-treatment: 'collapse
+           use: default-text-style
+           (part-titlepage nl 'recto)
+           (make display-group
+             break-before: 'page
+             (part-titlepage nl 'verso)))
+         (empty-sosofo))
+
+      (if (not (generate-toc-in-front))
+          (process-children)
+         (empty-sosofo))
+
+      ;; generate a part TOC on a separate page
+      (if (and %generate-part-toc%
+              (not %generate-part-toc-on-titlepage%))
+         (make simple-page-sequence
+           page-n-columns: %page-n-columns%
+           page-number-format: ($page-number-format$ (normalize "toc"))
+           use: default-text-style
+           left-header:   ($left-header$ (normalize "toc"))
+           center-header: ($center-header$ (normalize "toc"))
+           right-header:  ($right-header$ (normalize "toc"))
+           left-footer:   ($left-footer$ (normalize "toc"))
+           center-footer: ($center-footer$ (normalize "toc"))
+           right-footer:  ($right-footer$ (normalize "toc"))
+           input-whitespace-treatment: 'collapse
+           (build-toc (current-node)
+                      (toc-depth (current-node))))
+         (empty-sosofo))
+
+      ;; this seems wrong relative to generate-toc-in-front,
+      ;; goes *after* the content ??!
+      (if (and (not (node-list-empty? partintro))
+              (not %generate-partintro-on-titlepage%))
+         ($process-partintro$ partintro #t)
+         (empty-sosofo))
+      
+      (if (generate-toc-in-front)
+         (process-children)
+         (empty-sosofo)))))
+
+(element (part title) (empty-sosofo))
+
+(element partintro (empty-sosofo))
+
+(element (partintro title) 
+  (let* ((hlevel 1)
+        (hs (HSIZE (- 4 hlevel))))
+    (make paragraph
+      font-family-name: %title-font-family%
+      font-weight:  (if (< hlevel 5) 'bold 'medium)
+      font-posture: (if (< hlevel 5) 'upright 'italic)
+      font-size: hs
+      line-spacing: (* hs %line-spacing-factor%)
+      space-before: (* hs %head-before-factor%)
+      space-after:  (* hs %head-after-factor%)
+      start-indent: 0pt
+      first-line-start-indent: 0pt
+      quadding: %section-title-quadding%
+      keep-with-next?: #t
+      heading-level: (if %generate-heading-level% (+ hlevel 1) 0)
+      (element-title-sosofo (parent (current-node))))))
+
+(define ($process-partintro$ partintro make-page-seq?)
+  (if make-page-seq?
+      (make simple-page-sequence
+       page-n-columns: %page-n-columns%
+       page-number-restart?: (or %page-number-restart% 
+                                 (book-start?) 
+                                 (first-chapter?))
+       page-number-format: ($page-number-format$)
+       use: default-text-style
+       left-header:   ($left-header$)
+       center-header: ($center-header$)
+       right-header:  ($right-header$)
+       left-footer:   ($left-footer$)
+       center-footer: ($center-footer$)
+       right-footer:  ($right-footer$)
+       start-indent: %body-start-indent%
+       input-whitespace-treatment: 'collapse
+       quadding: %default-quadding%
+       (make sequence
+         (process-node-list (children partintro))
+         (make-endnotes partintro)))
+      (make sequence
+       start-indent: %body-start-indent%
+       (process-node-list (children partintro))
+       (make-endnotes partintro))))
+
diff --git a/print/dbefsyn.dsl b/print/dbefsyn.dsl
new file mode 100644 (file)
index 0000000..2eed205
--- /dev/null
@@ -0,0 +1,588 @@
+;; $Id: dbefsyn.dsl,v 1.4 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================ CLASS SYNOPSIS =============================
+
+(define %indent-classsynopsisinfo-lines% #f)
+(define %number-classsynopsisinfo-lines% #f)
+
+(define %default-classsynopsis-language% "java")
+
+(element classsynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+(element methodsynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+(element fieldsynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+(element constructorynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+(element destructorsynopsis
+  (let ((language (if (attribute-string (normalize "language"))
+                     (attribute-string (normalize "language"))
+                     %default-classsynopsis-language%)))
+    (case language
+      (("java") (with-mode cs-java-mode
+                 (process-node-list (current-node))))
+      (("perl") (with-mode cs-perl-mode
+                 (process-node-list (current-node))))
+      (("idl") (with-mode cs-idl-mode
+                 (process-node-list (current-node))))
+      (("python") (with-mode cs-python-mode
+                   (process-node-list (current-node))))
+      (else (with-mode cs-java-mode
+             (process-node-list (current-node)))))))
+
+;; ===== Java ========================================================
+
+(mode cs-java-mode
+
+(element classsynopsis
+  (let* ((classes      (select-elements (children (current-node))
+                                       (normalize "ooclass")))
+        (classname    (node-list-first classes))
+        (superclasses (node-list-rest classes)))
+  (make display-group
+    use: verbatim-style
+    (make paragraph
+      (process-node-list classname)
+      (process-node-list superclasses)
+      (literal "{"))
+    (process-node-list
+     (node-list-filter-by-gi
+      (children (current-node))
+      (list (normalize "constructorsynopsis")
+           (normalize "destructorsynopsis")
+           (normalize "fieldsynopsis")
+           (normalize "methodsynopsis")
+           (normalize "classsynopsisinfo"))))
+    (make paragraph
+      (literal "}")))))
+
+(element classsynopsisinfo
+  ($verbatim-display$ %indent-classsynopsisinfo-lines%
+                     %number-classsynopsisinfo-lines%))
+
+(element ooclass
+  (make sequence
+    (if (first-sibling?)
+       (literal " ")
+       (literal ", "))
+    (process-children)))
+
+(element oointerface
+  (make sequence
+    (if (first-sibling?)
+       (literal " ")
+       (literal ", "))
+    (process-children)))
+
+(element ooexception
+  (make sequence
+    (if (first-sibling?)
+       (literal " ")
+       (literal ", "))
+    (process-children)))
+
+(element modifier
+  (make sequence
+    (process-children)
+    (literal " ")))
+
+(element classname
+  (if (first-sibling?)
+      (make sequence
+       (literal "class ")
+       (process-children)
+       (literal " ")
+       (if (last-sibling?)
+           (empty-sosofo)
+           (literal "extends ")))
+      (make sequence
+       (process-children)
+       (if (last-sibling?)
+           (literal " ")
+           (literal ", ")))))
+
+(element fieldsynopsis
+  (make paragraph
+    use: inline-verbatim-style
+    (literal "  ")
+    (process-children)
+    (literal ";")))
+
+(element type
+  (make sequence
+    (process-children)
+    (literal " ")))
+
+(element varname
+  (make sequence
+    (process-children)))
+
+(element initializer
+  (make sequence
+    (literal " = ")
+    (process-children)))
+
+(element constructorsynopsis
+  (java-method-synopsis))
+
+(element destructorsynopsis
+  (java-method-synopsis))
+
+(element methodsynopsis
+  (java-method-synopsis))
+
+(element void
+  (literal "void "))
+
+(element methodname
+  (process-children))
+
+(element methodparam
+  (make sequence
+    (if (first-sibling?)
+       (empty-sosofo)
+       (literal ", "))
+    (process-children)))
+
+(element parameter
+  (process-children))
+
+(element exceptionname
+  (make sequence
+    (if (first-sibling?)
+       (literal " throws ")
+       (literal ", "))
+    (process-children)))
+)
+
+(define (java-method-synopsis #!optional (nd (current-node)))
+  (let* ((modifiers  (select-elements (children nd)
+                                     (normalize "modifier")))
+        (notmod     (node-list-filter-by-not-gi
+                     (children nd)
+                     (list (normalize "modifier"))))
+        (type       (if (equal? (gi (node-list-first notmod)) 
+                                (normalize "methodname"))
+                        (empty-node-list)
+                        (node-list-first notmod)))
+        (methodname (select-elements (children nd)
+                                     (normalize "methodname")))
+        (param      (node-list-filter-by-gi (node-list-rest notmod)
+                                            (list (normalize "methodparam"))))
+        (excep      (select-elements (children nd)
+                                     (normalize "exceptionname"))))
+    (make paragraph
+      use: inline-verbatim-style
+      (literal "  ")
+      (process-node-list modifiers)
+      (process-node-list type)
+      (process-node-list methodname)
+      (literal "(")
+      (process-node-list param)
+      (literal ")")
+      (process-node-list excep)
+      (literal ";"))))
+
+;; ===== Perl ========================================================
+
+(mode cs-perl-mode
+
+(element classsynopsis
+  (let* ((modifiers    (select-elements (children (current-node))
+                                       (normalize "modifier")))
+        (classes      (select-elements (children (current-node))
+                                       (normalize "classname")))
+        (classname    (node-list-first classes))
+        (superclasses (node-list-rest classes)))
+  (make display-group
+    use: verbatim-style;
+    (make paragraph
+      (literal "package ")
+      (process-node-list classname)
+      (literal ";"))
+    (if (node-list-empty? superclasses)
+       (empty-sosofo)
+       (make sequence
+         (literal "@ISA = (");
+         (process-node-list superclasses)
+         (literal ";")))
+    (process-node-list
+     (node-list-filter-by-gi
+      (children (current-node))
+      (list (normalize "constructorsynopsis")
+           (normalize "destructorsynopsis")
+           (normalize "fieldsynopsis")
+           (normalize "methodsynopsis")
+           (normalize "classsynopsisinfo")))))))
+
+(element classsynopsisinfo
+  ($verbatim-display$ %indent-classsynopsisinfo-lines%
+                     %number-classsynopsisinfo-lines%))
+
+(element modifier
+  (literal "Perl ClassSynopses don't use Modifiers"))
+
+(element classname
+  (if (first-sibling?)
+      (process-children)
+      (make sequence
+       (process-children)
+       (if (last-sibling?)
+           (empty-sosofo)
+           (literal ", ")))))
+
+(element fieldsynopsis
+  (make paragraph
+    use: inline-verbatim-style
+    (literal "  ");
+    (process-children)
+    (literal ";")))
+
+(element type
+  (make sequence
+    (process-children)
+    (literal " ")))
+
+(element varname
+  (make sequence
+    (process-children)))
+
+(element initializer
+  (make sequence
+    (literal " = ")
+    (process-children)))
+
+(element constructorsynopsis
+  (perl-method-synopsis))
+
+(element destructorsynopsis
+  (perl-method-synopsis))
+
+(element methodsynopsis
+  (perl-method-synopsis))
+
+(element void
+  (empty-sosofo))
+
+(element methodname
+  (process-children))
+
+(element methodparam
+  (make sequence
+    (if (first-sibling?)
+       (empty-sosofo)
+       (literal ", "))
+    (process-children)))
+
+(element parameter
+  (process-children))
+
+(element exceptionname
+  (literal "Perl ClassSynopses don't use Exceptions"))
+
+)
+
+(define (perl-method-synopsis #!optional (nd (current-node)))
+  (let* ((modifiers  (select-elements (children nd)
+                                     (normalize "modifier")))
+        (notmod     (node-list-filter-by-not-gi
+                     (children nd)
+                     (list (normalize "modifier"))))
+        (type       (if (equal? (gi (node-list-first notmod)) 
+                                (normalize "methodname"))
+                        (empty-node-list)
+                        (node-list-first notmod)))
+        (methodname (select-elements (children nd)
+                                     (normalize "methodname")))
+        (param      (node-list-filter-by-gi (node-list-rest notmod)
+                                            (list (normalize "type")
+                                                  (normalize "void"))))
+        (excep      (select-elements (children nd)
+                                     (normalize "exceptionname"))))
+    (make paragraph
+      use: inline-verbatim-style
+      (literal "sub ")
+      (process-node-list modifiers)
+      (process-node-list type)
+      (process-node-list methodname)
+      (literal " { ... }"))))
+
+;; ===== IDL =========================================================
+
+(mode cs-idl-mode
+
+(element classsynopsis
+  (let* ((modifiers    (select-elements (children (current-node))
+                                       (normalize "modifier")))
+        (classes      (select-elements (children (current-node))
+                                       (normalize "classname")))
+        (classname    (node-list-first classes))
+        (superclasses (node-list-rest classes)))
+  (make display-group
+    use: verbatim-style;
+    (make paragraph
+      (literal "interface ")
+      (process-node-list modifiers)
+      (process-node-list classname)
+      (if (node-list-empty? superclasses)
+         (literal " ")
+         (make sequence
+           (literal " : ")
+           (process-node-list superclasses)))
+      (literal "{"))
+    (process-node-list
+     (node-list-filter-by-gi
+      (children (current-node))
+      (list (normalize "constructorsynopsis")
+           (normalize "destructorsynopsis")
+           (normalize "fieldsynopsis")
+           (normalize "methodsynopsis")
+           (normalize "classsynopsisinfo"))))
+    (make paragraph
+      (literal "}")))))
+
+(element classsynopsisinfo
+  ($verbatim-display$ %indent-classsynopsisinfo-lines%
+                     %number-classsynopsisinfo-lines%))
+
+(element modifier
+  (make sequence
+    (process-children)
+    (literal " ")))
+
+(element classname
+  (if (first-sibling?)
+      (process-children)
+      (make sequence
+       (process-children)
+       (if (last-sibling?)
+           (empty-sosofo)
+           (literal ", ")))))
+
+(element fieldsynopsis
+  (make paragraph
+    use: inline-verbatim-style
+    (literal "  ");
+    (process-children)
+    (literal ";")))
+
+(element type
+  (make sequence
+    (process-children)
+    (literal " ")))
+
+(element varname
+  (make sequence
+    (process-children)))
+
+(element initializer
+  (make sequence
+    (literal " = ")
+    (process-children)))
+
+(element constructorsynopsis
+  (idl-method-synopsis))
+
+(element destructorsynopsis
+  (idl-method-synopsis))
+
+(element methodsynopsis
+  (idl-method-synopsis))
+
+(element void
+  (literal "void "))
+
+(element methodname
+  (process-children))
+
+(element methodparam
+  (make sequence
+    (if (first-sibling?)
+       (empty-sosofo)
+       (literal ", "))
+    (process-children)))
+
+(element parameter
+  (process-children))
+
+(element exceptionname
+  (make sequence
+    (if (first-sibling?)
+       (literal " raises(")
+       (literal ", "))
+    (process-children)
+    (if (last-sibling?)
+       (literal ")")
+       (empty-sosofo))))
+)
+
+(define (idl-method-synopsis #!optional (nd (current-node)))
+  (let* ((modifiers  (select-elements (children nd)
+                                     (normalize "modifier")))
+        (notmod     (node-list-filter-by-not-gi
+                     (children nd)
+                     (list (normalize "modifier"))))
+        (type       (if (equal? (gi (node-list-first notmod)) 
+                                (normalize "methodname"))
+                        (empty-node-list)
+                        (node-list-first notmod)))
+        (methodname (select-elements (children nd)
+                                     (normalize "methodname")))
+        (param      (node-list-filter-by-gi (node-list-rest notmod)
+                                            (list (normalize "methodparam"))))
+        (excep      (select-elements (children nd)
+                                     (normalize "exceptionname"))))
+    (make paragraph
+      use: inline-verbatim-style
+      (process-node-list modifiers)
+      (process-node-list type)
+      (process-node-list methodname)
+      (literal "(")
+      (process-node-list param)
+      (literal ")")
+      (process-node-list excep)
+      (literal ";"))))
+
+;; ===== Python ======================================================
+;; Contributed by Lane Stevens, lane@cycletime.com
+
+(mode cs-python-mode
+  (element classsynopsis
+    (let* ((classes      (select-elements (children (current-node))
+                                         (normalize "ooclass")))
+          (classname    (node-list-first classes))
+          (superclasses (node-list-rest classes)))
+      (make display-group
+       use: verbatim-style
+       (make paragraph
+         (literal "class ")
+         (process-node-list classname)
+         (literal "(")
+         (process-node-list superclasses)
+         (literal ") :"))
+       (process-node-list
+        (node-list-filter-by-gi
+         (children (current-node))
+         (list (normalize "constructorsynopsis")
+               (normalize "destructorsynopsis")
+               (normalize "fieldsynopsis")
+               (normalize "methodsynopsis")
+               (normalize "classsynopsisinfo"))))
+       )
+      )
+    )
+
+  (element ooclass
+    (make sequence
+      (process-children)
+      (cond
+       ((first-sibling?) (literal " "))
+       ((last-sibling?) (empty-sosofo))
+       (#t (literal ", "))
+       )
+      )
+    )
+  
+  (element methodsynopsis
+    (python-method-synopsis))
+  
+  (element classname
+    (process-children))
+
+  (element initializer
+    (make sequence
+      (literal " = ")
+      (process-children)))
+
+  (element methodname
+    (process-children))
+
+  (element methodparam
+    (make sequence
+      (process-children)
+      (if (last-sibling?)
+         (empty-sosofo)
+         (literal ", "))
+      )
+    )
+
+  (element parameter
+    (process-children))
+  )
+
+(define (python-method-synopsis #!optional (nd (current-node)))
+  (let* ((the-method-name (select-elements (children nd) (normalize "methodname")))
+        (the-method-params (select-elements (children nd) (normalize "methodparam")))
+        )
+    (make paragraph
+      use: inline-verbatim-style
+      (literal "    def ")
+      (process-node-list the-method-name)
+      (literal "(")
+      (process-node-list the-method-params)
+      (literal ") :"))
+    )
+  )
+
+;; EOF
diff --git a/print/dbgloss.dsl b/print/dbgloss.dsl
new file mode 100644 (file)
index 0000000..2fcc5d9
--- /dev/null
@@ -0,0 +1,117 @@
+;; $Id: dbgloss.dsl,v 1.4 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================= GLOSSARY ELEMENTS ==========================
+
+(element glossary ($component$))
+(element (article glossary) ($section$)) ;; this is a special case
+(element (glossary title) (empty-sosofo))
+
+(element glossdiv ($section$))
+(element (glossdiv title) (empty-sosofo))
+
+(element glosslist ($block-container$))
+(element glossentry  (process-children))
+
+;; a glossentry glossterm
+(element (glossentry glossterm) ($lowtitle$ 3 2))
+(element (glossdiv glossentry glossterm) ($lowtitle$ 3 3))
+(element (glossentry acronym) (empty-sosofo))
+(element (glossentry abbrev) (empty-sosofo))
+(element glossdef ($indent-para-container$))
+
+(element glosssee ($italic-seq$))
+
+(element (glossentry glosssee)
+  (let ((otherterm (attribute-string (normalize "otherterm"))))
+    (make paragraph
+      space-before: %para-sep%
+      space-after: %para-sep%
+      start-indent: (+ (inherited-start-indent) (* (ILSTEP) 2))
+      quadding: %default-quadding%
+      ($italic-seq$ (literal (gentext-element-name (current-node))
+                            (gentext-label-title-sep (gi))))
+      (if otherterm
+         (make link 
+           destination: (node-list-address (element-with-id otherterm))
+           (with-mode otherterm
+             (process-element-with-id otherterm)))
+         (process-children)))))
+
+;; When we hit the first GLOSSSEEALSO, process all of them as a node-list
+(element glossseealso
+  (if (first-sibling?)
+      (make paragraph
+       ($italic-seq$ (literal (gentext-element-name (current-node))
+                              (gentext-label-title-sep (gi))))
+       (with-mode glossseealso
+         (process-node-list
+          (select-elements (children (parent)) '(glossseealso))))
+       (literal "."))
+      (empty-sosofo)))
+
+(mode glossseealso
+
+  (element glossseealso
+    (let ((otherterm (attribute-string (normalize "otherterm"))))
+      (make sequence
+       (if (first-sibling?)
+           (empty-sosofo)
+           ($italic-seq$ (literal ", ")))
+
+       (if otherterm ;; but this should be required...
+           (make link 
+             destination: (node-list-address (element-with-id otherterm))
+             (with-mode otherterm
+               (process-element-with-id otherterm)))
+           (process-children)))))
+
+)
+
+;; This is referenced within the GLOSSSEE and GLOSSSEEALSO element
+;; construction expressions.  The OTHERTERM attributes on GLOSSSEE and
+;; GLOSSSEEALSO (should) refer to GLOSSENTRY elements but we're only
+;; interested in the text within the GLOSSTERM.  Discard the revision
+;; history and the definition from the referenced term.
+(mode otherterm
+  (element glossentry
+    (process-children))
+  (element glossterm
+    (process-children))
+  (element glossdef
+    (empty-sosofo))
+  (element revhistory
+    (empty-sosofo))
+  (element glosssee
+    (empty-sosofo))
+  (element (glossentry acronym)
+    (empty-sosofo))
+  (element (glossentry abbrev)
+    (empty-sosofo)))
+
+;; an inline gloss term
+(element glossterm
+  (let* ((linkend   (attribute-string (normalize "linkend"))))
+    (if linkend
+       (make link 
+         destination: (node-list-address (element-with-id linkend))
+         ($italic-seq$))
+       ($italic-seq$))))
+
+;; a first glossterm
+(element firstterm
+  (let* ((linkend (attribute-string (normalize "linkend")))
+        (sosofo  (if linkend
+                     (make link 
+                       destination: (node-list-address
+                                     (element-with-id linkend))
+                       ($italic-seq$))
+                     ($italic-seq$))))
+    (if firstterm-bold
+       (make sequence
+         font-weight: 'bold
+         sosofo)
+       sosofo)))
diff --git a/print/dbgraph.dsl b/print/dbgraph.dsl
new file mode 100644 (file)
index 0000000..218698a
--- /dev/null
@@ -0,0 +1,134 @@
+;; $Id: dbgraph.dsl,v 1.3 2003/03/25 19:53:55 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ==================== GRAPHICS ====================
+
+;; NOTE: display #f doesn't seem to work right in the RTF back end...
+
+(define (graphic-file filename)
+  (let ((ext (file-extension filename)))
+    (if (or (not filename)
+           (not %graphic-default-extension%)
+           (member ext %graphic-extensions%))
+       filename
+       (string-append filename "." %graphic-default-extension%))))
+
+(define ($graphic$ fileref 
+                  #!optional (display #f) (format #f) (scale #f) (align #f))
+  (let ((graphic-format (if format format ""))
+       (graphic-scale  (if scale (/  (string->number scale) 100) 1))
+       (graphic-align  (cond ((equal? align (normalize "center"))
+                              'center)
+                             ((equal? align (normalize "right"))
+                              'end)
+                             (else
+                              'start))))
+    (make external-graphic
+      entity-system-id: (graphic-file fileref)
+      notation-system-id: graphic-format
+      scale: graphic-scale
+      display?: display
+      display-alignment: graphic-align)))
+
+(define ($img$ #!optional (nd (current-node)) (display #f))
+  ;; This function now supports an extension to DocBook.  It's
+  ;; either a clever trick or an ugly hack, depending on your
+  ;; point of view, but it'll hold us until XLink is finalized
+  ;; and we can extend DocBook the "right" way.
+  ;;
+  ;; If the entity passed to GRAPHIC has the FORMAT
+  ;; "LINESPECIFIC", either because that's what's specified or
+  ;; because it's the notation of the supplied ENTITYREF, then
+  ;; the text of the entity is inserted literally (via Jade's
+  ;; read-entity external procedure).
+  ;;
+  (let* ((fileref   (attribute-string (normalize "fileref") nd))
+        (entityref (attribute-string (normalize "entityref") nd))
+        (format    (if (attribute-string (normalize "format") nd)
+                       (attribute-string (normalize "format") nd)
+                       (if entityref
+                           (entity-notation entityref)
+                           #f)))
+        (align     (attribute-string (normalize "align") nd))
+        (scale     (attribute-string (normalize "scale") nd)))
+    (if (or fileref entityref)
+       (if (equal? format (normalize "linespecific"))
+           (if fileref
+               (include-file fileref)
+               (include-file (entity-generated-system-id entityref)))
+           (if fileref
+               ($graphic$ fileref display format scale align)
+               ($graphic$ (entity-generated-system-id entityref)
+                          display format scale align)))
+       (empty-sosofo))))
+
+(element graphic
+  (make paragraph
+    space-before: %block-sep%
+    space-after: %block-sep%
+    ($img$ (current-node) #t)))
+
+(element inlinegraphic ($img$))
+
+
+;; ======================================================================
+;; MediaObject and friends...
+
+(define preferred-mediaobject-notations
+  (list "EPS" "PS" "JPG" "JPEG" "PNG" "linespecific"))
+
+(define preferred-mediaobject-extensions
+  (list "eps" "ps" "jpg" "jpeg" "png"))
+
+(define acceptable-mediaobject-notations
+  (list "GIF" "GIF87a" "GIF89a" "BMP" "WMF"))
+
+(define acceptable-mediaobject-extensions
+  (list "gif" "bmp" "wmf"))
+
+(element mediaobject
+  (make paragraph
+    ($mediaobject$)))
+
+(element inlinemediaobject
+  (make sequence
+    ($mediaobject$)))
+
+(element mediaobjectco
+  (error "MediaObjectCO is not supported yet."))
+
+(element imageobjectco
+  (error "ImageObjectCO is not supported yet."))
+
+(element objectinfo
+  (empty-sosofo))
+
+(element videoobject
+  (process-children))
+
+(element videodata
+  (empty-sosofo))
+
+(element audioobject
+  (process-children))
+
+(element audiodata
+  (empty-sosofo))
+
+(element imageobject
+  (process-children))
+
+(element imagedata
+  (if (have-ancestor? (normalize "mediaobject"))
+      ($img$ (current-node) #t)
+      ($img$ (current-node) #f)))
+
+(element textobject
+  (make display-group
+    (process-children)))
+
+(element caption
+  (process-children))
diff --git a/print/dbindex.dsl b/print/dbindex.dsl
new file mode 100644 (file)
index 0000000..c97d49b
--- /dev/null
@@ -0,0 +1,156 @@
+;; $Id: dbindex.dsl,v 1.4 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ................... INDEX TERMS (EMBEDDED MARKERS) ...................
+
+(element indexterm
+  ;; This is different than (empty-sosofo) alone because the backend
+  ;; will hang an anchor off the empty sequence.  This allows the index
+  ;; to point to the indexterm (but only if the indexterm has an ID).
+  (make sequence (empty-sosofo)))
+
+(element primary (empty-sosofo))
+(element secondary (empty-sosofo))
+(element tertiary (empty-sosofo))
+(element see (empty-sosofo))
+(element seealso (empty-sosofo))
+
+;; =========================== INDEX ELEMENTS ===========================
+
+(element setindex ($component$))
+(element (setindex title) (empty-sosofo))
+
+(element index
+  (make simple-page-sequence
+    page-number-restart?: (or %page-number-restart% 
+                             (book-start?) 
+                             (first-chapter?))
+    page-number-format: ($page-number-format$)
+    use: default-text-style
+    left-header:   ($left-header$)
+    center-header: ($center-header$)
+    right-header:  ($right-header$)
+    left-footer:   ($left-footer$)
+    center-footer: ($center-footer$)
+    right-footer:  ($right-footer$)
+    start-indent: %body-start-indent%
+    input-whitespace-treatment: 'collapse
+    quadding: %default-quadding%
+    page-n-columns: 2
+    (make sequence
+      ($component-title$)
+      (process-children))
+    (make-endnotes)))
+
+;; this is a special case. this prevents the index from causing an error but
+;; will make the index a single column. c'est la vie.
+(element (article index) ($section$))
+
+(element (index title) (empty-sosofo))
+
+(element indexdiv ($section$))
+(element (indexdiv title) (empty-sosofo))
+
+(element indexentry (process-children))
+
+(element primaryie
+  (make paragraph
+    font-size: (* (inherited-font-size) %smaller-size-factor%)
+    (process-children)))
+
+(element secondaryie
+  (make paragraph
+    font-size: (* (inherited-font-size) %smaller-size-factor%)
+    start-indent: (+ (inherited-start-indent) 1em)
+    (process-children)))
+
+(element tertiaryie
+  (make paragraph
+    font-size: (* (inherited-font-size) %smaller-size-factor%)
+    start-indent: (+ (inherited-start-indent) 2em)
+    (process-children)))
+
+(define (find-indexterm id)
+  ;; If you have a lot of indexterms that don't have IDs, this could 
+  ;; be incredibly slow.  So don't do that.
+  (let* ((idtarget (element-with-id id)))
+    (if (node-list-empty? idtarget)
+       (let loop ((idnodes (select-elements (descendants (sgml-root-element))
+                                            (normalize "indexterm"))))
+         (if (node-list-empty? idnodes)
+             (empty-node-list)
+             (if (equal? id (string-append "AEN" 
+                                           (number->string 
+                                            (all-element-number 
+                                             (node-list-first idnodes)))))
+                 (node-list-first idnodes)
+                 (loop (node-list-rest idnodes)))))
+       idtarget)))
+
+(define (indexentry-link nd)
+  (let* ((id        (attribute-string (normalize "role") nd))
+        (target    (find-indexterm id))
+        (preferred (not (node-list-empty?
+                         (select-elements (children (current-node))
+                                          (normalize "emphasis")))))
+        (sosofo    (if (node-list-empty? target) 
+                       (literal "?")
+                       (make link
+                         destination: (node-list-address target)
+                         (with-mode toc-page-number-mode
+                           (process-node-list target))))))
+    (if preferred
+       (make sequence
+         font-weight: 'bold
+         sosofo)
+       sosofo)))
+
+(element (primaryie ulink)
+  (indexentry-link (current-node)))
+
+(element (secondaryie ulink)
+  (indexentry-link (current-node)))
+
+(element (tertiaryie ulink)
+  (indexentry-link (current-node)))
+
+(element seeie
+  (let ((indent (cond ((node-list-empty? 
+                       (select-elements
+                        (children (parent (current-node)))
+                        (normalize "secondaryie")))
+                      1em)
+                     ((node-list-empty? 
+                       (select-elements
+                        (children (parent (current-node)))
+                        (normalize "tertiaryie")))
+                      2em)
+                     (else 3em))))
+    (make paragraph
+      font-size: (* (inherited-font-size) %smaller-size-factor%)
+      start-indent: (+ (inherited-start-indent) indent)
+      (literal "(" (gentext-index-see) " ")
+      (process-children)
+      (literal ")"))))
+
+(element seealsoie
+  (let ((indent (cond ((node-list-empty? 
+                       (select-elements
+                        (children (parent (current-node)))
+                        (normalize "secondaryie")))
+                      1em)
+                     ((node-list-empty? 
+                       (select-elements
+                        (children (parent (current-node)))
+                        (normalize "tertiaryie")))
+                      2em)
+                     (else 3em))))
+    (make paragraph
+      font-size: (* (inherited-font-size) %smaller-size-factor%)
+      start-indent: (+ (inherited-start-indent) indent)
+      (literal "(" (gentext-index-seealso) " ")
+      (process-children)
+      (literal ")"))))
diff --git a/print/dbinfo.dsl b/print/dbinfo.dsl
new file mode 100644 (file)
index 0000000..e89af5c
--- /dev/null
@@ -0,0 +1,1012 @@
+;; $Id: dbinfo.dsl,v 1.3 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ................................ INFO ................................
+
+;; Rather than make the *INFO containers empty-sosofos, we make them
+;; process-children and then make all of the elements they may contain
+;; empty in this context.  The advantage here is that we can then
+;; more easily override some of them in stylesheets that use this one.
+
+(element setinfo (empty-sosofo))
+
+(element (setinfo abbrev) (empty-sosofo))
+(element (setinfo abstract) (empty-sosofo))
+(element (setinfo address) (empty-sosofo))
+(element (setinfo affiliation) (empty-sosofo))
+(element (setinfo artpagenums) (empty-sosofo))
+(element (setinfo author) (empty-sosofo))
+(element (setinfo authorblurb) (empty-sosofo))
+(element (setinfo authorgroup) (empty-sosofo))
+(element (setinfo authorinitials) (empty-sosofo))
+(element (setinfo bibliomisc) (empty-sosofo))
+(element (setinfo biblioset) (empty-sosofo))
+(element (setinfo collab) (empty-sosofo))
+(element (setinfo confgroup) (empty-sosofo))
+(element (setinfo contractnum) (empty-sosofo))
+(element (setinfo contractsponsor) (empty-sosofo))
+(element (setinfo contrib) (empty-sosofo))
+(element (setinfo copyright) (empty-sosofo))
+(element (setinfo corpauthor) (empty-sosofo))
+(element (setinfo corpname) (empty-sosofo))
+(element (setinfo date) (empty-sosofo))
+(element (setinfo edition) (empty-sosofo))
+(element (setinfo editor) (empty-sosofo))
+(element (setinfo firstname) (empty-sosofo))
+(element (setinfo graphic) (empty-sosofo))
+(element (setinfo honorific) (empty-sosofo))
+(element (setinfo invpartnumber) (empty-sosofo))
+(element (setinfo isbn) (empty-sosofo))
+(element (setinfo issn) (empty-sosofo))
+(element (setinfo issuenum) (empty-sosofo))
+(element (setinfo itermset) (empty-sosofo))
+(element (setinfo keywordset) (empty-sosofo))
+(element (setinfo legalnotice) (empty-sosofo))
+(element (setinfo lineage) (empty-sosofo))
+(element (setinfo modespec) (empty-sosofo))
+(element (setinfo orgname) (empty-sosofo))
+(element (setinfo othercredit) (empty-sosofo))
+(element (setinfo othername) (empty-sosofo))
+(element (setinfo pagenums) (empty-sosofo))
+(element (setinfo printhistory) (empty-sosofo))
+(element (setinfo productname) (empty-sosofo))
+(element (setinfo productnumber) (empty-sosofo))
+(element (setinfo pubdate) (empty-sosofo))
+(element (setinfo publisher) (empty-sosofo))
+(element (setinfo publishername) (empty-sosofo))
+(element (setinfo pubsnumber) (empty-sosofo))
+(element (setinfo releaseinfo) (empty-sosofo))
+(element (setinfo revhistory) (empty-sosofo))
+(element (setinfo seriesvolnums) (empty-sosofo))
+(element (setinfo subjectset) (empty-sosofo))
+(element (setinfo subtitle) (empty-sosofo))
+(element (setinfo surname) (empty-sosofo))
+(element (setinfo title) (empty-sosofo))
+(element (setinfo titleabbrev) (empty-sosofo))
+(element (setinfo volumenum) (empty-sosofo))
+
+;; BookInfo is handled differently in dbdivis.dsl by using a
+;; special mode...
+
+(element bookinfo (empty-sosofo))
+
+(element (bookinfo abbrev) (process-children))
+(element (bookinfo abstract) (process-children))
+(element (bookinfo address) (process-children))
+(element (bookinfo affiliation) (process-children))
+(element (bookinfo artpagenums) (process-children))
+(element (bookinfo author) (process-children))
+(element (bookinfo authorblurb) (process-children))
+(element (bookinfo authorgroup) (process-children))
+(element (bookinfo authorinitials) (process-children))
+(element (bookinfo bibliomisc) (process-children))
+(element (bookinfo biblioset) (process-children))
+(element (bookinfo bookbiblio) (process-children))
+(element (bookinfo collab) (process-children))
+(element (bookinfo confgroup) (process-children))
+(element (bookinfo contractnum) (process-children))
+(element (bookinfo contractsponsor) (process-children))
+(element (bookinfo contrib) (process-children))
+;; (element (bookinfo copyright) (process-children)) ;; the default is good
+(element (bookinfo corpauthor) (process-children))
+(element (bookinfo corpname) (process-children))
+(element (bookinfo date) (process-children))
+(element (bookinfo edition) (process-children))
+(element (bookinfo editor) (process-children))
+(element (bookinfo firstname) (process-children))
+(element (bookinfo graphic) (process-children))
+(element (bookinfo honorific) (process-children))
+(element (bookinfo invpartnumber) (process-children))
+(element (bookinfo isbn) (process-children))
+(element (bookinfo issn) (process-children))
+(element (bookinfo issuenum) (process-children))
+(element (bookinfo itermset) (process-children))
+(element (bookinfo keywordset) (process-children))
+(element (bookinfo legalnotice) ($semiformal-object$))
+(element (bookinfo lineage) (process-children))
+(element (bookinfo modespec) (process-children))
+(element (bookinfo orgname) (process-children))
+(element (bookinfo othercredit) (process-children))
+(element (bookinfo othername) (process-children))
+(element (bookinfo pagenums) (process-children))
+(element (bookinfo printhistory) (process-children))
+(element (bookinfo productname) (process-children))
+(element (bookinfo productnumber) (process-children))
+(element (bookinfo pubdate) (process-children))
+(element (bookinfo publisher) (process-children))
+(element (bookinfo publishername) (process-children))
+(element (bookinfo pubsnumber) (process-children))
+(element (bookinfo releaseinfo) (process-children))
+(element (bookinfo revhistory) ($book-revhistory$))
+(element (bookinfo seriesvolnums) (process-children))
+(element (bookinfo subjectset) (process-children))
+(element (bookinfo subtitle) (process-children))
+(element (bookinfo surname) (process-children))
+(element (bookinfo title) (process-children))
+(element (bookinfo titleabbrev) (process-children))
+(element (bookinfo volumenum) (process-children))
+
+(element docinfo (empty-sosofo))
+
+(element (docinfo abbrev) (empty-sosofo))
+(element (docinfo abstract) (empty-sosofo))
+(element (docinfo address) (empty-sosofo))
+(element (docinfo affiliation) (empty-sosofo))
+(element (docinfo artpagenums) (empty-sosofo))
+(element (docinfo author) (empty-sosofo))
+(element (docinfo authorblurb) (empty-sosofo))
+(element (docinfo authorgroup) (empty-sosofo))
+(element (docinfo authorinitials) (empty-sosofo))
+(element (docinfo bibliomisc) (empty-sosofo))
+(element (docinfo biblioset) (empty-sosofo))
+(element (docinfo collab) (empty-sosofo))
+(element (docinfo confgroup) (empty-sosofo))
+(element (docinfo contractnum) (empty-sosofo))
+(element (docinfo contractsponsor) (empty-sosofo))
+(element (docinfo contrib) (empty-sosofo))
+(element (docinfo copyright) (empty-sosofo))
+(element (docinfo corpauthor) (empty-sosofo))
+(element (docinfo corpname) (empty-sosofo))
+(element (docinfo date) (empty-sosofo))
+(element (docinfo edition) (empty-sosofo))
+(element (docinfo editor) (empty-sosofo))
+(element (docinfo firstname) (empty-sosofo))
+(element (docinfo graphic) (empty-sosofo))
+(element (docinfo honorific) (empty-sosofo))
+(element (docinfo invpartnumber) (empty-sosofo))
+(element (docinfo isbn) (empty-sosofo))
+(element (docinfo issn) (empty-sosofo))
+(element (docinfo issuenum) (empty-sosofo))
+(element (docinfo itermset) (empty-sosofo))
+(element (docinfo keywordset) (empty-sosofo))
+(element (docinfo legalnotice) (empty-sosofo))
+(element (docinfo lineage) (empty-sosofo))
+(element (docinfo modespec) (empty-sosofo))
+(element (docinfo orgname) (empty-sosofo))
+(element (docinfo othercredit) (empty-sosofo))
+(element (docinfo othername) (empty-sosofo))
+(element (docinfo pagenums) (empty-sosofo))
+(element (docinfo printhistory) (empty-sosofo))
+(element (docinfo productname) (empty-sosofo))
+(element (docinfo productnumber) (empty-sosofo))
+(element (docinfo pubdate) (empty-sosofo))
+(element (docinfo publisher) (empty-sosofo))
+(element (docinfo publishername) (empty-sosofo))
+(element (docinfo pubsnumber) (empty-sosofo))
+(element (docinfo releaseinfo) (empty-sosofo))
+(element (docinfo revhistory) (empty-sosofo))
+(element (docinfo seriesvolnums) (empty-sosofo))
+(element (docinfo subjectset) (empty-sosofo))
+(element (docinfo subtitle) (empty-sosofo))
+(element (docinfo surname) (empty-sosofo))
+(element (docinfo title) (empty-sosofo))
+(element (docinfo titleabbrev) (empty-sosofo))
+(element (docinfo volumenum) (empty-sosofo))
+
+(element sect1info (process-children))
+
+(element (sect1info abbrev) (empty-sosofo))
+(element (sect1info abstract) (empty-sosofo))
+(element (sect1info address) (empty-sosofo))
+(element (sect1info affiliation) (empty-sosofo))
+(element (sect1info artpagenums) (empty-sosofo))
+(element (sect1info author) (empty-sosofo))
+(element (sect1info authorblurb) (empty-sosofo))
+(element (sect1info authorgroup) (empty-sosofo))
+(element (sect1info authorinitials) (empty-sosofo))
+(element (sect1info bibliomisc) (empty-sosofo))
+(element (sect1info biblioset) (empty-sosofo))
+(element (sect1info collab) (empty-sosofo))
+(element (sect1info confgroup) (empty-sosofo))
+(element (sect1info contractnum) (empty-sosofo))
+(element (sect1info contractsponsor) (empty-sosofo))
+(element (sect1info contrib) (empty-sosofo))
+(element (sect1info copyright) (empty-sosofo))
+(element (sect1info corpauthor) (empty-sosofo))
+(element (sect1info corpname) (empty-sosofo))
+(element (sect1info date) (empty-sosofo))
+(element (sect1info edition) (empty-sosofo))
+(element (sect1info editor) (empty-sosofo))
+(element (sect1info firstname) (empty-sosofo))
+(element (sect1info graphic) (empty-sosofo))
+(element (sect1info honorific) (empty-sosofo))
+(element (sect1info invpartnumber) (empty-sosofo))
+(element (sect1info isbn) (empty-sosofo))
+(element (sect1info issn) (empty-sosofo))
+(element (sect1info issuenum) (empty-sosofo))
+(element (sect1info itermset) (empty-sosofo))
+(element (sect1info keywordset) (empty-sosofo))
+(element (sect1info legalnotice) (empty-sosofo))
+(element (sect1info lineage) (empty-sosofo))
+(element (sect1info modespec) (empty-sosofo))
+(element (sect1info orgname) (empty-sosofo))
+(element (sect1info othercredit) (empty-sosofo))
+(element (sect1info othername) (empty-sosofo))
+(element (sect1info pagenums) (empty-sosofo))
+(element (sect1info printhistory) (empty-sosofo))
+(element (sect1info productname) (empty-sosofo))
+(element (sect1info productnumber) (empty-sosofo))
+(element (sect1info pubdate) (empty-sosofo))
+(element (sect1info publisher) (empty-sosofo))
+(element (sect1info publishername) (empty-sosofo))
+(element (sect1info pubsnumber) (empty-sosofo))
+(element (sect1info releaseinfo) (empty-sosofo))
+(element (sect1info revhistory) (empty-sosofo))
+(element (sect1info seriesvolnums) (empty-sosofo))
+(element (sect1info subjectset) (empty-sosofo))
+(element (sect1info subtitle) (empty-sosofo))
+(element (sect1info surname) (empty-sosofo))
+(element (sect1info title) (empty-sosofo))
+(element (sect1info titleabbrev) (empty-sosofo))
+(element (sect1info volumenum) (empty-sosofo))
+
+(element sect2info (process-children))
+
+(element (sect2info abbrev) (empty-sosofo))
+(element (sect2info abstract) (empty-sosofo))
+(element (sect2info address) (empty-sosofo))
+(element (sect2info affiliation) (empty-sosofo))
+(element (sect2info artpagenums) (empty-sosofo))
+(element (sect2info author) (empty-sosofo))
+(element (sect2info authorblurb) (empty-sosofo))
+(element (sect2info authorgroup) (empty-sosofo))
+(element (sect2info authorinitials) (empty-sosofo))
+(element (sect2info bibliomisc) (empty-sosofo))
+(element (sect2info biblioset) (empty-sosofo))
+(element (sect2info collab) (empty-sosofo))
+(element (sect2info confgroup) (empty-sosofo))
+(element (sect2info contractnum) (empty-sosofo))
+(element (sect2info contractsponsor) (empty-sosofo))
+(element (sect2info contrib) (empty-sosofo))
+(element (sect2info copyright) (empty-sosofo))
+(element (sect2info corpauthor) (empty-sosofo))
+(element (sect2info corpname) (empty-sosofo))
+(element (sect2info date) (empty-sosofo))
+(element (sect2info edition) (empty-sosofo))
+(element (sect2info editor) (empty-sosofo))
+(element (sect2info firstname) (empty-sosofo))
+(element (sect2info graphic) (empty-sosofo))
+(element (sect2info honorific) (empty-sosofo))
+(element (sect2info invpartnumber) (empty-sosofo))
+(element (sect2info isbn) (empty-sosofo))
+(element (sect2info issn) (empty-sosofo))
+(element (sect2info issuenum) (empty-sosofo))
+(element (sect2info itermset) (empty-sosofo))
+(element (sect2info keywordset) (empty-sosofo))
+(element (sect2info legalnotice) (empty-sosofo))
+(element (sect2info lineage) (empty-sosofo))
+(element (sect2info modespec) (empty-sosofo))
+(element (sect2info orgname) (empty-sosofo))
+(element (sect2info othercredit) (empty-sosofo))
+(element (sect2info othername) (empty-sosofo))
+(element (sect2info pagenums) (empty-sosofo))
+(element (sect2info printhistory) (empty-sosofo))
+(element (sect2info productname) (empty-sosofo))
+(element (sect2info productnumber) (empty-sosofo))
+(element (sect2info pubdate) (empty-sosofo))
+(element (sect2info publisher) (empty-sosofo))
+(element (sect2info publishername) (empty-sosofo))
+(element (sect2info pubsnumber) (empty-sosofo))
+(element (sect2info releaseinfo) (empty-sosofo))
+(element (sect2info revhistory) (empty-sosofo))
+(element (sect2info seriesvolnums) (empty-sosofo))
+(element (sect2info subjectset) (empty-sosofo))
+(element (sect2info subtitle) (empty-sosofo))
+(element (sect2info surname) (empty-sosofo))
+(element (sect2info title) (empty-sosofo))
+(element (sect2info titleabbrev) (empty-sosofo))
+(element (sect2info volumenum) (empty-sosofo))
+
+(element sect3info (process-children))
+
+(element (sect3info abbrev) (empty-sosofo))
+(element (sect3info abstract) (empty-sosofo))
+(element (sect3info address) (empty-sosofo))
+(element (sect3info affiliation) (empty-sosofo))
+(element (sect3info artpagenums) (empty-sosofo))
+(element (sect3info author) (empty-sosofo))
+(element (sect3info authorblurb) (empty-sosofo))
+(element (sect3info authorgroup) (empty-sosofo))
+(element (sect3info authorinitials) (empty-sosofo))
+(element (sect3info bibliomisc) (empty-sosofo))
+(element (sect3info biblioset) (empty-sosofo))
+(element (sect3info collab) (empty-sosofo))
+(element (sect3info confgroup) (empty-sosofo))
+(element (sect3info contractnum) (empty-sosofo))
+(element (sect3info contractsponsor) (empty-sosofo))
+(element (sect3info contrib) (empty-sosofo))
+(element (sect3info copyright) (empty-sosofo))
+(element (sect3info corpauthor) (empty-sosofo))
+(element (sect3info corpname) (empty-sosofo))
+(element (sect3info date) (empty-sosofo))
+(element (sect3info edition) (empty-sosofo))
+(element (sect3info editor) (empty-sosofo))
+(element (sect3info firstname) (empty-sosofo))
+(element (sect3info graphic) (empty-sosofo))
+(element (sect3info honorific) (empty-sosofo))
+(element (sect3info invpartnumber) (empty-sosofo))
+(element (sect3info isbn) (empty-sosofo))
+(element (sect3info issn) (empty-sosofo))
+(element (sect3info issuenum) (empty-sosofo))
+(element (sect3info itermset) (empty-sosofo))
+(element (sect3info keywordset) (empty-sosofo))
+(element (sect3info legalnotice) (empty-sosofo))
+(element (sect3info lineage) (empty-sosofo))
+(element (sect3info modespec) (empty-sosofo))
+(element (sect3info orgname) (empty-sosofo))
+(element (sect3info othercredit) (empty-sosofo))
+(element (sect3info othername) (empty-sosofo))
+(element (sect3info pagenums) (empty-sosofo))
+(element (sect3info printhistory) (empty-sosofo))
+(element (sect3info productname) (empty-sosofo))
+(element (sect3info productnumber) (empty-sosofo))
+(element (sect3info pubdate) (empty-sosofo))
+(element (sect3info publisher) (empty-sosofo))
+(element (sect3info publishername) (empty-sosofo))
+(element (sect3info pubsnumber) (empty-sosofo))
+(element (sect3info releaseinfo) (empty-sosofo))
+(element (sect3info revhistory) (empty-sosofo))
+(element (sect3info seriesvolnums) (empty-sosofo))
+(element (sect3info subjectset) (empty-sosofo))
+(element (sect3info subtitle) (empty-sosofo))
+(element (sect3info surname) (empty-sosofo))
+(element (sect3info title) (empty-sosofo))
+(element (sect3info titleabbrev) (empty-sosofo))
+(element (sect3info volumenum) (empty-sosofo))
+
+(element sect4info (process-children))
+
+(element (sect4info abbrev) (empty-sosofo))
+(element (sect4info abstract) (empty-sosofo))
+(element (sect4info address) (empty-sosofo))
+(element (sect4info affiliation) (empty-sosofo))
+(element (sect4info artpagenums) (empty-sosofo))
+(element (sect4info author) (empty-sosofo))
+(element (sect4info authorblurb) (empty-sosofo))
+(element (sect4info authorgroup) (empty-sosofo))
+(element (sect4info authorinitials) (empty-sosofo))
+(element (sect4info bibliomisc) (empty-sosofo))
+(element (sect4info biblioset) (empty-sosofo))
+(element (sect4info collab) (empty-sosofo))
+(element (sect4info confgroup) (empty-sosofo))
+(element (sect4info contractnum) (empty-sosofo))
+(element (sect4info contractsponsor) (empty-sosofo))
+(element (sect4info contrib) (empty-sosofo))
+(element (sect4info copyright) (empty-sosofo))
+(element (sect4info corpauthor) (empty-sosofo))
+(element (sect4info corpname) (empty-sosofo))
+(element (sect4info date) (empty-sosofo))
+(element (sect4info edition) (empty-sosofo))
+(element (sect4info editor) (empty-sosofo))
+(element (sect4info firstname) (empty-sosofo))
+(element (sect4info graphic) (empty-sosofo))
+(element (sect4info honorific) (empty-sosofo))
+(element (sect4info invpartnumber) (empty-sosofo))
+(element (sect4info isbn) (empty-sosofo))
+(element (sect4info issn) (empty-sosofo))
+(element (sect4info issuenum) (empty-sosofo))
+(element (sect4info itermset) (empty-sosofo))
+(element (sect4info keywordset) (empty-sosofo))
+(element (sect4info legalnotice) (empty-sosofo))
+(element (sect4info lineage) (empty-sosofo))
+(element (sect4info modespec) (empty-sosofo))
+(element (sect4info orgname) (empty-sosofo))
+(element (sect4info othercredit) (empty-sosofo))
+(element (sect4info othername) (empty-sosofo))
+(element (sect4info pagenums) (empty-sosofo))
+(element (sect4info printhistory) (empty-sosofo))
+(element (sect4info productname) (empty-sosofo))
+(element (sect4info productnumber) (empty-sosofo))
+(element (sect4info pubdate) (empty-sosofo))
+(element (sect4info publisher) (empty-sosofo))
+(element (sect4info publishername) (empty-sosofo))
+(element (sect4info pubsnumber) (empty-sosofo))
+(element (sect4info releaseinfo) (empty-sosofo))
+(element (sect4info revhistory) (empty-sosofo))
+(element (sect4info seriesvolnums) (empty-sosofo))
+(element (sect4info subjectset) (empty-sosofo))
+(element (sect4info subtitle) (empty-sosofo))
+(element (sect4info surname) (empty-sosofo))
+(element (sect4info title) (empty-sosofo))
+(element (sect4info titleabbrev) (empty-sosofo))
+(element (sect4info volumenum) (empty-sosofo))
+
+(element sect5info (process-children))
+
+(element (sect5info abbrev) (empty-sosofo))
+(element (sect5info abstract) (empty-sosofo))
+(element (sect5info address) (empty-sosofo))
+(element (sect5info affiliation) (empty-sosofo))
+(element (sect5info artpagenums) (empty-sosofo))
+(element (sect5info author) (empty-sosofo))
+(element (sect5info authorblurb) (empty-sosofo))
+(element (sect5info authorgroup) (empty-sosofo))
+(element (sect5info authorinitials) (empty-sosofo))
+(element (sect5info bibliomisc) (empty-sosofo))
+(element (sect5info biblioset) (empty-sosofo))
+(element (sect5info collab) (empty-sosofo))
+(element (sect5info confgroup) (empty-sosofo))
+(element (sect5info contractnum) (empty-sosofo))
+(element (sect5info contractsponsor) (empty-sosofo))
+(element (sect5info contrib) (empty-sosofo))
+(element (sect5info copyright) (empty-sosofo))
+(element (sect5info corpauthor) (empty-sosofo))
+(element (sect5info corpname) (empty-sosofo))
+(element (sect5info date) (empty-sosofo))
+(element (sect5info edition) (empty-sosofo))
+(element (sect5info editor) (empty-sosofo))
+(element (sect5info firstname) (empty-sosofo))
+(element (sect5info graphic) (empty-sosofo))
+(element (sect5info honorific) (empty-sosofo))
+(element (sect5info invpartnumber) (empty-sosofo))
+(element (sect5info isbn) (empty-sosofo))
+(element (sect5info issn) (empty-sosofo))
+(element (sect5info issuenum) (empty-sosofo))
+(element (sect5info itermset) (empty-sosofo))
+(element (sect5info keywordset) (empty-sosofo))
+(element (sect5info legalnotice) (empty-sosofo))
+(element (sect5info lineage) (empty-sosofo))
+(element (sect5info modespec) (empty-sosofo))
+(element (sect5info orgname) (empty-sosofo))
+(element (sect5info othercredit) (empty-sosofo))
+(element (sect5info othername) (empty-sosofo))
+(element (sect5info pagenums) (empty-sosofo))
+(element (sect5info printhistory) (empty-sosofo))
+(element (sect5info productname) (empty-sosofo))
+(element (sect5info productnumber) (empty-sosofo))
+(element (sect5info pubdate) (empty-sosofo))
+(element (sect5info publisher) (empty-sosofo))
+(element (sect5info publishername) (empty-sosofo))
+(element (sect5info pubsnumber) (empty-sosofo))
+(element (sect5info releaseinfo) (empty-sosofo))
+(element (sect5info revhistory) (empty-sosofo))
+(element (sect5info seriesvolnums) (empty-sosofo))
+(element (sect5info subjectset) (empty-sosofo))
+(element (sect5info subtitle) (empty-sosofo))
+(element (sect5info surname) (empty-sosofo))
+(element (sect5info title) (empty-sosofo))
+(element (sect5info titleabbrev) (empty-sosofo))
+(element (sect5info volumenum) (empty-sosofo))
+
+(element refsect1info (process-children))
+
+(element (refsect1info abbrev) (empty-sosofo))
+(element (refsect1info abstract) (empty-sosofo))
+(element (refsect1info address) (empty-sosofo))
+(element (refsect1info affiliation) (empty-sosofo))
+(element (refsect1info artpagenums) (empty-sosofo))
+(element (refsect1info author) (empty-sosofo))
+(element (refsect1info authorblurb) (empty-sosofo))
+(element (refsect1info authorgroup) (empty-sosofo))
+(element (refsect1info authorinitials) (empty-sosofo))
+(element (refsect1info bibliomisc) (empty-sosofo))
+(element (refsect1info biblioset) (empty-sosofo))
+(element (refsect1info collab) (empty-sosofo))
+(element (refsect1info confgroup) (empty-sosofo))
+(element (refsect1info contractnum) (empty-sosofo))
+(element (refsect1info contractsponsor) (empty-sosofo))
+(element (refsect1info contrib) (empty-sosofo))
+(element (refsect1info copyright) (empty-sosofo))
+(element (refsect1info corpauthor) (empty-sosofo))
+(element (refsect1info corpname) (empty-sosofo))
+(element (refsect1info date) (empty-sosofo))
+(element (refsect1info edition) (empty-sosofo))
+(element (refsect1info editor) (empty-sosofo))
+(element (refsect1info firstname) (empty-sosofo))
+(element (refsect1info graphic) (empty-sosofo))
+(element (refsect1info honorific) (empty-sosofo))
+(element (refsect1info invpartnumber) (empty-sosofo))
+(element (refsect1info isbn) (empty-sosofo))
+(element (refsect1info issn) (empty-sosofo))
+(element (refsect1info issuenum) (empty-sosofo))
+(element (refsect1info itermset) (empty-sosofo))
+(element (refsect1info keywordset) (empty-sosofo))
+(element (refsect1info legalnotice) (empty-sosofo))
+(element (refsect1info lineage) (empty-sosofo))
+(element (refsect1info modespec) (empty-sosofo))
+(element (refsect1info orgname) (empty-sosofo))
+(element (refsect1info othercredit) (empty-sosofo))
+(element (refsect1info othername) (empty-sosofo))
+(element (refsect1info pagenums) (empty-sosofo))
+(element (refsect1info printhistory) (empty-sosofo))
+(element (refsect1info productname) (empty-sosofo))
+(element (refsect1info productnumber) (empty-sosofo))
+(element (refsect1info pubdate) (empty-sosofo))
+(element (refsect1info publisher) (empty-sosofo))
+(element (refsect1info publishername) (empty-sosofo))
+(element (refsect1info pubsnumber) (empty-sosofo))
+(element (refsect1info releaseinfo) (empty-sosofo))
+(element (refsect1info revhistory) (empty-sosofo))
+(element (refsect1info seriesvolnums) (empty-sosofo))
+(element (refsect1info subjectset) (empty-sosofo))
+(element (refsect1info subtitle) (empty-sosofo))
+(element (refsect1info surname) (empty-sosofo))
+(element (refsect1info title) (empty-sosofo))
+(element (refsect1info titleabbrev) (empty-sosofo))
+(element (refsect1info volumenum) (empty-sosofo))
+
+(element refsect2info (process-children))
+
+(element (refsect2info abbrev) (empty-sosofo))
+(element (refsect2info abstract) (empty-sosofo))
+(element (refsect2info address) (empty-sosofo))
+(element (refsect2info affiliation) (empty-sosofo))
+(element (refsect2info artpagenums) (empty-sosofo))
+(element (refsect2info author) (empty-sosofo))
+(element (refsect2info authorblurb) (empty-sosofo))
+(element (refsect2info authorgroup) (empty-sosofo))
+(element (refsect2info authorinitials) (empty-sosofo))
+(element (refsect2info bibliomisc) (empty-sosofo))
+(element (refsect2info biblioset) (empty-sosofo))
+(element (refsect2info collab) (empty-sosofo))
+(element (refsect2info confgroup) (empty-sosofo))
+(element (refsect2info contractnum) (empty-sosofo))
+(element (refsect2info contractsponsor) (empty-sosofo))
+(element (refsect2info contrib) (empty-sosofo))
+(element (refsect2info copyright) (empty-sosofo))
+(element (refsect2info corpauthor) (empty-sosofo))
+(element (refsect2info corpname) (empty-sosofo))
+(element (refsect2info date) (empty-sosofo))
+(element (refsect2info edition) (empty-sosofo))
+(element (refsect2info editor) (empty-sosofo))
+(element (refsect2info firstname) (empty-sosofo))
+(element (refsect2info graphic) (empty-sosofo))
+(element (refsect2info honorific) (empty-sosofo))
+(element (refsect2info invpartnumber) (empty-sosofo))
+(element (refsect2info isbn) (empty-sosofo))
+(element (refsect2info issn) (empty-sosofo))
+(element (refsect2info issuenum) (empty-sosofo))
+(element (refsect2info itermset) (empty-sosofo))
+(element (refsect2info keywordset) (empty-sosofo))
+(element (refsect2info legalnotice) (empty-sosofo))
+(element (refsect2info lineage) (empty-sosofo))
+(element (refsect2info modespec) (empty-sosofo))
+(element (refsect2info orgname) (empty-sosofo))
+(element (refsect2info othercredit) (empty-sosofo))
+(element (refsect2info othername) (empty-sosofo))
+(element (refsect2info pagenums) (empty-sosofo))
+(element (refsect2info printhistory) (empty-sosofo))
+(element (refsect2info productname) (empty-sosofo))
+(element (refsect2info productnumber) (empty-sosofo))
+(element (refsect2info pubdate) (empty-sosofo))
+(element (refsect2info publisher) (empty-sosofo))
+(element (refsect2info publishername) (empty-sosofo))
+(element (refsect2info pubsnumber) (empty-sosofo))
+(element (refsect2info releaseinfo) (empty-sosofo))
+(element (refsect2info revhistory) (empty-sosofo))
+(element (refsect2info seriesvolnums) (empty-sosofo))
+(element (refsect2info subjectset) (empty-sosofo))
+(element (refsect2info subtitle) (empty-sosofo))
+(element (refsect2info surname) (empty-sosofo))
+(element (refsect2info title) (empty-sosofo))
+(element (refsect2info titleabbrev) (empty-sosofo))
+(element (refsect2info volumenum) (empty-sosofo))
+
+(element refsect3info (process-children))
+
+(element (refsect3info abbrev) (empty-sosofo))
+(element (refsect3info abstract) (empty-sosofo))
+(element (refsect3info address) (empty-sosofo))
+(element (refsect3info affiliation) (empty-sosofo))
+(element (refsect3info artpagenums) (empty-sosofo))
+(element (refsect3info author) (empty-sosofo))
+(element (refsect3info authorblurb) (empty-sosofo))
+(element (refsect3info authorgroup) (empty-sosofo))
+(element (refsect3info authorinitials) (empty-sosofo))
+(element (refsect3info bibliomisc) (empty-sosofo))
+(element (refsect3info biblioset) (empty-sosofo))
+(element (refsect3info collab) (empty-sosofo))
+(element (refsect3info confgroup) (empty-sosofo))
+(element (refsect3info contractnum) (empty-sosofo))
+(element (refsect3info contractsponsor) (empty-sosofo))
+(element (refsect3info contrib) (empty-sosofo))
+(element (refsect3info copyright) (empty-sosofo))
+(element (refsect3info corpauthor) (empty-sosofo))
+(element (refsect3info corpname) (empty-sosofo))
+(element (refsect3info date) (empty-sosofo))
+(element (refsect3info edition) (empty-sosofo))
+(element (refsect3info editor) (empty-sosofo))
+(element (refsect3info firstname) (empty-sosofo))
+(element (refsect3info graphic) (empty-sosofo))
+(element (refsect3info honorific) (empty-sosofo))
+(element (refsect3info invpartnumber) (empty-sosofo))
+(element (refsect3info isbn) (empty-sosofo))
+(element (refsect3info issn) (empty-sosofo))
+(element (refsect3info issuenum) (empty-sosofo))
+(element (refsect3info itermset) (empty-sosofo))
+(element (refsect3info keywordset) (empty-sosofo))
+(element (refsect3info legalnotice) (empty-sosofo))
+(element (refsect3info lineage) (empty-sosofo))
+(element (refsect3info modespec) (empty-sosofo))
+(element (refsect3info orgname) (empty-sosofo))
+(element (refsect3info othercredit) (empty-sosofo))
+(element (refsect3info othername) (empty-sosofo))
+(element (refsect3info pagenums) (empty-sosofo))
+(element (refsect3info printhistory) (empty-sosofo))
+(element (refsect3info productname) (empty-sosofo))
+(element (refsect3info productnumber) (empty-sosofo))
+(element (refsect3info pubdate) (empty-sosofo))
+(element (refsect3info publisher) (empty-sosofo))
+(element (refsect3info publishername) (empty-sosofo))
+(element (refsect3info pubsnumber) (empty-sosofo))
+(element (refsect3info releaseinfo) (empty-sosofo))
+(element (refsect3info revhistory) (empty-sosofo))
+(element (refsect3info seriesvolnums) (empty-sosofo))
+(element (refsect3info subjectset) (empty-sosofo))
+(element (refsect3info subtitle) (empty-sosofo))
+(element (refsect3info surname) (empty-sosofo))
+(element (refsect3info title) (empty-sosofo))
+(element (refsect3info titleabbrev) (empty-sosofo))
+(element (refsect3info volumenum) (empty-sosofo))
+
+(element seriesinfo (process-children))
+
+(element (seriesinfo abbrev) (empty-sosofo))
+(element (seriesinfo abstract) (empty-sosofo))
+(element (seriesinfo address) (empty-sosofo))
+(element (seriesinfo affiliation) (empty-sosofo))
+(element (seriesinfo artpagenums) (empty-sosofo))
+(element (seriesinfo author) (empty-sosofo))
+(element (seriesinfo authorblurb) (empty-sosofo))
+(element (seriesinfo authorgroup) (empty-sosofo))
+(element (seriesinfo authorinitials) (empty-sosofo))
+(element (seriesinfo bibliomisc) (empty-sosofo))
+(element (seriesinfo biblioset) (empty-sosofo))
+(element (seriesinfo collab) (empty-sosofo))
+(element (seriesinfo confgroup) (empty-sosofo))
+(element (seriesinfo contractnum) (empty-sosofo))
+(element (seriesinfo contractsponsor) (empty-sosofo))
+(element (seriesinfo contrib) (empty-sosofo))
+(element (seriesinfo copyright) (empty-sosofo))
+(element (seriesinfo corpauthor) (empty-sosofo))
+(element (seriesinfo corpname) (empty-sosofo))
+(element (seriesinfo date) (empty-sosofo))
+(element (seriesinfo edition) (empty-sosofo))
+(element (seriesinfo editor) (empty-sosofo))
+(element (seriesinfo firstname) (empty-sosofo))
+(element (seriesinfo honorific) (empty-sosofo))
+(element (seriesinfo invpartnumber) (empty-sosofo))
+(element (seriesinfo isbn) (empty-sosofo))
+(element (seriesinfo issn) (empty-sosofo))
+(element (seriesinfo issuenum) (empty-sosofo))
+(element (seriesinfo lineage) (empty-sosofo))
+(element (seriesinfo orgname) (empty-sosofo))
+(element (seriesinfo othercredit) (empty-sosofo))
+(element (seriesinfo othername) (empty-sosofo))
+(element (seriesinfo pagenums) (empty-sosofo))
+(element (seriesinfo printhistory) (empty-sosofo))
+(element (seriesinfo productname) (empty-sosofo))
+(element (seriesinfo productnumber) (empty-sosofo))
+(element (seriesinfo pubdate) (empty-sosofo))
+(element (seriesinfo publisher) (empty-sosofo))
+(element (seriesinfo publishername) (empty-sosofo))
+(element (seriesinfo pubsnumber) (empty-sosofo))
+(element (seriesinfo releaseinfo) (empty-sosofo))
+(element (seriesinfo revhistory) (empty-sosofo))
+(element (seriesinfo seriesvolnums) (empty-sosofo))
+(element (seriesinfo subtitle) (empty-sosofo))
+(element (seriesinfo surname) (empty-sosofo))
+(element (seriesinfo title) (empty-sosofo))
+(element (seriesinfo titleabbrev) (empty-sosofo))
+(element (seriesinfo volumenum) (empty-sosofo))
+
+(element artheader (empty-sosofo))
+
+(element (artheader abbrev) (empty-sosofo))
+(element (artheader abstract) (empty-sosofo))
+(element (artheader address) (empty-sosofo))
+(element (artheader affiliation) (empty-sosofo))
+(element (artheader artpagenums) (empty-sosofo))
+(element (artheader author) (empty-sosofo))
+(element (artheader authorblurb) (empty-sosofo))
+(element (artheader authorgroup) (empty-sosofo))
+(element (artheader authorinitials) (empty-sosofo))
+(element (artheader bibliomisc) (empty-sosofo))
+(element (artheader biblioset) (empty-sosofo))
+(element (artheader bookbiblio) (empty-sosofo))
+(element (artheader collab) (empty-sosofo))
+(element (artheader confgroup) (empty-sosofo))
+(element (artheader contractnum) (empty-sosofo))
+(element (artheader contractsponsor) (empty-sosofo))
+(element (artheader contrib) (empty-sosofo))
+(element (artheader copyright) (empty-sosofo))
+(element (artheader corpauthor) (empty-sosofo))
+(element (artheader corpname) (empty-sosofo))
+(element (artheader date) (empty-sosofo))
+(element (artheader edition) (empty-sosofo))
+(element (artheader editor) (empty-sosofo))
+(element (artheader firstname) (empty-sosofo))
+(element (artheader honorific) (empty-sosofo))
+(element (artheader invpartnumber) (empty-sosofo))
+(element (artheader isbn) (empty-sosofo))
+(element (artheader issn) (empty-sosofo))
+(element (artheader issuenum) (empty-sosofo))
+(element (artheader keywordset) (empty-sosofo))
+(element (artheader lineage) (empty-sosofo))
+(element (artheader orgname) (empty-sosofo))
+(element (artheader othercredit) (empty-sosofo))
+(element (artheader othername) (empty-sosofo))
+(element (artheader pagenums) (empty-sosofo))
+(element (artheader printhistory) (empty-sosofo))
+(element (artheader productname) (empty-sosofo))
+(element (artheader productnumber) (empty-sosofo))
+(element (artheader pubdate) (empty-sosofo))
+(element (artheader publisher) (empty-sosofo))
+(element (artheader publishername) (empty-sosofo))
+(element (artheader pubsnumber) (empty-sosofo))
+(element (artheader releaseinfo) (empty-sosofo))
+(element (artheader revhistory) (empty-sosofo))
+(element (artheader seriesvolnums) (empty-sosofo))
+(element (artheader subtitle) (empty-sosofo))
+(element (artheader surname) (empty-sosofo))
+(element (artheader title) (empty-sosofo))
+(element (artheader titleabbrev) (empty-sosofo))
+(element (artheader volumenum) (empty-sosofo))
+
+(element articleinfo (empty-sosofo))
+
+(element (articleinfo abbrev) (empty-sosofo))
+(element (articleinfo abstract) (empty-sosofo))
+(element (articleinfo address) (empty-sosofo))
+(element (articleinfo affiliation) (empty-sosofo))
+(element (articleinfo artpagenums) (empty-sosofo))
+(element (articleinfo author) (empty-sosofo))
+(element (articleinfo authorblurb) (empty-sosofo))
+(element (articleinfo authorgroup) (empty-sosofo))
+(element (articleinfo authorinitials) (empty-sosofo))
+(element (articleinfo bibliomisc) (empty-sosofo))
+(element (articleinfo biblioset) (empty-sosofo))
+(element (articleinfo bookbiblio) (empty-sosofo))
+(element (articleinfo collab) (empty-sosofo))
+(element (articleinfo confgroup) (empty-sosofo))
+(element (articleinfo contractnum) (empty-sosofo))
+(element (articleinfo contractsponsor) (empty-sosofo))
+(element (articleinfo contrib) (empty-sosofo))
+(element (articleinfo copyright) (empty-sosofo))
+(element (articleinfo corpauthor) (empty-sosofo))
+(element (articleinfo corpname) (empty-sosofo))
+(element (articleinfo date) (empty-sosofo))
+(element (articleinfo edition) (empty-sosofo))
+(element (articleinfo editor) (empty-sosofo))
+(element (articleinfo firstname) (empty-sosofo))
+(element (articleinfo honorific) (empty-sosofo))
+(element (articleinfo invpartnumber) (empty-sosofo))
+(element (articleinfo isbn) (empty-sosofo))
+(element (articleinfo issn) (empty-sosofo))
+(element (articleinfo issuenum) (empty-sosofo))
+(element (articleinfo lineage) (empty-sosofo))
+(element (articleinfo orgname) (empty-sosofo))
+(element (articleinfo othercredit) (empty-sosofo))
+(element (articleinfo othername) (empty-sosofo))
+(element (articleinfo pagenums) (empty-sosofo))
+(element (articleinfo printhistory) (empty-sosofo))
+(element (articleinfo productname) (empty-sosofo))
+(element (articleinfo productnumber) (empty-sosofo))
+(element (articleinfo pubdate) (empty-sosofo))
+(element (articleinfo publisher) (empty-sosofo))
+(element (articleinfo publishername) (empty-sosofo))
+(element (articleinfo pubsnumber) (empty-sosofo))
+(element (articleinfo releaseinfo) (empty-sosofo))
+(element (articleinfo revhistory) (empty-sosofo))
+(element (articleinfo seriesvolnums) (empty-sosofo))
+(element (articleinfo subtitle) (empty-sosofo))
+(element (articleinfo surname) (empty-sosofo))
+(element (articleinfo title) (empty-sosofo))
+(element (articleinfo titleabbrev) (empty-sosofo))
+(element (articleinfo volumenum) (empty-sosofo))
+
+(element refsynopsisdivinfo (process-children))
+
+(element (refsynopsisdivinfo graphic) (empty-sosofo))
+(element (refsynopsisdivinfo legalnotice) (empty-sosofo))
+(element (refsynopsisdivinfo modespec) (empty-sosofo))
+(element (refsynopsisdivinfo subjectset) (empty-sosofo))
+(element (refsynopsisdivinfo keywordset) (empty-sosofo))
+(element (refsynopsisdivinfo itermset) (empty-sosofo))
+(element (refsynopsisdivinfo abbrev) (empty-sosofo))
+(element (refsynopsisdivinfo abstract) (empty-sosofo))
+(element (refsynopsisdivinfo address) (empty-sosofo))
+(element (refsynopsisdivinfo artpagenums) (empty-sosofo))
+(element (refsynopsisdivinfo author) (empty-sosofo))
+(element (refsynopsisdivinfo authorgroup) (empty-sosofo))
+(element (refsynopsisdivinfo authorinitials) (empty-sosofo))
+(element (refsynopsisdivinfo bibliomisc) (empty-sosofo))
+(element (refsynopsisdivinfo biblioset) (empty-sosofo))
+(element (refsynopsisdivinfo collab) (empty-sosofo))
+(element (refsynopsisdivinfo confgroup) (empty-sosofo))
+(element (refsynopsisdivinfo contractnum) (empty-sosofo))
+(element (refsynopsisdivinfo contractsponsor) (empty-sosofo))
+(element (refsynopsisdivinfo copyright) (empty-sosofo))
+(element (refsynopsisdivinfo corpauthor) (empty-sosofo))
+(element (refsynopsisdivinfo corpname) (empty-sosofo))
+(element (refsynopsisdivinfo date) (empty-sosofo))
+(element (refsynopsisdivinfo edition) (empty-sosofo))
+(element (refsynopsisdivinfo editor) (empty-sosofo))
+(element (refsynopsisdivinfo invpartnumber) (empty-sosofo))
+(element (refsynopsisdivinfo isbn) (empty-sosofo))
+(element (refsynopsisdivinfo issn) (empty-sosofo))
+(element (refsynopsisdivinfo issuenum) (empty-sosofo))
+(element (refsynopsisdivinfo orgname) (empty-sosofo))
+(element (refsynopsisdivinfo othercredit) (empty-sosofo))
+(element (refsynopsisdivinfo pagenums) (empty-sosofo))
+(element (refsynopsisdivinfo printhistory) (empty-sosofo))
+(element (refsynopsisdivinfo productname) (empty-sosofo))
+(element (refsynopsisdivinfo productnumber) (empty-sosofo))
+(element (refsynopsisdivinfo pubdate) (empty-sosofo))
+(element (refsynopsisdivinfo publisher) (empty-sosofo))
+(element (refsynopsisdivinfo publishername) (empty-sosofo))
+(element (refsynopsisdivinfo pubsnumber) (empty-sosofo))
+(element (refsynopsisdivinfo releaseinfo) (empty-sosofo))
+(element (refsynopsisdivinfo revhistory) (empty-sosofo))
+(element (refsynopsisdivinfo seriesvolnums) (empty-sosofo))
+(element (refsynopsisdivinfo subtitle) (empty-sosofo))
+(element (refsynopsisdivinfo title) (empty-sosofo))
+(element (refsynopsisdivinfo titleabbrev) (empty-sosofo))
+(element (refsynopsisdivinfo volumenum) (empty-sosofo))
+(element (refsynopsisdivinfo honorific) (empty-sosofo))
+(element (refsynopsisdivinfo firstname) (empty-sosofo))
+(element (refsynopsisdivinfo surname) (empty-sosofo))
+(element (refsynopsisdivinfo lineage) (empty-sosofo))
+(element (refsynopsisdivinfo othername) (empty-sosofo))
+(element (refsynopsisdivinfo affiliation) (empty-sosofo))
+(element (refsynopsisdivinfo authorblurb) (empty-sosofo))
+(element (refsynopsisdivinfo contrib) (empty-sosofo))
+
+(element prefaceinfo (empty-sosofo))
+
+(element (prefaceinfo abbrev) (empty-sosofo))
+(element (prefaceinfo abstract) (empty-sosofo))
+(element (prefaceinfo address) (empty-sosofo))
+(element (prefaceinfo affiliation) (empty-sosofo))
+(element (prefaceinfo artpagenums) (empty-sosofo))
+(element (prefaceinfo author) (empty-sosofo))
+(element (prefaceinfo authorblurb) (empty-sosofo))
+(element (prefaceinfo authorgroup) (empty-sosofo))
+(element (prefaceinfo authorinitials) (empty-sosofo))
+(element (prefaceinfo bibliomisc) (empty-sosofo))
+(element (prefaceinfo biblioset) (empty-sosofo))
+(element (prefaceinfo bookbiblio) (empty-sosofo))
+(element (prefaceinfo collab) (empty-sosofo))
+(element (prefaceinfo confgroup) (empty-sosofo))
+(element (prefaceinfo contractnum) (empty-sosofo))
+(element (prefaceinfo contractsponsor) (empty-sosofo))
+(element (prefaceinfo contrib) (empty-sosofo))
+(element (prefaceinfo copyright) (empty-sosofo))
+(element (prefaceinfo corpauthor) (empty-sosofo))
+(element (prefaceinfo corpname) (empty-sosofo))
+(element (prefaceinfo date) (empty-sosofo))
+(element (prefaceinfo edition) (empty-sosofo))
+(element (prefaceinfo editor) (empty-sosofo))
+(element (prefaceinfo firstname) (empty-sosofo))
+(element (prefaceinfo honorific) (empty-sosofo))
+(element (prefaceinfo invpartnumber) (empty-sosofo))
+(element (prefaceinfo isbn) (empty-sosofo))
+(element (prefaceinfo issn) (empty-sosofo))
+(element (prefaceinfo issuenum) (empty-sosofo))
+(element (prefaceinfo lineage) (empty-sosofo))
+(element (prefaceinfo orgname) (empty-sosofo))
+(element (prefaceinfo othercredit) (empty-sosofo))
+(element (prefaceinfo othername) (empty-sosofo))
+(element (prefaceinfo pagenums) (empty-sosofo))
+(element (prefaceinfo printhistory) (empty-sosofo))
+(element (prefaceinfo productname) (empty-sosofo))
+(element (prefaceinfo productnumber) (empty-sosofo))
+(element (prefaceinfo pubdate) (empty-sosofo))
+(element (prefaceinfo publisher) (empty-sosofo))
+(element (prefaceinfo publishername) (empty-sosofo))
+(element (prefaceinfo pubsnumber) (empty-sosofo))
+(element (prefaceinfo releaseinfo) (empty-sosofo))
+(element (prefaceinfo revhistory) (empty-sosofo))
+(element (prefaceinfo seriesvolnums) (empty-sosofo))
+(element (prefaceinfo subtitle) (empty-sosofo))
+(element (prefaceinfo surname) (empty-sosofo))
+(element (prefaceinfo title) (empty-sosofo))
+(element (prefaceinfo titleabbrev) (empty-sosofo))
+(element (prefaceinfo volumenum) (empty-sosofo))
+
+(element chapterinfo (empty-sosofo))
+
+(element (chapterinfo abbrev) (empty-sosofo))
+(element (chapterinfo abstract) (empty-sosofo))
+(element (chapterinfo address) (empty-sosofo))
+(element (chapterinfo affiliation) (empty-sosofo))
+(element (chapterinfo artpagenums) (empty-sosofo))
+(element (chapterinfo author) (empty-sosofo))
+(element (chapterinfo authorblurb) (empty-sosofo))
+(element (chapterinfo authorgroup) (empty-sosofo))
+(element (chapterinfo authorinitials) (empty-sosofo))
+(element (chapterinfo bibliomisc) (empty-sosofo))
+(element (chapterinfo biblioset) (empty-sosofo))
+(element (chapterinfo bookbiblio) (empty-sosofo))
+(element (chapterinfo collab) (empty-sosofo))
+(element (chapterinfo confgroup) (empty-sosofo))
+(element (chapterinfo contractnum) (empty-sosofo))
+(element (chapterinfo contractsponsor) (empty-sosofo))
+(element (chapterinfo contrib) (empty-sosofo))
+(element (chapterinfo copyright) (empty-sosofo))
+(element (chapterinfo corpauthor) (empty-sosofo))
+(element (chapterinfo corpname) (empty-sosofo))
+(element (chapterinfo date) (empty-sosofo))
+(element (chapterinfo edition) (empty-sosofo))
+(element (chapterinfo editor) (empty-sosofo))
+(element (chapterinfo firstname) (empty-sosofo))
+(element (chapterinfo honorific) (empty-sosofo))
+(element (chapterinfo invpartnumber) (empty-sosofo))
+(element (chapterinfo isbn) (empty-sosofo))
+(element (chapterinfo issn) (empty-sosofo))
+(element (chapterinfo issuenum) (empty-sosofo))
+(element (chapterinfo lineage) (empty-sosofo))
+(element (chapterinfo orgname) (empty-sosofo))
+(element (chapterinfo othercredit) (empty-sosofo))
+(element (chapterinfo othername) (empty-sosofo))
+(element (chapterinfo pagenums) (empty-sosofo))
+(element (chapterinfo printhistory) (empty-sosofo))
+(element (chapterinfo productname) (empty-sosofo))
+(element (chapterinfo productnumber) (empty-sosofo))
+(element (chapterinfo pubdate) (empty-sosofo))
+(element (chapterinfo publisher) (empty-sosofo))
+(element (chapterinfo publishername) (empty-sosofo))
+(element (chapterinfo pubsnumber) (empty-sosofo))
+(element (chapterinfo releaseinfo) (empty-sosofo))
+(element (chapterinfo revhistory) (empty-sosofo))
+(element (chapterinfo seriesvolnums) (empty-sosofo))
+(element (chapterinfo subtitle) (empty-sosofo))
+(element (chapterinfo surname) (empty-sosofo))
+(element (chapterinfo title) (empty-sosofo))
+(element (chapterinfo titleabbrev) (empty-sosofo))
+(element (chapterinfo volumenum) (empty-sosofo))
+
+(element appendixinfo (empty-sosofo))
+
+(element (appendixinfo abbrev) (empty-sosofo))
+(element (appendixinfo abstract) (empty-sosofo))
+(element (appendixinfo address) (empty-sosofo))
+(element (appendixinfo affiliation) (empty-sosofo))
+(element (appendixinfo artpagenums) (empty-sosofo))
+(element (appendixinfo author) (empty-sosofo))
+(element (appendixinfo authorblurb) (empty-sosofo))
+(element (appendixinfo authorgroup) (empty-sosofo))
+(element (appendixinfo authorinitials) (empty-sosofo))
+(element (appendixinfo bibliomisc) (empty-sosofo))
+(element (appendixinfo biblioset) (empty-sosofo))
+(element (appendixinfo bookbiblio) (empty-sosofo))
+(element (appendixinfo collab) (empty-sosofo))
+(element (appendixinfo confgroup) (empty-sosofo))
+(element (appendixinfo contractnum) (empty-sosofo))
+(element (appendixinfo contractsponsor) (empty-sosofo))
+(element (appendixinfo contrib) (empty-sosofo))
+(element (appendixinfo copyright) (empty-sosofo))
+(element (appendixinfo corpauthor) (empty-sosofo))
+(element (appendixinfo corpname) (empty-sosofo))
+(element (appendixinfo date) (empty-sosofo))
+(element (appendixinfo edition) (empty-sosofo))
+(element (appendixinfo editor) (empty-sosofo))
+(element (appendixinfo firstname) (empty-sosofo))
+(element (appendixinfo honorific) (empty-sosofo))
+(element (appendixinfo invpartnumber) (empty-sosofo))
+(element (appendixinfo isbn) (empty-sosofo))
+(element (appendixinfo issn) (empty-sosofo))
+(element (appendixinfo issuenum) (empty-sosofo))
+(element (appendixinfo lineage) (empty-sosofo))
+(element (appendixinfo orgname) (empty-sosofo))
+(element (appendixinfo othercredit) (empty-sosofo))
+(element (appendixinfo othername) (empty-sosofo))
+(element (appendixinfo pagenums) (empty-sosofo))
+(element (appendixinfo printhistory) (empty-sosofo))
+(element (appendixinfo productname) (empty-sosofo))
+(element (appendixinfo productnumber) (empty-sosofo))
+(element (appendixinfo pubdate) (empty-sosofo))
+(element (appendixinfo publisher) (empty-sosofo))
+(element (appendixinfo publishername) (empty-sosofo))
+(element (appendixinfo pubsnumber) (empty-sosofo))
+(element (appendixinfo releaseinfo) (empty-sosofo))
+(element (appendixinfo revhistory) (empty-sosofo))
+(element (appendixinfo seriesvolnums) (empty-sosofo))
+(element (appendixinfo subtitle) (empty-sosofo))
+(element (appendixinfo surname) (empty-sosofo))
+(element (appendixinfo title) (empty-sosofo))
+(element (appendixinfo titleabbrev) (empty-sosofo))
+(element (appendixinfo volumenum) (empty-sosofo))
diff --git a/print/dbinline.dsl b/print/dbinline.dsl
new file mode 100644 (file)
index 0000000..43fb26a
--- /dev/null
@@ -0,0 +1,263 @@
+;; $Id: dbinline.dsl,v 1.7 2003/03/25 19:53:56 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================== INLINES ===============================
+
+(element abbrev ($charseq$))
+(element accel ($score-seq$ 'after))
+(element acronym ($charseq$))
+(element action ($charseq$))
+(element application ($charseq$))
+(element classname ($mono-seq$))
+(element constant ($mono-seq$))
+(element command ($bold-seq$))
+(element computeroutput ($mono-seq$))
+(element database ($charseq$))
+(element email 
+  (make sequence (literal "&#60;") ($mono-seq$) (literal "&#62;")))
+(element envar ($charseq$))
+(element errorcode ($charseq$))
+(element errorname ($charseq$))
+(element errortype ($charseq$))
+(element filename ($mono-seq$))
+(element function ($mono-seq$))
+(element guibutton ($guilabel-seq$))
+(element guiicon ($guilabel-seq$))
+(element guilabel ($guilabel-seq$))
+(element guimenu ($guilabel-seq$))
+(element guimenuitem ($guilabel-seq$))
+(element guisubmenu ($guilabel-seq$))
+(element hardware ($charseq$))
+(element interface ($charseq$))
+(element interfacedefinition ($charseq$))
+(element keycap ($bold-seq$))
+(element keycode ($charseq$))
+
+(element keycombo 
+  (let* ((action (attribute-string (normalize "action")))
+        (joinchar 
+         (cond
+          ((equal? action (normalize "seq")) " ")          ;; space
+          ((equal? action (normalize "simul")) "+")        ;; +
+          ((equal? action (normalize "press")) "-")        ;; ? I don't know
+          ((equal? action (normalize "click")) "-")        ;; ? what to do
+          ((equal? action (normalize "double-click")) "-") ;; ? about the rest
+          ((equal? action (normalize "other")) "-")        ;; ? of these
+          (else "-"))))
+    (let loop ((nl (children (current-node))) (count 1))
+      (if (node-list-empty? nl)
+         (empty-sosofo)
+         (if (equal? count 1)
+             (make sequence
+               (process-node-list (node-list-first nl))
+               (loop (node-list-rest nl) (+ count 1)))
+             (make sequence
+               (literal joinchar)
+               (process-node-list (node-list-first nl))
+               (loop (node-list-rest nl) (+ count 1))))))))
+
+(element keysym ($charseq$))
+(element literal ($mono-seq$))
+(element medialabel ($italic-seq$))
+
+(element menuchoice
+  (let* ((shortcut (select-elements (children (current-node)) 
+                                   (normalize "shortcut")))
+        (items    (node-list-filter-by-not-gi
+                   (children (current-node))
+                   (list (normalize "shortcut")))))
+    (make sequence
+      (let loop ((nl items) (first? #t))
+       (if (node-list-empty? nl)
+           (empty-sosofo)
+           (make sequence
+             (if first?
+                 (process-node-list (node-list-first nl))
+                 (make sequence
+                   (if (or (equal? (gi (node-list-first nl))
+                                   (normalize "guimenuitem"))
+                           (equal? (gi (node-list-first nl))
+                                   (normalize "guisubmenu")))
+                       (literal "\rightwards-arrow;")
+                       (literal "+"))
+                   (process-node-list (node-list-first nl))))
+             (loop (node-list-rest nl) #f))))
+      (if (node-list-empty? shortcut)
+         (empty-sosofo)
+         (make sequence
+           (literal " (")
+           (process-node-list shortcut)
+           (literal ")"))))))
+
+(element methodname ($mono-seq$))
+(element shortcut ($bold-seq$))
+(element mousebutton ($charseq$))
+(element option ($mono-seq$))
+
+(element optional 
+  (make sequence 
+    (literal %arg-choice-opt-open-str%)
+    ($charseq$)
+    (literal %arg-choice-opt-close-str%)))
+
+(element parameter ($italic-mono-seq$))
+(element property ($charseq$))
+(element prompt ($mono-seq$))
+(element replaceable ($italic-mono-seq$))
+(element returnvalue ($charseq$))
+(element structfield ($italic-mono-seq$))
+(element structname ($charseq$))
+(element symbol ($charseq$))
+(element systemitem ($charseq$))
+(element token ($charseq$))
+(element type ($charseq$))
+(element userinput ($bold-mono-seq$))
+(element varname ($mono-seq$))
+
+(element citation 
+  (if biblio-citation-check
+      (let* ((bgraphies (select-elements (descendants (sgml-root-element))
+                                        (normalize "bibliography")))
+            (bchildren1 (expand-children bgraphies
+                                         (list (normalize "bibliography"))))
+            (bchildren2 (expand-children bchildren1
+                                         (list (normalize "bibliodiv"))))
+            (bibentries (node-list-filter-by-gi 
+                         bchildren2
+                         (list (normalize "biblioentry")
+                               (normalize "bibliomixed")))))
+       (let loop ((bibs bibentries))
+         (if (node-list-empty? bibs)
+             (make sequence
+               (error (string-append "Cannot find citation: " 
+                                          (data (current-node))))
+               (literal "[") ($charseq$) (literal "]"))
+             (if (citation-matches-target? (current-node) 
+                                           (node-list-first bibs))
+                 (make link 
+                   destination: (node-list-address (node-list-first bibs))
+                   (literal "[") ($charseq$) (literal "]"))
+                 (loop (node-list-rest bibs))))))
+      (make sequence 
+       (literal "[") ($charseq$) (literal "]"))))
+
+(element citerefentry 
+  (if %refentry-xref-italic%
+      ($italic-seq$)
+      ($charseq$)))
+
+(element citetitle
+  (if (equal? (attribute-string (normalize "pubwork")) "article")
+      (make sequence
+       (literal (gentext-start-quote))
+       (process-children)
+       (literal (gentext-end-quote)))
+      ($italic-seq$)))
+
+(element emphasis
+  (if (and (attribute-string (normalize "role"))
+          (or (equal? (attribute-string (normalize "role")) "strong")
+              (equal? (attribute-string (normalize "role")) "bold")))
+      ($bold-seq$)
+      ($italic-seq$)))
+
+(element foreignphrase ($italic-seq$))
+(element markup ($charseq$))
+(element phrase ($charseq$))
+
+(element quote
+  (let* ((hnr   (hierarchical-number-recursive (normalize "quote") 
+                                              (current-node)))
+        (depth (length hnr)))
+    (if (equal? (modulo depth 2) 1)
+       (make sequence
+         (literal (gentext-start-nested-quote))
+         (process-children)
+         (literal (gentext-end-nested-quote)))
+       (make sequence
+         (literal (gentext-start-quote))
+         (process-children)
+         (literal (gentext-end-quote))))))
+
+(element sgmltag
+  (let ((class (if (attribute-string (normalize "class"))
+                  (attribute-string (normalize "class"))
+                  (normalize "element"))))
+    (cond
+<![CDATA[
+      ((equal? class (normalize "attribute")) ($mono-seq$))
+      ((equal? class (normalize "attvalue")) ($mono-seq$))
+      ((equal? class (normalize "element")) ($mono-seq$))
+      ((equal? class (normalize "emptytag")) ($mono-seq$ (make sequence 
+                                 (literal "<") 
+                                 (process-children)
+                                 (literal "/>"))))
+      ((equal? class (normalize "endtag")) ($mono-seq$ (make sequence 
+                              (literal "</") 
+                              (process-children)
+                              (literal ">"))))
+      ((equal? class (normalize "genentity")) ($mono-seq$ (make sequence
+                                   (literal "&")
+                                   (process-children)
+                                   (literal ";"))))
+      ((equal? class (normalize "numcharref")) ($mono-seq$ (make sequence
+                                    (literal "&#")
+                                    (process-children)
+                                    (literal ";"))))
+      ((equal? class (normalize "paramentity")) ($mono-seq$ (make sequence
+                                     (literal "%")
+                                     (process-children)
+                                     (literal ";"))))
+      ((equal? class (normalize "pi")) ($mono-seq$ (make sequence 
+                           (literal "<?")
+                           (process-children)
+                           (literal ">"))))
+      ((equal? class (normalize "starttag")) ($mono-seq$ (make sequence 
+                                 (literal "<") 
+                                 (process-children)
+                                 (literal ">"))))
+      ((equal? class (normalize "sgmlcomment")) ($mono-seq$ (make sequence 
+                                    (literal "<!--")
+                                    (process-children)
+                                    (literal "-->"))))
+      ((equal? class (normalize "xmlpi")) ($mono-seq$ (make sequence 
+                           (literal "<?")
+                           (process-children)
+                           (literal "?>"))))
+]]>
+      (else ($charseq$)))))
+
+(element trademark 
+  (make sequence
+    ($charseq$)
+    (cond
+     ((equal? (attribute-string "class") (normalize "copyright"))
+      (literal "\copyright-sign;"))
+     ((equal? (attribute-string "class") (normalize "registered"))
+      (literal "\registered-sign;"))
+     ((equal? (attribute-string "class") (normalize "service"))
+      ($ss-seq$ + (literal "SM")))
+     (else
+      (literal "\trade-mark-sign;")))))
+
+(element wordasword ($italic-seq$))
+
+(element lineannotation
+  (make sequence
+    font-family-name: %body-font-family%
+    font-posture: 'italic
+    (process-children)))
+
+(define ($ss-seq$ plus-or-minus #!optional (sosofo (process-children)))
+  (make sequence
+       font-size:
+         (* (inherited-font-size) %ss-size-factor%)
+       position-point-shift:
+         (plus-or-minus (* (inherited-font-size) %ss-shift-factor%))
+       sosofo))
+
+(element superscript ($ss-seq$ +))
+(element subscript ($ss-seq$ -))
diff --git a/print/dblink.dsl b/print/dblink.dsl
new file mode 100644 (file)
index 0000000..6517a26
--- /dev/null
@@ -0,0 +1,457 @@
+;; $Id: dblink.dsl,v 1.6 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================= LINKS AND ANCHORS ==========================
+
+(element link
+  ;; No warnings about missing targets.  Jade will do that for us, and
+  ;; this way we can use -wno-idref if we really don't care.
+  (let* ((endterm   (attribute-string (normalize "endterm")))
+        (linkend   (attribute-string (normalize "linkend")))
+        (target    (element-with-id linkend))
+        (etarget   (if endterm 
+                       (element-with-id endterm)
+                       (empty-node-list)))
+        (link-cont (if endterm
+                       (if (node-list-empty? etarget)
+                           (literal 
+                            (string-append "LINK CONTENT ENDTERM '"
+                                           endterm
+                                           "' MISSING"))
+                           (with-mode xref-endterm-mode
+                             (process-node-list etarget)))
+                       (process-children))))
+    (if (node-list-empty? target)
+       link-cont
+       (make link 
+         destination: (node-list-address target)
+         link-cont))))
+
+(element ulink 
+  (make sequence
+    (if (node-list-empty? (children (current-node)))
+       (literal (attribute-string (normalize "url")))
+       (make sequence
+         ($charseq$)
+         (if (not (equal? (attribute-string (normalize "url"))
+                          (data-of (current-node))))
+             (if %footnote-ulinks%
+                 (if (and (equal? (print-backend) 'tex) bop-footnotes)
+                     (make sequence
+                       ($ss-seq$ + (literal (footnote-number (current-node))))
+                       (make page-footnote
+                         (make paragraph
+                           font-family-name: %body-font-family%
+                           font-size: (* %footnote-size-factor% %bf-size%)
+                           font-posture: 'upright
+                           quadding: %default-quadding%
+                           line-spacing: (* (* %footnote-size-factor% %bf-size%)
+                                            %line-spacing-factor%)
+                           space-before: %para-sep%
+                           space-after: %para-sep%
+                           start-indent: %footnote-field-width%
+                           first-line-start-indent: (- %footnote-field-width%)
+                           (make line-field
+                             field-width: %footnote-field-width%
+                             (literal (footnote-number (current-node))
+                                      (gentext-label-title-sep (normalize "footnote"))))
+                           (literal (attribute-string (normalize "url"))))))
+                     ($ss-seq$ + (literal (footnote-number (current-node)))))
+                 (if %show-ulinks%
+                     (make sequence
+                       (literal " (")
+                       (literal (attribute-string (normalize "url")))
+                       (literal ")"))
+                     (empty-sosofo)))
+             (empty-sosofo))))))
+
+(element footnoteref 
+  (process-element-with-id (attribute-string (normalize "linkend"))))
+
+(element anchor
+  ;; This is different than (empty-sosofo) alone because the backend
+  ;; will hang an anchor off the empty sequence.
+  (make sequence (empty-sosofo)))
+
+(element beginpage (empty-sosofo))
+
+;; ======================================================================
+
+(define (olink-link)
+  ;; This is an olink without a TARGETDOCENT, treat it as a link within
+  ;; the same document.
+  (let* ((localinfo (attribute-string (normalize "localinfo")))
+        (target    (element-with-id localinfo))
+        (linkmode  (attribute-string (normalize "linkmode")))
+        (modespec  (if linkmode (element-with-id linkmode) (empty-node-list)))
+        (xreflabel (if (node-list-empty? modespec)
+                       #f
+                       (attribute-string (normalize "xreflabel") modespec)))
+        (linktext  (strip (data-of (current-node)))))
+    (if (node-list-empty? target)
+       (make sequence
+         (error (string-append "OLink to missing ID '" localinfo "'"))
+         (if (and (equal? linktext "") xreflabel)
+             (literal xreflabel)
+             (process-children)))
+       (if (equal? linktext "")
+           (if xreflabel
+               (xref-general target xreflabel)
+               (xref-general target))
+           (process-children)))))
+
+(define (olink-simple)
+  ;; Assumptions: 
+  ;; - The TARGETDOCENT is identified by a public ID
+  ;; - If the element has no content, the title extracted by
+  ;;   (olink-resource-title) should be used
+  ;; - The (olink-resource-title) function can deduce the title from
+  ;;   the pubid and the sysid
+  (let* ((target   (attribute-string (normalize "targetdocent")))
+        (pubid    (entity-public-id target))
+        (sysid    (system-id-filename target))
+        (title    (olink-resource-title pubid sysid))
+        (linktext (strip (data-of (current-node)))))
+    (if (equal? linktext "")
+       (make sequence
+         font-posture: 'italic
+         (literal title))
+       (process-children))))
+
+(define (olink-outline-xref olroot target linktext)
+  (let* ((name  (attribute-string (normalize "name") target))
+        (label (attribute-string (normalize "label") target))
+        (title (select-elements (children target) (normalize "ttl")))
+        (substitute (list
+                     (list "%g" (if name (literal name) (literal "")))
+                     (list "%n" (if label (literal label) (literal "")))
+                     (list "%t" (with-mode olink-title-mode
+                                  (process-node-list title)))))
+        (tlist   (match-split-list linktext (assoc-objs substitute))))
+    (string-list-sosofo tlist substitute)))
+
+(define (olink-outline)
+  (let* ((target    (attribute-string (normalize "targetdocent")))
+        (linkmode  (attribute-string (normalize "linkmode")))
+        (localinfo (attribute-string (normalize "localinfo")))
+        (modespec  (if linkmode (element-with-id linkmode) (empty-node-list)))
+        (xreflabel (if (node-list-empty? modespec) 
+                       ""
+                       (attribute-string (normalize "xreflabel") modespec)))
+        (pubid     (entity-public-id target))
+        (sysid     (system-id-filename target))
+        (basename  (trim-string sysid '(".sgm" ".xml" ".sgml")))
+        (olinkfile (string-append basename %olink-outline-ext%))
+        (olinkdoc  (sgml-parse olinkfile))
+        (olinkroot (node-property 'document-element olinkdoc))
+        (olnode    (if localinfo
+                       (element-with-id localinfo olinkroot)
+                       olinkroot))
+        (linktext (strip (data-of (current-node)))))
+    (if (equal? linktext "")
+       (olink-outline-xref olinkroot olnode xreflabel)
+       (process-children))))
+
+(element olink
+  (if (not (attribute-string (normalize "targetdocent")))
+      (olink-link)
+      (if (attribute-string (normalize "linkmode"))
+         (olink-outline)
+         (olink-simple))))
+
+(mode olink-title-mode
+  (default (process-children))
+
+  (element ttl
+    (make sequence
+      font-posture: 'italic
+      (process-children)))
+
+  (element it
+    (make sequence
+      font-posture: 'upright
+      (process-children)))
+
+  (element tt
+    (make sequence
+      font-family-name: %mono-font-family%
+      (process-children)))
+
+  (element sub 
+    ($ss-seq$ -))
+
+  (element sup 
+    ($ss-seq$ +))
+)
+
+;; ======================================================================
+
+(element xref
+  (let* ((endterm (attribute-string (normalize "endterm")))
+        (linkend (attribute-string (normalize "linkend")))
+        (target  (element-with-id linkend))
+        (xreflabel (if (node-list-empty? target)
+                       #f
+                       (attribute-string (normalize "xreflabel") target))))
+    (if (node-list-empty? target)
+       (error (string-append "XRef LinkEnd to missing ID '" linkend "'"))
+       (if xreflabel
+           (make link 
+             destination: (node-list-address target)
+             (literal xreflabel))
+           (if endterm
+               (if (node-list-empty? (element-with-id endterm))
+                   (error (string-append "XRef EndTerm to missing ID '" 
+                                         endterm "'"))
+                   (make link 
+                     destination: (node-list-address (element-with-id endterm))
+                     (with-mode xref-endterm-mode 
+                       (process-element-with-id endterm))))
+               (cond
+                ((or (equal? (gi target) (normalize "biblioentry"))
+                     (equal? (gi target) (normalize "bibliomixed")))
+                 ;; xref to the bibliography is a special case
+                 (xref-biblioentry target))
+                ((equal? (gi target) (normalize "co"))
+                 ;; callouts are a special case
+                 (xref-callout target))
+                ((equal? (gi target) (normalize "listitem"))
+                 (xref-listitem target))
+                ((equal? (gi target) (normalize "varlistentry"))
+                 (xref-varlistentry target))
+                ((equal? (gi target) (normalize "question"))
+                 (xref-question target))
+                ((equal? (gi target) (normalize "answer"))
+                 (xref-answer target))
+                ((equal? (gi target) (normalize "refentry"))
+                 (xref-refentry target))
+                ((equal? (gi target) (normalize "refnamediv"))
+                 ;; and refnamedivs
+                 (xref-refnamediv target))
+                ((equal? (gi target) (normalize "glossentry"))
+                 ;; as are glossentrys
+                 (xref-glossentry target))
+                ((equal? (gi target) (normalize "author"))
+                 ;; and authors
+                 (xref-author target))
+                ((equal? (gi target) (normalize "authorgroup"))
+                 ;; and authorgroups
+                 (xref-authorgroup target))
+                (else 
+                 (xref-general target))))))))
+
+(define (xref-general target #!optional (xref-string #f))
+  ;; This function is used by both XREF and OLINK (when no TARGETDOCENT
+  ;; is specified).  The only case where xref-string is supplied is
+  ;; on OLINK.
+  (let ((label (attribute-string (normalize "xreflabel") target)))
+    (make link 
+      destination: (node-list-address target)
+      (if xref-string
+         (auto-xref target xref-string)
+         (if label
+             (xreflabel-sosofo label)
+             (auto-xref target))))))
+
+(define (xref-refentry target)
+;; refmeta/refentrytitle, refmeta/manvolnum, refnamediv/refdescriptor, 
+;; refnamediv/refname
+  (let* ((refmeta    (select-elements (children target)
+                                     (normalize "refmeta")))
+        (refnamediv (select-elements (children target)
+                                     (normalize "refnamediv")))
+        (rfetitle   (select-elements (children refmeta) 
+                                     (normalize "refentrytitle")))
+        (manvolnum  (select-elements (children refmeta)
+                                     (normalize "manvolnum")))
+        (refdescrip (select-elements (children refnamediv)
+                                     (normalize "refdescriptor")))
+        (refname    (select-elements (children refnamediv)
+                                     (normalize "refname")))
+
+        (title      (if (node-list-empty? rfetitle)
+                        (if (node-list-empty? refdescrip)
+                            (node-list-first refname)
+                            (node-list-first refdescrip))
+                        (node-list-first rfetitle))))
+  (make link 
+    destination: (node-list-address target)
+
+    (make sequence
+      font-posture: (if %refentry-xref-italic% 
+                       'italic
+                       (inherited-font-posture))
+
+      (process-node-list (children title))
+      (if (and %refentry-xref-manvolnum%
+              (not (node-list-empty? manvolnum)))
+         (process-node-list manvolnum)
+         (empty-sosofo))))))
+
+(define (xref-refnamediv target)
+  (let* ((refname    (select-elements (children target)
+                                     (normalize "refname")))
+
+        (title      (node-list-first refname)))
+    (make link
+      destination: (node-list-address target)
+
+      (make sequence
+       font-posture: (if %refentry-xref-italic%
+                         'italic
+                         (inherited-font-posture))
+
+       (process-node-list (children title))))))
+
+(define (xref-varlistentry target)
+  (let ((terms (select-elements (children target)
+                               (normalize "term"))))
+    (make link 
+      destination: (node-list-address target)
+      (with-mode xref-varlistentry-mode
+       (process-node-list (node-list-first terms))))))
+
+(define (xref-glossentry target)
+  (let ((glossterms (select-elements (children target)
+                                    (normalize "glossterm"))))
+    (make link 
+      destination: (node-list-address target)
+      (with-mode xref-glossentry-mode
+       (process-node-list (node-list-first glossterms))))))
+
+(define (xref-author target)
+  (make link 
+    destination: (node-list-address target)
+    (literal (author-string target))))
+
+(define (xref-authorgroup target)
+  ;; it's a quirk of author-list-string that it needs to point to
+  ;; one of the authors in the authorgroup, not the authorgroup.
+  ;; go figure.
+  (make link 
+    destination: (node-list-address target)
+    (let loop ((author (select-elements (children target)
+                                       (normalize "author"))))
+      (if (node-list-empty? author)
+         (empty-sosofo)
+         (make sequence
+           (literal (author-list-string (node-list-first author)))
+           (loop (node-list-rest author)))))))
+
+(define (xref-biblioentry target)
+  (let* ((abbrev (node-list-first 
+                 (node-list-filter-out-pis (children target))))
+        (label  (attribute-string (normalize "xreflabel") target)))
+    (make link 
+      destination: (node-list-address target)
+
+      (if biblio-xref-title
+         (let* ((citetitles (select-elements (descendants target)
+                                            (normalize "citetitle")))
+                (titles     (select-elements (descendants target)
+                                            (normalize "title")))
+                (title      (if (node-list-empty? citetitles)
+                                (node-list-first titles)
+                                (node-list-first citetitles))))
+           (with-mode xref-title-mode
+             (process-node-list title)))
+         (if biblio-number
+             (make sequence
+               (literal "[" (number->string (bibentry-number target)) "]"))
+             (if label
+                 (make sequence
+                   (literal "[" label "]"))
+                 (if (equal? (gi abbrev) (normalize "abbrev"))
+                     (make sequence
+                       (process-node-list abbrev))
+                     (make sequence
+                       (literal "[" 
+                                (attribute-string (normalize "id") target)
+                                "]")))))))))
+
+(define (xref-callout target)
+  (make link 
+    destination: (node-list-address target)
+    ($callout-mark$ target)))
+
+(define (xref-listitem target)
+  (if (equal? (gi (parent target)) (normalize "orderedlist"))
+      (make link 
+       destination: (node-list-address target)
+       (literal (orderedlist-listitem-label-recursive target)))
+      (error 
+       (string-append "XRef to LISTITEM only supported in ORDEREDLISTs"))))
+
+
+(define (xref-question target)
+  (make link
+    destination: (node-list-address target)
+    (make sequence
+      (literal (gentext-element-name target))
+      (literal (gentext-label-title-sep target))
+      (literal (question-answer-label target)))))
+
+(define (xref-answer target)
+  (xref-question target))
+
+(mode xref-endterm-mode
+  (default
+    (make sequence
+      font-posture: 'italic
+      (process-children-trim))))
+
+(define (xreflabel-sosofo xreflabel)
+  (make sequence
+    font-posture: 'italic
+    (literal xreflabel)))
+
+;; ======================================================================
+
+;; Returns the title of the element as a sosofo, italicized for xref.
+;;
+(define (element-title-xref-sosofo nd)
+  (make sequence
+    font-posture: 'italic
+    (element-title-sosofo nd)))
+
+(mode xref-title-mode
+  (element title
+    (make sequence
+      font-posture: 'italic
+      (process-children-trim)))
+
+  (element citetitle
+    (make sequence
+      font-posture: 'italic
+      (process-children-trim)))
+
+  (element refname
+    (process-children-trim))
+
+  (element refentrytitle
+    (process-children-trim))
+)
+
+(mode xref-varlistentry-mode
+  (element term
+    ($italic-seq$)))
+
+(mode xref-glossentry-mode
+  (element glossterm
+    ($italic-seq$)))
+
+;; ======================================================================
+
+(define (element-page-number-sosofo target)
+  (with-mode pageno-mode
+       (process-node-list target)))
+
+(mode pageno-mode
+  (default
+    (current-node-page-number-sosofo)))
+
+;; ======================================================================
+
diff --git a/print/dblists.dsl b/print/dblists.dsl
new file mode 100644 (file)
index 0000000..d109e77
--- /dev/null
@@ -0,0 +1,515 @@
+;; $Id: dblists.dsl,v 1.7 2003/02/17 02:42:44 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; =============================== LISTS ================================
+
+(define (BULLTREAT bullfcn ilevel override mark)
+  (cond
+   (override (bullfcn override ilevel))
+   (mark (bullfcn mark ilevel))
+   (else (bullfcn "bullet" ilevel))))
+
+(define (BULLSTR m lvl)
+  (dingbat m))
+
+(define (BULLSHIFT m lvl)
+  (let ((md (case-fold-down m)))
+    (case md
+         (("bullet") 0.0em)
+         (("box") (if (= lvl 1) 0.0em 0.1em))
+         (("checkbox") (if (= lvl 1) 0.0em 0.1em))
+         (("check") 0.0em)
+         (("checkedbox") 0.0em)
+         (("dash") 0.0em)
+         (("none") 0.0em)
+         (else 0.0em))))
+
+(define (MSIZE m lvl f1 f2)
+  (if (= lvl 1)
+      (* %bf-size% f1)
+      (* %bf-size% f2)))
+
+(define (BULLSIZE m lvl)
+  (let ((md (case-fold-down m)))
+    (case md
+         (("bullet") (MSIZE m lvl 0.8 0.72))
+         (("box") (MSIZE m lvl 0.9 0.72))
+         (("checkbox") (MSIZE m lvl 0.9 0.72))
+         (("check") (MSIZE m lvl 1.0 1.0))
+         (("checkedbox") (MSIZE m lvl 1.0 1.0))
+         (("dash") (MSIZE m lvl 1.0 1.0))
+         (("none") (MSIZE m lvl 1.0 1.0))
+         (else (MSIZE m lvl 1.0 1.0)))))
+
+(define (OLSTEP) 0.9em)
+;;  (case
+;;   (modulo (length (hierarchical-number-recursive (normalize "orderedlist"))) 4)
+;;     ((1) 1.4em)
+;;     ((2) 1.4em)
+;;     ((3) 1.4em)
+;;     ((0) 1.4em)))
+
+(define (ILSTEP) 1.0em)
+
+(define (COSTEP) 1.5pi)
+
+;; Improve spacing on lists, remove extra space before..
+;; Suggested by Adam Di Carlo, adam@onshore.com
+(define ($list$)
+   (make display-group
+     start-indent: (if (INBLOCK?)
+                      (inherited-start-indent)
+                      (+ %block-start-indent% (inherited-start-indent)))
+     space-after:  (if (INLIST?) %para-sep% %block-sep%)))
+
+(element itemizedlist ($list$))
+
+(element (itemizedlist title)
+  (make paragraph
+    use: title-style
+    (process-children)))
+
+(define (generic-list-item indent-step line-field)
+  (let* ((itemcontent (children (current-node)))
+         (first-child (node-list-first itemcontent))
+         (spacing (inherited-attribute-string (normalize "spacing"))))
+    (make display-group
+      start-indent: (+ (inherited-start-indent) indent-step)
+      (make paragraph
+        use: (cond
+              ((equal? (gi first-child) (normalize "programlisting"))
+               verbatim-style)
+              ((equal? (gi first-child) (normalize "screen"))
+               verbatim-style)
+              ((equal? (gi first-child) (normalize "synopsis"))
+               verbatim-style)
+              ((equal? (gi first-child) (normalize "literallayout"))
+               linespecific-style)
+              ((equal? (gi first-child) (normalize "address"))
+               linespecific-style)
+              (else
+               nop-style))
+        space-before: (if (equal? (normalize "compact") spacing)
+                          0pt
+                          %para-sep%)
+        first-line-start-indent: (- indent-step)
+        (make sequence
+          line-field)
+       (with-mode listitem-content-mode
+         (process-node-list first-child)))
+      (process-node-list (node-list-rest itemcontent)))))
+
+(define (process-listitem-content)
+  (if (absolute-first-sibling?) 
+      (make sequence
+       (process-children-trim))
+      (next-match)))
+
+(mode listitem-content-mode
+  (element (listitem programlisting) (process-listitem-content))
+  (element (listitem screen) (process-listitem-content))
+  (element (listitem synopsis) (process-listitem-content))
+  (element (listitem funcsynopsis) (process-listitem-content))
+  (element (listitem literallayout) (process-listitem-content))
+  (element (listitem address) (process-listitem-content))
+  (element (listitem para) (process-listitem-content))
+  (element (listitem formalpara) (process-listitem-content))
+  (element (listitem simpara) (process-listitem-content))
+)
+
+(element (itemizedlist listitem)
+  (let ((ilevel (length (hierarchical-number-recursive (normalize "itemizedlist"))))
+       (override (inherited-attribute-string (normalize "override")))
+       (mark (inherited-attribute-string (normalize "mark"))))
+    (generic-list-item
+     (ILSTEP)
+     (if (or (and override
+                 (equal? (normalize override) (normalize "none")))
+            (and (not override)
+                 (equal? (normalize mark) (normalize "none"))))
+        (make line-field
+          font-size: (BULLTREAT BULLSIZE ilevel override mark)
+          position-point-shift: (BULLTREAT BULLSHIFT ilevel override mark)
+          field-width: (ILSTEP)
+          (literal "\no-break-space;"))
+        (make line-field
+          font-size: (BULLTREAT BULLSIZE ilevel override mark)
+          position-point-shift: (BULLTREAT BULLSHIFT ilevel override mark)
+          field-width: (ILSTEP)
+          (literal (BULLTREAT BULLSTR ilevel override mark)))))))
+
+(element orderedlist ($list$))
+
+(element (orderedlist title)
+  (make paragraph
+    use: title-style
+    (process-children)))
+
+(element (orderedlist listitem)
+  (let* ((listitems (select-elements (children (parent (current-node)))
+                                    (normalize "listitem")))
+        (itemnumber (orderedlist-listitem-number (current-node)))
+        (displaynum (if (string=? (inherited-attribute-string 
+                                   (normalize "inheritnum"))
+                                  (normalize "inherit"))
+                        (let loop ((nd (current-node)) (inum ""))
+                          (if (node-list-empty? nd)
+                              inum
+                              (if (and (equal? (gi nd) 
+                                               (normalize "listitem"))
+                                       (equal? (gi (parent nd)) 
+                                               (normalize "orderedlist")))
+                                  (loop (parent nd)
+                                        (string-append
+                                         (number-with-numeration 
+                                          nd
+                                          (inherited-attribute-string
+                                           (normalize "numeration") nd)
+                                          (orderedlist-listitem-number nd))
+                                         (if (string=? inum "")
+                                             ""
+                                             ".")
+                                         inum))
+                                  (loop (parent nd) inum))))
+                        (number-with-numeration 
+                         (current-node)
+                         (inherited-attribute-string (normalize "numeration"))
+                         (orderedlist-listitem-number (current-node)))))
+        (listcount (+ (node-list-length listitems) itemnumber))
+        (factor    (cond 
+                    ((> listcount 999) 4)
+                    ((> listcount 99) 3)
+                    ((> listcount 9) 2)
+                    (else 2))))
+    (generic-list-item
+     (* (OLSTEP) factor)
+     (make line-field
+       field-width: (* (OLSTEP) factor)
+       field-align: 'end
+       (literal displaynum
+               (gentext-label-title-sep (normalize "orderedlist")))))))
+
+(define (number-with-numeration node numeration number)
+  (let* ((depth (length (hierarchical-number-recursive (normalize "orderedlist") node)))
+        (rawnum (cond
+                 ((equal? numeration (normalize "arabic")) 1)
+                 ((equal? numeration (normalize "loweralpha")) 2)
+                 ((equal? numeration (normalize "lowerroman")) 3)
+                 ((equal? numeration (normalize "upperalpha")) 4)
+                 ((equal? numeration (normalize "upperroman")) 0)
+                 (else (modulo depth 5))))
+        (num (case rawnum
+               ((1) (format-number number "1"))
+               ((2) (format-number number "a"))
+               ((3) (format-number number "i"))
+               ((4) (format-number number "A"))
+               ((0) (format-number number "I")))))
+    (if (> depth 5) 
+       (string-append "(" num ")")
+       num)))
+  
+(element variablelist
+  (let* ((termlength (if (attribute-string (normalize "termlength"))
+                        (string->number 
+                         (attribute-string (normalize "termlength")))
+                        %default-variablelist-termlength%))
+        (maxlen     (if (> termlength %default-variablelist-termlength%)
+                           termlength
+                           %default-variablelist-termlength%))
+        (too-long?  (variablelist-term-too-long? termlength)))
+    (make display-group
+      start-indent: (if (INBLOCK?)
+                       (inherited-start-indent)
+                       (+ %block-start-indent% (inherited-start-indent)))
+      space-before: (if (INLIST?) %para-sep% %block-sep%)
+      space-after:  (if (INLIST?) %para-sep% %block-sep%)
+
+      (if (and (or (and termlength (not too-long?))
+                  %always-format-variablelist-as-table%)
+              (or %may-format-variablelist-as-table%
+                  %always-format-variablelist-as-table%))
+         (make table
+           space-before: (if (INLIST?) %para-sep% %block-sep%)
+           space-after:  (if (INLIST?) %para-sep% %block-sep%)
+           start-indent: (if (INBLOCK?)
+                             (inherited-start-indent)
+                             (+ %block-start-indent% 
+                                (inherited-start-indent)))
+
+;; Calculate the width of the column containing the terms...
+;;
+;; maxlen       in        (inherited-font-size)     72pt
+;;        x ---------- x ----------------------- x ------ = width
+;;           12 chars              10pt              in
+;;
+           (make table-column
+             column-number: 1
+             width: (* (* (/ maxlen 12) (/ (inherited-font-size) 10pt)) 72pt))
+           (with-mode variablelist-table
+             (process-children)))
+         (process-children)))))
+
+(element varlistentry (process-children))
+
+(element (varlistentry term)
+    (make paragraph
+         space-before: (if (first-sibling?)
+                           %block-sep%
+                           0pt)
+         keep-with-next?: #t
+         first-line-start-indent: 0pt
+         start-indent: (inherited-start-indent)
+         (process-children)))
+
+(element (varlistentry listitem)
+  (let ((vle-indent 2em)) ; this ought to be in dbparam!
+    (generic-list-item 
+     vle-indent
+     (make line-field
+       field-width: vle-indent
+       (literal "\no-break-space;")))))
+
+(mode variablelist-table
+  (element varlistentry
+    (let* ((terms      (select-elements (children (current-node))
+                                       (normalize "term")))
+          (listitem   (select-elements (children (current-node))
+                                       (normalize "listitem")))
+          (termlen    (if (attribute-string (normalize "termlength")
+                                            (parent (current-node)))
+                          (string->number (attribute-string
+                                           (normalize "termlength")
+                                           (parent (current-node))))
+                          %default-variablelist-termlength%))
+          (too-long? (varlistentry-term-too-long? (current-node) termlen)))
+      (if too-long?
+         (make sequence
+           (make table-row
+             cell-before-row-margin: %para-sep%
+
+             (make table-cell
+               column-number: 1
+               n-columns-spanned: 2
+               n-rows-spanned: 1
+               (process-node-list terms)))
+           (make table-row
+             (make table-cell
+               column-number: 1
+               n-columns-spanned: 1
+               n-rows-spanned: 1
+               ;; where terms would have gone
+               (empty-sosofo))
+             (make table-cell
+               column-number: 2
+               n-columns-spanned: 1
+               n-rows-spanned: 1
+               (process-node-list listitem))))
+         (make table-row
+           cell-before-row-margin: %para-sep%
+
+           (make table-cell
+             column-number: 1
+             n-columns-spanned: 1
+             n-rows-spanned: 1
+             (process-node-list terms))
+           (make table-cell
+             column-number: 2
+             n-columns-spanned: 1
+             n-rows-spanned: 1
+             (process-node-list listitem))))))
+  
+  (element (varlistentry term)
+    (make sequence
+      (process-children-trim)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (empty-sosofo))))
+
+  (element (varlistentry listitem)
+    (make display-group
+      start-indent: 0pt
+      (process-children)))
+
+  ;; Suggested by Nick NICHOLAS, nicholas@uci.edu
+  (element (variablelist title)
+    (make table-row
+      cell-before-row-margin: %para-sep%
+      (make table-cell
+       column-number: 1
+       n-columns-spanned: 2
+       n-rows-spanned: 1
+       (make paragraph
+         use: title-style
+         start-indent: 0pt
+         (process-children)))))
+
+)
+
+(define (simplelist-table majororder cols members)
+  (let* ((termcount (node-list-length members))
+        (rows (quotient (+ termcount (- cols 1)) cols)))
+    (make table
+      space-before: (if (INLIST?) %para-sep% %block-sep%)
+      space-after:  (if (INLIST?) %para-sep% %block-sep%)
+      start-indent: (if (INBLOCK?)
+                       (inherited-start-indent)
+                       (+ %block-start-indent% (inherited-start-indent)))
+      (if %simplelist-column-width%
+         (let colloop ((colnum 1))
+           (if (> colnum cols)
+               (empty-sosofo)
+               (make sequence
+                 (make table-column
+                   width: %simplelist-column-width%)
+                 (colloop (+ colnum 1)))))
+         (empty-sosofo))
+      (let rowloop ((rownum 1))
+       (if (> rownum rows)
+           (empty-sosofo)
+           (make sequence
+             (simplelist-row rownum majororder rows cols members)
+             (rowloop (+ rownum 1))))))))
+
+(define (simplelist-row rownum majororder rows cols members)
+  (make table-row
+    (let colloop ((colnum 1))
+      (if (> colnum cols)
+         (empty-sosofo)
+         (make sequence
+           (simplelist-entry rownum colnum majororder rows cols members)
+           (colloop (+ colnum 1)))))))
+
+(define (simplelist-entry rownum colnum majororder rows cols members)
+  (let ((membernum (if (equal? majororder 'row)
+                      (+ (* (- rownum 1) cols) colnum)
+                      (+ (* (- colnum 1) rows) rownum))))
+    (let loop ((nl members) (count membernum))
+      (if (<= count 1)
+         (make table-cell
+           column-number: colnum
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+;; removed to avoid dependency between dblists and dbtable
+;;         cell-before-row-margin: %cals-cell-before-row-margin%
+;;         cell-after-row-margin: %cals-cell-after-row-margin%
+;;         cell-before-column-margin: %cals-cell-before-column-margin%
+;;         cell-after-column-margin: %cals-cell-after-column-margin%
+;;         start-indent: %cals-cell-content-start-indent%
+;;         end-indent: %cals-cell-content-end-indent%
+;; is another variable needed to parameterize these settings, or are
+;; constants good enough?
+           cell-before-row-margin: 0pt
+           cell-after-row-margin: 0pt
+           cell-before-column-margin: 3pt
+           cell-after-column-margin: 3pt
+           start-indent: 0pt
+           end-indent: 0pt
+           quadding: 'start
+           (if (node-list-empty? nl)
+               (literal "\no-break-space;")
+               (process-node-list (node-list-first nl))))
+         (loop (node-list-rest nl) (- count 1))))))
+
+(element (entry simplelist) 
+  ;; This is to avoid possibly putting tables inside tables, which don't
+  ;; work in some backends (e.g. RTF)
+  (make paragraph
+    (process-children)))
+
+(element (entry simplelist member)
+  ;; This is to avoid possibly putting tables inside tables, which don't
+  ;; work in some backends (e.g. RTF)
+  (let ((type (inherited-attribute-string (normalize "type"))))
+    (if (equal? type (normalize "inline"))
+       (next-match)
+       (make sequence
+         (if (equal? (child-number) 1)
+             (empty-sosofo)
+             (make paragraph-break))
+         (process-children)))))
+
+(element simplelist
+  (let ((type (attribute-string (normalize "type")))
+       (cols (if (attribute-string (normalize "columns"))
+                 (if (> (string->number (attribute-string (normalize "columns"))) 0)
+                     (string->number (attribute-string (normalize "columns")))
+                     1)
+                 1))
+       (members (select-elements (children (current-node)) (normalize "member"))))
+    (cond
+       ((equal? type (normalize "inline")) 
+       (process-children))
+       ((equal? type (normalize "vert"))
+       (simplelist-table 'column cols members))
+       ((equal? type (normalize "horiz"))
+       (simplelist-table 'row    cols members)))))
+
+(element member
+  (let ((type (inherited-attribute-string (normalize "type"))))
+    (if (equal? type (normalize "inline"))
+       (make sequence
+         (process-children)
+         (if (not (last-sibling?))
+             (literal ", ")
+             (literal "")))
+       (make paragraph
+         quadding: 'start
+         (process-children)))))
+
+(element segmentedlist (process-children))
+(element (segmentedlist title) ($lowtitle$ 2 4))
+
+(element segtitle (empty-sosofo))
+(mode seglist-in-seg
+  (element segtitle
+    (make sequence
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      (process-children))))
+
+(element seglistitem ($paragraph$))
+(element seg 
+  (let* ((seg-num (child-number (current-node)))
+        (seglist (parent (parent (current-node))))
+        (segtitle (nth-node (select-elements 
+                        (descendants seglist) (normalize "segtitle")) seg-num)))
+
+    ;; Note: segtitle is only going to be the right thing in a well formed
+    ;; SegmentedList.  If there are too many Segs or too few SegTitles,
+    ;; you'll get something odd...maybe an error
+
+    (with-mode seglist-in-seg
+      (make paragraph
+       (make sequence
+         font-family-name: %title-font-family%
+         font-weight: 'bold
+         (sosofo-append (process-node-list segtitle))
+         (literal ": "))
+       (process-children)))))
+
+(element calloutlist ($list$))
+(element (calloutlist title) ($lowtitle$ 2 4))
+
+(element callout
+  (let* ((calloutcontent (children (current-node)))
+        (arearefs (inherited-attribute-string (normalize "arearefs")))
+        (idlist (split arearefs)))
+    (make sequence
+      start-indent: (+ (inherited-start-indent) (COSTEP))
+      (make paragraph
+       space-before: %para-sep%
+       first-line-start-indent: (- (COSTEP))
+       (make line-field
+         field-width: (COSTEP)
+         (let loop ((ids idlist))
+           (if (null? ids)
+               (empty-sosofo)
+               (make sequence
+                 ($callout-mark$ (element-with-id (car ids)))
+                 (loop (cdr ids))))))
+       (process-node-list (children (node-list-first calloutcontent))))
+
+      (process-node-list (node-list-rest calloutcontent)))))
diff --git a/print/dblot.dsl b/print/dblot.dsl
new file mode 100644 (file)
index 0000000..6964ad4
--- /dev/null
@@ -0,0 +1,24 @@
+;; $Id: dblot.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; need test cases to do toc/lot; do these later
+
+(element toc (empty-sosofo))
+(element (toc title) (empty-sosofo))
+(element tocfront ($paragraph$))
+(element tocentry ($paragraph$))
+(element tocpart (process-children))
+(element tocchap (process-children))
+(element toclevel1 (process-children))
+(element toclevel2 (process-children))
+(element toclevel3 (process-children))
+(element toclevel4 (process-children))
+(element toclevel5 (process-children))
+(element tocback ($paragraph$))
+(element lot (empty-sosofo))
+(element (lot title) (empty-sosofo))
+(element lotentry ($paragraph$))
+
diff --git a/print/dbmath.dsl b/print/dbmath.dsl
new file mode 100644 (file)
index 0000000..7284176
--- /dev/null
@@ -0,0 +1,92 @@
+;; $Id: dbmath.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define %equation-autolabel% #f)
+
+(element equation
+  ;; derived from $semiformal-object$
+  (if (node-list-empty? (select-elements (children (current-node))
+                                        (normalize "title")))
+      ($informal-object$ %informalequation-rules% %informalequation-rules%)
+      ($formal-object$ %informalequation-rules% %informalequation-rules%)))
+
+(element (equation title) (empty-sosofo))
+(element (equation alt) (empty-sosofo))
+(element (equation graphic) 
+  (make paragraph
+    space-before: 0pt
+    space-after: 0pt
+    ($img$ (current-node) #t)))
+
+(element informalequation
+  ;; Derived from informal-object
+  (let ((rule-before? %informalequation-rules%)
+       (rule-after? %informalequation-rules%))
+    (if %equation-autolabel%
+       (make display-group
+         space-before: %block-sep%
+         space-after:  %block-sep%
+         start-indent: (+ %block-start-indent% 
+                          (inherited-start-indent))
+         keep-with-next?: (object-title-after)
+
+         (if rule-before?
+             (make rule
+               orientation: 'horizontal
+               line-thickness: %object-rule-thickness%
+               display-alignment: 'center
+               space-after: (/ %block-sep% 2)
+               keep-with-next?: #t)
+             (empty-sosofo))
+
+         (make table
+           (make table-column
+             column-number: 1
+             width: (- %text-width% 
+                       (+ (inherited-start-indent) 
+                          (inherited-end-indent) 
+                          1in)))
+           (make table-column
+             column-number: 2
+             width: 1in)
+           (make table-row
+             (make table-cell
+               cell-row-alignment: 'center
+               start-indent: 0pt
+               end-indent: 0pt
+               (process-children))
+             (make table-cell
+               cell-row-alignment: 'center
+               quadding: 'end
+               start-indent: 0pt
+               end-indent: 0pt
+               (make paragraph
+                 (literal "(" (element-label (current-node)) ")")))))
+
+         (if rule-after?
+             (make rule
+               orientation: 'horizontal
+               line-thickness: %object-rule-thickness%
+               display-alignment: 'center
+               space-before: (/ %block-sep% 2)
+               keep-with-previous?: #t)
+             (empty-sosofo)))
+       ($informal-object$ rule-before? rule-after?))))
+
+(element (informalequation alt) (empty-sosofo))
+(element (informalequation graphic) 
+  (make paragraph
+    space-before: 0pt
+    space-after: 0pt
+    quadding: 'end
+    ($img$ (current-node) #t)))
+
+(element inlineequation ($inline-object$))
+(element (inlineequation alt) (empty-sosofo))
+(element (inlineequation graphic) 
+  (make sequence
+    ($img$ (current-node) #f)))
+
diff --git a/print/dbmsgset.dsl b/print/dbmsgset.dsl
new file mode 100644 (file)
index 0000000..ba0648e
--- /dev/null
@@ -0,0 +1,51 @@
+;; $Id: dbmsgset.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ======================== ERROR MESSAGES (ETC.) =======================
+
+(element msgset (process-children))
+
+(element msgentry ($informal-object$))
+
+(element simplemsgentry ($informal-object$))
+
+(element msg
+  (make display-group
+       font-weight: 'bold
+       font-family-name: %mono-font-family%
+       (process-children)))
+
+(element msgmain (process-children))
+
+(element msgsub
+  (make display-group
+       start-indent: (+ (inherited-start-indent) (ILSTEP))
+       (process-children)))
+
+(element msgrel (empty-sosofo))
+
+(element msgtext (process-children))
+
+(element msginfo ($indent-para-container$))
+
+(define ($genhead-para$ headtext)
+  (make paragraph
+       space-before: %para-sep%
+       space-after: %para-sep%
+       (make sequence
+             font-weight: 'bold
+             (literal
+               (string-append headtext ": ")))
+       (process-children)))
+
+(element msglevel ($genhead-para$ (gentext-element-name (current-node))))
+(element msgorig ($genhead-para$ (gentext-element-name (current-node))))
+(element msgaud ($genhead-para$ (gentext-element-name (current-node))))
+
+(element msgexplan ($indent-para-container$))
+(element (msgexplan title) ($runinhead$))
+(element (msgexplan para) (make sequence (process-children)))
+
diff --git a/print/dbparam.dsl b/print/dbparam.dsl
new file mode 100644 (file)
index 0000000..2170512
--- /dev/null
@@ -0,0 +1,2085 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
+
+<style-sheet>
+<style-specification>
+<style-specification-body>
+
+;; $Id: dbparam.dsl,v 1.9 2003/04/29 05:33:30 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; === Book intro, for dsl2man ==========================================
+
+<![CDATA[
+;; DOCINFO
+;; <title>DocBook Print Parameters</title>
+;; <subtitle>Part of the Modular DocBook Stylesheet distribution</subtitle>
+;; <author><firstname>Norman</firstname><surname>Walsh</surname>
+;; </author>
+;; <edition>$Revision: 1.9 $</edition>
+;; <copyright><year>1997</year><year>1998</year><year>1999</year>
+;; <holder>Norman Walsh</holder></copyright>
+;; <legalnotice>
+;; <para>
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+;; OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT.  IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+;; CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+;; OTHER DEALINGS IN THE SOFTWARE.
+;; </para>
+;; </legalnotice>
+;; <legalnotice>
+;; <para>
+;; Please direct all questions, bug reports, or suggestions for changes
+;; to Norman Walsh, &lt;<literal>ndw@nwalsh.com</literal>&gt;.
+;; </para>
+;; <para>
+;; See <ulink url="http://nwalsh.com/docbook/dsssl/">http://nwalsh.com/docbook/dsssl/</ulink> for more information.</para>
+;; </legalnotice>
+;; /DOCINFO
+]]>
+
+;; REFERENCE TOC/LOT Apparatus
+
+(define %generate-set-toc% 
+  ;; REFENTRY generate-set-toc
+  ;; PURP Should a Table of Contents be produced for Sets?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Set'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %generate-book-toc% 
+  ;; REFENTRY generate-book-toc
+  ;; PURP Should a Table of Contents be produced for Books?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Book'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define ($generate-book-lot-list$)
+  ;; REFENTRY generate-book-lot-list
+  ;; PURP Which Lists of Titles should be produced for Books?
+  ;; DESC
+  ;; This parameter should be a list (possibly empty) of the elements
+  ;; for which Lists of Titles should be produced for each 'Book'.
+  ;;
+  ;; It is meaningless to put elements that do not have titles in this
+  ;; list.  If elements with optional titles are placed in this list, only
+  ;; the instances of those elements that do have titles will appear in
+  ;; the LOT.
+  ;;
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (list (normalize "table")
+(normalize "figure")
+(normalize "example")
+(normalize "equation")))
+
+(define %generate-part-toc% 
+  ;; REFENTRY generate-part-toc
+  ;; PURP Should a Table of Contents be produced for Parts?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Part'.
+  ;; Note: '%generate-part-toc-on-titlepage%' controls whether the Part TOC
+  ;; is placed on the bottom of the part titlepage or on page(s) of its own.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %generate-part-toc-on-titlepage%
+  ;; REFENTRY generate-part-toc-on-titlepage
+  ;; PURP Should the Part TOC appear on the Part title page?
+  ;; DESC
+  ;; If true, the Part TOC will be placed on the Part title page.  If false,
+  ;; the TOC will be placed on separate page(s) after the Part title page.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-reference-toc% 
+  ;; REFENTRY generate-reference-toc
+  ;; PURP Should a Table of Contents be produced for References?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Reference'.
+  ;; Note: '%generate-reference-toc-on-titlepage%' controls whether the
+  ;; Reference TOC
+  ;; is placed on the bottom of the title page or on page(s) of its own.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %generate-reference-toc-on-titlepage%
+  ;; REFENTRY generate-reference-toc-on-titlepage
+  ;; PURP Should the Reference TOC appear on the Reference title page?
+  ;; DESC
+  ;; If true, the Reference TOC will be placed on the Reference title page.
+  ;; If false,
+  ;; the TOC will be placed on separate page(s) after the title page.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-article-toc% 
+  ;; REFENTRY generate-article-toc
+  ;; PURP Should a Table of Contents be produced for Articles?
+  ;; DESC
+  ;; If true, a Table of Contents will be generated for each 'Article'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %generate-article-toc-on-titlepage%
+  ;; REFENTRY generate-article-toc-on-titlepage
+  ;; PURP Should the Article TOC appear on the Article title page?
+  ;; DESC
+  ;; If true, the Article TOC will be placed on the Article title page.
+  ;; If false,
+  ;; the TOC will be placed on separate page(s) after the title page.
+  ;; If false, %generate-article-titlepage-on-separate-page% should be
+  ;; true.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE Titlepages
+
+(define %generate-set-titlepage%
+  ;; REFENTRY generate-set-titlepage
+  ;; PURP Should a set title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Set'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-book-titlepage%
+  ;; REFENTRY generate-book-titlepage
+  ;; PURP Should a book title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Book'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-part-titlepage% 
+  ;; REFENTRY generate-part-titlepage
+  ;; PURP Should a part title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Part'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-partintro-on-titlepage%
+  ;; REFENTRY generate-partintro-on-titlepage
+  ;; PURP Should the PartIntro appear on the Part/Reference title page?
+  ;; DESC
+  ;; If true, the PartIntro content will appear on the title page of
+  ;; Parts and References.  If false,
+  ;; it will be placed on separate page(s) after the title page.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-reference-titlepage% 
+  ;; REFENTRY generate-reference-titlepage
+  ;; PURP Should a reference title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Reference'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-article-titlepage% 
+  ;; REFENTRY generate-article-titlepage
+  ;; PURP Should an article title page be produced?
+  ;; DESC
+  ;; If true, a title page will be generated for each 'Article'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %generate-article-titlepage-on-separate-page%
+  ;; REFENTRY generate-article-ttlpg-on-sep-page
+  ;; PURP Should the article title page be on a separate page?
+  ;; DESC
+  ;; If true, the title page for each 'Article' will occur on its own page.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %titlepage-in-info-order% 
+  ;; REFENTRY titlepage-in-info-order
+  ;; PURP Place elements on title page in document order?
+  ;; DESC
+  ;; If true, the elements on the title page will be set in the order that
+  ;; they appear in the *info element.  Otherwise, they will be set in
+  ;; the order specified in the *-titlepage-*-elements list.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %author-othername-in-middle%
+  ;; REFENTRY othername-in-middle
+  ;; PURP Author OTHERNAME appears between FIRSTNAME and SURNAME?
+  ;; DESC
+  ;; If true, the OTHERNAME of an AUTHOR appears between the 
+  ;; FIRSTNAME and SURNAME.  Otherwise, OTHERNAME is suppressed.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE RefEntries and FuncSynopses
+
+(define %refentry-new-page% 
+  ;; REFENTRY refentry-new-page
+  ;; PURP 'RefEntry' starts on new page?
+  ;; DESC
+  ;; If true, each 'RefEntry' begins on a new page.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %refentry-keep% 
+  ;; REFENTRY refentry-keep
+  ;; PURP Keep RefEntrys together?
+  ;; DESC
+  ;; Refentry keep indicates how the stylesheet should
+  ;; attempt to keep each RefEntry.  Common values are '#t', for the
+  ;; smallest possible area, 'page' for the same page, and '#f' to ignore
+  ;; this characteristic.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %refentry-generate-name% 
+  ;; REFENTRY refentry-generate-name
+  ;; PURP Output NAME header before 'RefName'(s)?
+  ;; DESC
+  ;; If true, a "NAME" section title is output before the list
+  ;; of 'RefName's.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %refentry-xref-italic%
+  ;; REFENTRY refentry-xref-italic
+  ;; PURP Use italic text when cross-referencing RefEntrys?
+  ;; DESC
+  ;; If true, italics are used when cross-referencing RefEntrys, either
+  ;; with XRef or CiteRefEntry.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %refentry-xref-manvolnum%
+  ;; REFENTRY refentry-xref-manvolnum
+  ;; PURP Output manvolnum as part of RefEntry cross-reference?
+  ;; DESC
+  ;; If true, the manvolnum is used when cross-referencing RefEntrys, either
+  ;; with XRef or CiteRefEntry.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %funcsynopsis-style% 
+  ;; REFENTRY funcsynopsis-style
+  ;; PURP What style of 'FuncSynopsis' should be generated?
+  ;; DESC
+  ;; If '%funcsynopsis-style%' is 'ansi',
+  ;; ANSI-style function synopses are generated for a 'FuncSynopsis',
+  ;; otherwise K<![CDATA[&]]>R-style function synopses are generated.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'ansi)
+
+(define %kr-funcsynopsis-indent% 
+  ;; REFENTRY kr-funcsynopsis-indent
+  ;; PURP Indent-depth in K<![CDATA[&]]>R-style function synopses
+  ;; DESC
+  ;; If the '%funcsynopsis-style%' is 'kr',
+  ;; '%kr-funcsynopsis-indent%' specifies the amount by which parameter
+  ;; definitions should be indented under the function prototype.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  1pi)
+
+(define %funcsynopsis-decoration%
+  ;; REFENTRY funcsynopsis-decoration
+  ;; PURP Decorate elements of a FuncSynopsis?
+  ;; DESC
+  ;; If true, elements of the FuncSynopsis will be decorated (e.g. bold or
+  ;; italic).  The decoration is controlled by functions that can be redefined
+  ;; in a customization layer.  See 'edbsynop.dsl'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE Fonts
+
+(define %refentry-name-font-family%
+  ;; REFENTRY refentry-name-font-family
+  ;; PURP The font family used in RefName
+  ;; DESC
+  ;; The name of the font family used in 'RefEntry'
+  ;; 'RefName's.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  %mono-font-family%)
+
+(define %title-font-family% 
+  ;; REFENTRY title-font-family
+  ;; PURP The font family used in titles
+  ;; DESC
+  ;; The name of the font family used in titles (Arial by default).
+  ;;
+  ;; The values used here are system dependent (you have
+  ;; to have the fonts you select) and backend dependent (the backend has
+  ;; to know how to use them). 
+  ;;
+  ;; The values here work for the RTF backend under MS Windows.  YMMV.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "Arial")
+
+(define %body-font-family% 
+  ;; REFENTRY body-font-family
+  ;; PURP The font family used in body text
+  ;; DESC
+  ;; The name of the font family used in body text 
+  ;; (Times New Roman by default).
+  ;;
+  ;; The values used here are system dependent (you have
+  ;; to have the fonts you select) and backend dependent (the backend has
+  ;; to know how to use them). 
+  ;;
+  ;; The values here work for the RTF backend under MS Windows.  YMMV.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "Times New Roman")
+
+(define %mono-font-family% 
+  ;; REFENTRY mono-font-family
+  ;; PURP The font family used in verbatim environments
+  ;; DESC
+  ;; The name of the font family used in verbatim environments (Courier New
+  ;; by default).
+  ;;
+  ;; The values used here are system dependent (you have
+  ;; to have the fonts you select) and backend dependent (the backend has
+  ;; to know how to use them). 
+  ;;
+  ;; The values here work for the RTF backend under MS Windows.  YMMV.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "Courier New")
+
+(define %admon-font-family% 
+  ;; REFENTRY admon-font-family
+  ;; PURP The font family used in admonitions
+  ;; DESC
+  ;; The name of the font family used for body text in admonitions (Arial
+  ;; by default).
+  ;;
+  ;; The values used here are system dependent (you have
+  ;; to have the fonts you select) and backend dependent (the backend has
+  ;; to know how to use them). 
+  ;;
+  ;; The values here work for the RTF backend under MS Windows.  YMMV.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "Arial")
+
+(define %guilabel-font-family%
+  ;; REFENTRY guilabel-font-family
+  ;; PURP The font family used in GUI labels
+  ;; DESC
+  ;; The name of the font family used for text that represents text on a
+  ;; GUI (e.g., text in 'GUILabel', 'GUIMenu',
+  ;; etc.). (Arial by default).
+  ;;
+  ;; The values used here are system dependent (you have
+  ;; to have the fonts you select) and backend dependent (the backend has
+  ;; to know how to use them). 
+  ;;
+  ;; The values here work for the RTF backend under MS Windows.  YMMV.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "Arial")
+
+(define %visual-acuity%
+  ;; REFENTRY visual-acuity
+  ;; PURP General measure of document text size
+  ;; DESC
+  ;; This parameter controls the general size of the text in the document.
+  ;; Several other values (body font size and margins) have default values that
+  ;; vary depending on the setting of '%visual-acuity%'. There
+  ;; are three legal values: 'normal', 
+  ;; the normal, standard document size (10pt body text);
+  ;; 'tiny',
+  ;; a small text size (8pt body text);
+  ;; 'presbyopic', 
+  ;; a slightly more generous size (12pt body text); and
+  ;; 'large-type',
+  ;; quite large (24pt body text).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  ;; "tiny"
+  ;; "presbyopic"
+  ;; "large-type"
+  "normal")
+
+(define %hsize-bump-factor% 
+  ;; REFENTRY hsize-bump-factor
+  ;; PURP Font scaling factor
+  ;; DESC
+  ;; Internally, the stylesheet refers to font sizes in purely relative
+  ;; terms. This is done by defining a scaled set of fonts 
+  ;; (sizes 1, 2, 3, etc.)
+  ;; based at the default text font size (e.g. 10pt). The '%hsize-bump-factor%'
+  ;; describes the ratio between scaled sizes. The default is 1.2.
+  ;;
+  ;; Each hsize is '%hsize-bump-factor%' times larger than
+  ;; the previous hsize. For example, if the base size is 10pt, and 
+  ;; '%hsize-bump-factor%'
+  ;; 1.2, hsize 1 is 12pt, hsize 2 is 14.4pt, hsize 3 is 17.28pt, etc.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  1.2)
+
+(define %smaller-size-factor% 
+  ;; REFENTRY smaller-size-factor
+  ;; PURP Smaller font scaling factor
+  ;; DESC
+  ;; In environments that are usually set with a slightly smaller font size,
+  ;; for example block quotations, the stylesheet calculates the smaller font
+  ;; size by muliplying the current font size by '%smaller-size-factor%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0.9)
+
+(define %ss-size-factor% 
+  ;; REFENTRY ss-size-factor
+  ;; PURP Super/subscript scaling factor
+  ;; DESC
+  ;; When text is set as a subscript or superscript, the font size of the
+  ;; text is multiplied by '%ss-size-factor%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0.6)
+
+(define %ss-shift-factor%
+  ;; REFENTRY ss-shift-factor
+  ;; PURP Super/subscript shift factor
+  ;; DESC
+  ;; When text is set as a subscript or superscript, it is set above or below
+  ;; the baseline by a factor of the current font size and '%ss-shift-factor%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0.4)
+
+(define %verbatim-size-factor% 
+  ;; REFENTRY verbatim-size-factor
+  ;; PURP Verbatim font scaling factor
+  ;; DESC
+  ;; When a monospace font is selected, the current font size is multiplied
+  ;; by the '%verbatim-size-factor%'. If '%verbatim-size-factor%'
+  ;; is '#f', no scaling is performed (Well, that's not precisely true. 
+  ;; In '$verbatim-display$'
+  ;; environments, the font size is calculated with respect to the longest line
+  ;; in the display, if '%verbatim-size-factor%' is '#f').
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0.9)
+
+(define %bf-size%
+  ;; REFENTRY bf-size
+  ;; PURP Defines the body font size
+  ;; DESC
+  ;; Sets the body font size. This parameter is usually controlled by the
+  ;; '%visual-acuity%' parameter.
+  ;; /DESC
+  ;; /REFENTRY
+  (case %visual-acuity%
+    (("tiny") 8pt)
+    (("normal") 10pt)
+    (("presbyopic") 12pt)
+    (("large-type") 24pt)))
+
+(define-unit em %bf-size%)
+
+(define %footnote-size-factor% 
+  ;; REFENTRY footnote-size-factor
+  ;; PURP Footnote font scaling factor
+  ;; DESC
+  ;; When printing footnotes, the current font size is multiplied by the
+  ;; '%footnote-size-factor%'. 
+  ;; /DESC
+  ;; /REFENTRY
+  0.9)
+
+(define %formal-object-title-font-weight%
+  ;; REFENTRY formal-object-title-font-weight
+  ;; PURP Formal object title font weight
+  ;; DESC
+  ;; Specifies the title font weight (i.e., 'bold or 'medium) of
+  ;; formal objects (e.g., figures).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'bold)
+
+(define %table-title-font-weight%
+  ;; REFENTRY table-title-font-weight
+  ;; PURP Table title font weight
+  ;; DESC
+  ;; Specifies the title font weight (i.e., 'bold or 'medium) of the
+  ;; formal tables.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'bold)
+
+;; REFERENCE Backends
+
+(define tex-backend 
+  ;; REFENTRY tex-backend
+  ;; PURP Are we using the TeX backend?
+  ;; DESC
+  ;; This parameter exists so that '-V tex-backend' can be used on the
+  ;; command line to explicitly select the TeX backend.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define mif-backend 
+  ;; REFENTRY mif-backend
+  ;; PURP Are we using the MIF backend?
+  ;; DESC
+  ;; This parameter exists so that '-V mif-backend' can be used on the
+  ;; command line to explicitly select the MIF backend.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define rtf-backend 
+  ;; REFENTRY rtf-backend
+  ;; PURP Are we using the RTF backend?
+  ;; DESC
+  ;; This parameter exists so that '-V rtf-backend' can be used on the
+  ;; command line to explicitly select the RTF backend.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define default-backend 
+  ;; REFENTRY default-backend
+  ;; PURP What is the default backend?
+  ;; DESC
+  ;; This parameter sets the default backend.  Selecting an explicit
+  ;; backend enables features specific to that backend (if there are any).
+  ;; The legal values are 'rtf', 'tex', 'mif', and '#f'. Using
+  ;; '#f' implies that no special features are used.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define (print-backend)
+  ;; REFENTRY print-backend
+  ;; PURP Returns the backend that is being used to format the document
+  ;; DESC
+  ;; This parameter controls features in the stylesheet that are backend
+  ;; specific.  The legal values are 'rtf', 'tex', 'mif', and '#f'. Using
+  ;; '#f' implies that no special features are used.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (cond
+   (tex-backend 'tex)
+   (mif-backend 'mif)
+   (rtf-backend 'rtf)
+   (else default-backend)))
+
+;; REFERENCE Verbatim Environments
+
+(define %verbatim-default-width%
+  ;; REFENTRY verbatim-default-width
+  ;; PURP Default width of verbatim environments
+  ;; DESC
+  ;; If no WIDTH attribute is specified on verbatim environments, 
+  ;; '%verbatim-default-width%' is the default.  Note: this width only
+  ;; comes into play if '%verbatim-size-factor%' is '#f'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  80)
+
+(define %number-synopsis-lines% 
+  ;; REFENTRY number-synopsis-lines
+  ;; PURP Enumerate lines in a 'Synopsis'?
+  ;; DESC
+  ;; If true, lines in each 'Synopsis' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%', 
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-funcsynopsisinfo-lines% 
+  ;; REFENTRY number-funcsynopsisinfo-lines
+  ;; PURP Enumerate lines in a 'FuncSynopsisInfo'?
+  ;; DESC
+  ;; If true, lines in each 'FuncSynopsisInfo' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-literallayout-lines% 
+  ;; REFENTRY number-literallayout-lines
+  ;; PURP Enumerate lines in a 'LiteralLayout'?
+  ;; DESC
+  ;; If true, lines in each 'LiteralLayout' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-address-lines% 
+  ;; REFENTRY number-address-lines
+  ;; PURP Enumerate lines in a 'Address'?
+  ;; DESC
+  ;; If true, lines in each 'Address' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-programlisting-lines%
+  ;; REFENTRY number-programlisting-lines
+  ;; PURP Enumerate lines in a 'ProgramListing'?
+  ;; DESC
+  ;; If true, lines in each 'ProgramListing' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %number-screen-lines%
+  ;; REFENTRY number-screen-lines
+  ;; PURP Enumerate lines in a 'Screen'?
+  ;; DESC
+  ;; If true, lines in each 'Screen' will be enumerated.
+  ;; See also '%linenumber-mod%', '%linenumber-length%',
+  ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %linenumber-mod% 
+  ;; REFENTRY linenumber-mod
+  ;; PURP Controls line-number frequency in enumerated environments.
+  ;; DESC
+  ;; Every '%linenumber-mod%' line will be enumerated.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  5)
+
+(define %linenumber-length% 
+  ;; REFENTRY linenumber-length
+  ;; PURP Width of line numbers in enumerated environments
+  ;; DESC
+  ;; Line numbers will be padded to '%linenumber-length%'
+  ;; characters.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  3)
+
+(define %linenumber-padchar% 
+  ;; REFENTRY linenumber-padchar
+  ;; PURP Pad character in line numbers
+  ;; DESC
+  ;; Line numbers will be padded (on the left) with '%linenumber-padchar%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "\no-break-space;")
+
+(define ($linenumber-space$) 
+  ;; REFENTRY linenumber-space
+  ;; PURP Returns the sosofo which separates line numbers from the text
+  ;; DESC
+  ;; The sosofo returned by '($linenumber-space$)' is placed
+  ;; between the line number and the corresponding line in 
+  ;; enumerated environments.
+  ;;
+  ;; Note: '%linenumber-padchar%'s are separated from lines
+  ;; that are not enumerated (because they don't match '%linenumber-mod%').
+  ;; In other words, '($linenumber-space$)' occurs
+  ;; on every line.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (literal "\no-break-space;"))
+
+(define %indent-synopsis-lines% 
+  ;; REFENTRY indent-synopsis-lines
+  ;; PURP Indent lines in a 'Synopsis'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-funcsynopsisinfo-lines% 
+  ;; REFENTRY indent-funcsynopsisinfo-lines
+  ;; PURP Indent lines in a 'FuncSynopsisInfo'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-literallayout-lines% 
+  ;; REFENTRY indent-literallayout-lines
+  ;; PURP Indent lines in a 'LiteralLayout'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-address-lines% 
+  ;; REFENTRY indent-address-lines
+  ;; PURP Indent lines in a 'Address'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-programlisting-lines%
+  ;; REFENTRY indent-programlisting-lines
+  ;; PURP Indent lines in a 'ProgramListing'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %indent-screen-lines%
+  ;; REFENTRY indent-screen-lines
+  ;; PURP Indent lines in a 'Screen'?
+  ;; DESC
+  ;; If not '#f', each line in the display will be indented
+  ;; with the content of this variable.  Usually it is set to some number
+  ;; of spaces, but you can indent with any string you wish.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %callout-fancy-bug% 
+  ;; REFENTRY callout-fancy-bug
+  ;; PURP Use fancy callout bugs?
+  ;; DESC
+  ;; If true, fancy callout bugs will be used. Otherwise, simple ones are
+  ;; used. Fancy callout bugs may require the RTF backend.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %callout-default-col% 
+  ;; REFENTRY callout-default-col
+  ;; PURP Default column for callouts
+  ;; DESC
+  ;; If the coordinates of a callout include only a line number, the callout
+  ;; bug will appear in column '%callout-default-col%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  60)
+
+;; REFERENCE Labelling
+
+(define %section-autolabel% 
+  ;; REFENTRY section-autolabel
+  ;; PURP Are sections enumerated?
+  ;; DESC
+  ;; If true, unlabeled sections will be enumerated.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %chapter-autolabel% 
+  ;; REFENTRY chapter-autolabel
+  ;; PURP Are chapters enumerated?
+  ;; DESC
+  ;; If true, chapters will be enumerated.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %label-preface-sections%
+  ;; REFENTRY label-preface-sections
+  ;; PURP Are sections in the Preface enumerated?
+  ;; DESC
+  ;; If true, unlabeled sections in the Preface will be enumerated
+  ;; if '%section-autolabel%' is true.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %qanda-inherit-numeration% 
+  ;; REFENTRY qanda-inherit-numeration
+  ;; PURP Should numbered questions inherit the surrounding numeration?
+  ;; DESC
+  ;; If true, question numbers are prefixed with the surrounding
+  ;; component or section number. Has no effect unless
+  ;; '%section-autolabel%' is also true.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+;; REFERENCE Running Heads
+
+(define %chap-app-running-heads% 
+  ;; REFENTRY chap-app-running-heads
+  ;; PURP Generate running headers and footers on chapter-level elements?
+  ;; DESC
+  ;; If true, running headers and footers are produced on chapter-level 
+  ;; elements.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %chap-app-running-head-autolabel% 
+  ;; REFENTRY chap-app-running-head-autolabel
+  ;; PURP Put chapter labels in running heads?
+  ;; DESC
+  ;; If true, running heads on 'Chapter's and 
+  ;; 'Appendix'es will include an automatic label.
+  ;; 
+  ;; In other words, if a 'Chapter' has no 'Label' attribute,
+  ;; and '%chap-app-running-head-autolabel%'
+  ;; is true, running heads will include the automatic label for the
+  ;; 'Chapter'. If '%chap-app-running-head-autolabel%'
+  ;; is false, only the 'Title' (or 'TitleAbbrev')
+  ;; will appear in the running head.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE Paper/Page Characteristics
+
+(define %paper-type%
+  ;; REFENTRY paper-type
+  ;; PURP Name of paper type
+  ;; DESC
+  ;; The paper type value identifies the sort of paper in use, for example, 
+  ;; 'A4' or 'USletter'. Setting the paper type is an
+  ;; easy shortcut for setting the correct paper height and width.
+  ;; 
+  ;; See %page-width% and %page-height concerning what other page size
+  ;; are available.  Some common examples are 'A4', 'USletter',
+  ;; 'A4landscape', 'USlandscape'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  ;; "A4"
+  "USletter")
+
+(define %two-side% 
+  ;; REFENTRY two-side
+  ;; PURP Is two-sided output being produced?
+  ;; DESC
+  ;; If '%two-side%' is true, headers and footers are alternated
+  ;; so that the "outer" and "inner" headers will be correctly
+  ;; placed in the bound document.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %writing-mode%
+  ;; REFENTRY writing-mode
+  ;; PURP The writing mode
+  ;; DESC
+  ;; The writing mode is either 'left-to-right', or 
+  ;; 'right-to-left'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'left-to-right)
+
+(define %page-n-columns%
+  ;; REFENTRY page-n-columns
+  ;; PURP Sets the number of columns on each page
+  ;; DESC
+  ;; Sets the number of columns on each page
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  1)
+
+(define %titlepage-n-columns%
+  ;; REFENTRY titlepage-n-columns
+  ;; PURP Sets the number of columns on the title page
+  ;; DESC
+  ;; Sets the number of columns on the title page
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  1)
+
+(define %page-column-sep%
+  ;; REFENTRY page-column-sep
+  ;; PURP Sets the width of the gutter between columns
+  ;; DESC
+  ;; Sets the width of the gutter between columns
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0.5in)
+
+(define %page-balance-columns?% 
+  ;; REFENTRY page-balance-columns
+  ;; PURP Balance columns on pages?
+  ;; DESC
+  ;; If true, the columns on the final page of a multiple column layout
+  ;; will be balanced.  Otherwise, the columns will be completely filled in the
+  ;; writing direction and the last column may be a different length 
+  ;; than the preceding columns.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %left-margin% 
+  ;; REFENTRY left-margin
+  ;; PURP Width of left margin
+  ;; DESC
+  ;; The '%left-margin%' parameter specifies the width of the left margin
+  ;; of the page.  Note that this setting is relative to the physical page,
+  ;; not the writing direction.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  6pi)
+
+(define %right-margin% 
+  ;; REFENTRY right-margin
+  ;; PURP Width of the right margin
+  ;; DESC
+  ;; The '%right-margin%' parameter specifies the width of the right margin
+  ;; of the page.  Note that this setting is relative to the physical page,
+  ;; not the writing direction.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  6pi)
+
+(define %page-width%
+  ;; REFENTRY page-width
+  ;; PURP Specifies the page width
+  ;; DESC
+  ;; Identifies the width of the page (length in the writing direction).
+  ;; It is usually controlled by the '%paper-type%' parameter.
+  ;; /DESC
+  ;; /REFENTRY
+  (case %paper-type%
+    (("A4landscape") 297mm)
+    (("USletter") 8.5in)
+    (("USlandscape") 11in)
+    (("4A0") 1682mm)
+    (("2A0") 1189mm)
+    (("A0") 841mm)
+    (("A1") 594mm)
+    (("A2") 420mm)
+    (("A3") 297mm)
+    (("A4") 210mm)
+    (("A5") 148mm)
+    (("A6") 105mm)
+    (("A7") 74mm)
+    (("A8") 52mm)
+    (("A9") 37mm)
+    (("A10") 26mm)
+    (("B0") 1000mm)
+    (("B1") 707mm)
+    (("B2") 500mm)
+    (("B3") 353mm)
+    (("B4") 250mm)
+    (("B5") 176mm)
+    (("B6") 125mm)
+    (("B7") 88mm)
+    (("B8") 62mm)
+    (("B9") 44mm)
+    (("B10") 31mm)
+    (("C0") 917mm)
+    (("C1") 648mm)
+    (("C2") 458mm)
+    (("C3") 324mm)
+    (("C4") 229mm)
+    (("C5") 162mm)
+    (("C6") 114mm)
+    (("C7") 81mm)
+    (("C8") 57mm)
+    (("C9") 40mm)
+    (("C10") 28mm)))
+
+(define %page-height%
+  ;; REFENTRY page-height
+  ;; PURP Specifies the page height
+  ;; DESC
+  ;; Identifies the height of the page (length perpendicular to the
+  ;; writing direction).
+  ;; It is usually controlled by the '%paper-type%' parameter.
+  ;; /DESC
+  ;; /REFENTRY
+  (case %paper-type%
+    (("A4landscape") 210mm)
+    (("USletter") 11in)
+    (("USlandscape") 8.5in)
+    (("4A0") 2378mm)
+    (("2A0") 1682mm)
+    (("A0") 1189mm)
+    (("A1") 841mm)
+    (("A2") 594mm)
+    (("A3") 420mm)
+    (("A4") 297mm)
+    (("A5") 210mm)
+    (("A6") 148mm)
+    (("A7") 105mm)
+    (("A8") 74mm)
+    (("A9") 52mm)
+    (("A10") 37mm)
+    (("B0") 1414mm)
+    (("B1") 1000mm)
+    (("B2") 707mm)
+    (("B3") 500mm)
+    (("B4") 353mm)
+    (("B5") 250mm)
+    (("B6") 176mm)
+    (("B7") 125mm)
+    (("B8") 88mm)
+    (("B9") 62mm)
+    (("B10") 44mm)
+    (("C0") 1297mm)
+    (("C1") 917mm)
+    (("C2") 648mm)
+    (("C3") 458mm)
+    (("C4") 324mm)
+    (("C5") 229mm)
+    (("C6") 162mm)
+    (("C7") 114mm)
+    (("C8") 81mm)
+    (("C9") 57mm)
+    (("C10") 40mm)))
+
+(define %text-width% 
+  ;; REFENTRY text-width
+  ;; PURP Specifies the width of the body column
+  ;; DESC
+  ;; Identifies the width of the page on which text may occur.
+  ;; /DESC
+  ;; /REFENTRY
+  (- %page-width% (+ %left-margin% %right-margin%)))
+
+(define %epigraph-start-indent%
+  ;; REFENTRY epigraph-start-indent
+  ;; PURP Specifies the left indent of epigraphs.
+  ;; DESC
+  ;; The indent of a epigraph. Default 55% of the text width.
+  ;; /DESC
+  ;; /REFENTRY
+  (* %text-width% 0.55))
+
+(define %epigraph-end-indent%
+  ;; REFENTRY epigraph-end-indent
+  ;; PURP Specified the right indent of epigraphs.
+  ;; DESC
+  ;; The right indent of a epigraph. Default none.
+  ;; /DESC
+  ;; /REFENTRY
+  0pt)
+
+(define %body-width% 
+  ;; REFENTRY body-width
+  ;; PURP Specifies the width of the text in the body column
+  ;; DESC
+  ;; Identifies the width of the page on which text will occur, after
+  ;; the '%body-start-indent%' is removed.
+  ;; /DESC
+  ;; /REFENTRY
+  (- %text-width% %body-start-indent%))
+
+(define %top-margin% 
+  ;; REFENTRY top-margin
+  ;; PURP Height of top margin
+  ;; DESC
+  ;; The '%top-margin%' parameter specifies the height of the
+  ;; top margin
+  ;; of the page.  Note that this setting is relative to the physical page,
+  ;; not the writing direction.
+  ;; /DESC
+  ;; /REFENTRY
+  (if (equal? %visual-acuity% "large-type")
+      7.5pi
+      6pi))
+
+(define %bottom-margin% 
+  ;; REFENTRY bottom-margin
+  ;; PURP Height of bottom margin
+  ;; DESC
+  ;; The '%bottom-margin%' parameter specifies the
+  ;; height of the bottom margin
+  ;; of the page.  Note that this setting is relative to the physical page,
+  ;; not the writing direction.
+  ;; /DESC
+  ;; /REFENTRY
+  (if (equal? %visual-acuity% "large-type")
+      9.5pi 
+      8pi))
+
+(define %header-margin% 
+  ;; REFENTRY header-margin
+  ;; PURP Height of header margin
+  ;; DESC
+  ;; The '%header-margin%' parameter specifies the heigth
+  ;; of the header margin
+  ;; of the page.  Note that this setting is relative to the physical page,
+  ;; not the writing direction.
+  ;; /DESC
+  ;; /REFENTRY
+  (if (equal? %visual-acuity% "large-type") 
+      5.5pi 
+      4pi))
+
+(define %footer-margin% 
+  ;; REFENTRY footer-margin
+  ;; PURP Height of footer margin
+  ;; DESC
+  ;; The '%footer-margin%' parameter specifies the height
+  ;; of the footer margin
+  ;; of the page.  Note that this setting is relative to the physical page,
+  ;; not the writing direction.
+  ;; /DESC
+  ;; /REFENTRY
+  4pi)
+
+(define %page-number-restart% 
+  ;; REFENTRY page-number-restart
+  ;; PURP Restart page numbers in each component?
+  ;; DESC
+  ;; If true, page numbers are restarted at the beginning of each 
+  ;; component-level
+  ;; element ('Chapter', 'Appendix',
+  ;; 'Bibliography', etc.).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %article-page-number-restart% 
+  ;; REFENTRY article-page-number-restart
+  ;; PURP Restart page numbers in each article?
+  ;; DESC
+  ;; If true, page numbers are restarted at the beginning of each 
+  ;; article.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %generate-heading-level%   
+  ;; REFENTRY generate-heading-level
+  ;; PURP Output RTF heading level characteristics?
+  ;; DESC
+  ;; If true, component and section titles will have the heading-level
+  ;; characteristic in the RTF.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+;; REFERENCE Admonitions
+
+(define %admon-graphics%
+  ;; REFENTRY admon-graphics
+  ;; PURP Use graphics in admonitions?
+  ;; DESC
+  ;; If true, admonitions are presented in an alternate style that uses
+  ;; a graphic.  Default graphics are provided in the distribution.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %admon-graphics-path%
+  ;; REFENTRY admon-graphics-path
+  ;; PURP Path to admonition graphics
+  ;; DESC
+  ;; Sets the path, probably relative to the directory where the HTML
+  ;; files are created, to the admonition graphics.  Must include
+  ;; trailing directory separator.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "../images/")
+
+
+;; just for back compat, set it false to say its not set
+(define admon-graphic-default-extension #f)
+
+(define %admon-graphics-extension%
+  ;; REFENTRY admon-graphic-extension
+  ;; PURP Admonition graphic file extension
+  ;; DESC
+  ;; Identifies the extension for admonition graphics. This allows
+  ;; backends to select different images (e.g., EPS for print, PNG for
+  ;; PDF, etc.)
+  ;;
+  ;; The older parameter, admon-graphic-default-extension, will be
+  ;; used if it is set, for backwards compatability.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (if admon-graphic-default-extension
+      admon-graphic-default-extension
+      ".eps"))
+
+(define ($admon-graphic$ #!optional (nd (current-node)))
+  ;; REFENTRY admon-graphic
+  ;; PURP Admonition graphic file
+  ;; DESC
+  ;; Given an admonition node, returns the name of the graphic that should
+  ;; be used for that admonition.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (cond ((equal? (gi nd) (normalize "tip"))
+        (string-append %admon-graphics-path%
+                       (string-append "tip"
+                                      %admon-graphics-extension%)))
+       ((equal? (gi nd) (normalize "note"))
+        (string-append %admon-graphics-path%
+                       (string-append "note"
+                                      %admon-graphics-extension%)))
+
+       ((equal? (gi nd) (normalize "important"))
+        (string-append %admon-graphics-path%
+                       (string-append "important"
+                                      %admon-graphics-extension%)))
+
+       ((equal? (gi nd) (normalize "caution"))
+        (string-append %admon-graphics-path%
+                       (string-append "caution"
+                                      %admon-graphics-extension%)))
+       ((equal? (gi nd) (normalize "warning"))
+        (string-append %admon-graphics-path%
+                       (string-append "warning"
+                                      %admon-graphics-extension%)))
+       (else (error (string-append (gi nd) " is not an admonition.")))))
+
+(define ($admon-graphic-width$ #!optional (nd (current-node)))
+  ;; REFENTRY admon-graphic-width
+  ;; PURP Admonition graphic file width
+  ;; DESC
+  ;; Given an admonition node, returns the width of the graphic that will
+  ;; be used for that admonition.
+  ;;
+  ;; All of the default graphics in the distribution are 0.3in wide.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0.3in)
+
+;; REFERENCE Quadding
+
+(define %default-quadding%   
+  ;; REFENTRY default-quadding
+  ;; PURP The default quadding
+  ;; DESC
+  ;; The default quadding ('start', 'center', 'justify',
+  ;; or 'end').
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'start)
+
+(define %division-title-quadding% 
+  ;; REFENTRY division-title-quadding
+  ;; PURP Division title quadding
+  ;; DESC
+  ;; The quadding of division-level titles ('Set', 'Book', and 'Part').
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'center)
+
+(define %division-subtitle-quadding% 
+  ;; REFENTRY division-subtitle-quadding
+  ;; PURP Division subtitle quadding
+  ;; DESC
+  ;; The quadding of division-level subtitles ('Set', 'Book', and 'Part').
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'center)
+
+(define %component-title-quadding% 
+  ;; REFENTRY component-title-quadding
+  ;; PURP Component title quadding
+  ;; DESC
+  ;; The quadding of component-level titles ('Chapter',
+  ;; 'Appendix', 'Glossary', etc.).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'start)
+
+(define %component-subtitle-quadding% 
+  ;; REFENTRY component-subtitle-quadding
+  ;; PURP Component subtitle quadding
+  ;; DESC
+  ;; The quadding of component-level subtitles ('Chapter',
+  ;; 'Appendix', 'Glossary', etc.).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'start)
+
+(define %article-title-quadding% 
+  ;; REFENTRY article-title-quadding
+  ;; PURP Article title quadding
+  ;; DESC
+  ;; The quadding of article titles.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'center)
+
+(define %article-subtitle-quadding% 
+  ;; REFENTRY article-subtitle-quadding
+  ;; PURP Article subtitle quadding
+  ;; DESC
+  ;; The quadding of article subtitles.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'center)
+
+(define %section-title-quadding% 
+  ;; REFENTRY section-title-quadding
+  ;; PURP Section title quadding
+  ;; DESC
+  ;; The quadding of section-level titles.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'start)
+
+(define %section-subtitle-quadding% 
+  ;; REFENTRY section-subtitle-quadding
+  ;; PURP Section subtitle quadding
+  ;; DESC
+  ;; The quadding of section-level subtitles.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  'start)
+
+;; REFERENCE Bibliographies
+
+(define biblio-citation-check
+  ;; REFENTRY biblio-citation-check
+  ;; PURP Check citations
+  ;; DESC
+  ;; If true, the content of CITATIONs will be checked against possible
+  ;; biblioentries.  If the citation cannot be found, an error is issued
+  ;; and the citation is generated.  If the citation is found, it is generated
+  ;; with a cross reference to the appropriate biblioentry.
+  ;;
+  ;; A citation matches if the content of the citation element matches the
+  ;; ID, XREFLABEL, or leading ABBREV of a biblioentry.
+  ;;
+  ;; This setting may have significant performance implications on large
+  ;; documents, hence it is false by default.
+  ;;
+  ;; (This option can conveniently be set with '-V biblio-citation-check' 
+  ;; on the Jade command line).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define biblio-filter-used
+  ;; REFENTRY filter-used
+  ;; PURP Suppress unreferenced bibliography entries
+  ;; DESC
+  ;; If true, bibliography entries which are not cited are suppressed.
+  ;; A biblioentry is cited if an XREF or LINK matches its ID, or if
+  ;; a CITE element matches its
+  ;; ID, XREFLABEL, or leading ABBREV.
+  ;;
+  ;; A BIBLIOGRAPHY with no entries will still be output (making a whole
+  ;; component conditional would be _A LOT_ of work and seems unnecessary),
+  ;; but BIBLIDIVs with no entries will be suppressed.
+  ;;
+  ;; This setting may have significant performance implications,
+  ;; hence it is false by default.
+  ;;
+  ;; (This option can conveniently be set with '-V biblio-filter-used' on the 
+  ;; Jade command line).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define biblio-number
+  ;; REFENTRY biblio-number
+  ;; PURP Enumerate bibliography entries
+  ;; DESC
+  ;; If true, bibliography entries will be numbered.  If you cross-reference
+  ;; bibliography entries, you should probably use biblio-number or
+  ;; consistently use XREFLABEL or ABBREV.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define biblio-xref-title
+  ;; REFENTRY biblio-xref-title
+  ;; PURP Use the titles of bibliography entries in XREFs
+  ;; DESC
+  ;; If true, cross references to bibliography entries will use the
+  ;; title of the entry as the cross reference text. Otherwise, either
+  ;; the number (see 'biblio-number') or XREFLABEL/ABBREV will be used.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+;; REFERENCE OLinks
+
+(define %olink-outline-ext%
+  ;; REFENTRY olink-outline-ext
+  ;; PURP Extension for olink outline file
+  ;; DESC
+  ;; The extension used to find the outline information file.  When searching
+  ;; for outline information about a document, the extension is discarded
+  ;; from the system ID of the file and '%olinke-outline-ext%' is appended.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  ".olink")
+
+;; REFERENCE Footnotes
+
+(define %footnote-ulinks%
+  ;; REFENTRY footnote-ulinks
+  ;; PURP Generate footnotes for ULinks?
+  ;; DESC
+  ;; If true, the URL of each ULink will appear as a footnote.
+  ;; Processing ULinks this way may be very, very slow. It requires
+  ;; walking over every descendant of every component in order to count
+  ;; both ulinks and footnotes.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define bop-footnotes
+  ;; REFENTRY bop-footnotes
+  ;; PURP Make "bottom-of-page" footnotes?
+  ;; DESC
+  ;; If true, footnotes will be done at the bottom of the page instead 
+  ;; of collected together as notes at the end of the section.
+  ;; This variable is ignored if the print backend does not support
+  ;; bottom-of-the-page footnotes. At present, only the TeX backend
+  ;; supports them.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+;; REFERENCE Graphics
+
+(define %graphic-default-extension% 
+  ;; REFENTRY graphic-default-extension
+  ;; PURP Default extension for graphic FILEREFs
+  ;; DESC
+  ;; The '%graphic-default-extension%' will be
+  ;; added to the end of all 'fileref' filenames on
+  ;; 'Graphic's if they do not end in one of the
+  ;; '%graphic-extensions%'.  Set this to '#f'
+  ;; to turn off this feature.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %graphic-extensions% 
+  ;; REFENTRY graphic-extensions
+  ;; PURP List of graphic filename extensions
+  ;; DESC
+  ;; The list of extensions which may appear on a 'fileref'
+  ;; on a 'Graphic' which are indicative of graphic formats.
+  ;;
+  ;; Filenames that end in one of these extensions will not have
+  ;; the '%graphic-default-extension%' added to them.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  '("eps" "epsf" "gif" "tif" "tiff" "jpg" "jpeg" "png" "pdf"))
+
+(define image-library
+  ;; REFENTRY image-library
+  ;; PURP Load image library database for additional info about images?
+  ;; DESC
+  ;; If true, an image library database is loaded and extra information
+  ;; about web graphics is retrieved from it.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define image-library-filename
+  ;; REFENTRY image-library-filename
+  ;; PURP Name of the image library database
+  ;; DESC
+  ;; If 'image-library' is true, then the database is loaded from
+  ;; 'image-library-filename'.  It's a current limitation that only a
+  ;; single database can be loaded.
+  ;; 
+  ;; The image library database is stored in a separate directory
+  ;; because it must be parsed with the XML declaration.  The only
+  ;; practical way to accomplish this with Jade, if you are processing a
+  ;; document that uses another declaration, is by having a catalog
+  ;; file in the directory that contains the image library that
+  ;; specifies the SGMLDECL.  (So if it was in the same directory
+  ;; as your document, your document would also be parsed with the
+  ;; XML declaration, which may not be correct.)
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  "imagelib/imagelib.xml")
+
+;; REFERENCE Tables
+
+(define ($table-element-list$) 
+  ;; REFENTRY table-element-list
+  ;; PURP List of table element names
+  ;; DESC
+  ;; The list of table elements in the DTD.  
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (list (normalize "table") (normalize "informaltable")))
+
+(define %simplelist-column-width% 
+  ;; REFENTRY simplelist-column-width
+  ;; PURP Width of columns in tabular simple lists
+  ;; DESC
+  ;; If set to '#f', the table will span the entire
+  ;; page width.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+;; REFERENCE VariableLists
+
+(define %default-variablelist-termlength%
+  ;; REFENTRY default-variablelist-termlength
+  ;; PURP Default term length on variablelists
+  ;; DESC
+  ;; When formatting a 'VariableList', this value is used as the
+  ;; default term length, if no 'TermLength' is specified.
+  ;;
+  ;; If all of the terms in a list shorter than the term length,
+  ;; the stylesheet may format them "side-by-side" in a table if
+  ;; 'may-format-variablelist-as-table' is '#t'.
+  ;; /DESC
+  ;; /REFENTRY
+  20)
+
+(define %may-format-variablelist-as-table%
+  ;; REFENTRY may-format-variablelist-as-table
+  ;; PURP Format VariableLists as tables?
+  ;; DESC
+  ;; If '%may-format-variablelist-as-table%' is '#t', a
+  ;; 'VariableList' will be formatted as a table, if *all of*
+  ;; the terms are shorter than the specified 'TermLength'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %always-format-variablelist-as-table%
+  ;; REFENTRY always-format-variablelist-as-table
+  ;; PURP Always format VariableLists as tables?
+  ;; DESC
+  ;; When a 'VariableList' is formatted, if any of the
+  ;; terms in the list are too long, the whole list is formatted as a
+  ;; list.
+  ;;
+  ;; If '%always-format-variablelist-as-table%' is
+  ;; '#t', the 'VariableList' will be
+  ;; formatted as a table, even if some terms are too long.  The terms that
+  ;; are too long will format span above their associated description.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+;; REFERENCE Vertical Spacing
+
+(define %line-spacing-factor% 
+  ;; REFENTRY line-spacing-factor
+  ;; PURP Factor used to calculate leading
+  ;; DESC
+  ;; The leading is calculated by multiplying the current font size by the 
+  ;; '%line-spacing-factor%'. For example, if the font size is 10pt and
+  ;; the '%line-spacing-factor%' is 1.1, then the text will be
+  ;; printed "10-on-11".
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  1.3)
+
+(define %head-before-factor% 
+  ;; REFENTRY head-before-factor
+  ;; PURP Factor used to calculate space above a title
+  ;; DESC
+  ;; The space before a title is calculated by multiplying the font size
+  ;; used in the title by the '%head-before-factor%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0.75)
+
+(define %head-after-factor% 
+  ;; REFENTRY head-after-factor
+  ;; PURP Factor used to calculate space below a title
+  ;; DESC
+  ;; The space after a title is calculated by multiplying the font size used
+  ;; in the title by the '%head-after-factor%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0.5)
+
+(define %body-start-indent% 
+  ;; REFENTRY body-start-indent
+  ;; PURP Default indent of body text
+  ;; DESC
+  ;; The default indent of body text. Some elements may have more or less
+  ;; indentation.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  4pi)
+
+(define %blockquote-start-indent%
+  ;; PURP Default indent of blockquoted text
+  ;; DESC
+  ;; The default start (usually left) indent of blockquoted text.
+  ;; /DESC
+  ;; AUTHOR Ola Lundqvist
+  ;; /REFENTRY
+  1em)
+
+(define %blockquote-end-indent%
+  ;; PURP Default indent of blockquoted text
+  ;; DESC
+  ;; The default end (usually right) indent of blockquoted text.
+  ;; /DESC
+  ;; AUTHOR Ola Lundqvist
+  ;; /REFENTRY
+  1em)
+
+(define %para-sep% 
+  ;; REFENTRY para-sep
+  ;; PURP Distance between paragraphs
+  ;; DESC
+  ;; The '%para-sep%' is the distance between the last line
+  ;; of one paragraph and the first line of the next.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (/ %bf-size% 2.0))
+
+(define %block-sep% 
+  ;; REFENTRY block-sep
+  ;; PURP Distance between block-elements
+  ;; DESC
+  ;; The '%block-sep%' is the vertical distance between
+  ;; block elements (figures, tables, etc.)
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  (* %para-sep% 2.0))
+
+;; REFERENCE Indents
+
+(define %para-indent%
+  ;; REFENTRY para-indent
+  ;; PURP First line start-indent for paragraphs (other than the first)
+  ;; DESC
+  ;; The '%para-indent%' is the amount of extra indentation that the
+  ;; first line of a paragraph should receive.  This parameter applies
+  ;; only to the second and subsequent paragraphs in a section.  See
+  ;; '%para-indent-firstpara%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0pt)
+
+(define %para-indent-firstpara%
+  ;; REFENTRY para-indent-firstpara
+  ;; PURP First line start-indent for the first paragraph
+  ;; DESC
+  ;; The '%para-indent-firstpara%' is the amount of extra indentation
+  ;; that the first line of the first paragraph of a section should receive.
+  ;; This parameter is frequently '0pt' even when '%para-indent%' is 
+  ;; not.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0pt)
+
+(define %block-start-indent% 
+  ;; REFENTRY block-start-indent
+  ;; PURP Extra start-indent for block-elements
+  ;; DESC
+  ;; Block elements (tables, figures, verbatim environments, etc.) will
+  ;; be indented by the specified amount.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  0pt)
+
+;; REFERENCE Object Rules
+
+(define %example-rules%
+  ;; REFENTRY example-rules
+  ;; PURP Specify rules before and after an Example
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'Example'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %figure-rules%
+  ;; REFENTRY figure-rules
+  ;; PURP Specify rules before and after an Figure
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'Figure'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %table-rules%
+  ;; REFENTRY table-rules
+  ;; PURP Specify rules before and after an Table
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'Table'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %equation-rules%
+  ;; REFENTRY equation-rules
+  ;; PURP Specify rules before and after an Equation
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'Equation'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %informalexample-rules%
+  ;; REFENTRY informalexample-rules
+  ;; PURP Specify rules before and after an InformalExample
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'InformalExample'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %informalfigure-rules%
+  ;; REFENTRY informalfigure-rules
+  ;; PURP Specify rules before and after an InformalFigure
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'InformalFigure'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %informaltable-rules%
+  ;; REFENTRY informaltable-rules
+  ;; PURP Specify rules before and after an InformalTable
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'InformalTable'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %informalequation-rules%
+  ;; REFENTRY informalequation-rules
+  ;; PURP Specify rules before and after an InformalEquation
+  ;; DESC
+  ;; If '#t', rules will be drawn before and after each
+  ;; 'InformalEquation'.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(define %object-rule-thickness%
+  ;; REFENTRY object-rule-thickness
+  ;; PURP Width of rules around formal and informal objects
+  ;; DESC
+  ;; Specifies the width of the rules drawn before and after an object.
+  ;; This only applies if the appropriate
+  ;; '%*-rules%' variable
+  ;; is '#t'.
+  ;; /DESC
+  ;; /REFENTRY
+  2pt)
+
+;; REFERENCE Miscellaneous
+
+(define ($object-titles-after$)
+  ;; REFENTRY object-titles-after
+  ;; PURP List of objects who's titles go after the object
+  ;; DESC
+  ;; Titles of formal objects (Figures, Equations, Tables, etc.)
+  ;; in this list will be placed below the object instead of above it.
+  ;;
+  ;; This is a list of element names, for example:
+  ;; '(list (normalize "figure") (normalize "table"))'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  '())
+
+(define formal-object-float
+  ;; REFENTRY formal-object-float
+  ;; PURP Do formal objects float?
+  ;; DESC
+  ;; If '#t', formal objects will float if floating is supported by the
+  ;; backend. At present, only the TeX backend supports floats.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %default-title-end-punct% 
+  ;; REFENTRY default-title-end-punct
+  ;; PURP Default punctuation at the end of a run-in head.
+  ;; DESC
+  ;; The punctuation used at the end of a run-in head (e.g. on FORMALPARA).
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  ".")
+
+(define %content-title-end-punct% 
+  ;; REFENTRY content-title-end-punct
+  ;; PURP List of punctuation chars at the end of a run-in head
+  ;; DESC
+  ;; If a run-in head ends in any of these characters, the
+  ;; '%default-title-end-punct%' is not used.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  '(#\. #\! #\? #\:))
+
+(define %honorific-punctuation%
+  ;; REFENTRY honorific-punctuation
+  ;; PURP Punctuation to follow honorifics in names
+  ;; DESC
+  ;; The honorific punctuation is placed after the honorific in
+  ;; a name. 
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  ".")
+
+(define %default-simplesect-level% 
+  ;; REFENTRY default-simplesect-level
+  ;; PURP Default section level for 'SimpleSect's.
+  ;; DESC
+  ;; If 'SimpleSect's appear inside other section-level
+  ;; elements, they are rendered at the appropriate section level, but if they
+  ;; appear in a component-level element, they are rendered at 
+  ;; '%default-simplesect-level%'.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  4)
+
+(define %show-ulinks%
+  ;; REFENTRY show-ulinks
+  ;; PURP Display URLs after ULinks?
+  ;; DESC
+  ;; If true, the URL of each ULink will appear in parenthesis after
+  ;; the text of the link.  If the text of the link and the URL are
+  ;; identical, the parenthetical URL is suppressed.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define %show-comments%
+  ;; REFENTRY show-comments
+  ;; PURP Display Comment elements?
+  ;; DESC
+  ;; If true, comments will be displayed, otherwise they are suppressed.
+  ;; Comments here refers to the 'Comment' element, which will be renamed
+  ;; 'Remark' in DocBook V4.0, not SGML/XML comments which are unavailable.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #t)
+
+(define firstterm-bold
+  ;; REFENTRY firstterm-bold
+  ;; PURP Make FIRSTTERM elements bold?
+  ;; DESC
+  ;; If '#t', FIRSTTERMs will be bold, to distinguish them from
+  ;; simple GLOSSTERMs.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  #f)
+
+(define %min-leading%
+  ;; REFENTRY min-leading
+  ;; PURP Minumum leading between lines
+  ;; DESC
+  ;; The '%min-leading%' parameter specifies the smallest amount of leading
+  ;; to allow between lines.  The default value, '#f', has the side-effect
+  ;; that leading cannot change.  This means that graphics that appear in
+  ;; a paragraph are truncated if they are taller than the current leading.
+  ;; By setting this parameter to some small value, we get stretchable
+  ;; space between lines.
+  ;; /DESC
+  ;; AUTHOR N/A
+  ;; /REFENTRY
+  2pt)
+
+(define %hyphenation%
+  ;; REFENTRY hyphenation
+  ;; PURP Allow automatic hyphenation?
+  ;; DESC
+  ;; The '%hyphenation%' parameter indicates whether or
+  ;; not the backend should allow automatic hyphention of text, for example
+  ;; in paragraphs. The default value, '#f', indicates that
+  ;; it should not.
+  ;; /DESC
+  ;; /REFENTRY
+  #f)
+
+(declare-initial-value writing-mode    %writing-mode%)
+
+(declare-initial-value input-whitespace-treatment 'collapse)
+
+(declare-initial-value left-margin     %left-margin%)
+(declare-initial-value right-margin    %right-margin%)
+
+(declare-initial-value page-width      %page-width%)
+(declare-initial-value page-height     %page-height%)
+
+(declare-initial-value min-leading %min-leading%)
+(declare-initial-value top-margin      %top-margin%)
+(declare-initial-value bottom-margin   %bottom-margin%)
+(declare-initial-value header-margin   %header-margin%)
+(declare-initial-value footer-margin   %footer-margin%)
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/print/dbprint.dsl b/print/dbprint.dsl
new file mode 100644 (file)
index 0000000..01005d4
--- /dev/null
@@ -0,0 +1,205 @@
+;; $Id: dbprint.dsl,v 1.6 2004/10/09 19:46:33 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define (HSIZE n)
+  (let ((m (if (< n 0) 0 n)))
+    (* %bf-size%
+       (expt %hsize-bump-factor% m))))
+
+(define (print-backend)
+  (cond 
+   (tex-backend 'tex)
+   (mif-backend 'mif)
+   (rtf-backend 'rtf)
+   (else default-backend)))
+
+;; ====================== COMMON STYLE TEMPLATES =======================
+
+(define ($block-container$)
+  (make display-group
+       space-before: %block-sep%
+       space-after: %block-sep%
+       start-indent: %body-start-indent%
+       (process-children)))
+
+(define (is-first-para #!optional (para (current-node)))
+  ;; A paragraph is the first paragraph if it is preceded by a title
+  ;; (or bridgehead) and the only elements that intervene between the
+  ;; title and the paragraph are *info elements, indexterms, and beginpage.
+  ;;
+  (let loop ((nd (ipreced para)))
+    (if (node-list-empty? nd)
+       ;; We've run out of nodes. We still might be the first paragraph
+       ;; preceded by a title if the parent element has an implied
+       ;; title.
+       (if (equal? (element-title-string (parent para)) "")
+           #f  ;; nope
+           #t) ;; yep
+       (if (or (equal? (gi nd) (normalize "title"))
+               (equal? (gi nd) (normalize "titleabbrev"))
+               (equal? (gi nd) (normalize "bridgehead")))
+           #t
+           (if (or (not (equal? (node-property 'class-name nd) 'element))
+                   (member (gi nd) (info-element-list)))
+               (loop (ipreced nd))
+               #f)))))
+
+(define (dsssl-language-code #!optional (node (current-node)))
+  (let* ((lang     ($lang$))
+        (langcode (if (> (string-index lang "_") 0)
+                      (substring lang 0 (string-index lang "_"))
+                      lang)))
+    (string->symbol (case-fold-up langcode))))
+
+(define (dsssl-country-code #!optional (node (current-node)))
+  (let* ((lang     ($lang$))
+        (ctrycode (if (> (string-index lang "_") 0)
+                      (substring lang
+                                 (+ (string-index lang "_") 1)
+                                 (string-length lang))
+                      #f)))
+    (if ctrycode
+       (string->symbol (case-fold-up ctrycode))
+       #f)))
+
+(define ($paragraph$)
+  (if (or (equal? (print-backend) 'tex)
+         (equal? (print-backend) #f))
+      ;; avoid using country: characteristic because of a JadeTeX bug...
+      (make paragraph
+       first-line-start-indent: (if (is-first-para)
+                                    %para-indent-firstpara%
+                                    %para-indent%)
+       space-before: %para-sep%
+       space-after: (if (INLIST?)
+                        0pt
+                        %para-sep%)
+       quadding: %default-quadding%
+       hyphenate?: %hyphenation%
+       language: (dsssl-language-code)
+       (process-children-trim))
+      (make paragraph
+       first-line-start-indent: (if (is-first-para)
+                                    %para-indent-firstpara%
+                                    %para-indent%)
+       space-before: %para-sep%
+       space-after: (if (INLIST?)
+                        0pt
+                        %para-sep%)
+       quadding: %default-quadding%
+       hyphenate?: %hyphenation%
+       language: (dsssl-language-code)
+       country: (dsssl-country-code)
+       (process-children-trim))))
+
+(define ($para-container$)
+  (make paragraph
+       space-before: %para-sep%
+       space-after: %para-sep%
+       start-indent: (if (member (current-node) (outer-parent-list))
+                         %body-start-indent%
+                         (inherited-start-indent))
+       (process-children-trim)))
+
+(define ($indent-para-container$)
+  (make paragraph
+       space-before: %para-sep%
+       space-after: %para-sep%
+       start-indent: (+ (inherited-start-indent) (* (ILSTEP) 2))
+       quadding: %default-quadding%
+       (process-children-trim)))
+
+(define nop-style
+  ;; a nop for use:
+  (style
+      font-family-name: (inherited-font-family-name)
+      font-weight: (inherited-font-weight)
+      font-size: (inherited-font-size)))
+
+(define default-text-style
+  (style
+   font-size: %bf-size%
+   font-weight: 'medium
+   font-posture: 'upright
+   font-family-name: %body-font-family%
+   line-spacing: (* %bf-size% %line-spacing-factor%)))
+
+(define ($bold-seq$ #!optional (sosofo (process-children)))
+  (make sequence
+    font-weight: 'bold
+    sosofo))
+
+(define ($italic-seq$ #!optional (sosofo (process-children)))
+  (make sequence
+    font-posture: 'italic
+    sosofo))
+
+(define ($bold-italic-seq$ #!optional (sosofo (process-children)))
+  (make sequence
+    font-weight: 'bold
+    font-posture: 'italic
+    sosofo))
+
+(define ($mono-seq$ #!optional (sosofo (process-children)))
+  (let ((%factor% (if %verbatim-size-factor% 
+                     %verbatim-size-factor% 
+                     1.0)))
+    (make sequence
+      font-family-name: %mono-font-family%
+      font-size: (* (inherited-font-size) %factor%)
+      sosofo)))
+
+(define ($italic-mono-seq$ #!optional (sosofo (process-children)))
+  (let ((%factor% (if %verbatim-size-factor% 
+                     %verbatim-size-factor% 
+                     1.0)))
+    (make sequence
+      font-family-name: %mono-font-family%
+      font-size: (* (inherited-font-size) %factor%)
+      font-posture: 'italic
+      sosofo)))
+
+(define ($bold-mono-seq$ #!optional (sosofo (process-children)))
+  (let ((%factor% (if %verbatim-size-factor% 
+                     %verbatim-size-factor% 
+                     1.0)))
+    (make sequence
+      font-family-name: %mono-font-family%
+      font-size: (* (inherited-font-size) %factor%)
+      font-weight: 'bold
+      sosofo)))
+
+(define ($score-seq$ stype #!optional (sosofo (process-children)))
+  (make score
+    type: stype
+    sosofo))
+
+(define ($charseq$ #!optional (sosofo (process-children)))
+  (make sequence
+    sosofo))
+
+(define ($guilabel-seq$ #!optional (sosofo (process-children)))
+  (make sequence
+    font-family-name: %guilabel-font-family%
+    sosofo))
+
+;; Stolen from a posting by James on dssslist
+(define *small-caps*
+  (letrec ((signature (* #o375 256))
+          (make-afii
+           (lambda (n)
+             (glyph-id (string-append "ISO/IEC 10036/RA//Glyphs::"
+                                      (number->string n)))))
+          (gen
+           (lambda (from count)
+             (if (= count 0)
+                 '()
+                 (cons (cons (make-afii from)
+                             (make-afii (+ from signature)))
+                       (gen (+ 1 from)
+                            (- count 1)))))))
+    (glyph-subst-table (gen #o141 26))))
+
diff --git a/print/dbprocdr.dsl b/print/dbprocdr.dsl
new file mode 100644 (file)
index 0000000..2627699
--- /dev/null
@@ -0,0 +1,38 @@
+;; $Id: dbprocdr.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================= PROCEDURES =============================
+
+(define (PROCSTEP ilvl)
+  (if (> ilvl 1) 2.0em 1.8em))
+
+(element procedure
+  (if (node-list-empty? (select-elements (children (current-node)) (normalize "title")))
+      ($informal-object$)
+      ($formal-object$)))
+
+(element (procedure title) (empty-sosofo))
+
+(element substeps
+  (make display-group
+       space-before: %para-sep%
+       space-after: %para-sep%
+       start-indent: (+ (inherited-start-indent) (PROCSTEP 2))))
+
+(element step
+  (let ((stepcontent (children (current-node)))
+       (ilevel (length (hierarchical-number-recursive (normalize "step")))))
+    (make sequence
+      start-indent: (+ (inherited-start-indent) (PROCSTEP ilevel))
+
+      (make paragraph
+       space-before: %para-sep%
+       first-line-start-indent: (- (PROCSTEP ilevel))
+       (make line-field
+         field-width: (PROCSTEP ilevel)
+         (literal ($proc-step-number$ (current-node))))
+       (process-node-list (children (node-list-first stepcontent))))
+      (process-node-list (node-list-rest stepcontent)))))
diff --git a/print/dbqanda.dsl b/print/dbqanda.dsl
new file mode 100644 (file)
index 0000000..4ea9aef
--- /dev/null
@@ -0,0 +1,126 @@
+;; $Id: dbqanda.dsl,v 1.1 2003/03/25 19:53:56 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================== QANDASET ==============================
+
+(define (qanda-defaultlabel)
+  (normalize "number"))
+
+(element qandaset
+  (let ((title (select-elements (children (current-node)) 
+                               (normalize "title"))))
+    (make display-group
+      (process-node-list title)
+      (process-qanda))))
+
+(element (qandaset title)
+  (let* ((enclsect (ancestor-member (current-node)
+                                   (list (normalize "section")
+                                         (normalize "simplesect")
+                                         (normalize "sect5")
+                                         (normalize "sect4")
+                                         (normalize "sect3")
+                                         (normalize "sect2")
+                                         (normalize "sect1")
+                                         (normalize "refsect3")
+                                         (normalize "refsect2")
+                                         (normalize "refsect1"))))
+        (sectlvl (SECTLEVEL enclsect))
+        (hs      (HSIZE (- 4 (+ sectlvl 1)))))
+    (make paragraph
+      font-family-name: %title-font-family%
+      font-weight:  (if (< sectlvl 5) 'bold 'medium)
+      font-posture: (if (< sectlvl 5) 'upright 'italic)
+      font-size: hs
+      line-spacing: (* hs %line-spacing-factor%)
+      space-before: (* hs %head-before-factor%)
+      space-after: (* hs %head-after-factor%)
+      start-indent: %body-start-indent%
+      first-line-start-indent: 0pt
+      quadding: %section-title-quadding%
+      keep-with-next?: #t
+      (process-children))))
+
+(element qandadiv
+  (let ((title (select-elements (children (current-node)) 
+                               (normalize "title"))))
+    (make sequence
+      (process-node-list title)
+      (make display-group
+       start-indent: (+ (inherited-start-indent) 2pi)
+       (process-qanda)))))
+
+(element (qandadiv title)
+  (let* ((hnr     (hierarchical-number-recursive (normalize "qandadiv")
+                                                (current-node)))
+        (number  (let loop ((numlist hnr) (number "") (sep ""))
+                   (if (null? numlist)
+                       number
+                       (loop (cdr numlist) 
+                             (string-append number
+                                            sep
+                                            (number->string (car numlist)))
+                             ".")))))
+    (make paragraph
+      font-weight: 'bold
+      space-after: %block-sep%
+      (literal number ". ")
+      (process-children))))
+
+(define (process-qanda #!optional (node (current-node)))
+  (let* ((preamble (node-list-filter-by-not-gi 
+                   (children node)
+                   (list (normalize "title")
+                         (normalize "qandadiv") 
+                         (normalize "qandaentry"))))
+        (divs     (node-list-filter-by-gi (children node)
+                                          (list (normalize "qandadiv"))))
+        (entries  (node-list-filter-by-gi (children node)
+                                          (list (normalize "qandaentry"))))
+        (inhlabel (inherited-attribute-string (normalize "defaultlabel")))
+        (deflabel (if inhlabel inhlabel (qanda-defaultlabel))))
+    (make sequence
+      (process-node-list preamble)
+      (process-node-list divs)
+      (process-node-list entries))))
+
+(element qandaentry
+  (process-children))
+
+(element question
+  (let* ((chlist   (children (current-node)))
+         (firstch  (node-list-first chlist))
+         (restch   (node-list-rest chlist))
+        (label    (question-answer-label (current-node))))
+    (make sequence
+      (make paragraph
+       space-after: (/ %para-sep% 2)
+       keep-with-next?: #t
+       (make sequence
+         (make sequence
+           font-weight: 'bold
+           (if (string=? label "")
+               (empty-sosofo)
+               (literal label " ")))
+         (process-node-list (children firstch)))
+      (process-node-list restch)))))
+
+(element answer
+  (let* ((chlist   (children (current-node)))
+        (firstch  (node-list-first chlist))
+        (restch   (node-list-rest chlist))
+        (label    (question-answer-label (current-node))))
+    (make display-group
+      space-after: %block-sep%
+      (make paragraph
+       (make sequence
+         (make sequence
+           font-weight: 'bold
+           (if (string=? label "")
+               (empty-sosofo)
+               (literal label " ")))
+         (process-node-list (children firstch))))
+      (process-node-list restch))))
diff --git a/print/dbrfntry.dsl b/print/dbrfntry.dsl
new file mode 100644 (file)
index 0000000..39833ab
--- /dev/null
@@ -0,0 +1,215 @@
+;; $Id: dbrfntry.dsl,v 1.3 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; =========================== REFERENCE PAGES ==========================
+
+;;(element reference ($component$))
+
+(element reference
+  (let* ((refinfo  (select-elements (children (current-node)) 
+                                   (normalize "docinfo")))
+        (refintro (select-elements (children (current-node)) 
+                                   (normalize "partintro")))
+        (nl       (titlepage-info-elements 
+                   (current-node)
+                   refinfo
+                   (if %generate-partintro-on-titlepage%
+                       refintro
+                       (empty-node-list)))))
+    (make sequence
+      (if %generate-reference-titlepage%
+         (make sequence
+           (reference-titlepage nl 'recto)
+           (reference-titlepage nl 'verso))
+         (empty-sosofo))
+
+      (if (not (generate-toc-in-front))
+         (process-children)
+         (empty-sosofo))
+      
+      (if (and %generate-reference-toc%
+              (not %generate-reference-toc-on-titlepage%))
+         (make simple-page-sequence
+           page-n-columns: %page-n-columns%
+           page-number-restart?: #t
+           page-number-format: ($page-number-format$ (normalize "toc"))
+           use: default-text-style
+           left-header:   ($left-header$ (normalize "toc"))
+           center-header: ($center-header$ (normalize "toc"))
+           right-header:  ($right-header$ (normalize "toc"))
+           left-footer:   ($left-footer$ (normalize "toc"))
+           center-footer: ($center-footer$ (normalize "toc"))
+           right-footer:  ($right-footer$ (normalize "toc"))
+           input-whitespace-treatment: 'collapse
+           (build-toc (current-node)
+                      (toc-depth (current-node))))
+         (empty-sosofo))
+
+      (if (and (not (node-list-empty? refintro))
+              (not %generate-partintro-on-titlepage%))
+         ($process-partintro$ refintro #t)
+         (empty-sosofo))
+
+      (if (generate-toc-in-front)
+         (if %refentry-new-page%
+             (process-children)
+             (make simple-page-sequence
+               page-n-columns: %page-n-columns%
+               page-number-format: ($page-number-format$)
+               use: default-text-style
+               left-header:   ($left-header$)
+               center-header: ($center-header$)
+               right-header:  ($right-header$)
+               left-footer:   ($left-footer$)
+               center-footer: ($center-footer$)
+               right-footer:  ($right-footer$)
+               input-whitespace-treatment: 'collapse
+               quadding: %default-quadding%
+               (process-children)))
+         (empty-sosofo)))))
+
+;; If each RefEntry begins on a new page, this title is going to wind
+;; up on its own page, too, so make it a divtitlepage instead.  Otherwise,
+;; just let it be a component title.
+(element (reference title) (empty-sosofo))
+;;  (if %refentry-new-page%
+;;      ($divtitlepage$)
+;;      (empty-sosofo)))
+
+(element refentry 
+  (make display-group
+    keep: %refentry-keep%
+    (if (or %refentry-new-page%
+           (node-list=? (current-node) (sgml-root-element)))
+       (make simple-page-sequence
+         page-n-columns: %page-n-columns%
+         page-number-format: ($page-number-format$)
+         use: default-text-style
+         left-header:   ($left-header$)
+         center-header: ($center-header$)
+         right-header:  ($right-header$)
+         left-footer:   ($left-footer$)
+         center-footer: ($center-footer$)
+         right-footer:  ($right-footer$)
+         input-whitespace-treatment: 'collapse
+         quadding: %default-quadding%
+         ($refentry-title$)
+         (process-children))
+       (make sequence
+         ($refentry-title$)
+         ($block-container$)))
+    (make-endnotes)))
+
+(define ($refentry-title$)
+  (let* ((refmeta       (select-elements (children (current-node))
+                                        (normalize "refmeta")))
+        (refentrytitle (select-elements (children refmeta)
+                                        (normalize "refentrytitle")))
+        (refnamediv    (select-elements (children (current-node))
+                                        (normalize "refnamediv")))
+        (refdescriptor (select-elements (children refnamediv)
+                                        (normalize "refdescriptor")))
+        (refname       (select-elements (children refnamediv)
+                                        (normalize "refname")))
+        (title         (if (node-list-empty? refentrytitle)
+                           (if (node-list-empty? refdescriptor)
+                               (node-list-first refname)
+                               refdescriptor)
+                           refentrytitle))
+        (slevel (SECTLEVEL)) ;; the true level in the section hierarchy
+        (hlevel (if (> slevel 2) 2 slevel)) ;; limit to sect2 equiv.
+        (hs (HSIZE (- 4 hlevel))))
+    (make paragraph
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      font-size: hs
+      line-spacing: (* hs %line-spacing-factor%)
+      space-before: (* hs %head-before-factor%)
+      space-after: (* hs %head-after-factor%)
+      start-indent: %body-start-indent%
+      first-line-start-indent: (- %body-start-indent%)
+      quadding: 'start
+      heading-level: (if %generate-heading-level% 2 0)
+      keep-with-next?: #t
+      (process-node-list (children title)))))
+;; nwalsh, this is wrong, 29 July 1999
+;      (if %refentry-function%
+;        (sosofo-append
+;         (literal "\no-break-space;")
+;         (process-first-descendant (normalize "manvolnum")))
+;        (empty-sosofo)))))
+
+(element refmeta (empty-sosofo)) ;; handled by $refentry-title$
+
+(element manvolnum 
+  (if %refentry-xref-manvolnum%
+      (sosofo-append
+       (literal "(")
+       (process-children)
+       (literal ")"))
+      (empty-sosofo)))
+
+(element refmiscinfo (empty-sosofo))
+
+(element refentrytitle ($charseq$))
+
+(element refnamediv
+  (make paragraph
+       space-before: %para-sep%
+       start-indent: %body-start-indent%
+       quadding: 'start
+       (process-children)))
+
+(element refname
+  (make sequence
+    (if (and %refentry-generate-name% (first-sibling? (current-node)))
+       ($lowtitlewithsosofo$ 1 3 (literal (gentext-element-name 
+                                           (current-node))))
+       (empty-sosofo))
+    (make sequence
+         font-weight: 'medium
+         font-family-name: %refentry-name-font-family%
+         (process-children)
+         (if (last-sibling? (current-node))
+             (empty-sosofo)
+             (literal (gentext-intra-label-sep (gi (current-node))))))))
+
+(element refpurpose
+  (make sequence
+        font-family-name: %body-font-family%
+    (make sequence
+      (literal " \em-dash ")
+      (process-children))
+    (make paragraph-break)))
+       
+(element refdescriptor (empty-sosofo))
+
+(element refclass
+  (let ((role (attribute-string "role")))
+    (make paragraph
+         space-before: %para-sep%
+         start-indent: %body-start-indent%
+         quadding: 'start
+         (make sequence
+               font-weight: 'bold
+               (literal
+                 (if role
+                     (string-append role ": ")
+                     "")))
+         (process-children-trim))))
+
+(element refsynopsisdiv ($section$))
+
+(element (refsynopsisdiv title) (empty-sosofo))
+
+(element refsect1 ($section$))
+(element (refsect1 title) (empty-sosofo))
+(element refsect2 ($section$))
+(element (refsect2 title) (empty-sosofo))
+(element refsect3 ($section$))
+(element (refsect3 title) (empty-sosofo))
+
+
diff --git a/print/dbsect.dsl b/print/dbsect.dsl
new file mode 100644 (file)
index 0000000..39b1f6a
--- /dev/null
@@ -0,0 +1,208 @@
+;; $Id: dbsect.dsl,v 1.6 2003/03/25 19:53:57 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================== SECTIONS ==============================
+
+(define (SECTLEVEL #!optional (sect (current-node)))
+  (section-level-by-node #f sect))
+
+;; BRIDGEHEAD isn't a proper section, but appears to be a section title
+(element bridgehead
+  (let* ((renderas (attribute-string "renderas"))
+        ;; the apparent section level
+        (hlevel
+         ;; if not real section level, then get the apparent level
+         ;; from "renderas"
+         (if renderas
+             (section-level-by-gi #f (normalize renderas))
+             ;; else use the real level
+             (SECTLEVEL)))
+        (hs (HSIZE (- 5 hlevel))))     
+    (make paragraph
+      font-family-name: %title-font-family%
+      font-weight:  (if (< hlevel 5) 'bold 'medium)
+      font-posture: (if (< hlevel 5) 'upright 'italic)
+      font-size: hs
+      line-spacing: (* hs %line-spacing-factor%)
+      space-before: (* hs %head-before-factor%)
+      space-after: (* hs %head-after-factor%)
+      start-indent: (if (< hlevel 3)
+                       0pt
+                       %body-start-indent%)
+      first-line-start-indent: 0pt
+      quadding: %section-title-quadding%
+      keep-with-next?: #t
+      (process-children))))
+
+(define ($section$)
+  (if (node-list=? (current-node) (sgml-root-element))
+      (make simple-page-sequence
+       page-n-columns: %page-n-columns%
+       page-number-restart?: (or %page-number-restart% 
+                                 (book-start?) 
+                                 (first-chapter?))
+       page-number-format: ($page-number-format$)
+       use: default-text-style
+       left-header:   ($left-header$)
+       center-header: ($center-header$)
+       right-header:  ($right-header$)
+       left-footer:   ($left-footer$)
+       center-footer: ($center-footer$)
+       right-footer:  ($right-footer$)
+       start-indent: %body-start-indent%
+       input-whitespace-treatment: 'collapse
+       quadding: %default-quadding%
+       (make sequence
+         ($section-title$)
+         (process-children)))
+      (make display-group
+       space-before: %block-sep%
+       space-after: %block-sep%
+       start-indent: %body-start-indent%
+       (make sequence
+         ($section-title$)
+         (process-children)))))
+
+(define ($section-title$)
+  (let* ((sect (current-node))
+        (info (info-element))
+        (exp-children (if (node-list-empty? info)
+                          (empty-node-list)
+                          (expand-children (children info) 
+                                           (list (normalize "bookbiblio") 
+                                                 (normalize "bibliomisc")
+                                                 (normalize "biblioset")))))
+        (parent-titles (select-elements (children sect) (normalize "title")))
+        (info-titles   (select-elements exp-children (normalize "title")))
+        (titles        (if (node-list-empty? parent-titles)
+                           info-titles
+                           parent-titles))
+        (subtitles     (select-elements exp-children (normalize "subtitle")))
+        (renderas (inherited-attribute-string (normalize "renderas") sect))
+        ;; the apparent section level
+        (hlevel
+         ;; if not real section level, then get the apparent level
+         ;; from "renderas"
+         (if renderas
+             (section-level-by-gi #f (normalize renderas))
+             ;; else use the real level
+             (SECTLEVEL)))
+        (hs (HSIZE (- 5 hlevel))))
+    (make sequence
+      (make paragraph
+       font-family-name: %title-font-family%
+       font-weight:  (if (< hlevel 5) 'bold 'medium)
+       font-posture: (if (< hlevel 5) 'upright 'italic)
+       font-size: hs
+       line-spacing: (* hs %line-spacing-factor%)
+       space-before: (* hs %head-before-factor%)
+       space-after: (if (node-list-empty? subtitles)
+                        (* hs %head-after-factor%)
+                        0pt)
+       start-indent: (if (or (>= hlevel 3)
+                             (member (gi) (list (normalize "refsynopsisdiv") 
+                                                (normalize "refsect1") 
+                                                (normalize "refsect2") 
+                                                (normalize "refsect3"))))
+                         %body-start-indent%
+                         0pt)
+       first-line-start-indent: 0pt
+       quadding: %section-title-quadding%
+       keep-with-next?: #t
+       heading-level: (if %generate-heading-level% hlevel 0)
+       ;; SimpleSects are never AUTO numbered...they aren't hierarchical
+       (if (string=? (element-label (current-node)) "")
+           (empty-sosofo)
+           (literal (element-label (current-node)) 
+                    (gentext-label-title-sep (gi sect))))
+       (element-title-sosofo (current-node)))
+      (with-mode section-title-mode
+       (process-node-list subtitles))
+      ($proc-section-info$ info))))
+
+(mode section-title-mode
+  (element subtitle
+    (let* ((sect (parent (parent (current-node)))) ;; parent=>sect*info
+          (renderas (inherited-attribute-string "renderas" sect))
+          ;; the apparent section level
+          (hlevel
+           ;; if not real section level, then get the apparent level
+           ;; from "renderas"
+           (if renderas
+               (section-level-by-gi #f (normalize renderas))
+               ;; else use the real level
+               (SECTLEVEL)))
+          (hs (HSIZE (- 4 hlevel))))       ;; one smaller than the title...
+      (make paragraph
+       font-family-name: %title-font-family%
+       font-weight:  (if (< hlevel 5) 'bold 'medium)
+       font-posture: (if (< hlevel 5) 'upright 'italic)
+       font-size: hs
+       line-spacing: (* hs %line-spacing-factor%)
+       space-before: 0pt
+       space-after: (* hs %head-after-factor%)
+       start-indent:
+       (if (< hlevel 3)
+           0pt
+           %body-start-indent%)
+       first-line-start-indent: 0pt
+       quadding: %section-subtitle-quadding%
+       keep-with-next?: #t
+       (process-children))))
+)
+
+(define ($proc-section-info$ info)
+  (cond ((equal? (gi) (normalize "sect1"))
+        ($sect1-info$ info))
+       ((equal? (gi) (normalize "sect2"))
+        ($sect2-info$ info))
+       ((equal? (gi) (normalize "sect3"))
+        ($sect3-info$ info))
+       ((equal? (gi) (normalize "sect4"))
+        ($sect4-info$ info))
+       ((equal? (gi) (normalize "sect5"))
+        ($sect5-info$ info))
+       ((equal? (gi) (normalize "section"))
+        ($section-info$ info))
+       ((equal? (gi) (normalize "refsect1"))
+        ($refsect1-info$ info))
+       ((equal? (gi) (normalize "refsect2"))
+        ($refsect2-info$ info))
+       ((equal? (gi) (normalize "refsect3"))
+        ($refsect3-info$ info))
+       (else (empty-sosofo))))
+
+(define ($sect1-info$ info) (empty-sosofo))
+(define ($sect2-info$ info) (empty-sosofo))
+(define ($sect3-info$ info) (empty-sosofo))
+(define ($sect4-info$ info) (empty-sosofo))
+(define ($sect5-info$ info) (empty-sosofo))
+(define ($section-info$ info) (empty-sosofo))
+(define ($refsect1-info$ info) (empty-sosofo))
+(define ($refsect2-info$ info) (empty-sosofo))
+(define ($refsect3-info$ info) (empty-sosofo))
+
+(element section ($section$))
+(element (section title) (empty-sosofo))
+
+(element sect1 ($section$))
+(element (sect1 title) (empty-sosofo))
+
+(element sect2 ($section$))
+(element (sect2 title) (empty-sosofo))
+
+(element sect3 ($section$))
+(element (sect3 title) (empty-sosofo))
+
+(element sect4 ($section$))
+(element (sect4 title) (empty-sosofo))
+
+(element sect5 ($section$))
+(element (sect5 title) (empty-sosofo))
+
+(element simplesect ($section$))
+(element (simplesect title) (empty-sosofo))
+
diff --git a/print/dbsynop.dsl b/print/dbsynop.dsl
new file mode 100644 (file)
index 0000000..2e04e5c
--- /dev/null
@@ -0,0 +1,224 @@
+;; $Id: dbsynop.dsl,v 1.3 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================= SYNTAX DEFINITIONS =========================
+
+(element synopsis ($verbatim-display$ %indent-synopsis-lines%
+                                     %number-synopsis-lines%))
+
+(element cmdsynopsis
+  ;; Can't be an $informal-object$ because it needs the paragraph
+  ;; wrapper around process-children
+  (make display-group
+    start-indent: (+ %block-start-indent% (inherited-start-indent))
+    space-before: %block-sep%
+    space-after: %block-sep%
+    (make paragraph
+      (process-children))))
+
+;; Support for ARG provided by James Bostock, augmented by norm
+;;
+
+(element (cmdsynopsis command)
+  (make sequence
+    (if (first-sibling? (current-node))
+       (empty-sosofo)
+       (make paragraph-break))
+    (next-match)
+    (literal " ")))
+
+(element group
+  (let ((choice  (attribute-string (normalize "choice")))
+       (rep     (attribute-string (normalize "rep")))
+       (sepchar (if (inherited-attribute-string (normalize "sepchar"))
+                    (inherited-attribute-string (normalize "sepchar"))
+                    " ")))
+    (make sequence
+      (if (equal? (absolute-child-number (current-node)) 1)
+         (empty-sosofo)
+         (literal sepchar))
+      (cond
+       ((equal? choice (normalize "plain")) (literal %arg-choice-plain-open-str%))
+       ((equal? choice (normalize "req")) (literal %arg-choice-req-open-str%))
+       ((equal? choice (normalize "opt")) (literal %arg-choice-opt-open-str%))
+       (else (literal %arg-choice-def-open-str%)))
+      (process-children)
+      (cond
+       ((equal? choice (normalize "plain")) (literal %arg-choice-plain-close-str%))
+       ((equal? choice (normalize "req")) (literal %arg-choice-req-close-str%))
+       ((equal? choice (normalize "opt")) (literal %arg-choice-opt-close-str%))
+       (else (literal %arg-choice-def-close-str%)))
+      (cond
+       ((equal? rep (normalize "repeat")) (literal %arg-rep-repeat-str%))
+       ((equal? rep (normalize "norepeat")) (literal %arg-rep-norepeat-str%))
+       (else (literal %arg-rep-def-str%))))))
+
+(element arg
+  (let ((choice  (attribute-string (normalize "choice")))
+       (rep     (attribute-string (normalize "rep")))
+       (sepchar (if (inherited-attribute-string (normalize "sepchar"))
+                    (inherited-attribute-string (normalize "sepchar"))
+                    " ")))
+    (make sequence
+      (if (equal? (absolute-child-number (current-node)) 1)
+         (empty-sosofo)
+         (literal sepchar))
+      (cond
+       ((equal? choice (normalize "plain")) (literal %arg-choice-plain-open-str%))
+       ((equal? choice (normalize "req")) (literal %arg-choice-req-open-str%))
+       ((equal? choice (normalize "opt")) (literal %arg-choice-opt-open-str%))
+       (else (literal %arg-choice-def-open-str%)))
+      (process-children)
+      (cond
+       ((equal? rep (normalize "repeat")) (literal %arg-rep-repeat-str%))
+       ((equal? rep (normalize "norepeat")) (literal %arg-rep-norepeat-str%))
+       (else (literal %arg-rep-def-str%)))
+      (cond
+       ((equal? choice (normalize "plain")) (literal %arg-choice-plain-close-str%))
+       ((equal? choice (normalize "req")) (literal %arg-choice-req-close-str%))
+       ((equal? choice (normalize "opt")) (literal %arg-choice-opt-close-str%))
+       (else (literal %arg-choice-def-close-str%))))))
+
+(element (group arg)
+  (let ((choice (attribute-string (normalize "choice")))
+       (rep (attribute-string (normalize "rep"))))
+    (make sequence
+      (if (not (first-sibling? (current-node)))
+         (literal %arg-or-sep%)
+         (empty-sosofo))
+      (process-children))))
+
+(element sbr 
+  (make paragraph-break))
+
+;; ----------------------------------------------------------------------
+;; Syntax highlighting...
+
+(define (funcsynopsis-function #!optional (sosofo (process-children)))
+  (make sequence
+    font-weight: 'bold
+    sosofo))
+
+(define (paramdef-parameter #!optional (sosofo (process-children)))
+  (make sequence
+    font-posture: 'italic
+    sosofo))
+
+;; ----------------------------------------------------------------------
+
+(element synopfragmentref 
+  (let* ((target (element-with-id (attribute-string (normalize "linkend"))))
+        (snum   (child-number target)))
+    (make sequence
+      font-posture: 'italic
+      (make link 
+       destination: (node-list-address target)
+       (make sequence
+         font-posture: 'upright
+         ($callout-bug$ snum)))
+      (process-children))))
+
+(element synopfragment
+  (let ((snum (child-number (current-node))))
+    (make paragraph
+      ($callout-bug$ snum)
+      (literal " ")
+      (process-children))))
+
+(element funcsynopsis 
+  (let* ((width-in-chars (if (attribute-string "width")
+                            (string->number (attribute-string "width"))
+                            %verbatim-default-width%))
+        (fsize (lambda () (if (or (attribute-string (normalize "width"))
+                                  (not %verbatim-size-factor%))
+                              (/ (/ (- %text-width% (inherited-start-indent))
+                                    width-in-chars) 
+                                 0.7)
+                              (* (inherited-font-size) 
+                                 %verbatim-size-factor%)))))
+    ;; This used to be a sequence, but that caused the start-indent to be
+    ;; wrong when it was the first element of a RefSect.  Making it a
+    ;; paragraph makes the bug go away and doesn't seem to have any ill
+    ;; effects.  Need to investigate further...
+    (make paragraph
+      font-family-name: %mono-font-family%
+      font-size: (fsize)
+      font-weight: 'medium
+      font-posture: 'upright
+      line-spacing: (* (fsize) %line-spacing-factor%)
+      ($informal-object$))))
+
+(element funcsynopsisinfo 
+  ;; Fake out the font-size so that when verbatim-display calculates the
+  ;; verbatim-size-factor it doesn't get squared.  This will fail if the
+  ;; "correct" size isn't bfsize, but what can I do?
+  (make sequence
+    font-size: %bf-size%
+    ($verbatim-display$ %indent-funcsynopsisinfo-lines%
+                       %number-funcsynopsisinfo-lines%)))
+
+(element funcprototype 
+  (let ((paramdefs (select-elements (children (current-node))
+                                   (normalize "paramdef"))))
+    (make sequence
+      (make paragraph
+       font-family-name: %mono-font-family%
+       (process-children))
+      (if (equal? %funcsynopsis-style% 'kr)
+         (with-mode kr-funcsynopsis-mode
+           (process-node-list paramdefs))
+         (empty-sosofo)))))
+
+(element funcdef (process-children))
+(element (funcdef function) 
+  (if %funcsynopsis-decoration%
+      (funcsynopsis-function)
+      (process-children)))
+
+(element void 
+  (if (equal? %funcsynopsis-style% 'ansi)
+      (literal "(void);")
+      (literal "();")))
+
+(element varargs (literal "(...);"))
+
+(element paramdef
+  (let ((param (select-elements (children (current-node)) (normalize "parameter"))))
+    (make sequence
+      (if (equal? (child-number (current-node)) 1)
+         (literal "(")
+         (empty-sosofo))
+      (if (equal? %funcsynopsis-style% 'ansi)
+         (process-children)
+         (process-node-list param))
+      (if (equal? (gi (ifollow (current-node))) (normalize "paramdef"))
+         (literal ", ")
+         (literal ");")))))
+  
+(element (paramdef parameter)
+  (make sequence
+    (if %funcsynopsis-decoration%
+      (paramdef-parameter)
+      (process-children))
+    (if (equal? (gi (ifollow (current-node))) (normalize "parameter"))
+       (literal ", ")
+       (empty-sosofo))))
+
+(element funcparams 
+  (make sequence 
+    (literal "(")
+    (process-children)
+    (literal ")")))
+
+(mode kr-funcsynopsis-mode
+  (element paramdef
+    (make sequence
+      (make paragraph
+       font-family-name: %mono-font-family%
+       start-indent: (+ (inherited-start-indent) %kr-funcsynopsis-indent%)
+       (make sequence
+         (process-children) 
+         (literal ";"))))))
diff --git a/print/dbtable.dsl b/print/dbtable.dsl
new file mode 100644 (file)
index 0000000..364ced8
--- /dev/null
@@ -0,0 +1,587 @@
+;; $Id: dbtable.dsl,v 1.3 2003/02/17 08:56:46 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+;; Table support completely reimplemented by norm 15/16 Nov 1997
+;;
+;; ======================================================================
+;;
+;; This code is intended to implement the SGML Open Exchange Table Model
+;; (http://www.sgmlopen.org/sgml/docs/techpubs.htm) as far as is possible
+;; in RTF.  There are a few areas where this code probably fails to 
+;; perfectly implement the model:
+;;
+;; - Mixed column width units (4*+2pi) are not supported.
+;; - The behavior that results from mixing relative units with 
+;;   absolute units has not been carefully considered.
+;; - TFOOT appears at the bottom of the table, but is not repeated
+;;   across the bottom of pages (RTF limitation).
+;; - ENTRYTBL is not supported.
+;; - Rotated tables (e.g. landscape tables in a portrait document)
+;;   cannot be supported in a simple-page-sequence
+;;
+;; ======================================================================
+;; 
+;; My goal in reimplementing the table model was to provide correct
+;; formatting in tables that use MOREROWS. The difficulty is that
+;; correct formatting depends on calculating the column into which
+;; an ENTRY will fall.
+;;
+;; This is a non-trivial problem because MOREROWS can hang down from
+;; preceding rows and ENTRYs may specify starting columns (skipping
+;; preceding ones).
+;;
+;; A simple, elegant recursive algorithm exists. Unfortunately it 
+;; requires calculating the column number of every preceding cell 
+;; in the entire table. Without memoization, performance is unacceptable
+;; even in relatively small tables (5x5, for example).
+;;
+;; In order to avoid recursion, the algorithm used below is one that
+;; works forward from the beginning of the table and "passes along"
+;; the relevant information (column number of the preceding cell and
+;; overhang from the MOREROWS in preceding rows).
+;;
+;; Unfortunately, this means that element construction rules
+;; can't always be used to fire the appropriate rule.  Instead,
+;; each TGROUP has to process each THEAD/BODY/FOOT explicitly.
+;; And each of those must process each ROW explicitly, then each
+;; ENTRY/ENTRYTBL explicitly.
+;;
+;; ----------------------------------------------------------------------
+;;
+;; I attempted to simplify this code by relying on inheritence from
+;; table-column flow objects, but that wasn't entirely successful.
+;; Horizontally spanning cells didn't seem to inherit from table-column
+;; flow objects that didn't specify equal spanning.  There seemed to
+;; be other problems as well, but they could have been caused by coding
+;; errors on my part.
+;; 
+;; Anyway, by the time I understood how I could use table-column
+;; flow objects for inheritence, I'd already implemented all the
+;; machinery below to "work it out by hand".  
+;;
+;; ======================================================================
+;; NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE 
+;; ----------------------------------------------------------------------
+;; A fairly large chunk of this code is in dbcommon.dsl!
+;; ======================================================================
+;;
+
+;; Default value for FRAME= on tables
+(define ($cals-frame-default$) (normalize "all"))
+
+;; Default for COLSEP/ROWSEP if unspecified.
+(define ($cals-rowsep-default$ #!optional (node (current-node)))
+  ;; Return "0" for #f, "1" for #t
+  ;; Default is to have rules if FRAME=ALL, otherwise not.  Except
+  ;; that a separator between HEAD and BODY is controlled by
+  ;; %table-head-body-border%.
+  ;; 
+  (let* ((table (ancestor-member node ($table-element-list$)))
+        (frame (if (attribute-string (normalize "frame") table)
+                   (attribute-string (normalize "frame") table)
+                   ($cals-frame-default$)))
+        (row   (ancestor-member node (list (normalize "row")))))
+    (if (equal? frame (normalize "all"))
+       #t
+       (if (and (equal? (gi (parent row)) (normalize "thead"))
+                (last-sibling? row))
+           %table-head-body-border%
+           #f))))
+
+(define ($cals-colsep-default$ #!optional (node (current-node)))
+  ;; Default is to have rules if FRAME=ALL, otherwise not.
+  ;;
+  (let* ((table (ancestor-member node ($table-element-list$)))
+        (frame (if (attribute-string (normalize "frame") table)
+                   (attribute-string (normalize "frame") table)
+                   ($cals-frame-default$))))
+    (equal? frame (normalize "all"))))
+
+;; Default for VALIGN if unspecified
+(define ($cals-valign-default$) (normalize "top"))
+
+;; Margins around cell contents
+(define %cals-cell-before-row-margin% 3pt)
+(define %cals-cell-after-row-margin% 3pt)
+
+(define %cals-cell-before-column-margin% 3pt)
+
+(define %cals-cell-after-column-margin% 3pt)
+
+;; Inheritable start and end indent for cell contents
+(define %cals-cell-content-start-indent% 2pt)
+(define %cals-cell-content-end-indent% 2pt)
+
+;; How to indent pgwide tables?  (Non-pgwide tables get inherited-start-indent
+(define %cals-pgwide-start-indent% %body-start-indent%)
+
+;; What alignment should tables have on the page
+(define %cals-display-align% 'start)
+
+;; ----------------------------------------------------------------------
+;; Table rule widths
+
+(define %table-before-row-border% #t)
+(define %table-after-row-border% #t)
+(define %table-before-column-border% #t) 
+(define %table-after-column-border% #t)
+(define %table-head-body-border% #t)
+(define %table-cell-after-column-border% #t)
+(define %table-cell-after-row-border% #t)
+
+;;(define tbl-color-space 
+;;  (color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB"))
+;;
+;;(define tbl-red (color tbl-color-space 1 0 0))
+;;(define tbl-green (color tbl-color-space 0 1 0))
+;;(define tbl-blue (color tbl-color-space 0 0 1))
+
+(define calc-table-before-row-border
+  (if (boolean? %table-before-row-border%)
+      %table-before-row-border%
+      ;; Avoid problems with the DSSSL compiler when 
+      ;; %table-before-row-border% is boolean.
+      (let ((border-width %table-before-row-border%))
+       (make table-border
+         line-thickness: border-width))))
+
+(define calc-table-after-row-border
+  (if (boolean? %table-after-row-border%)
+      %table-after-row-border%
+      (let ((border-width %table-after-row-border%))
+       (make table-border
+         line-thickness: border-width))))
+
+(define calc-table-before-column-border
+  (if (boolean? %table-before-column-border%)
+      %table-before-column-border%
+      (let ((border-width %table-before-column-border%))
+       (make table-border
+         line-thickness: border-width))))
+
+(define calc-table-after-column-border
+  (if (boolean? %table-after-column-border%)
+      %table-after-column-border%
+      (let ((border-width %table-after-column-border%))
+       (make table-border
+         line-thickness: border-width))))
+
+(define calc-table-head-body-border
+  (if (boolean? %table-head-body-border%)
+      %table-head-body-border%
+      (let ((border-width %table-head-body-border%))
+       (make table-border
+         line-thickness: border-width))))
+
+(define calc-table-cell-after-column-border
+  (if (boolean? %table-cell-after-column-border%)
+      %table-cell-after-column-border%
+      (let ((border-width %table-cell-after-column-border%))
+       (make table-border
+         line-thickness: border-width))))
+
+(define calc-table-cell-after-row-border
+  (if (boolean? %table-cell-after-row-border%)
+      %table-cell-after-row-border%
+      (let ((border-width %table-cell-after-row-border%))
+       (make table-border
+         line-thickness: border-width))))
+
+;; ----------------------------------------------------------------------
+;; Convert colwidth units into table-unit measurements
+
+(define (colwidth-unit lenstr)
+  (if (string? lenstr)
+      (let ((number (length-string-number-part lenstr))
+           (units  (length-string-unit-part lenstr)))
+       (if (string=? units "*")
+           (if (string=? number "")
+               (table-unit 1)
+               (table-unit (string->number number)))
+           (if (string=? units "")
+               ;; no units, default to points
+               (* (string->number number) 1pt)
+               (let* ((unum  (string->number number))
+                      (uname (case-fold-down units)))
+                 (case uname
+                   (("mm") (* unum 1mm))
+                   (("cm") (* unum 1cm))
+                   (("in") (* unum 1in))
+                   (("pi") (* unum 1pi))
+                   (("pt") (* unum 1pt))
+                   (("px") (* unum 1px))
+                   ;; unrecognized units; use points
+                   (else   (* unum 1pt)))))))
+      ;; lenstr is not a string...probably #f
+      (table-unit 1)))
+
+
+(define (cell-align cell colnum)
+  (let* ((entry     (ancestor-member cell (list (normalize "entry")
+                                               (normalize "entrytbl"))))
+        (tgroup    (find-tgroup entry))
+        (spanname  (attribute-string (normalize "spanname") entry))
+        (calsalign (if (attribute-string (normalize "align") entry)
+                       (attribute-string (normalize "align") entry)
+                       (if (and spanname 
+                                (spanspec-align (find-spanspec spanname)))
+                           (spanspec-align (find-spanspec spanname))
+                           (if (colspec-align (find-colspec-by-number colnum))
+                               (colspec-align (find-colspec-by-number colnum))
+                               (if (tgroup-align tgroup)
+                                   (tgroup-align tgroup)
+                                   (normalize "left")))))))
+    (cond
+     ((equal? calsalign (normalize "left")) 'start)
+     ((equal? calsalign (normalize "center")) 'center)
+     ((equal? calsalign (normalize "right")) 'end)
+     (else 'start))))
+    
+(define (cell-valign cell colnum)
+  (let* ((entry      (ancestor-member cell (list (normalize "entry")
+                                                (normalize "entrytbl"))))
+        (row        (ancestor (normalize "row") entry))
+        (tbody      (ancestor-member cell (list (normalize "tbody") 
+                                                (normalize "thead")
+                                                (normalize "tfoot"))))
+        (tgroup     (ancestor (normalize "tgroup") entry))
+        (calsvalign (if (attribute-string (normalize "valign") entry)
+                        (attribute-string (normalize "valign") entry)
+                        (if (attribute-string (normalize "valign") row)
+                            (attribute-string (normalize "valign") row)
+                            (if (attribute-string (normalize "valign") tbody)
+                                (attribute-string (normalize "valign") tbody)
+                                ($cals-valign-default$))))))
+    (cond
+     ((equal? calsvalign (normalize "top")) 'start)
+     ((equal? calsvalign (normalize "middle")) 'center)
+     ((equal? calsvalign (normalize "bottom")) 'end)
+     (else 'start))))
+
+;; ======================================================================
+;; Element rules
+
+(element tgroup
+  (let ((frame-attribute (if (inherited-attribute-string (normalize "frame"))
+                            (inherited-attribute-string (normalize "frame"))
+                            ($cals-frame-default$))))
+    (make table
+      ;; These values are used for the outer edges (well, the top, bottom
+      ;; and left edges for sure; I think the right edge actually comes
+      ;; from the cells in the last column
+      before-row-border:  (if (cond
+                              ((equal? frame-attribute (normalize "all")) #t)
+                              ((equal? frame-attribute (normalize "sides")) #f)
+                              ((equal? frame-attribute (normalize "top")) #t)
+                              ((equal? frame-attribute (normalize "bottom")) #f)
+                              ((equal? frame-attribute (normalize "topbot")) #t)
+                              ((equal? frame-attribute (normalize "none")) #f)
+                              (else #f))
+                             calc-table-before-row-border
+                             #f)
+      after-row-border:   (if (cond
+                              ((equal? frame-attribute (normalize "all")) #t)
+                              ((equal? frame-attribute (normalize "sides")) #f)
+                              ((equal? frame-attribute (normalize "top")) #f)
+                              ((equal? frame-attribute (normalize "bottom")) #t)
+                              ((equal? frame-attribute (normalize "topbot")) #t)
+                              ((equal? frame-attribute (normalize "none")) #f)
+                              (else #f))
+                             calc-table-after-row-border
+                             #f)
+      before-column-border: (if (cond
+                                ((equal? frame-attribute (normalize "all")) #t)
+                                ((equal? frame-attribute (normalize "sides")) #t)
+                                ((equal? frame-attribute (normalize "top")) #f)
+                                ((equal? frame-attribute (normalize "bottom")) #f)
+                                ((equal? frame-attribute (normalize "topbot")) #f)
+                                ((equal? frame-attribute (normalize "none")) #f)
+                                (else #f))
+                               calc-table-before-column-border
+                               #f)
+      after-column-border:  (if (cond
+                                ((equal? frame-attribute (normalize "all")) #t)
+                                ((equal? frame-attribute (normalize "sides")) #t)
+                                ((equal? frame-attribute (normalize "top")) #f)
+                                ((equal? frame-attribute (normalize "bottom")) #f)
+                                ((equal? frame-attribute (normalize "topbot")) #f)
+                                ((equal? frame-attribute (normalize "none")) #f)
+                                (else #f))
+                               calc-table-after-column-border
+                               #f)
+      display-alignment: %cals-display-align%
+      (make table-part
+       content-map: '((thead header)
+                      (tbody #f)
+                      (tfoot footer))
+       ($process-colspecs$ (current-node))
+       (process-children)
+       (make-table-endnotes)))))
+
+(element colspec
+  ;; now handled by $process-colspecs$ at the top of each tgroup...
+  (empty-sosofo))
+
+(element spanspec
+  (empty-sosofo))
+
+(element thead
+  ($process-table-body$ (current-node)))
+
+(element tfoot
+  ($process-table-body$ (current-node)))
+
+(element tbody
+  ($process-table-body$ (current-node)))
+
+(element row
+  (empty-sosofo)) ;; this should never happen, they're processed explicitly
+
+(element entry
+  (empty-sosofo)) ;; this should never happen, they're processed explicitly
+
+;; ======================================================================
+;; Functions that handle processing of table bodies, rows, and cells
+
+(define ($process-colspecs$ tgroup)
+  (let* ((cols (string->number (attribute-string (normalize "cols")))))
+    (let loop ((colnum 1))
+      (if (> colnum cols)
+         (empty-sosofo)
+         (make sequence
+           (let ((colspec (find-colspec-by-number colnum)))
+             (if (node-list-empty? colspec)
+                 (make table-column
+                   column-number: colnum
+                   width: (colwidth-unit "1*"))
+                 ($process-colspec$ colspec colnum)))
+           (loop (+ colnum 1)))))))
+
+(define ($process-colspec$ colspec colnum)
+  (let* ((colwidth (if (attribute-string (normalize "colwidth") colspec)
+                      (attribute-string (normalize "colwidth") colspec)
+                      "1*")))
+    (make table-column
+      column-number: colnum
+      width: (colwidth-unit colwidth))))
+
+(define ($process-table-body$ body)
+  (let* ((tgroup (ancestor (normalize "tgroup") body))
+        (cols   (string->number (attribute-string (normalize "cols") tgroup)))
+        (blabel (cond 
+                  ((equal? (gi body) (normalize "thead")) 'thead)
+                  ((equal? (gi body) (normalize "tbody")) 'tbody)
+                  ((equal? (gi body) (normalize "tfoot")) 'tfoot))))
+    (make sequence
+      label: blabel
+      (let loop ((rows (select-elements (children body) (normalize "row")))
+                (overhang (constant-list 0 cols)))
+       (if (node-list-empty? rows)
+           (empty-sosofo)
+           (make sequence
+             ($process-row$ (node-list-first rows) overhang)
+             (loop (node-list-rest rows)
+                   (update-overhang (node-list-first rows) overhang))))))))
+
+(define ($process-row$ row overhang)
+  (let* ((tgroup           (ancestor (normalize "tgroup") row))
+        (maxcol           (string->number (attribute-string 
+                                           (normalize "cols") tgroup)))
+        (lastentry        (node-list-last (node-list-filter-out-pis 
+                                           (children row))))
+        (table            (parent tgroup)))
+    ;; there's no point calculating the row or colsep here, each cell
+    ;; specifies it which overrides anything we might say here...
+    (make table-row
+      (let loop ((cells (node-list-filter-out-pis (children row)))
+                (prevcell (empty-node-list)))
+       (if (node-list-empty? cells)
+           (empty-sosofo)
+           (make sequence
+             ($process-cell$ (node-list-first cells) prevcell row overhang)
+             (loop (node-list-rest cells) (node-list-first cells)))))
+      
+      ;; add any necessary empty cells to the end of the row
+      (let loop ((colnum (+ (cell-column-number lastentry overhang)
+                           (hspan lastentry))))
+       (if (> colnum maxcol)
+           (empty-sosofo)
+           (make sequence
+             ($process-empty-cell$ colnum row)
+             (loop (+ colnum 1))))))))
+
+(define ($process-cell$ entry preventry row overhang)
+  (let* ((colnum    (cell-column-number entry overhang))
+        (lastcellcolumn (if (node-list-empty? preventry)
+                            0
+                            (- (+ (cell-column-number preventry overhang)
+                                  (hspan preventry))
+                               1)))
+        (lastcolnum (if (> lastcellcolumn 0)
+                        (overhang-skip overhang lastcellcolumn)
+                        0))
+        (font-name (if (have-ancestor? (normalize "thead") entry)
+                       %title-font-family%
+                       %body-font-family%))
+        (weight    (if (have-ancestor? (normalize "thead") entry)
+                       'bold
+                       'medium))
+        (align     (cell-align entry colnum)))
+
+    (make sequence
+      ;; This is a little bit complicated.  We want to output empty cells
+      ;; to skip over missing data.  We start count at the column number
+      ;; arrived at by adding 1 to the column number of the previous entry
+      ;; and skipping over any MOREROWS overhanging entrys.  Then for each
+      ;; iteration, we add 1 and skip over any overhanging entrys.
+      (let loop ((count (overhang-skip overhang (+ lastcolnum 1))))
+       (if (>= count colnum)
+           (empty-sosofo)
+           (make sequence
+             ($process-empty-cell$ count row)
+             (loop (overhang-skip overhang (+ count 1))))))
+
+      ;; Now we've output empty cells for any missing entries, so we 
+      ;; are ready to output the cell for this entry...
+      (make table-cell 
+       column-number: colnum
+       n-columns-spanned: (hspan entry)
+       n-rows-spanned: (vspan entry)
+
+       cell-row-alignment: (cell-valign entry colnum)
+
+       cell-after-column-border: (if (cell-colsep entry colnum)
+                                     calc-table-cell-after-column-border
+                                     #f)
+
+       cell-after-row-border: (if (cell-rowsep entry colnum)
+                                  (if (last-sibling? (parent entry))
+                                      calc-table-head-body-border
+                                      calc-table-cell-after-row-border)
+                                  #f)
+
+       cell-before-row-margin: %cals-cell-before-row-margin%
+       cell-after-row-margin: %cals-cell-after-row-margin%
+       cell-before-column-margin: %cals-cell-before-column-margin%
+       cell-after-column-margin: %cals-cell-after-column-margin%
+
+       ;; If there is some additional indentation (because we're in a list,
+       ;; for example) make sure that gets passed along, but don't add
+       ;; the normal body-start-indent.
+       start-indent: (+ (- (inherited-start-indent) %body-start-indent%)
+                        %cals-cell-content-start-indent%)
+       end-indent: %cals-cell-content-end-indent%
+       (if (equal? (gi entry) (normalize "entrytbl"))
+           (make paragraph 
+             (literal "ENTRYTBL not supported."))
+           (make paragraph
+             font-family-name: font-name
+             font-weight: weight
+             quadding: align
+             (process-node-list (children entry))))))))
+
+(define (empty-cell-colsep colnum row)
+  (let* ((tgroup    (ancestor (normalize "tgroup") row))
+        (table     (parent tgroup))
+        (calscolsep 
+         (if (tgroup-colsep tgroup)
+             (tgroup-colsep tgroup)
+             (if (attribute-string (normalize "colsep") table)
+                 (attribute-string (normalize "colsep") table)
+                 (if ($cals-colsep-default$ row)
+                     "1"
+                     "0")))))
+    (> (string->number calscolsep) 0)))
+
+;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+(define (cell-colsep cell colnum)
+  (let* ((entry     (ancestor-member cell (list (normalize "entry") (normalize "entrytbl"))))
+        (spanname  (attribute-string (normalize "spanname") entry))
+        (tgroup    (find-tgroup entry))
+        (table     (parent tgroup))
+        (calscolsep 
+         (if (attribute-string (normalize "colsep") entry)
+             (attribute-string (normalize "colsep") entry)
+             (if (and spanname 
+                      (spanspec-colsep (find-spanspec spanname)))
+                 (spanspec-colsep (find-spanspec spanname))
+                 (if (colspec-colsep (find-colspec-by-number colnum))
+                     (colspec-colsep (find-colspec-by-number colnum))
+                     (if (tgroup-colsep tgroup)
+                         (tgroup-colsep tgroup)
+                         (if (attribute-string (normalize "colsep") table)
+                             (attribute-string (normalize "colsep") table)
+                             (if ($cals-colsep-default$ cell)
+                                 "1"
+                                 "0"))))))))
+    (> (string->number calscolsep) 0)))
+
+(define (cell-rowsep cell colnum)
+  (let* ((entry     (ancestor-member cell (list (normalize "entry") 
+                                               (normalize "entrytbl"))))
+        (spanname  (attribute-string (normalize "spanname") entry))
+        (row       (ancestor (normalize "row") entry))
+        (tgroup    (find-tgroup entry))
+        (table     (parent tgroup))
+        (calsrowsep 
+         (if (attribute-string (normalize "rowsep") entry)
+             (attribute-string (normalize "rowsep") entry)
+             (if (and spanname (spanspec-rowsep (find-spanspec spanname)))
+                 (spanspec-rowsep (find-spanspec spanname))
+                 (if (colspec-rowsep (find-colspec-by-number colnum))
+                     (colspec-rowsep (find-colspec-by-number colnum))
+                     (if (attribute-string (normalize "rowsep") row)
+                         (attribute-string (normalize "rowsep") row)
+                         (if (tgroup-rowsep tgroup)
+                             (tgroup-rowsep tgroup)
+                             (if (attribute-string (normalize "rowsep") table)
+                                 (attribute-string (normalize "rowsep") table)
+                                 (if ($cals-rowsep-default$ cell)
+                                     "1"
+                                     "0")))))))))
+    (> (string->number calsrowsep) 0)))
+
+(define (empty-cell-rowsep colnum row)
+  (let* ((tgroup    (ancestor (normalize "tgroup") row))
+        (table     (parent tgroup))
+        (calsrowsep 
+         (if (attribute-string (normalize "rowsep") row)
+             (attribute-string (normalize "rowsep") row)
+             (if (tgroup-rowsep tgroup)
+                 (tgroup-rowsep tgroup)
+                 (if (attribute-string (normalize "rowsep") table)
+                     (attribute-string (normalize "rowsep") table)
+                     (if ($cals-rowsep-default$ row)
+                         "1"
+                         "0"))))))
+    (> (string->number calsrowsep) 0)))
+
+;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+(define ($process-empty-cell$ colnum row)
+  (make table-cell 
+    column-number: colnum
+    n-columns-spanned: 1
+    n-rows-spanned: 1
+    cell-after-column-border: (if (empty-cell-colsep colnum row)
+                                 calc-table-cell-after-column-border
+                                 #f)
+    
+    cell-after-row-border: (if (empty-cell-rowsep colnum row)
+                              (if (last-sibling? row)
+                                  calc-table-head-body-border
+                                  calc-table-cell-after-row-border)
+                              #f)
+    
+    cell-before-row-margin: %cals-cell-before-row-margin%
+    cell-after-row-margin: %cals-cell-after-row-margin%
+    cell-before-column-margin: %cals-cell-before-column-margin%
+    cell-after-column-margin: %cals-cell-after-column-margin%
+    start-indent: %cals-cell-content-start-indent%
+    end-indent: %cals-cell-content-end-indent%
+    (empty-sosofo)))
+
+;; EOF
diff --git a/print/dbtitle.dsl b/print/dbtitle.dsl
new file mode 100644 (file)
index 0000000..8c4635b
--- /dev/null
@@ -0,0 +1,52 @@
+;; $Id: dbtitle.dsl,v 1.4 2003/02/17 19:42:45 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define title-style
+  (style
+   font-family-name: %title-font-family%
+   font-weight: 'bold
+   quadding: 'start))
+
+;; So we can pass different sosofo's to this routine and get identical
+;; treatment (see REFNAME in dbrfntry.dsl)
+;;
+(define ($lowtitlewithsosofo$ tlevel hlevel sosofo)
+  (let ((hs (HSIZE (- 3 tlevel))))
+    (make paragraph
+         font-family-name: %title-font-family%
+         font-weight: 'bold
+         font-size: hs
+         line-spacing: (* hs %line-spacing-factor%)
+         space-before: (* hs %head-before-factor%)
+         space-after: (* hs %head-after-factor%)
+         start-indent: %body-start-indent%
+         quadding: 'start
+         keep-with-next?: #t
+         heading-level: (if %generate-heading-level% hlevel 0)
+         sosofo)))
+
+(define ($lowtitle$ tlevel hlevel)
+  ($lowtitlewithsosofo$ tlevel hlevel (process-children)))
+
+(define ($runinhead$)
+  (let* ((title    (data (current-node)))
+        (titlelen (string-length title))
+        (lastchar (string-ref title (- titlelen 1)))
+        (punct    (if (member lastchar %content-title-end-punct%)
+                      ""
+                      %default-title-end-punct%)))
+    (make sequence
+      font-weight: 'bold
+      (process-children-trim)
+      (literal punct " "))))
+
+(element title ($lowtitle$ 2 4))         ;; the default TITLE format
+(element titleabbrev (empty-sosofo))
+(element subtitle (empty-sosofo))
+
+(mode title-mode
+  (element title
+    (process-children)))
diff --git a/print/dbttlpg.dsl b/print/dbttlpg.dsl
new file mode 100644 (file)
index 0000000..733f0f5
--- /dev/null
@@ -0,0 +1,6772 @@
+;; $Id: dbttlpg.dsl,v 1.13 2004/10/10 21:15:06 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+(define (have-sibling? sibling-gi #!optional (node (current-node)))
+  (let loop ((nl (children (parent node))))
+    (if (node-list-empty? nl) 
+       #f
+       (if (equal? (gi (node-list-first nl)) sibling-gi)
+           #t
+           (loop (node-list-rest nl))))))
+
+(define (titlepage-content? elements gis)
+  (let giloop ((gilist gis))
+    (if (null? gilist)
+       #f
+       (if (not (node-list-empty? (node-list-filter-by-gi 
+                                   elements 
+                                   (list (car gilist)))))
+           #t
+           (giloop (cdr gilist))))))
+
+(define (titlepage-gi-list-by-elements elements nodelist) 
+  ;; Elements is a list of GIs.  Nodelist is a list of nodes.
+  ;; This function returns all of the nodes in nodelist that
+  ;; are in elements in the order they occur in elements.
+  (let loop ((gilist elements) (rlist (empty-node-list)))
+    (if (null? gilist)
+       rlist
+       (loop (cdr gilist) 
+             (node-list rlist (node-list-filter-by-gi 
+                               nodelist (list (car gilist))))))))
+
+(define (titlepage-gi-list-by-nodelist elements nodelist) 
+  ;; Elements is a list of GIs.  Nodelist is a list of nodes.
+  ;; This function returns all of the nodes in nodelist that
+  ;; are in elements in the order they occur in nodelist.
+  (let loop ((nl nodelist) (rlist (empty-node-list)))
+    (if (node-list-empty? nl)
+       rlist
+       (if (member (gi (node-list-first nl)) elements)
+           (loop (node-list-rest nl)
+                 (node-list rlist (node-list-first nl)))
+           (loop (node-list-rest nl) rlist)))))
+
+(define (titlepage-nodelist elements nodelist)
+  ;; We expand BOOKBIBLIO, BIBLIOMISC, and BIBLIOSET in the element
+  ;; list because that level of wrapper usually isn't significant.
+  (let ((exp-nodelist (expand-children nodelist (list (normalize "bookbiblio") 
+                                                     (normalize "bibliomisc")
+                                                     (normalize "biblioset")))))
+    (if %titlepage-in-info-order%
+       (titlepage-gi-list-by-nodelist elements exp-nodelist)
+       (titlepage-gi-list-by-elements elements exp-nodelist))))
+
+(mode titlepage-address-mode
+  (default (process-children)))
+
+;; == Title pages for SETs ==============================================
+
+(define (set-titlepage-recto-elements)
+  (list (normalize "title") 
+       (normalize "subtitle") 
+       (normalize "graphic") 
+       (normalize "mediaobject")
+       (normalize "corpauthor") 
+       (normalize "authorgroup") 
+       (normalize "author") 
+       (normalize "editor")))
+
+(define (set-titlepage-verso-elements)
+  (list (normalize "title") 
+       (normalize "subtitle") 
+       (normalize "corpauthor") 
+       (normalize "authorgroup") 
+       (normalize "author") 
+       (normalize "editor")
+       (normalize "edition") 
+       (normalize "pubdate") 
+       (normalize "copyright")
+       (normalize "legalnotice") 
+       (normalize "revhistory")))
+
+(define (set-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (set-titlepage-recto-elements)
+                                  (set-titlepage-verso-elements))))
+
+(define (set-titlepage elements #!optional (side 'recto))
+  (let ((nodelist (titlepage-nodelist 
+                  (if (equal? side 'recto)
+                      (set-titlepage-recto-elements)
+                      (set-titlepage-verso-elements))
+                  elements)))
+;;    (make simple-page-sequence
+;;      page-n-columns: %titlepage-n-columns%
+;;      input-whitespace-treatment: 'collapse
+;;      use: default-text-style
+      (make sequence
+
+      ;; This hack is required for the RTF backend. If an external-graphic
+      ;; is the first thing on the page, RTF doesn't seem to do the right
+      ;; thing (the graphic winds up on the baseline of the first line
+      ;; of the page, left justified).  This "one point rule" fixes
+      ;; that problem.
+      (make paragraph
+       line-spacing: 1pt
+       (literal ""))
+
+      (let loop ((nl nodelist) (lastnode (empty-node-list)))
+       (if (node-list-empty? nl)
+           (empty-sosofo)
+           (make sequence
+             (if (or (node-list-empty? lastnode)
+                     (not (equal? (gi (node-list-first nl))
+                                  (gi lastnode))))
+                 (set-titlepage-before (node-list-first nl) side)
+                 (empty-sosofo))
+             (cond
+               ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                (set-titlepage-abbrev (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                (set-titlepage-abstract (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "address"))
+                (set-titlepage-address (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                (set-titlepage-affiliation (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                (set-titlepage-artpagenums (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "author"))
+                (set-titlepage-author (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                (set-titlepage-authorblurb (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                (set-titlepage-authorgroup (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                (set-titlepage-authorinitials (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                (set-titlepage-bibliomisc (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                (set-titlepage-biblioset (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                (set-titlepage-bookbiblio (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                (set-titlepage-citetitle (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                (set-titlepage-collab (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                (set-titlepage-confgroup (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                (set-titlepage-contractnum (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                (set-titlepage-contractsponsor (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                (set-titlepage-contrib (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                (set-titlepage-copyright (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                (set-titlepage-corpauthor (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                (set-titlepage-corpname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "date"))
+                (set-titlepage-date (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                (set-titlepage-edition (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                (set-titlepage-editor (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                (set-titlepage-firstname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                (set-titlepage-graphic (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                (set-titlepage-honorific (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                (set-titlepage-indexterm (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                (set-titlepage-invpartnumber (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                (set-titlepage-isbn (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                (set-titlepage-issn (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                (set-titlepage-issuenum (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                (set-titlepage-itermset (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                (set-titlepage-keywordset (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                (set-titlepage-legalnotice (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                (set-titlepage-lineage (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                (set-titlepage-mediaobject (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                (set-titlepage-modespec (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                (set-titlepage-orgname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                (set-titlepage-othercredit (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                (set-titlepage-othername (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                (set-titlepage-pagenums (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                (set-titlepage-printhistory (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                (set-titlepage-productname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                (set-titlepage-productnumber (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                (set-titlepage-pubdate (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                (set-titlepage-publisher (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                (set-titlepage-publishername (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                (set-titlepage-pubsnumber (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                (set-titlepage-releaseinfo (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                (set-titlepage-revhistory (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                (set-titlepage-seriesinfo (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                (set-titlepage-seriesvolnums (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                (set-titlepage-subjectset (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                (set-titlepage-subtitle (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                (set-titlepage-surname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "title"))
+                (set-titlepage-title (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                (set-titlepage-titleabbrev (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                (set-titlepage-volumenum (node-list-first nl) side))
+               (else
+                (set-titlepage-default (node-list-first nl) side)))
+             (loop (node-list-rest nl) (node-list-first nl))))))))
+
+(define (set-titlepage-before node side)
+  (if (equal? side 'recto)
+      (cond
+       ((equal? (gi node) (normalize "corpauthor"))
+       (make paragraph
+         space-after: (* (HSIZE 5) %head-after-factor% 8)
+         (literal "\no-break-space;")))
+       ((equal? (gi node) (normalize "authorgroup"))
+       (if (have-sibling? (normalize "corpauthor") node)
+           (empty-sosofo)
+           (make paragraph
+             space-after: (* (HSIZE 5) %head-after-factor% 8)
+             (literal "\no-break-space;"))))
+       ((equal? (gi node) (normalize "author"))
+       (if (or (have-sibling? (normalize "corpauthor") node) 
+               (have-sibling? (normalize "authorgroup") node))
+           (empty-sosofo)
+           (make paragraph
+             space-after: (* (HSIZE 5) %head-after-factor% 8)
+             (literal "\no-break-space;"))))
+       (else (empty-sosofo)))
+      (empty-sosofo)))
+
+(define (set-titlepage-default node side)
+  (let ((foo (debug (string-append "No set-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (set-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode set-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode set-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (set-titlepage-abbrev node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-abstract node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-address node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-affiliation node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-artpagenums node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-author node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-authorblurb node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-authorgroup node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-authorinitials node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-bibliomisc node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-biblioset node side)
+  (set-titlepage node side))
+(define (set-titlepage-bookbiblio node side)
+  (set-titlepage node side))
+(define (set-titlepage-citetitle node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-collab node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-confgroup node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-contractnum node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-contractsponsor node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-contrib  node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-copyright node side)
+  (set-titlepage-element node side))
+
+(define (set-titlepage-corpauthor node side)
+  (if (equal? side 'recto)
+      (set-titlepage-element node side)
+      (if (first-sibling? node)
+         (make paragraph
+           (with-mode set-titlepage-verso-mode
+             (process-node-list
+              (select-elements (children (parent node))
+                               (normalize "corpauthor")))))
+         (empty-sosofo))))
+
+(define (set-titlepage-corpname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-date node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-edition node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-editor node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-firstname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-graphic node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-honorific node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-indexterm node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-invpartnumber node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-isbn node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-issn node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-issuenum node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-itermset node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-keywordset node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-legalnotice node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-lineage node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-mediaobject node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-modespec node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-orgname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-othercredit node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-othername node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-pagenums node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-printhistory node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-productname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-productnumber node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-pubdate node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-publisher node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-publishername node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-pubsnumber node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-releaseinfo node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-revhistory node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-seriesinfo node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-seriesvolnums node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-subjectset node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-subtitle node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-surname node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-title node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-titleabbrev node side)
+  (set-titlepage-element node side))
+(define (set-titlepage-volumenum node side)
+  (set-titlepage-element node side))
+
+(define set-titlepage-recto-style
+  (style
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      font-size: (HSIZE 1)))
+
+(define set-titlepage-verso-style
+  (style
+      font-family-name: %body-font-family%))
+
+(mode set-titlepage-recto-mode
+  (element abbrev
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element abstract
+    (make display-group
+      use: set-titlepage-recto-style
+      quadding: 'start
+      ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element (abstract para)
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element address 
+    (make display-group
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make display-group
+      use: set-titlepage-recto-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+          use: set-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make display-group
+      use: set-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element (authorblurb para)
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element authorgroup
+    (make display-group
+      (process-children)))
+
+  (element authorinitials
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      space-before: (* (HSIZE 2) %head-before-factor%)
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+  
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    (make sequence
+      (make paragraph
+       use: set-titlepage-recto-style
+       font-size: (HSIZE 3)
+       line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+       space-before: (* (HSIZE 2) %head-before-factor%)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       (process-children))
+      ;; This paragraph is a hack to get the spacing right.
+      ;; Authors always have an affiliation paragraph below them, even if
+      ;; it's empty, so corpauthors need one too.
+      (make paragraph
+       use: set-titlepage-recto-style
+       font-size: (HSIZE 1)
+       line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+       space-after: (* (HSIZE 2) %head-after-factor% 4)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       (literal "\no-break-space;"))))
+
+  (element corpname
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence      
+       (if (first-sibling?) 
+           (make paragraph
+             use: set-titlepage-recto-style
+             font-size: (HSIZE 1)
+             line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+             space-before: (* (HSIZE 2) %head-before-factor% 6)
+             quadding: %division-title-quadding%
+             keep-with-next?: #t
+             (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make paragraph
+         use: set-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-after: (* (HSIZE 2) %head-after-factor% 4)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal editor-name)))))
+
+  (element firstname
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'center)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element (keyword)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: set-titlepage-recto-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para)
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: 'start
+      line-spacing: (* 0.8 (inherited-line-spacing))
+      font-size: (* 0.8 (inherited-font-size))
+      (process-children)))
+
+  (element lineage
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element othercredit
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+          use: set-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element othername
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element printhistory
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element publisher
+    (make display-group
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: set-titlepage-recto-style
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 use: set-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revdate))
+               (make paragraph
+                 use: set-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 use: set-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: set-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    (process-node-list revremark)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: set-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revdescription)))
+               (else (empty-sosofo))))))))
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle 
+    (make paragraph
+      use: set-titlepage-recto-style
+      font-size: (HSIZE 4)
+      line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+      space-before: (* (HSIZE 4) %head-before-factor%)
+      quadding: %division-subtitle-quadding%
+      keep-with-next?: #t
+      (process-children-trim)))
+
+  (element surname
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element title 
+    (make paragraph
+      use: set-titlepage-recto-style
+      font-size: (HSIZE 5)
+      line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+      space-before: (* (HSIZE 5) %head-before-factor%)
+      quadding: %division-title-quadding%
+      keep-with-next?: #t
+      heading-level: (if %generate-heading-level% 1 0)
+      (with-mode title-mode
+       (process-children-trim))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: set-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+)
+
+(mode set-titlepage-verso-mode
+  (element abbrev
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element abstract ($semiformal-object$))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make display-group
+      use: set-titlepage-verso-style
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element authorblurb
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element authorgroup
+    (make paragraph
+      space-after: (* %bf-size% %line-spacing-factor%)
+      (make sequence
+       (literal (gentext-by))
+       (literal "\no-break-space;")
+       (process-children-trim))))
+
+  (element authorinitials
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: set-titlepage-verso-style
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    ;; note: set-titlepage-corpauthor takes care of wrapping multiple
+    ;; corpauthors
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element corpname
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-edited-by))
+             (literal "\no-break-space;")
+             (literal (author-string))))
+         (make sequence 
+           (literal (author-string))))))
+
+  (element firstname
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'start)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element (keyword)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: set-titlepage-verso-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para) 
+    (make paragraph
+      use: set-titlepage-verso-style
+      font-size: (* (inherited-font-size) 0.8)
+      (process-children-trim)))
+
+  (element lineage
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element othercredit
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element othername
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element printhistory
+    (make display-group
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      (literal (gentext-element-name-space (gi (current-node))))
+      (process-children)))
+
+  (element publisher
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: set-titlepage-verso-style
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 use: set-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revdate))
+               (make paragraph
+                 use: set-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 use: set-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: set-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    ;(process-node-list revremark)))
+                    (empty-sosofo)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: set-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revdescription)))
+               (else (empty-sosofo))))))))
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle
+    (make sequence
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      (literal (if (first-sibling?) ": " "; "))
+      (process-children)))
+
+  (element surname
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+  (element title
+    (make sequence
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      (with-mode title-mode
+       (process-children))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: set-titlepage-verso-style
+      (process-children)))
+
+)
+
+;; == Title pages for BOOKs =============================================
+
+(define (book-titlepage-recto-elements)
+  (list (normalize "title") 
+       (normalize "subtitle") 
+       (normalize "graphic") 
+       (normalize "mediaobject")
+       (normalize "corpauthor") 
+       (normalize "authorgroup") 
+       (normalize "author") 
+       (normalize "editor")))
+
+(define (book-titlepage-verso-elements)
+  (list (normalize "title") 
+       (normalize "subtitle") 
+       (normalize "corpauthor") 
+       (normalize "authorgroup") 
+       (normalize "author") 
+       (normalize "editor")
+       (normalize "edition") 
+       (normalize "pubdate") 
+       (normalize "copyright")
+       (normalize "abstract") 
+       (normalize "legalnotice") 
+       (normalize "revhistory")))
+
+(define (book-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (book-titlepage-recto-elements)
+                                  (book-titlepage-verso-elements))))
+
+(define (book-titlepage elements #!optional (side 'recto))
+  (let ((nodelist (titlepage-nodelist 
+                  (if (equal? side 'recto)
+                      (book-titlepage-recto-elements)
+                      (book-titlepage-verso-elements))
+                  elements)))
+;;    (make simple-page-sequence
+;;      page-n-columns: %titlepage-n-columns%
+;;      input-whitespace-treatment: 'collapse
+;;      use: default-text-style
+      (make sequence
+
+      ;; This hack is required for the RTF backend. If an external-graphic
+      ;; is the first thing on the page, RTF doesn't seem to do the right
+      ;; thing (the graphic winds up on the baseline of the first line
+      ;; of the page, left justified).  This "one point rule" fixes
+      ;; that problem.
+      (make paragraph
+       line-spacing: 1pt
+       (literal ""))
+      
+      (let loop ((nl nodelist) (lastnode (empty-node-list)))
+       (if (node-list-empty? nl)
+           (empty-sosofo)
+           (make sequence
+             (if (or (node-list-empty? lastnode)
+                     (not (equal? (gi (node-list-first nl))
+                                  (gi lastnode))))
+                 (book-titlepage-before (node-list-first nl) side)
+                 (empty-sosofo))
+             (cond
+               ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                (book-titlepage-abbrev (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                (book-titlepage-abstract (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "address"))
+                (book-titlepage-address (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                (book-titlepage-affiliation (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                (book-titlepage-artpagenums (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "author"))
+                (book-titlepage-author (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                (book-titlepage-authorblurb (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                (book-titlepage-authorgroup (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                (book-titlepage-authorinitials (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                (book-titlepage-bibliomisc (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                (book-titlepage-biblioset (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                (book-titlepage-bookbiblio (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                (book-titlepage-citetitle (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                (book-titlepage-collab (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                (book-titlepage-confgroup (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                (book-titlepage-contractnum (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                (book-titlepage-contractsponsor (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                (book-titlepage-contrib (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                (book-titlepage-copyright (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                (book-titlepage-corpauthor (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                (book-titlepage-corpname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "date"))
+                (book-titlepage-date (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                (book-titlepage-edition (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                (book-titlepage-editor (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                (book-titlepage-firstname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                (book-titlepage-graphic (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                (book-titlepage-honorific (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                (book-titlepage-indexterm (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                (book-titlepage-invpartnumber (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                (book-titlepage-isbn (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                (book-titlepage-issn (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                (book-titlepage-issuenum (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                (book-titlepage-itermset (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                (book-titlepage-keywordset (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                (book-titlepage-legalnotice (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                (book-titlepage-lineage (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                (book-titlepage-mediaobject (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                (book-titlepage-modespec (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                (book-titlepage-orgname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                (book-titlepage-othercredit (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                (book-titlepage-othername (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                (book-titlepage-pagenums (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                (book-titlepage-printhistory (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                (book-titlepage-productname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                (book-titlepage-productnumber (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                (book-titlepage-pubdate (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                (book-titlepage-publisher (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                (book-titlepage-publishername (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                (book-titlepage-pubsnumber (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                (book-titlepage-releaseinfo (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                (book-titlepage-revhistory (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                (book-titlepage-seriesinfo (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                (book-titlepage-seriesvolnums (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                (book-titlepage-subjectset (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                (book-titlepage-subtitle (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                (book-titlepage-surname (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "title"))
+                (book-titlepage-title (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                (book-titlepage-titleabbrev (node-list-first nl) side))
+               ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                (book-titlepage-volumenum (node-list-first nl) side))
+               (else
+                (book-titlepage-default (node-list-first nl) side)))
+             (loop (node-list-rest nl) (node-list-first nl))))))))
+
+(define (book-titlepage-before node side)
+  (if (equal? side 'recto)
+      (cond
+       ((equal? (gi node) (normalize "corpauthor"))
+       (make paragraph
+         space-after: (* (HSIZE 5) %head-after-factor% 8)
+         (literal "\no-break-space;")))
+       ((equal? (gi node) (normalize "authorgroup"))
+       (if (have-sibling? (normalize "corpauthor") node)
+           (empty-sosofo)
+           (make paragraph
+             space-after: (* (HSIZE 5) %head-after-factor% 8)
+             (literal "\no-break-space;"))))
+       ((equal? (gi node) (normalize "author"))
+       (if (or (have-sibling? (normalize "corpauthor") node) 
+               (have-sibling? (normalize "authorgroup") node))
+           (empty-sosofo)
+           (make paragraph
+             space-after: (* (HSIZE 5) %head-after-factor% 8)
+             (literal "\no-break-space;"))))
+       (else (empty-sosofo)))
+      (empty-sosofo)))
+
+(define (book-titlepage-default node side)
+  (let ((foo (debug (string-append "No book-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (book-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode book-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode book-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (book-titlepage-abbrev node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-abstract node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-address node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-affiliation node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-artpagenums node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-author node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-authorblurb node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-authorgroup node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-authorinitials node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-bibliomisc node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-biblioset node side)
+  (book-titlepage node side))
+(define (book-titlepage-bookbiblio node side)
+  (book-titlepage node side))
+(define (book-titlepage-citetitle node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-collab node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-confgroup node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-contractnum node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-contractsponsor node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-contrib  node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-copyright node side)
+  (book-titlepage-element node side))
+
+(define (book-titlepage-corpauthor node side)
+  (if (equal? side 'recto)
+      (book-titlepage-element node side)
+      (if (first-sibling? node)
+         (make paragraph
+           (with-mode book-titlepage-verso-mode
+             (process-node-list
+              (select-elements (children (parent node)) 
+                               (normalize "corpauthor")))))
+         (empty-sosofo))))
+
+(define (book-titlepage-corpname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-date node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-edition node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-editor node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-firstname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-graphic node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-honorific node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-indexterm node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-invpartnumber node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-isbn node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-issn node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-issuenum node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-itermset node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-keywordset node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-legalnotice node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-lineage node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-mediaobject node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-modespec node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-orgname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-othercredit node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-othername node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-pagenums node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-printhistory node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-productname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-productnumber node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-pubdate node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-publisher node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-publishername node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-pubsnumber node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-releaseinfo node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-revhistory node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-seriesinfo node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-seriesvolnums node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-subjectset node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-subtitle node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-surname node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-title node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-titleabbrev node side)
+  (book-titlepage-element node side))
+(define (book-titlepage-volumenum node side)
+  (book-titlepage-element node side))
+
+(define book-titlepage-recto-style
+  (style
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      font-size: (HSIZE 1)))
+
+(define book-titlepage-verso-style
+  (style
+      font-family-name: %body-font-family%))
+
+(mode book-titlepage-recto-mode
+  (element abbrev
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element abstract
+    (make display-group
+      use: book-titlepage-recto-style
+      quadding: 'start
+      ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element (abstract para)
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element address 
+    (make display-group
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make display-group
+      use: book-titlepage-recto-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+         use: book-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make display-group
+      use: book-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element (authorblurb para)
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element authorgroup
+    (make display-group
+      (process-children)))
+
+  (element authorinitials
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      space-before: (* (HSIZE 2) %head-before-factor%)
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    (make sequence
+      (make paragraph
+       use: book-titlepage-recto-style
+       font-size: (HSIZE 3)
+       line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+       space-before: (* (HSIZE 2) %head-before-factor%)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       (process-children))
+      ;; This paragraph is a hack to get the spacing right.
+      ;; Authors always have an affiliation paragraph below them, even if
+      ;; it's empty, so corpauthors need one too.
+      (make paragraph
+       use: book-titlepage-recto-style
+       font-size: (HSIZE 1)
+       line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+       space-after: (* (HSIZE 2) %head-after-factor% 4)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       (literal "\no-break-space;"))))
+
+  (element corpname
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence      
+       (if (first-sibling?) 
+           (make paragraph
+             use: book-titlepage-recto-style
+             font-size: (HSIZE 1)
+             line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+             space-before: (* (HSIZE 2) %head-before-factor% 6)
+             quadding: %division-title-quadding%
+             keep-with-next?: #t
+             (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make paragraph
+         use: book-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-after: (* (HSIZE 2) %head-after-factor% 4)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal editor-name)))))
+
+  (element firstname
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'center)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element (keyword)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: book-titlepage-recto-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para)
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: 'start
+      line-spacing: (* 0.8 (inherited-line-spacing))
+      font-size: (* 0.8 (inherited-font-size))
+      (process-children)))
+
+  (element lineage
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element othercredit
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+         use: book-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element othername
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element printhistory
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element publisher
+    (make display-group
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: book-titlepage-recto-style
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 use: book-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revdate))
+               (make paragraph
+                 use: book-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 use: book-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: book-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    (process-node-list revremark)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: book-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revremark)))
+                 (else (empty-sosofo))))))))
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle 
+    (make paragraph
+      use: book-titlepage-recto-style
+      font-size: (HSIZE 4)
+      line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+      space-before: (* (HSIZE 4) %head-before-factor%)
+      quadding: %division-subtitle-quadding%
+      keep-with-next?: #t
+      (process-children-trim)))
+
+  (element surname
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element title 
+    (make paragraph
+      use: book-titlepage-recto-style
+      font-size: (HSIZE 5)
+      line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+      space-before: (* (HSIZE 5) %head-before-factor%)
+      quadding: %division-title-quadding%
+      keep-with-next?: #t
+      heading-level: (if %generate-heading-level% 1 0)
+      (with-mode title-mode
+       (process-children-trim))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: book-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+)
+
+(mode book-titlepage-verso-mode
+  (element abbrev
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element abstract ($semiformal-object$))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make display-group
+      use: book-titlepage-verso-style
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element authorblurb
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element authorgroup
+    (let* ((editors (select-elements (children (current-node)) (normalize "editor"))))
+      (make paragraph
+       space-after: (* %bf-size% %line-spacing-factor%)
+       (make sequence
+         (if (node-list-empty? editors)
+             (literal (gentext-by))
+             (literal (gentext-edited-by)))
+         (literal "\no-break-space;")
+         (process-children-trim)))))
+
+  (element authorinitials
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: book-titlepage-verso-style
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    ;; note: book-titlepage-corpauthor takes care of wrapping multiple
+    ;; corpauthors
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element corpname
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #f (not in-group)) ; nevermind, always put out the Edited by
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-edited-by))
+             (literal "\no-break-space;")
+             (literal (author-string))))
+         (make sequence
+           (literal (author-list-string))))))
+
+  (element firstname
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'start)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element (keyword)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: book-titlepage-verso-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para) 
+    (make paragraph
+      use: book-titlepage-verso-style
+      font-size: (* (inherited-font-size) 0.8)
+      (process-children-trim)))
+
+  (element lineage
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element othercredit
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element othername
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element printhistory
+    (make display-group
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      (literal (gentext-element-name-space (gi (current-node))))
+      (process-children)))
+
+  (element publisher
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: book-titlepage-verso-style
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 use: book-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revdate))
+               (make paragraph
+                 use: book-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 use: book-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: book-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    (process-node-list revremark)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: book-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revdescription)))
+               (else (empty-sosofo)))))))) 
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle
+    (make sequence
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      (literal (if (first-sibling?) ": " "; "))
+      (process-children)))
+
+  (element surname
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+
+  (element title
+    (make sequence
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      (with-mode title-mode
+       (process-children))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: book-titlepage-verso-style
+      (process-children)))
+)
+
+;; == Title pages for PARTs =============================================
+
+(define (part-titlepage-recto-elements)
+  (list (normalize "title")
+       (normalize "subtitle")))
+
+(define (part-titlepage-verso-elements)
+  '())
+
+(define (part-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (part-titlepage-recto-elements)
+                                  (part-titlepage-verso-elements))))
+
+(define (part-titlepage elements #!optional (side 'recto))
+  (let ((nodelist (titlepage-nodelist 
+                  (if (equal? side 'recto)
+                      (part-titlepage-recto-elements)
+                      (part-titlepage-verso-elements))
+                  elements))
+        ;; partintro is a special case...
+       (partintro (node-list-first
+                   (node-list-filter-by-gi elements (list (normalize "partintro"))))))
+    (if (part-titlepage-content? elements side)
+;;     (make simple-page-sequence
+;;       page-n-columns: %titlepage-n-columns%
+;;       input-whitespace-treatment: 'collapse
+;;       use: default-text-style
+       (make sequence
+  
+         ;; This hack is required for the RTF backend. If an external-graphic
+         ;; is the first thing on the page, RTF doesn't seem to do the right
+         ;; thing (the graphic winds up on the baseline of the first line
+         ;; of the page, left justified).  This "one point rule" fixes
+         ;; that problem.
+         (make paragraph
+           line-spacing: 1pt
+           (literal ""))
+
+         (let loop ((nl nodelist) (lastnode (empty-node-list)))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (if (or (node-list-empty? lastnode)
+                         (not (equal? (gi (node-list-first nl))
+                                      (gi lastnode))))
+                     (part-titlepage-before (node-list-first nl) side)
+                     (empty-sosofo))
+                 (cond
+                  ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                   (part-titlepage-abbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                   (part-titlepage-abstract (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "address"))
+                   (part-titlepage-address (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                   (part-titlepage-affiliation (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                   (part-titlepage-artpagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "author"))
+                   (part-titlepage-author (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                   (part-titlepage-authorblurb (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                   (part-titlepage-authorgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                   (part-titlepage-authorinitials (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                   (part-titlepage-bibliomisc (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                   (part-titlepage-biblioset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                   (part-titlepage-bookbiblio (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                   (part-titlepage-citetitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                   (part-titlepage-collab (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                   (part-titlepage-confgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                   (part-titlepage-contractnum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                   (part-titlepage-contractsponsor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                   (part-titlepage-contrib (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                   (part-titlepage-copyright (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                   (part-titlepage-corpauthor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                   (part-titlepage-corpname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "date"))
+                   (part-titlepage-date (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                   (part-titlepage-edition (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                   (part-titlepage-editor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                   (part-titlepage-firstname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                   (part-titlepage-graphic (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                   (part-titlepage-honorific (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                   (part-titlepage-indexterm (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                   (part-titlepage-invpartnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                   (part-titlepage-isbn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                   (part-titlepage-issn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                   (part-titlepage-issuenum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                   (part-titlepage-itermset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                   (part-titlepage-keywordset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                   (part-titlepage-legalnotice (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                   (part-titlepage-lineage (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                   (part-titlepage-mediaobject (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                   (part-titlepage-modespec (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                   (part-titlepage-orgname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                   (part-titlepage-othercredit (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                   (part-titlepage-othername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                   (part-titlepage-pagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                   (part-titlepage-printhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                   (part-titlepage-productname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                   (part-titlepage-productnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                   (part-titlepage-pubdate (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                   (part-titlepage-publisher (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                   (part-titlepage-publishername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                   (part-titlepage-pubsnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                   (part-titlepage-releaseinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                   (part-titlepage-revhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                   (part-titlepage-seriesinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                   (part-titlepage-seriesvolnums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                   (part-titlepage-subjectset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                   (part-titlepage-subtitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                   (part-titlepage-surname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "title"))
+                   (part-titlepage-title (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                   (part-titlepage-titleabbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                   (part-titlepage-volumenum (node-list-first nl) side))
+                  (else
+                   (part-titlepage-default (node-list-first nl) side)))
+                 (loop (node-list-rest nl) (node-list-first nl)))))
+
+         (if (and %generate-part-toc%
+                  %generate-part-toc-on-titlepage%
+                  (equal? side 'recto))
+             (make display-group
+               (build-toc (current-node)
+                          (toc-depth (current-node))))
+             (empty-sosofo))
+
+         ;; PartIntro is a special case
+         (if (and (equal? side 'recto)
+                  (not (node-list-empty? partintro))
+                  %generate-partintro-on-titlepage%)
+             ($process-partintro$ partintro #f)
+             (empty-sosofo)))
+       (empty-sosofo))))
+
+(define (part-titlepage-before node side)
+  (if (equal? side 'recto)
+      (cond
+       ((equal? (gi node) (normalize "corpauthor"))
+       (make paragraph
+         space-after: (* (HSIZE 5) %head-after-factor% 8)
+         (literal "\no-break-space;")))
+       ((equal? (gi node) (normalize "authorgroup"))
+       (if (have-sibling? (normalize "corpauthor") node)
+           (empty-sosofo)
+           (make paragraph
+             space-after: (* (HSIZE 5) %head-after-factor% 8)
+             (literal "\no-break-space;"))))
+       ((equal? (gi node) (normalize "author"))
+       (if (or (have-sibling? (normalize "corpauthor") node) 
+               (have-sibling? (normalize "authorgroup") node))
+           (empty-sosofo)
+           (make paragraph
+             space-after: (* (HSIZE 5) %head-after-factor% 8)
+             (literal "\no-break-space;"))))
+       (else (empty-sosofo)))
+      (empty-sosofo)))
+
+(define (part-titlepage-default node side)
+  (let ((foo (debug (string-append "No part-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (part-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode part-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode part-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (part-titlepage-abbrev node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-abstract node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-address node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-affiliation node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-artpagenums node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-author node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-authorblurb node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-authorgroup node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-authorinitials node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-bibliomisc node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-biblioset node side)
+  (part-titlepage node side))
+(define (part-titlepage-bookbiblio node side)
+  (part-titlepage node side))
+(define (part-titlepage-citetitle node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-collab node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-confgroup node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-contractnum node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-contractsponsor node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-contrib  node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-copyright node side)
+  (part-titlepage-element node side))
+
+(define (part-titlepage-corpauthor node side)
+  (if (equal? side 'recto)
+      (book-titlepage-element node side)
+      (if (first-sibling? node)
+         (make paragraph
+           (with-mode book-titlepage-verso-mode
+             (process-node-list
+              (select-elements (children (parent node)) 
+                               (normalize "corpauthor")))))
+         (empty-sosofo))))
+
+(define (part-titlepage-corpname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-date node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-edition node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-editor node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-firstname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-graphic node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-honorific node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-indexterm node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-invpartnumber node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-isbn node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-issn node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-issuenum node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-itermset node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-keywordset node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-legalnotice node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-lineage node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-mediaobject node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-modespec node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-orgname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-othercredit node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-othername node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-pagenums node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-printhistory node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-productname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-productnumber node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-pubdate node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-publisher node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-publishername node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-pubsnumber node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-releaseinfo node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-revhistory node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-seriesinfo node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-seriesvolnums node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-subjectset node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-subtitle node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-surname node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-title node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-titleabbrev node side)
+  (part-titlepage-element node side))
+(define (part-titlepage-volumenum node side)
+  (part-titlepage-element node side))
+
+(define part-titlepage-recto-style
+  (style
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      font-size: (HSIZE 1)))
+
+(define part-titlepage-verso-style
+  (style
+      font-family-name: %body-font-family%))
+
+(mode part-titlepage-recto-mode
+  (element abbrev
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element abstract
+    (make display-group
+      use: part-titlepage-recto-style
+      quadding: 'start
+      ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element (abstract para)
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element address 
+    (make display-group
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make display-group
+      use: part-titlepage-recto-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+          use: part-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make display-group
+      use: part-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element (authorblurb para)
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element authorgroup
+    (make display-group
+      (process-children)))
+
+  (element authorinitials
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      space-before: (* (HSIZE 2) %head-before-factor%)
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    (make sequence
+      (make paragraph
+        use: part-titlepage-recto-style
+       font-size: (HSIZE 3)
+       line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+       space-before: (* (HSIZE 2) %head-before-factor%)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       (process-children))
+      ;; This paragraph is a hack to get the spacing right.
+      ;; Authors always have an affiliation paragraph below them, even if
+      ;; it's empty, so corpauthors need one too.
+      (make paragraph
+        use: part-titlepage-recto-style
+       font-size: (HSIZE 1)
+       line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+       space-after: (* (HSIZE 2) %head-after-factor% 4)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       (literal "\no-break-space;"))))
+
+  (element corpname
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence      
+       (if (first-sibling?) 
+           (make paragraph
+              use: part-titlepage-recto-style
+             font-size: (HSIZE 1)
+             line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+             space-before: (* (HSIZE 2) %head-before-factor% 6)
+             quadding: %division-title-quadding%
+             keep-with-next?: #t
+             (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make paragraph
+          use: part-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-after: (* (HSIZE 2) %head-after-factor% 4)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal editor-name)))))
+
+  (element firstname
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'center)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element (keyword)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: part-titlepage-recto-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para)
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: 'start
+      line-spacing: (* 0.8 (inherited-line-spacing))
+      font-size: (* 0.8 (inherited-font-size))
+      (process-children)))
+
+  (element lineage
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element othercredit
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+          use: part-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element othername
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element printhistory
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element publisher
+    (make display-group
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: part-titlepage-recto-style
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 use: part-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revdate))
+               (make paragraph
+                 use: part-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 use: part-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: part-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    (process-node-list revremark)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: part-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revdescription)))
+                 (else (empty-sosofo)))))))) 
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle 
+    (make paragraph
+      use: part-titlepage-recto-style
+      font-size: (HSIZE 4)
+      line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+      space-before: (* (HSIZE 4) %head-before-factor%)
+      quadding: %division-subtitle-quadding%
+      keep-with-next?: #t
+      (process-children-trim)))
+
+  (element surname
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element title
+    (let ((division (ancestor-member (current-node) (division-element-list))))
+      (make paragraph
+        use: part-titlepage-recto-style
+       font-size: (HSIZE 5)
+       line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+       space-before: (* (HSIZE 5) %head-before-factor%)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       heading-level: (if %generate-heading-level% 1 0)
+       (if (string=? (element-label division) "")
+           (empty-sosofo)
+           (literal (element-label division) 
+                    (gentext-label-title-sep (gi division))))
+       (with-mode title-mode
+         (process-children)))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: part-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+)
+
+(mode part-titlepage-verso-mode
+  (element abbrev
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element abstract ($semiformal-object$))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make display-group
+      use: part-titlepage-verso-style
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element authorblurb
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element authorgroup
+    (make paragraph
+      space-after: (* %bf-size% %line-spacing-factor%)
+      (make sequence
+       (literal (gentext-by))
+       (literal "\no-break-space;")
+       (process-children-trim))))
+
+  (element authorinitials
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: part-titlepage-verso-style
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    ;; note: part-titlepage-corpauthor takes care of wrapping multiple
+    ;; corpauthors
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element corpname
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-edited-by))
+             (literal "\no-break-space;")
+             (literal (author-string))))
+         (make sequence 
+           (literal (author-string))))))
+
+  (element firstname
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'start)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element (keyword)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: part-titlepage-verso-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para) 
+    (make paragraph
+      use: part-titlepage-verso-style
+      font-size: (* (inherited-font-size) 0.8)
+      (process-children-trim)))
+
+  (element lineage
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element othercredit
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element othername
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element printhistory
+    (make display-group
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      (literal (gentext-element-name-space (gi (current-node))))
+      (process-children)))
+
+  (element publisher
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: part-titlepage-verso-style
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 use: part-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revdate))
+               (make paragraph
+                 use: part-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 use: part-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: part-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    (process-node-list revremark)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: part-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revremark)))
+                 (else (empty-sosofo)))))))) 
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle
+    (make sequence
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      (literal (if (first-sibling?) ": " "; "))
+      (process-children)))
+
+  (element surname
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+
+  (element title
+    (let ((division (ancestor-member (current-node) (division-element-list))))
+      (make sequence
+        font-family-name: %title-font-family%
+       font-weight: 'bold
+       (if (string=? (element-label division) "")
+           (empty-sosofo)
+           (literal (element-label division) 
+                    (gentext-label-title-sep (gi division))))
+       (with-mode title-mode
+         (process-children)))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: part-titlepage-verso-style
+      (process-children)))
+)
+
+;; == Title pages for ARTICLEs ==========================================
+;;
+;; Note: Article title pages are a little different in that they do not
+;; create their own simple-page-sequence.
+;;
+
+(define (article-titlepage-recto-elements)
+  (list (normalize "title")
+       (normalize "subtitle")
+       (normalize "corpauthor")
+       (normalize "authorgroup")
+       (normalize "author")
+       (normalize "releaseinfo")
+       (normalize "copyright")
+       (normalize "pubdate")
+       (normalize "revhistory")
+       (normalize "abstract")))
+
+(define (article-titlepage-verso-elements)
+  '())
+
+(define (article-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (article-titlepage-recto-elements)
+                                  (article-titlepage-verso-elements))))
+
+(define (article-titlepage elements #!optional (side 'recto))
+  (let* ((nodelist (titlepage-nodelist 
+                   (if (equal? side 'recto)
+                       (article-titlepage-recto-elements)
+                       (article-titlepage-verso-elements))
+                   elements)))
+    (if (article-titlepage-content? elements side)
+       (make sequence
+         (let loop ((nl nodelist) (lastnode (empty-node-list)))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (if (or (node-list-empty? lastnode)
+                         (not (equal? (gi (node-list-first nl))
+                                      (gi lastnode))))
+                     (article-titlepage-before (node-list-first nl) side)
+                     (empty-sosofo))
+                 (cond
+                  ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                   (article-titlepage-abbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                   (article-titlepage-abstract (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "address"))
+                   (article-titlepage-address (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                   (article-titlepage-affiliation (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                   (article-titlepage-artpagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "author"))
+                   (article-titlepage-author (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                   (article-titlepage-authorblurb (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                   (article-titlepage-authorgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                   (article-titlepage-authorinitials (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                   (article-titlepage-bibliomisc (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                   (article-titlepage-biblioset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                   (article-titlepage-bookbiblio (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                   (article-titlepage-citetitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                   (article-titlepage-collab (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                   (article-titlepage-confgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                   (article-titlepage-contractnum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                   (article-titlepage-contractsponsor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                   (article-titlepage-contrib (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                   (article-titlepage-copyright (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                   (article-titlepage-corpauthor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                   (article-titlepage-corpname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "date"))
+                   (article-titlepage-date (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                   (article-titlepage-edition (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                   (article-titlepage-editor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                   (article-titlepage-firstname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                   (article-titlepage-graphic (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                   (article-titlepage-honorific (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                   (article-titlepage-indexterm (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                   (article-titlepage-invpartnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                   (article-titlepage-isbn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                   (article-titlepage-issn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                   (article-titlepage-issuenum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                   (article-titlepage-itermset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                   (article-titlepage-keywordset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                   (article-titlepage-legalnotice (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                   (article-titlepage-lineage (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                   (article-titlepage-mediaobject (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                   (article-titlepage-modespec (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                   (article-titlepage-orgname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                   (article-titlepage-othercredit (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                   (article-titlepage-othername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                   (article-titlepage-pagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                   (article-titlepage-printhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                   (article-titlepage-productname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                   (article-titlepage-productnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                   (article-titlepage-pubdate (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                   (article-titlepage-publisher (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                   (article-titlepage-publishername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                   (article-titlepage-pubsnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                   (article-titlepage-releaseinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                   (article-titlepage-revhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                   (article-titlepage-seriesinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                   (article-titlepage-seriesvolnums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                   (article-titlepage-subjectset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                   (article-titlepage-subtitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                   (article-titlepage-surname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "title"))
+                   (article-titlepage-title (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                   (article-titlepage-titleabbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                   (article-titlepage-volumenum (node-list-first nl) side))
+                  (else
+                   (article-titlepage-default (node-list-first nl) side)))
+                 (loop (node-list-rest nl) (node-list-first nl)))))
+
+         (if (and %generate-article-toc%
+                  %generate-article-toc-on-titlepage%
+                  (equal? side 'recto))
+             (make display-group
+               (build-toc (current-node)
+                          (toc-depth (current-node))))
+             (empty-sosofo)))
+       (empty-sosofo))))
+
+(define (article-titlepage-before node side)
+  (empty-sosofo))
+
+(define (article-titlepage-default node side)
+  (let ((foo (debug (string-append "No article-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (article-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode article-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode article-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (article-titlepage-abbrev node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-abstract node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-address node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-affiliation node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-artpagenums node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-author node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-authorblurb node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-authorgroup node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-authorinitials node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-bibliomisc node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-biblioset node side)
+  (article-titlepage node side))
+(define (article-titlepage-bookbiblio node side)
+  (article-titlepage node side))
+(define (article-titlepage-citetitle node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-collab node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-confgroup node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-contractnum node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-contractsponsor node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-contrib  node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-copyright node side)
+  (article-titlepage-element node side))
+
+(define (article-titlepage-corpauthor node side)
+  (if (equal? side 'recto)
+      (book-titlepage-element node side)
+      (if (first-sibling? node)
+         (make paragraph
+           (with-mode book-titlepage-verso-mode
+             (process-node-list
+              (select-elements (children (parent node)) 
+                               (normalize "corpauthor")))))
+         (empty-sosofo))))
+
+(define (article-titlepage-corpname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-date node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-edition node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-editor node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-firstname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-graphic node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-honorific node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-indexterm node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-invpartnumber node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-isbn node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-issn node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-issuenum node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-itermset node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-keywordset node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-legalnotice node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-lineage node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-mediaobject node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-modespec node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-orgname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-othercredit node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-othername node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-pagenums node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-printhistory node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-productname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-productnumber node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-pubdate node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-publisher node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-publishername node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-pubsnumber node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-releaseinfo node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-revhistory node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-seriesinfo node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-seriesvolnums node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-subjectset node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-subtitle node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-surname node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-title node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-titleabbrev node side)
+  (article-titlepage-element node side))
+(define (article-titlepage-volumenum node side)
+  (article-titlepage-element node side))
+
+(define article-titlepage-recto-style
+  (style
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      font-size: (HSIZE 1)))
+
+(define article-titlepage-verso-style
+  (style
+      font-family-name: %body-font-family%))
+
+(mode article-titlepage-recto-mode
+  (element abbrev
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element abstract
+    (make display-group
+      use: article-titlepage-verso-style ;; EVEN THOUGH IT'S RECTO!
+      quadding: 'start
+      start-indent: (+ (inherited-start-indent) (/ %body-width% 24))
+      end-indent: (+ (inherited-end-indent) (/ %body-width% 24))
+      ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make display-group
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make display-group
+      use: article-titlepage-recto-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+          use: article-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %article-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make display-group
+      use: article-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element (authorblurb para)
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element authorgroup
+    (make display-group
+      (process-children)))
+
+  (element authorinitials
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      space-before: (* (HSIZE 2) %head-before-factor%)
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    (make sequence
+      (make paragraph
+        use: article-titlepage-recto-style
+       font-size: (HSIZE 3)
+       line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+       space-before: (* (HSIZE 2) %head-before-factor%)
+       quadding: %article-title-quadding%
+       keep-with-next?: #t
+       (process-children))
+      ;; This paragraph is a hack to get the spacing right.
+      ;; Authors always have an affiliation paragraph below them, even if
+      ;; it's empty, so corpauthors need one too.
+      (make paragraph
+        use: article-titlepage-recto-style
+       font-size: (HSIZE 1)
+       line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+       space-after: (* (HSIZE 2) %head-after-factor% 4)
+       quadding: %article-title-quadding%
+       keep-with-next?: #t
+       (literal "\no-break-space;"))))
+
+  (element corpname
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence      
+       (if (first-sibling?) 
+           (make paragraph
+              use: article-titlepage-recto-style
+             font-size: (HSIZE 1)
+             line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+             space-before: (* (HSIZE 2) %head-before-factor% 6)
+             quadding: %article-title-quadding%
+             keep-with-next?: #t
+             (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make paragraph
+          use: article-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-after: (* (HSIZE 2) %head-after-factor% 4)
+         quadding: %article-title-quadding%
+         keep-with-next?: #t
+         (literal editor-name)))))
+
+  (element firstname
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'center)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element keyword
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: article-titlepage-recto-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para)
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: 'start
+      line-spacing: (* 0.8 (inherited-line-spacing))
+      font-size: (* 0.8 (inherited-font-size))
+      (process-children)))
+
+  (element lineage
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element othercredit
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+          use: article-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %article-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element othername
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element printhistory
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element publisher
+    (make display-group
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: article-titlepage-recto-style
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 use: article-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revdate))
+               (make paragraph
+                 use: article-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 use: article-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: article-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    (process-node-list revremark)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: article-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revdescription)))
+                 (else (empty-sosofo))))))))
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle 
+    (make paragraph
+      use: article-titlepage-recto-style
+      font-size: (HSIZE 4)
+      line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+      space-before: (* (HSIZE 4) %head-before-factor%)
+      quadding: %article-subtitle-quadding%
+      keep-with-next?: #t
+      (process-children-trim)))
+
+  (element surname
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+
+  (element title 
+    (make paragraph
+      use: article-titlepage-recto-style
+      font-size: (HSIZE 5)
+      line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+      space-before: (* (HSIZE 5) %head-before-factor%)
+      quadding: %article-title-quadding%
+      keep-with-next?: #t
+      (with-mode title-mode
+       (process-children-trim))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: article-titlepage-recto-style
+      quadding: %article-title-quadding%
+      (process-children)))
+)
+
+(mode article-titlepage-verso-mode
+  (element abbrev
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element abstract ($semiformal-object$))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make display-group
+      use: article-titlepage-verso-style
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element authorblurb
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element authorgroup
+    (make paragraph
+      space-after: (* %bf-size% %line-spacing-factor%)
+      (make sequence
+       (literal (gentext-by))
+       (literal "\no-break-space;")
+       (process-children-trim))))
+
+  (element authorinitials
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: article-titlepage-verso-style
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    ;; note: article-titlepage-corpauthor takes care of wrapping multiple
+    ;; corpauthors
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element corpname
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-edited-by))
+             (literal "\no-break-space;")
+             (literal (author-string))))
+         (make sequence 
+           (literal (author-string))))))
+
+  (element firstname
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'start)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element (keyword)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: article-titlepage-verso-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para) 
+    (make paragraph
+      use: article-titlepage-verso-style
+      font-size: (* (inherited-font-size) 0.8)
+      (process-children-trim)))
+
+  (element lineage
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element othercredit
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element othername
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element printhistory
+    (make display-group
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      (literal (gentext-element-name-space (gi (current-node))))
+      (process-children)))
+
+  (element publisher
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: article-titlepage-verso-style
+       font-family-name: %title-font-family%
+       font-weight: 'bold
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (node-list-empty? revnumber)
+               (empty-sosofo)
+               (make paragraph
+                 use: article-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (node-list-empty? revdate)
+               (empty-sosofo)
+               (make paragraph
+                 use: article-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (node-list-empty? revauthor)
+               (empty-sosofo)
+               (make paragraph
+                 use: article-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor)))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: article-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    (process-node-list revremark)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: article-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revdescription)))
+                 (else (empty-sosofo)))))))) 
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle
+    (make sequence
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      (literal (if (first-sibling?) ": " "; "))
+      (process-children)))
+
+  (element surname
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+  (element title
+    (make sequence
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      (with-mode title-mode
+       (process-children))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: article-titlepage-verso-style
+      (process-children)))
+
+)
+
+;; == Title pages for REFERENCEs ========================================
+
+(define (reference-titlepage-recto-elements)
+  (list (normalize "title") 
+       (normalize "subtitle")
+       (normalize "corpauthor") 
+       (normalize "authorgroup") 
+       (normalize "author") 
+       (normalize "editor")))
+
+(define (reference-titlepage-verso-elements)
+  '())
+
+(define (reference-titlepage-content? elements side)
+  (titlepage-content? elements (if (equal? side 'recto)
+                                  (reference-titlepage-recto-elements)
+                                  (reference-titlepage-verso-elements))))
+
+(define (reference-titlepage elements #!optional (side 'recto))
+  (let ((nodelist (titlepage-nodelist 
+                  (if (equal? side 'recto)
+                      (reference-titlepage-recto-elements)
+                      (reference-titlepage-verso-elements))
+                  elements))
+        ;; partintro is a special case...
+       (partintro (node-list-first
+                   (node-list-filter-by-gi elements (list (normalize "partintro"))))))
+    (if (reference-titlepage-content? elements side)
+       (make simple-page-sequence
+         page-n-columns: %titlepage-n-columns%
+         input-whitespace-treatment: 'collapse
+         use: default-text-style
+         
+         ;; This hack is required for the RTF backend. If an external-graphic
+         ;; is the first thing on the page, RTF doesn't seem to do the right
+         ;; thing (the graphic winds up on the baseline of the first line
+         ;; of the page, left justified).  This "one point rule" fixes
+         ;; that problem.
+         (make paragraph
+           line-spacing: 1pt
+           (literal ""))
+      
+         (let loop ((nl nodelist) (lastnode (empty-node-list)))
+           (if (node-list-empty? nl)
+               (empty-sosofo)
+               (make sequence
+                 (if (or (node-list-empty? lastnode)
+                         (not (equal? (gi (node-list-first nl))
+                                      (gi lastnode))))
+                     (reference-titlepage-before (node-list-first nl) side)
+                     (empty-sosofo))
+                 (cond
+                  ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+                   (reference-titlepage-abbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+                   (reference-titlepage-abstract (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "address"))
+                   (reference-titlepage-address (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+                   (reference-titlepage-affiliation (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+                   (reference-titlepage-artpagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "author"))
+                   (reference-titlepage-author (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+                   (reference-titlepage-authorblurb (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+                   (reference-titlepage-authorgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+                   (reference-titlepage-authorinitials (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+                   (reference-titlepage-bibliomisc (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+                   (reference-titlepage-biblioset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+                   (reference-titlepage-bookbiblio (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+                   (reference-titlepage-citetitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "collab"))
+                   (reference-titlepage-collab (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+                   (reference-titlepage-confgroup (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+                   (reference-titlepage-contractnum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+                   (reference-titlepage-contractsponsor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+                   (reference-titlepage-contrib (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+                   (reference-titlepage-copyright (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+                   (reference-titlepage-corpauthor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+                   (reference-titlepage-corpname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "date"))
+                   (reference-titlepage-date (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "edition"))
+                   (reference-titlepage-edition (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "editor"))
+                   (reference-titlepage-editor (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+                   (reference-titlepage-firstname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+                   (reference-titlepage-graphic (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+                   (reference-titlepage-honorific (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+                   (reference-titlepage-indexterm (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+                   (reference-titlepage-invpartnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+                   (reference-titlepage-isbn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issn"))
+                   (reference-titlepage-issn (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+                   (reference-titlepage-issuenum (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+                   (reference-titlepage-itermset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+                   (reference-titlepage-keywordset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+                   (reference-titlepage-legalnotice (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+                   (reference-titlepage-lineage (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+                   (reference-titlepage-mediaobject (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+                   (reference-titlepage-modespec (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+                   (reference-titlepage-orgname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+                   (reference-titlepage-othercredit (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "othername"))
+                   (reference-titlepage-othername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+                   (reference-titlepage-pagenums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+                   (reference-titlepage-printhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productname"))
+                   (reference-titlepage-productname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+                   (reference-titlepage-productnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+                   (reference-titlepage-pubdate (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+                   (reference-titlepage-publisher (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+                   (reference-titlepage-publishername (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+                   (reference-titlepage-pubsnumber (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+                   (reference-titlepage-releaseinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+                   (reference-titlepage-revhistory (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+                   (reference-titlepage-seriesinfo (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+                   (reference-titlepage-seriesvolnums (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+                   (reference-titlepage-subjectset (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+                   (reference-titlepage-subtitle (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "surname"))
+                   (reference-titlepage-surname (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "title"))
+                   (reference-titlepage-title (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+                   (reference-titlepage-titleabbrev (node-list-first nl) side))
+                  ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+                   (reference-titlepage-volumenum (node-list-first nl) side))
+                  (else
+                   (reference-titlepage-default (node-list-first nl) side)))
+                 (loop (node-list-rest nl) (node-list-first nl)))))
+
+         (if (and %generate-reference-toc%
+                  %generate-reference-toc-on-titlepage%
+                  (equal? side 'recto))
+             (make display-group
+               (build-toc (current-node)
+                          (toc-depth (current-node))))
+             (empty-sosofo))
+
+         ;; PartIntro is a special case
+         (if (and (equal? side 'recto)
+                  (not (node-list-empty? partintro))
+                  %generate-partintro-on-titlepage%)
+             ($process-partintro$ partintro #f)
+             (empty-sosofo)))
+
+       (empty-sosofo))))
+
+(define (reference-titlepage-before node side)
+  (if (equal? side 'recto)
+      (cond
+       ((equal? (gi node) (normalize "corpauthor"))
+       (make paragraph
+         space-after: (* (HSIZE 5) %head-after-factor% 8)
+         (literal "\no-break-space;")))
+       ((equal? (gi node) (normalize "authorgroup"))
+       (if (have-sibling? (normalize "corpauthor") node)
+           (empty-sosofo)
+           (make paragraph
+             space-after: (* (HSIZE 5) %head-after-factor% 8)
+             (literal "\no-break-space;"))))
+       ((equal? (gi node) (normalize "author"))
+       (if (or (have-sibling? (normalize "corpauthor") node) 
+               (have-sibling? (normalize "authorgroup") node))
+           (empty-sosofo)
+           (make paragraph
+             space-after: (* (HSIZE 5) %head-after-factor% 8)
+             (literal "\no-break-space;"))))
+       (else (empty-sosofo)))
+      (empty-sosofo)))
+
+(define (reference-titlepage-default node side)
+  (let ((foo (debug (string-append "No reference-titlepage-* for " (gi node) "!"))))
+    (empty-sosofo)))
+
+(define (reference-titlepage-element node side)
+  (if (equal? side 'recto)
+      (with-mode reference-titlepage-recto-mode
+       (process-node-list node))
+      (with-mode reference-titlepage-verso-mode
+       (process-node-list node))))
+
+(define (reference-titlepage-abbrev node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-abstract node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-address node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-affiliation node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-artpagenums node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-author node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-authorblurb node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-authorgroup node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-authorinitials node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-bibliomisc node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-biblioset node side)
+  (reference-titlepage node side))
+(define (reference-titlepage-bookbiblio node side)
+  (reference-titlepage node side))
+(define (reference-titlepage-citetitle node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-collab node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-confgroup node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-contractnum node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-contractsponsor node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-contrib  node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-copyright node side)
+  (reference-titlepage-element node side))
+
+(define (reference-titlepage-corpauthor node side)
+  (if (equal? side 'recto)
+      (book-titlepage-element node side)
+      (if (first-sibling? node)
+         (make paragraph
+           (with-mode book-titlepage-verso-mode
+             (process-node-list
+              (select-elements (children (parent node)) 
+                               (normalize "corpauthor")))))
+         (empty-sosofo))))
+
+(define (reference-titlepage-corpname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-date node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-edition node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-editor node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-firstname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-graphic node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-honorific node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-indexterm node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-invpartnumber node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-isbn node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-issn node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-issuenum node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-itermset node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-keywordset node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-legalnotice node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-lineage node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-mediaobject node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-modespec node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-orgname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-othercredit node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-othername node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-pagenums node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-printhistory node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-productname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-productnumber node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-pubdate node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-publisher node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-publishername node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-pubsnumber node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-releaseinfo node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-revhistory node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-seriesinfo node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-seriesvolnums node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-subjectset node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-subtitle node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-surname node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-title node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-titleabbrev node side)
+  (reference-titlepage-element node side))
+(define (reference-titlepage-volumenum node side)
+  (reference-titlepage-element node side))
+
+(define reference-titlepage-recto-style
+  (style
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      font-size: (HSIZE 1)))
+
+(define reference-titlepage-verso-style
+  (style
+      font-family-name: %body-font-family%))
+
+(mode reference-titlepage-recto-mode
+  (element abbrev
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element abstract
+    (make display-group
+      use: reference-titlepage-recto-style
+      quadding: 'start
+      ($semiformal-object$)))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element (abstract para)
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element address 
+    (make display-group
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make display-group
+      use: reference-titlepage-recto-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element author
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+         use: reference-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element authorblurb
+    (make display-group
+      use: reference-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element (authorblurb para)
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: 'start
+      (process-children)))
+
+  (element authorgroup
+    (make display-group
+      (process-children)))
+
+  (element authorinitials
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      space-before: (* (HSIZE 2) %head-before-factor%)
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    (make sequence
+      (make paragraph
+        use: reference-titlepage-recto-style
+       font-size: (HSIZE 3)
+       line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+       space-before: (* (HSIZE 2) %head-before-factor%)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       (process-children))
+      ;; This paragraph is a hack to get the spacing right.
+      ;; Authors always have an affiliation paragraph below them, even if
+      ;; it's empty, so corpauthors need one too.
+      (make paragraph
+        use: reference-titlepage-recto-style
+       font-size: (HSIZE 1)
+       line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+       space-after: (* (HSIZE 2) %head-after-factor% 4)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       (literal "\no-break-space;"))))
+
+  (element corpname
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    (let ((editor-name (author-string)))
+      (make sequence      
+       (if (first-sibling?) 
+           (make paragraph
+              use: reference-titlepage-recto-style
+             font-size: (HSIZE 1)
+             line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+             space-before: (* (HSIZE 2) %head-before-factor% 6)
+             quadding: %division-title-quadding%
+             keep-with-next?: #t
+             (literal (gentext-edited-by)))
+           (empty-sosofo))
+       (make paragraph
+          use: reference-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-after: (* (HSIZE 2) %head-after-factor% 4)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal editor-name)))))
+
+  (element firstname
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'center)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element (keyword)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: reference-titlepage-recto-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para)
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: 'start
+      line-spacing: (* 0.8 (inherited-line-spacing))
+      font-size: (* 0.8 (inherited-font-size))
+      (process-children)))
+
+  (element lineage
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element othercredit
+    (let ((author-name  (author-string))
+         (author-affil (select-elements (children (current-node)) 
+                                        (normalize "affiliation"))))
+      (make sequence      
+       (make paragraph
+         use: reference-titlepage-recto-style
+         font-size: (HSIZE 3)
+         line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+         space-before: (* (HSIZE 2) %head-before-factor%)
+         quadding: %division-title-quadding%
+         keep-with-next?: #t
+         (literal author-name))
+       (process-node-list author-affil))))
+
+  (element othername
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element printhistory
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element publisher
+    (make display-group
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: reference-titlepage-recto-style
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 use: reference-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revdate))
+               (make paragraph
+                 use: reference-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 use: reference-titlepage-recto-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: reference-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    (process-node-list revremark)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: reference-titlepage-recto-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revdescription)))
+               (else (empty-sosofo)))))))) 
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle 
+    (make paragraph
+      use: reference-titlepage-recto-style
+      font-size: (HSIZE 4)
+      line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+      space-before: (* (HSIZE 4) %head-before-factor%)
+      quadding: %division-subtitle-quadding%
+      keep-with-next?: #t
+      (process-children-trim)))
+
+  (element surname
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+
+  (element title
+    (let ((ref (ancestor-member (current-node)
+                               (list (normalize "reference")))))
+      (make paragraph
+        use: reference-titlepage-recto-style
+       font-size: (HSIZE 5)
+       line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+       space-before: (* (HSIZE 5) %head-before-factor%)
+       quadding: %division-title-quadding%
+       keep-with-next?: #t
+       heading-level: (if %generate-heading-level% 1 0)
+       (literal (element-label ref)
+                (gentext-label-title-sep (gi ref)))
+       (with-mode title-mode
+         (process-children)))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: reference-titlepage-recto-style
+      quadding: %division-title-quadding%
+      (process-children)))
+)
+
+(mode reference-titlepage-verso-mode
+  (element abbrev
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element abstract ($semiformal-object$))
+
+  (element (abstract title) (empty-sosofo))
+
+  (element address 
+    (make display-group
+      use: reference-titlepage-verso-style
+      (with-mode titlepage-address-mode 
+       ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+  (element affiliation
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element artpagenums
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element author
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element authorblurb
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element authorgroup
+    (make paragraph
+      space-after: (* %bf-size% %line-spacing-factor%)
+      (make sequence
+       (literal (gentext-by))
+       (literal "\no-break-space;")
+       (process-children-trim))))
+
+  (element authorinitials
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element bibliomisc (process-children))
+
+  (element bibliomset (process-children))
+
+  (element collab
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element confgroup
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element contractnum
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element contractsponsor
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element contrib
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element copyright
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (literal (gentext-element-name (current-node)))
+      (literal "\no-break-space;")
+      (literal (dingbat "copyright"))
+      (literal "\no-break-space;")
+      (process-children)))
+
+  (element (copyright year)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling? (current-node)))
+         (literal ", ")
+         (literal " "))))
+
+  (element (copyright holder) ($charseq$))
+
+  (element corpauthor
+    ;; note: reference-titlepage-corpauthor takes care of wrapping multiple
+    ;; corpauthors
+    (make sequence
+      (if (first-sibling?)
+         (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+             (empty-sosofo)
+             (literal (gentext-by) " "))
+         (literal ", "))
+      (process-children)))
+
+  (element corpname
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element date
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element edition
+    (make paragraph
+      (process-children)
+      (literal "\no-break-space;")
+      (literal (gentext-element-name-space (gi (current-node))))))
+
+  (element editor
+    ;; Print the editor name.
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-edited-by))
+             (literal "\no-break-space;")
+             (literal (author-string))))
+         (make sequence 
+           (literal (author-string))))))
+
+  (element firstname
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element graphic
+    (let* ((nd (current-node))
+          (fileref (attribute-string "fileref" nd))
+          (entityref (attribute-string "entityref" nd))
+          (format (attribute-string "format" nd))
+          (align (attribute-string "align" nd)))
+      (if (or fileref entityref) 
+         (make external-graphic
+           notation-system-id: (if format format "")
+           entity-system-id: (if fileref 
+                                 (graphic-file fileref)
+                                 (if entityref 
+                                     (entity-generated-system-id entityref)
+                                     ""))
+           display?: #t
+           display-alignment: 'start)
+         (empty-sosofo))))
+
+  (element honorific
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element isbn
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element issn
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element itermset (empty-sosofo))
+
+  (element invpartnumber
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element issuenum
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element jobtitle
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element keywordset
+    (make paragraph
+      quadding: 'start
+      (make sequence
+       font-weight: 'bold
+       (literal "Keywords: "))
+      (process-children)))
+
+  (element (keyword)
+    (make sequence
+      (process-children)
+      (if (not (last-sibling?))
+         (literal ", ")
+         (literal ""))))
+
+  (element legalnotice
+    (make display-group
+      use: reference-titlepage-verso-style
+      ($semiformal-object$)))
+
+  (element (legalnotice title) (empty-sosofo))
+
+  (element (legalnotice para) 
+    (make paragraph
+      use: reference-titlepage-verso-style
+      font-size: (* (inherited-font-size) 0.8)
+      (process-children-trim)))
+
+  (element lineage
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element modespec (empty-sosofo))
+
+  (element orgdiv
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element orgname
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element othercredit
+    ;; Print the author name.  Handle the case where there's no AUTHORGROUP
+    (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+      (if (not in-group)
+         (make paragraph
+           ;; Hack to get the spacing right below the author name line...
+           space-after: (* %bf-size% %line-spacing-factor%)
+           (make sequence
+             (literal (gentext-by))
+             (literal "\no-break-space;")
+             (literal (author-list-string))))
+         (make sequence 
+           (literal (author-list-string))))))  
+
+  (element othername
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element pagenums
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element printhistory
+    (make display-group
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element productname
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element productnumber
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element pubdate
+    (make paragraph
+      (literal (gentext-element-name-space (gi (current-node))))
+      (process-children)))
+
+  (element publisher
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element publishername
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element pubsnumber
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element releaseinfo
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element revhistory
+    (make sequence
+      (make paragraph
+       use: reference-titlepage-verso-style
+       space-before: (* (HSIZE 3) %head-before-factor%)
+       space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+       (literal (gentext-element-name (current-node))))
+      (make table
+       before-row-border: #f
+       (process-children))))
+  
+  (element (revhistory revision)
+    (let ((revnumber (select-elements (descendants (current-node)) 
+                                     (normalize "revnumber")))
+         (revdate   (select-elements (descendants (current-node)) 
+                                     (normalize "date")))
+         (revauthor (select-elements (descendants (current-node))
+                                     (normalize "authorinitials")))
+         (revremark (select-elements (descendants (current-node))
+                                     (normalize "revremark")))
+         (revdescription (select-elements (descendants (current-node))
+                                     (normalize "revdescription"))))
+      (make sequence
+       (make table-row
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (if (not (node-list-empty? revnumber))
+               (make paragraph
+                 use: reference-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-element-name-space (current-node)))
+                 (process-node-list revnumber))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 2
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revdate))
+               (make paragraph
+                 use: reference-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (process-node-list revdate))
+               (empty-sosofo)))
+         (make table-cell
+           column-number: 3
+           n-columns-spanned: 1
+           n-rows-spanned: 1
+           start-indent: 0pt
+           cell-before-column-margin: (if (equal? (print-backend) 'tex)
+                                          6pt
+                                          0pt)
+           (if (not (node-list-empty? revauthor))
+               (make paragraph
+                 use: reference-titlepage-verso-style
+                 font-size: %bf-size%
+                 font-weight: 'medium
+                 (literal (gentext-revised-by))
+                 (process-node-list revauthor))
+               (empty-sosofo))))
+       (make table-row
+         cell-after-row-border: #f
+         (make table-cell
+           column-number: 1
+           n-columns-spanned: 3
+           n-rows-spanned: 1
+           start-indent: 0pt
+           (cond ((not (node-list-empty? revremark))
+                  (make paragraph
+                    use: reference-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    space-after: (if (last-sibling?) 
+                                     0pt
+                                     (/ %block-sep% 2))
+                    (process-node-list revremark)))
+                 ((not (node-list-empty? revdescription))
+                  (make sequence
+                    use: reference-titlepage-verso-style
+                    font-size: %bf-size%
+                    font-weight: 'medium
+                    (process-node-list revdescription)))
+               (else (empty-sosofo)))))))) 
+  
+  (element (revision revnumber) (process-children-trim))
+  (element (revision date) (process-children-trim))
+  (element (revision authorinitials) (process-children-trim))
+  (element (revision revremark) (process-children-trim))
+  (element (revision revdescription) (process-children))
+
+  (element seriesvolnums
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element shortaffil
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element subjectset (empty-sosofo))
+
+  (element subtitle
+    (make sequence
+      font-family-name: %title-font-family%
+      font-weight: 'bold
+      (literal (if (first-sibling?) ": " "; "))
+      (process-children)))
+
+  (element surname
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+  (element title
+    (let ((ref (ancestor-member (current-node)
+                               (list (normalize "reference")))))
+      (make sequence
+        font-family-name: %title-font-family%
+        font-weight: 'bold
+       (literal (element-label ref)
+                (gentext-label-title-sep (gi ref)))
+       (with-mode title-mode
+         (process-children)))))
+
+  (element formalpara ($para-container$))
+  (element (formalpara title) ($runinhead$))
+  (element (formalpara para) (make sequence (process-children)))
+
+  (element titleabbrev (empty-sosofo))
+
+  (element volumenum
+    (make paragraph
+      use: reference-titlepage-verso-style
+      (process-children)))
+
+)
diff --git a/print/dbverb.dsl b/print/dbverb.dsl
new file mode 100644 (file)
index 0000000..cb22cb1
--- /dev/null
@@ -0,0 +1,222 @@
+;; $Id: dbverb.dsl,v 1.6 2004/10/09 19:46:33 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define verbatim-style
+  (style
+      font-family-name: %mono-font-family%
+      font-size:        (* (inherited-font-size) 
+                          (if %verbatim-size-factor%
+                              %verbatim-size-factor%
+                              1.0))
+      font-weight:      'medium
+      font-posture:     'upright
+      line-spacing:     (* (* (inherited-font-size) 
+                             (if %verbatim-size-factor%
+                                 %verbatim-size-factor%
+                                 1.0))
+                          %line-spacing-factor%)
+      first-line-start-indent: 0pt
+      lines: 'asis
+      input-whitespace-treatment: 'preserve))
+
+(define inline-verbatim-style
+  (style
+      font-family-name: %mono-font-family%
+      font-size:        (* (inherited-font-size) 
+                          (if %verbatim-size-factor%
+                              %verbatim-size-factor%
+                              1.0))
+      font-weight:      'medium
+      font-posture:     'upright
+      lines: 'asis
+      input-whitespace-treatment: 'preserve))
+
+(define linespecific-style
+  (style
+      first-line-start-indent: 0pt
+      lines: 'asis
+      input-whitespace-treatment: 'preserve))
+
+(define ($format-indent$ indent)
+  (literal indent))
+
+(define ($format-linenumber$ linenumber)
+  ;; A line-field would make more sense here, and allow proportional
+  ;; fonts, but you can't put line-fields in the middle of a paragraph
+  ;; in the current RTF backend of Jade
+  (let ((%factor% (if %verbatim-size-factor%
+                     %verbatim-size-factor%
+                     1.0)))
+    (if (equal? (remainder linenumber %linenumber-mod%) 0)
+       (make sequence
+         use: verbatim-style
+         (literal (pad-string (format-number linenumber "1") 
+                              %linenumber-length% %linenumber-padchar%))
+         ($linenumber-space$))
+       (make sequence
+         use: verbatim-style
+         (literal (pad-string "" %linenumber-length% " "))
+         ($linenumber-space$)))))
+
+(define ($line-start$ indent line-numbers? #!optional (line-number 1))
+  (make sequence
+    (if indent
+       ($format-indent$ indent)
+       (empty-sosofo))
+    (if line-numbers?
+       ($format-linenumber$ line-number)
+       (empty-sosofo))))
+
+(define ($linespecific-display$ indent line-numbers?)
+  (let ((vspace (if (INBLOCK?)
+                  0pt
+                  (if (INLIST?) 
+                      %para-sep% 
+                      %block-sep%))))
+    (make paragraph
+      use: linespecific-style
+      space-before: (if (and (string=? (gi (parent)) (normalize "entry"))
+                            (absolute-first-sibling?))
+                       0pt
+                       vspace)
+      space-after:  (if (and (string=? (gi (parent)) (normalize "entry"))
+                            (absolute-last-sibling?))
+                       0pt
+                       vspace)
+      start-indent: (if (INBLOCK?)
+                       (inherited-start-indent)
+                       (+ %block-start-indent% (inherited-start-indent)))
+      (if (or indent line-numbers?)
+         ($linespecific-line-by-line$ indent line-numbers?)
+         (process-children)))))
+
+(define ($linespecific-line-by-line$ indent line-numbers?)
+  (let ((expanded-content
+        ;; this is the content with
+        ;; inlinemediaobject/imageobject[@format='linespecific']
+        ;; expanded
+        (let loop ((kl (children (current-node))) (rl (empty-node-list)))
+          (if (node-list-empty? kl)
+              rl
+              (if (equal? (gi (node-list-first kl))
+                          (normalize "inlinemediaobject"))
+                  (let* ((imgobj (node-list-filter-by-gi
+                                  (children (node-list-first kl))
+                                  (list (normalize "imageobject"))))
+                         (datobj (node-list-filter-by-gi
+                                  (children imgobj)
+                                  (list (normalize "imagedata")))))
+                    (if (and (not (node-list-empty? imgobj))
+                             (not (node-list-empty? datobj))
+                             (equal? (attribute-string (normalize "format") datobj)
+                                     (normalize "linespecific")))
+                        (loop (node-list-rest kl)
+                              (node-list rl (string->nodes (include-characters
+                                                            (if (attribute-string (normalize "fileref") datobj)
+                                                                (attribute-string (normalize "fileref") datobj)
+                                                                (entity-generated-system-id (attribute-string (normalize "entityref") datobj)))))))
+                        (loop (node-list-rest kl)
+                              (node-list rl (node-list-first kl)))))
+                  (loop (node-list-rest kl) (node-list rl (node-list-first kl))))))))
+  (make sequence
+    ($line-start$ indent line-numbers? 1)
+    (let loop ((kl expanded-content)
+              (linecount 1)
+              (res (empty-sosofo)))
+      (if (node-list-empty? kl)
+         res
+         (loop
+          (node-list-rest kl)
+          (if (char=? (node-property 'char (node-list-first kl)
+                                     default: #\U-0000) #\U-000D)
+              (+ linecount 1)
+              linecount)
+          (let ((c (node-list-first kl)))
+            (if (char=? (node-property 'char c default: #\U-0000) 
+                        #\U-000D)
+                (sosofo-append res
+                               (process-node-list c)
+                               ($line-start$ indent line-numbers?
+                                             (+ linecount 1)))
+                (sosofo-append res (process-node-list c))))))))))
+
+(define ($verbatim-display$ indent line-numbers?)
+  (let* ((width-in-chars (if (attribute-string (normalize "width"))
+                            (string->number (attribute-string (normalize "width")))
+                            %verbatim-default-width%))
+        (fsize (lambda () (if (or (attribute-string (normalize "width"))
+                                  (not %verbatim-size-factor%))
+                              (/ (/ (- %text-width% (inherited-start-indent))
+                                    width-in-chars) 
+                                 0.7)
+                              (* (inherited-font-size) 
+                                 %verbatim-size-factor%))))
+        (vspace-before (if (INBLOCK?)
+                           0pt
+                           (if (INLIST?)
+                               %para-sep%
+                               %block-sep%)))
+        (vspace-after (if (INBLOCK?)
+                          0pt
+                          (if (INLIST?)
+                              0pt
+                              %block-sep%))))
+    (make paragraph
+      use: verbatim-style
+      space-before: (if (and (string=? (gi (parent)) (normalize "entry"))
+                            (absolute-first-sibling?))
+                       0pt
+                       vspace-before)
+      space-after:  (if (and (string=? (gi (parent)) (normalize "entry"))
+                            (absolute-last-sibling?))
+                       0pt
+                       vspace-after)
+      font-size: (fsize)
+      line-spacing: (* (fsize) %line-spacing-factor%)
+      start-indent: (if (INBLOCK?)
+                       (inherited-start-indent)
+                       (+ %block-start-indent% (inherited-start-indent)))
+      (if (or indent line-numbers?)
+         ($linespecific-line-by-line$ indent line-numbers?)
+         (process-children)))))
+
+(element literallayout
+  (if (equal? (attribute-string "class") (normalize "monospaced"))
+      ($verbatim-display$
+       %indent-literallayout-lines%
+       (or %number-literallayout-lines%
+          (equal? (attribute-string (normalize "linenumbering"))
+                  (normalize "numbered"))))
+      ($linespecific-display$
+       %indent-literallayout-lines%
+       (or %number-literallayout-lines%
+          (equal? (attribute-string (normalize "linenumbering"))
+                  (normalize "numbered"))))))
+
+(element address
+  ($linespecific-display$
+   %indent-address-lines%
+   (or %number-address-lines%
+       (equal? (attribute-string (normalize "linenumbering"))
+              (normalize "numbered")))))
+
+(element programlisting
+  ($verbatim-display$
+   %indent-programlisting-lines%
+   (or %number-programlisting-lines%
+       (equal? (attribute-string (normalize "linenumbering"))
+              (normalize "numbered")))))
+
+(element screen
+  ($verbatim-display$
+   %indent-screen-lines%
+   (or %number-screen-lines%
+       (equal? (attribute-string (normalize "linenumbering"))
+              (normalize "numbered")))))
+
+(element screenshot (process-children))
+(element screeninfo (empty-sosofo))
+
diff --git a/print/docbook.dsl b/print/docbook.dsl
new file mode 100644 (file)
index 0000000..512eba1
--- /dev/null
@@ -0,0 +1,197 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+
+<!ENTITY % dbl10n.ent SYSTEM "../common/dbl10n.ent">
+%dbl10n.ent;
+
+<!ENTITY dbl10n.dsl  SYSTEM "../common/dbl10n.dsl">
+
+
+<!ENTITY dblib.dsl
+  PUBLIC "-//Norman Walsh//DOCUMENT DSSSL Library V2//EN" CDATA DSSSL>
+
+<!ENTITY dbparam.dsl  SYSTEM "dbparam.dsl" CDATA DSSSL>
+
+
+<!ENTITY VERSION SYSTEM "../VERSION">
+
+<!ENTITY dbcommon.dsl SYSTEM "../common/dbcommon.dsl">
+<!ENTITY dbctable.dsl SYSTEM "../common/dbtable.dsl">
+
+<!ENTITY dbadmon.dsl  SYSTEM "dbadmon.dsl">
+<!ENTITY dbautoc.dsl  SYSTEM "dbautoc.dsl">
+<!ENTITY dbbibl.dsl   SYSTEM "dbbibl.dsl">
+<!ENTITY dbblock.dsl  SYSTEM "dbblock.dsl">
+<!ENTITY dbcallou.dsl SYSTEM "dbcallou.dsl">
+<!ENTITY dbcompon.dsl SYSTEM "dbcompon.dsl">
+<!ENTITY dbdivis.dsl  SYSTEM "dbdivis.dsl">
+<!ENTITY dbgloss.dsl  SYSTEM "dbgloss.dsl">
+<!ENTITY dbgraph.dsl  SYSTEM "dbgraph.dsl">
+<!ENTITY dbindex.dsl  SYSTEM "dbindex.dsl">
+<!ENTITY dbinfo.dsl   SYSTEM "dbinfo.dsl">
+<!ENTITY dbinline.dsl SYSTEM "dbinline.dsl">
+<!ENTITY dblink.dsl   SYSTEM "dblink.dsl">
+<!ENTITY dblists.dsl  SYSTEM "dblists.dsl">
+<!ENTITY dblot.dsl    SYSTEM "dblot.dsl">
+<!ENTITY dbmath.dsl   SYSTEM "dbmath.dsl">
+<!ENTITY dbmsgset.dsl SYSTEM "dbmsgset.dsl">
+<!ENTITY dbprint.dsl  SYSTEM "dbprint.dsl">
+<!ENTITY dbprocdr.dsl SYSTEM "dbprocdr.dsl">
+<!ENTITY dbqanda.dsl  SYSTEM "dbqanda.dsl">
+<!ENTITY dbrfntry.dsl SYSTEM "dbrfntry.dsl">
+<!ENTITY dbsect.dsl   SYSTEM "dbsect.dsl">
+<!ENTITY dbsynop.dsl  SYSTEM "dbsynop.dsl">
+<!ENTITY dbefsyn.dsl  SYSTEM "dbefsyn.dsl">
+<!ENTITY dbtable.dsl  SYSTEM "dbtable.dsl">
+<!ENTITY dbtitle.dsl  SYSTEM "dbtitle.dsl">
+<!ENTITY dbttlpg.dsl  SYSTEM "dbttlpg.dsl">
+<!ENTITY dbverb.dsl   SYSTEM "dbverb.dsl">
+<!ENTITY version.dsl  SYSTEM "version.dsl">
+]>
+
+<style-sheet>
+<style-specification id="docbook"
+   use="af bg bs ca cs da de el en es et eu fi fr hu id it ja ko nl nn no pl pt ptbr ro ru sk sl sr sv tr uk xh zhcn zhtw dbparam dblib">
+
+<style-specification-body>
+
+;; $Id: docbook.dsl,v 1.10 2004/10/09 21:36:35 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define if-front-page
+  (external-procedure "UNREGISTERED::James Clark//Procedure::if-front-page"))
+
+(define if-first-page
+  (external-procedure "UNREGISTERED::James Clark//Procedure::if-first-page"))
+
+(declare-characteristic heading-level 
+   "UNREGISTERED::James Clark//Characteristic::heading-level" 0)
+
+(declare-characteristic page-number-format
+   "UNREGISTERED::James Clark//Characteristic::page-number-format" "1")
+
+(declare-characteristic page-number-restart?
+   "UNREGISTERED::James Clark//Characteristic::page-number-restart?" #f)
+
+(declare-characteristic page-two-side?
+   "UNREGISTERED::OpenJade//Characteristic::page-two-side?" %two-side%)
+
+(declare-characteristic two-side-start-on-right?
+   "UNREGISTERED::OpenJade//Characteristic::two-side-start-on-right?" %two-side%)
+
+(declare-characteristic page-n-columns
+   "UNREGISTERED::James Clark//Characteristic::page-n-columns" 1)
+
+(declare-characteristic page-column-sep
+   "UNREGISTERED::James Clark//Characteristic::page-column-sep" %page-column-sep%)
+
+(declare-characteristic page-balance-columns?
+   "UNREGISTERED::James Clark//Characteristic::page-balance-columns?" %page-balance-columns?%)
+
+;; This allows bottom-of-page footnotes
+(declare-flow-object-class page-footnote
+      "UNREGISTERED::Sebastian Rahtz//Flow Object Class::page-footnote")
+
+;; This allows formal objects to float
+(declare-flow-object-class page-float
+      "UNREGISTERED::Sebastian Rahtz//Flow Object Class::page-float")
+
+(define read-entity
+  (external-procedure "UNREGISTERED::James Clark//Procedure::read-entity"))
+
+(define all-element-number
+  (external-procedure "UNREGISTERED::James Clark//Procedure::all-element-number"))
+
+(define debug
+  (external-procedure "UNREGISTERED::James Clark//Procedure::debug"))
+
+;; Make text that comes from unimplemented tags easy to spot
+(default
+  (let* ((colr-space (color-space 
+                     "ISO/IEC 10179:1996//Color-Space Family::Device RGB"))
+        (red (color colr-space 1 0 0)))
+    (make sequence
+      color: red
+      (process-children))))
+
+&dbcommon.dsl;  <!-- Common ("stock") stylesheet functions                 -->
+&dbctable.dsl;  <!-- Common table stylesheet functions                     -->
+
+&dbl10n.dsl;    <!-- Localization -->
+
+&dbadmon.dsl;   <!-- Admonitions                                           -->
+&dbautoc.dsl;   <!-- Automatic TOC generation                              -->
+&dbbibl.dsl;    <!-- Bibliographies                                        -->
+&dbblock.dsl;   <!-- Miscellaneous block elements                          -->
+&dbcallou.dsl;  <!-- Callouts                                              -->
+&dbcompon.dsl;  <!-- Components; chapter-level elements                    -->
+&dbdivis.dsl;   <!-- Divisions; Sets, Books, Articles, Parts               -->
+&dbgloss.dsl;   <!-- Glossaries                                            -->
+&dbgraph.dsl;   <!-- Graphics                                              -->
+&dbindex.dsl;   <!-- Indexes                                               -->
+&dbinfo.dsl;    <!-- Infopools (SetInfo, BookInfo, Sect1Info, etc.)        -->
+&dbinline.dsl;  <!-- Inline elements                                       -->
+&dblink.dsl;    <!-- Links                                                 -->
+&dblists.dsl;   <!-- Lists                                                 -->
+&dblot.dsl;     <!-- Lists of Tables (ToC, LoT, etc.)                      -->
+&dbmath.dsl;    <!-- Math (Equations)                                      -->
+&dbmsgset.dsl;  <!-- MsgSet                                                -->
+&dbprint.dsl;   <!-- Print macros                                          -->
+&dbprocdr.dsl;  <!-- Procedures                                            -->
+&dbqanda.dsl;   <!-- QandASet                                              -->
+&dbrfntry.dsl;  <!-- References and RefEntrys                              -->
+&dbsect.dsl;    <!-- Sections                                              -->
+&dbsynop.dsl;   <!-- Synopsis                                              -->
+&dbefsyn.dsl;   <!-- Class Synopsis                                        -->
+&dbtable.dsl;   <!-- Tables                                                -->
+&dbtitle.dsl;   <!-- Titles                                                -->
+&dbttlpg.dsl;   <!-- Title Page                                            -->
+&dbverb.dsl;    <!-- Verbatim (ProgramListing, LiteralLayout, etc.)        -->
+&version.dsl;
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="dbparam" document="dbparam.dsl">
+<external-specification id="dblib" document="dblib.dsl">
+
+<external-specification id="af" document="dbl1af">
+<external-specification id="bg" document="dbl1bg">
+<external-specification id="bs" document="dbl1bs">
+<external-specification id="ca" document="dbl1ca">
+<external-specification id="cs" document="dbl1cs">
+<external-specification id="da" document="dbl1da">
+<external-specification id="de" document="dbl1de">
+<external-specification id="el" document="dbl1el">
+<external-specification id="en" document="dbl1en">
+<external-specification id="es" document="dbl1es">
+<external-specification id="et" document="dbl1et">
+<external-specification id="eu" document="dbl1eu">
+<external-specification id="fi" document="dbl1fi">
+<external-specification id="fr" document="dbl1fr">
+<external-specification id="hu" document="dbl1hu">
+<external-specification id="id" document="dbl1id">
+<external-specification id="it" document="dbl1it">
+<external-specification id="ja" document="dbl1ja">
+<external-specification id="ko" document="dbl1ko">
+<external-specification id="nl" document="dbl1nl">
+<external-specification id="nn" document="dbl1nn">
+<external-specification id="no" document="dbl1no">
+<external-specification id="pl" document="dbl1pl">
+<external-specification id="pt" document="dbl1pt">
+<external-specification id="ptbr" document="dbl1ptbr">
+<external-specification id="ro" document="dbl1ro">
+<external-specification id="ru" document="dbl1ru">
+<external-specification id="sk" document="dbl1sk">
+<external-specification id="sl" document="dbl1sl">
+<external-specification id="sr" document="dbl1sr">
+<external-specification id="sv" document="dbl1sv">
+<external-specification id="tr" document="dbl1tr">
+<external-specification id="uk" document="dbl1uk">
+<external-specification id="xh" document="dbl1xh">
+<external-specification id="zhcn" document="dbl1zhcn">
+<external-specification id="zhtw" document="dbl1zhtw">
+
+</style-sheet>
diff --git a/print/notoc.dsl b/print/notoc.dsl
new file mode 100644 (file)
index 0000000..ffa8c56
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl SYSTEM "docbook.dsl" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification id="docbook-notoc" use="docbook">
+<style-specification-body>
+
+;; $Id: notoc.dsl,v 1.3 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+;; Example of a customization layer on top of the modular docbook style
+;; sheet.  Definitions inserted in this file take precedence over 
+;; definitions in the 'use'd stylesheet(s).
+
+(define %generate-set-toc% #f)
+(define %generate-book-toc% #f)
+(define %generate-part-toc% #f)
+(define %generate-reference-toc% #f)
+(define %generate-article-toc% #f)
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/print/plain.dsl b/print/plain.dsl
new file mode 100644 (file)
index 0000000..d049df4
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+;; $Id: plain.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+;; Example of a customization layer on top of the modular docbook style
+;; sheet.  Definitions inserted in this file take precedence over 
+;; definitions in the 'use'd stylesheet(s).
+
+(define %generate-set-titlepage% #f)
+(define %generate-book-titlepage% #f)
+(define %generate-part-titlepage% #f)
+(define %generate-reference-titlepage% #f)
+(define %generate-article-titlepage% #f)
+
+(define %generate-set-toc% #f)
+(define %generate-book-toc% #f)
+(define %generate-part-toc% #f)
+(define %generate-reference-toc% #f)
+(define %generate-article-toc% #f)
+
+(define %generate-book-lot-list% '())
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/print/version.dsl b/print/version.dsl
new file mode 100644 (file)
index 0000000..cee6faf
--- /dev/null
@@ -0,0 +1,14 @@
+;; $Id: version.dsl,v 1.2 2004/07/11 06:21:00 nyraghu Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://www.nwalsh.com/docbook/dsssl/
+;;
+
+;; If **ANY** change is made to this file, you _MUST_ alter the
+;; following definition:
+
+(define (stylesheet-version)
+  (string-append
+   "Modular DocBook Print Stylesheet Version "
+   ;; Trim off bounding white space.
+   (strip "&VERSION;")))