Initial revision
authorarjen <arjen>
Wed, 28 Aug 2002 14:50:50 +0000 (14:50 +0000)
committerarjen <arjen>
Wed, 28 Aug 2002 14:50:50 +0000 (14:50 +0000)
34 files changed:
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
configure [new file with mode: 0755]
configure.in [new file with mode: 0644]
doc.dtd [new file with mode: 0644]
doc/block.xml [new file with mode: 0644]
doc/guide.xml [new file with mode: 0644]
doc/inline.xml [new file with mode: 0644]
doc/intro.xml [new file with mode: 0644]
doc/main.css [new file with mode: 0644]
doc/makefile [new file with mode: 0644]
doc/multifiles.xml [new file with mode: 0644]
doc/overall.xml [new file with mode: 0644]
doc/structure.obj [new file with mode: 0644]
html.xsl [new file with mode: 0644]
install-sh [new file with mode: 0755]
latex.xsl [new file with mode: 0644]
missing [new file with mode: 0755]
mkinstalldirs [new file with mode: 0755]
preprocess.xsl [new file with mode: 0644]
text.xsl [new file with mode: 0644]
xml2html [new file with mode: 0755]
xml2latex [new file with mode: 0755]
xml2text [new file with mode: 0755]
xmldoc.html [new file with mode: 0644]
xp.c [new file with mode: 0644]
xsl.dtd [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..18a8088
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Arjen Baart <arjen@andromeda.nl>
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..7ba38ed
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,36 @@
+Version 0.4 - Aug 28, 2002
+===========================================================
+
+o  Added two more levels of sectioning: <paragraph> and <subparagraph>.
+o  Fixed configure bug to find the libxml2 header files.
+o  Added the <footnote> element.
+o  Added <sub> for subscript and <sup> for superscript type styles.
+o  Added <quote> for quotation paragraphs.
+o  Added internal cross-referencing with the <label>, <ref> and <page>
+   elements.
+o  Added <subtitle> element.
+
+Version 0.3 - May 27, 2002
+===========================================================
+
+o  Filter special characters for LaTeX and translate them to LaTeX sequences.
+   The filter is built inside the XSLT processor and is applied before the
+   stylesheet.
+   The XSLT processor, called 'xp', is a separate program, based upon
+   the xsltproc utility that comes with Gnu libxslt.
+   Run xp with the '-latex' option to invoke the filter.
+o  The 'latexescape' filter is now obsolete.
+o  Many more ENTITIES for special characters defined in the DTD
+   These now include accented letters, greek letters, matemathical symbols
+   and the euro symbol.
+o  Removed 'chapter' from the definition of 'article' in the DTD. The
+   'article' style documents can only have 'section' elements.
+o  Made the proper input files for automake and autoconf. You should
+   be able to 'configure; make install' XMLDoc on any system now.
+
+Version 0.2 - Apr 8, 2002
+===========================================================
+
+o  Defined ENTITIES in the DTD
+o  Added title page and child elements. The <title> element has moved
+   to a different place. [Thanks to Marc Groenewegen]
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..b42a17a
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,182 @@
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.in' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory.  After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
+
+`--help'
+     Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--version'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..6b9a8f4
--- /dev/null
@@ -0,0 +1,11 @@
+
+##  Process this file with automake to create Makefile.in
+
+xsltdir = $(prefix)/xslt
+
+bin_PROGRAMS = xp
+bin_SCRIPTS = xml2html xml2latex xml2text
+
+xslt_DATA = doc.dtd preprocess.xsl html.xsl latex.xsl text.xsl
+xp_SOURCES = xp.c
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..e301273
--- /dev/null
@@ -0,0 +1,404 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+XML_CONFIG = @XML_CONFIG@
+
+xsltdir = $(prefix)/xslt
+
+bin_PROGRAMS = xp
+bin_SCRIPTS = xml2html xml2latex xml2text
+
+xslt_DATA = doc.dtd preprocess.xsl html.xsl latex.xsl text.xsl
+xp_SOURCES = xp.c
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES = 
+PROGRAMS =  $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) 
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+xp_OBJECTS =  xp.o
+xp_LDADD = $(LDADD)
+xp_DEPENDENCIES = 
+xp_LDFLAGS = 
+SCRIPTS =  $(bin_SCRIPTS)
+
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DATA =  $(xslt_DATA)
+
+DIST_COMMON =  README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
+Makefile.in NEWS aclocal.m4 configure configure.in install-sh missing \
+mkinstalldirs
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+DEP_FILES =  .deps/xp.P
+SOURCES = $(xp_SOURCES)
+OBJECTS = $(xp_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+       cd $(top_builddir) \
+         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4):  configure.in 
+       cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+       cd $(srcdir) && $(AUTOCONF)
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(bindir)
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         if test -f $$p; then \
+           echo "  $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+            $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+         else :; fi; \
+       done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       list='$(bin_PROGRAMS)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+       done
+
+.s.o:
+       $(COMPILE) -c $<
+
+.S.o:
+       $(COMPILE) -c $<
+
+mostlyclean-compile:
+       -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+       -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+xp: $(xp_OBJECTS) $(xp_DEPENDENCIES)
+       @rm -f xp
+       $(LINK) $(xp_LDFLAGS) $(xp_OBJECTS) $(xp_LDADD) $(LIBS)
+
+install-binSCRIPTS: $(bin_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(bindir)
+       @list='$(bin_SCRIPTS)'; for p in $$list; do \
+         if test -f $$p; then \
+           echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+           $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+         else if test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+           $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+         else :; fi; fi; \
+       done
+
+uninstall-binSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       list='$(bin_SCRIPTS)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+       done
+
+install-xsltDATA: $(xslt_DATA)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(xsltdir)
+       @list='$(xslt_DATA)'; for p in $$list; do \
+         if test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(xsltdir)/$$p"; \
+           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(xsltdir)/$$p; \
+         else if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(xsltdir)/$$p"; \
+           $(INSTALL_DATA) $$p $(DESTDIR)$(xsltdir)/$$p; \
+         fi; fi; \
+       done
+
+uninstall-xsltDATA:
+       @$(NORMAL_UNINSTALL)
+       list='$(xslt_DATA)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(xsltdir)/$$p; \
+       done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       here=`pwd` && cd $(srcdir) \
+         && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+       -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       -rm -rf $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+       mkdir $(distdir)/=build
+       mkdir $(distdir)/=inst
+       dc_install_base=`cd $(distdir)/=inst && pwd`; \
+       cd $(distdir)/=build \
+         && ../configure --srcdir=.. --prefix=$$dc_install_base \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) dist
+       -rm -rf $(distdir)
+       @banner="$(distdir).tar.gz is ready for distribution"; \
+       dashes=`echo "$$banner" | sed s/./=/g`; \
+       echo "$$dashes"; \
+       echo "$$banner"; \
+       echo "$$dashes"
+dist: distdir
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
+dist-all: distdir
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
+distdir: $(DISTFILES)
+       -rm -rf $(distdir)
+       mkdir $(distdir)
+       -chmod 777 $(distdir)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$d/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+       -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+       @echo '$(COMPILE) -c $<'; \
+       $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+       @-cp .deps/$(*F).pp .deps/$(*F).P; \
+       tr ' ' '\012' < .deps/$(*F).pp \
+         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+           >> .deps/$(*F).P; \
+       rm .deps/$(*F).pp
+
+%.lo: %.c
+       @echo '$(LTCOMPILE) -c $<'; \
+       $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+       @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
+         < .deps/$(*F).pp > .deps/$(*F).P; \
+       tr ' ' '\012' < .deps/$(*F).pp \
+         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+           >> .deps/$(*F).P; \
+       rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
+install-exec: install-exec-am
+
+install-data-am: install-xsltDATA
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+               uninstall-xsltDATA
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+       $(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) \
+               $(DESTDIR)$(xsltdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-compile \
+               mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-binPROGRAMS clean-compile clean-tags clean-depend \
+               clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-binPROGRAMS distclean-compile distclean-tags \
+               distclean-depend distclean-generic clean-am
+
+distclean: distclean-am
+       -rm -f config.status
+
+maintainer-clean-am:  maintainer-clean-binPROGRAMS \
+               maintainer-clean-compile maintainer-clean-tags \
+               maintainer-clean-depend maintainer-clean-generic \
+               distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+       -rm -f config.status
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile uninstall-binSCRIPTS install-binSCRIPTS \
+uninstall-xsltDATA install-xsltDATA tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..604f275
--- /dev/null
@@ -0,0 +1,104 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
+
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+# Do all the work for Automake.  This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   if test "[$]*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "[$]*" != "X $srcdir/configure conftestfile" \
+      && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "[$]2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN([AM_MISSING_PROG],
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+   $1=$2
+   AC_MSG_RESULT(found)
+else
+   $1="$3/missing $2"
+   AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..a96a88f
--- /dev/null
+++ b/configure
@@ -0,0 +1,1790 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  case "$ac_option" in
+  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir="$ac_optarg" ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$ac_optarg" ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file="$ac_optarg" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix="$ac_optarg" ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he)
+    # Omit some internal or obsolete options to make the list less imposing.
+    # This message is too long to be a string in the A/UX 3.1 sh.
+    cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --program-prefix=PREFIX prepend PREFIX to installed program names
+  --program-suffix=SUFFIX append SUFFIX to installed program names
+  --program-transform-name=PROGRAM
+                          run sed PROGRAM on installed program names
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$ac_optarg" ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir="$ac_optarg" ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir="$ac_optarg" ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir="$ac_optarg" ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir="$ac_optarg" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir="$ac_optarg" ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir="$ac_optarg" ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir="$ac_optarg" ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix="$ac_optarg" ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix="$ac_optarg" ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix="$ac_optarg" ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name="$ac_optarg" ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir="$ac_optarg" ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir="$ac_optarg" ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site="$ac_optarg" ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir="$ac_optarg" ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir="$ac_optarg" ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval "with_${ac_package}=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes="$ac_optarg" ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries="$ac_optarg" ;;
+
+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=xp.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='       '
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:556: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+         if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         else
+           ac_cv_path_install="$ac_dir/$ac_prog -c"
+           break 2
+         fi
+       fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:609: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "$*" != "X $srcdir/configure conftestfile" \
+      && test "$*" != "X conftestfile $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+   fi
+
+   test "$2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+  program_transform_name=
+else
+  # Double any \ or $.  echo might interpret backslashes.
+  cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+  rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:666: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftestmake <<\EOF
+all:
+       @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=XMLDoc
+
+VERSION=0.3
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:712: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+   ACLOCAL=aclocal
+   echo "$ac_t""found" 1>&6
+else
+   ACLOCAL="$missing_dir/missing aclocal"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:725: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+   AUTOCONF=autoconf
+   echo "$ac_t""found" 1>&6
+else
+   AUTOCONF="$missing_dir/missing autoconf"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:738: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+   AUTOMAKE=automake
+   echo "$ac_t""found" 1>&6
+else
+   AUTOMAKE="$missing_dir/missing automake"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:751: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+   AUTOHEADER=autoheader
+   echo "$ac_t""found" 1>&6
+else
+   AUTOHEADER="$missing_dir/missing autoheader"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:764: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+   MAKEINFO=makeinfo
+   echo "$ac_t""found" 1>&6
+else
+   MAKEINFO="$missing_dir/missing makeinfo"
+   echo "$ac_t""missing" 1>&6
+fi
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:781: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:811: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_prog_rejected=no
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+       continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:862: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+    esac
+  fi
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 905 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:936: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:941: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:969: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+
+
+# Extract the first word of "xml2-config", so it can be a program name with args.
+set dummy xml2-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1004: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XML_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$XML_CONFIG" in
+  /*)
+  ac_cv_path_XML_CONFIG="$XML_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_XML_CONFIG="$XML_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_XML_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_XML_CONFIG" && ac_cv_path_XML_CONFIG="no"
+  ;;
+esac
+fi
+XML_CONFIG="$ac_cv_path_XML_CONFIG"
+if test -n "$XML_CONFIG"; then
+  echo "$ac_t""$XML_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+XML_CFLAGS=`$XML_CONFIG --cflags`
+CFLAGS="$CFLAGS $XML_CFLAGS"
+
+echo $ac_n "checking for main in -latex""... $ac_c" 1>&6
+echo "configure:1043: checking for main in -latex" >&5
+ac_lib_var=`echo atex'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-latex  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1051 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo atex | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-latex $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for main in -lexslt""... $ac_c" 1>&6
+echo "configure:1086: checking for main in -lexslt" >&5
+ac_lib_var=`echo exslt'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lexslt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1094 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo exslt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lexslt $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for xmlParseFile in -lxml2""... $ac_c" 1>&6
+echo "configure:1129: checking for xmlParseFile in -lxml2" >&5
+ac_lib_var=`echo xml2'_'xmlParseFile | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lxml2  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1137 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char xmlParseFile();
+
+int main() {
+xmlParseFile()
+; return 0; }
+EOF
+if { (eval echo configure:1148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo xml2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lxml2 $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for main in -lxslt""... $ac_c" 1>&6
+echo "configure:1176: checking for main in -lxslt" >&5
+ac_lib_var=`echo xslt'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lxslt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1184 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo xslt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lxslt $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1220: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 1235 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 1252 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 1269 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1300: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1305 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  ac_cv_header_stdc=yes
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1330 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1348 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+  :
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1369 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:1380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1407: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1412 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:1445: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1450 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this.  */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25, 17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:1499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
+EOF
+
+fi
+
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[        ]*VPATH[        ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[    `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@CC@%$CC%g
+s%@XML_CONFIG@%$XML_CONFIG%g
+s%@CPP@%$CPP%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..7d8a49f
--- /dev/null
@@ -0,0 +1,33 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(xp.c)
+AM_INIT_AUTOMAKE(XMLDoc, 0.3)
+
+dnl Checks for programs.
+AC_PROG_CC
+
+AC_PATH_PROG(XML_CONFIG,xml2-config,no)
+
+dnl Checks for libraries.
+
+XML_CFLAGS=`$XML_CONFIG --cflags`
+CFLAGS="$CFLAGS $XML_CFLAGS"
+
+dnl Replace `main' with a function in -latex:
+AC_CHECK_LIB(atex, main)
+dnl Replace `main' with a function in -lexslt:
+AC_CHECK_LIB(exslt, main)
+dnl Replace `main' with a function in -lxml2:
+AC_CHECK_LIB(xml2, xmlParseFile)
+dnl Replace `main' with a function in -lxslt:
+AC_CHECK_LIB(xslt, main)
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS(unistd.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+dnl Checks for library functions.
+
+AC_OUTPUT(Makefile)
diff --git a/doc.dtd b/doc.dtd
new file mode 100644 (file)
index 0000000..ab4c49f
--- /dev/null
+++ b/doc.dtd
@@ -0,0 +1,529 @@
+<!ENTITY % inline "#PCDATA | emph | strong | code | remark | sub | sup | label | ref | page | reference | LaTeX">
+
+<!ENTITY % block "para | quote | itemize | enumerate | verbatim | footnote | picture | include | table">
+
+<!ELEMENT doc (book | article | report)>
+<!ATTLIST doc
+    style  CDATA  #IMPLIED
+>
+
+<!ELEMENT book (titlepage?, toc?, (chapter|include)*)>
+<!ELEMENT article (titlepage?, toc?, (section|include)*)>
+<!ELEMENT report (titlepage?, toc?, (chapter|include)*)>
+
+<!ELEMENT titlepage (title, subtitle*, author+, date?, docinfo?, abstract?)>
+
+<!ELEMENT title (%inline;)*>
+<!ELEMENT subtitle (%inline;)*>
+<!ELEMENT author (%inline;)*>
+<!ELEMENT date (%inline;)*>
+<!ELEMENT docinfo (infoitem)+>
+<!ELEMENT infoitem (%inline;)*>
+<!ATTLIST infoitem
+       label    CDATA    #IMPLIED
+>
+
+<!ELEMENT abstract (%inline;)*>
+
+<!ELEMENT toc EMPTY>
+
+<!--  Document structure: chapters and sections -->
+
+<!ELEMENT chapter (heading, (%block;)*, section*)>
+<!ELEMENT section (heading, (%block;)*, subsection*)>
+<!ELEMENT subsection (heading, (%block;)*, subsubsection*)>
+<!ELEMENT subsubsection (heading, (%block;)*, paragraph*)>
+<!ELEMENT paragraph (heading, (%block;)*, subparagraph*)>
+<!ELEMENT subparagraph (heading, (%block;)*)>
+<!ELEMENT heading (%inline;)*>
+
+<!--  Block level content  -->
+
+<!ELEMENT para (%inline;|%block;)*>
+<!ELEMENT quote (%inline;|%block;)*>
+<!ELEMENT itemize (item)*>
+<!ELEMENT enumerate (item)*>
+<!ELEMENT item (%inline;|%block;)*>
+<!ELEMENT verbatim (#PCDATA)>
+<!ELEMENT footnote (%inline;)*>
+
+<!--  Inline content: type styles -->
+
+<!ELEMENT emph (%inline;)*>
+<!ELEMENT strong (%inline;)*>
+<!ELEMENT code (%inline;)*>
+<!ELEMENT remark (%inline;)*>
+<!ELEMENT sub (%inline;)*>
+<!ELEMENT sup (%inline;)*>
+
+
+<!--   Internal and external references -->
+
+<!ELEMENT label EMPTY>
+<!ATTLIST label
+   name   ID     #REQUIRED
+>
+
+<!ELEMENT ref (%inline;)*>
+<!ATTLIST ref
+   to     IDREF  #REQUIRED
+>
+
+<!ELEMENT page (%inline;)*>
+<!ATTLIST page
+   to     IDREF  #REQUIRED
+>
+
+<!ELEMENT reference (%inline;)*>
+<!ATTLIST reference
+      href    CDATA   #REQUIRED
+      xml:link  CDATA   #IMPLIED
+>
+
+<!--  Tables  -->
+
+<!ELEMENT table (thead?,row)+>
+<!ELEMENT row (col)+>
+<!ELEMENT thead (col)+>
+<!ELEMENT col (%inline;|%block;)*>
+
+<!ATTLIST table
+   cpos   CDATA  #REQUIRED
+>
+
+<!ELEMENT picture EMPTY>
+<!ATTLIST picture
+   src    CDATA    #IMPLIED
+   eps    CDATA    #IMPLIED
+   scale  CDATA    "1.0"
+>
+
+<!ELEMENT include EMPTY>
+<!ATTLIST include
+      href    CDATA   #REQUIRED
+>
+
+<!ELEMENT LaTeX EMPTY>
+<!ATTLIST LaTeX
+      command   CDATA   #REQUIRED
+>
+
+
+<!--
+
+   The entities define most of the well known unicode characters
+
+-->
+
+<!ENTITY nbsp   "&#160;"> <!-- no-break space = non-breaking space,
+                                  U+00A0 ISOnum -->
+<!ENTITY iexcl  "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent   "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound  "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen    "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+                                  U+00A6 ISOnum -->
+<!ENTITY sect   "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml    "&#168;"> <!-- diaeresis = spacing diaeresis,
+                                  U+00A8 ISOdia -->
+<!ENTITY copy   "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf   "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo  "&#171;"> <!-- left-pointing double angle quotation mark
+                                  = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not    "&#172;"> <!-- not sign, U+00AC ISOnum -->
+<!ENTITY shy    "&#173;"> <!-- soft hyphen = discretionary hyphen,
+                                  U+00AD ISOnum -->
+<!ENTITY reg    "&#174;"> <!-- registered sign = registered trade mark sign,
+                                  U+00AE ISOnum -->
+<!ENTITY macr   "&#175;"> <!-- macron = spacing macron = overline
+                                  = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg    "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+                                  U+00B1 ISOnum -->
+<!ENTITY sup2   "&#178;"> <!-- superscript two = superscript digit two
+                                  = squared, U+00B2 ISOnum -->
+<!ENTITY sup3   "&#179;"> <!-- superscript three = superscript digit three
+                                  = cubed, U+00B3 ISOnum -->
+<!ENTITY acute  "&#180;"> <!-- acute accent = spacing acute,
+                                  U+00B4 ISOdia -->
+<!ENTITY micro  "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para   "&#182;"> <!-- pilcrow sign = paragraph sign,
+                                  U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+                                  = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil  "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1   "&#185;"> <!-- superscript one = superscript digit one,
+                                  U+00B9 ISOnum -->
+<!ENTITY ordm   "&#186;"> <!-- masculine ordinal indicator,
+                                  U+00BA ISOnum -->
+<!ENTITY raquo  "&#187;"> <!-- right-pointing double angle quotation mark
+                                  = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+                                  = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+                                  = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+                                  = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+                                  = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+                                  = latin capital letter A grave,
+                                  U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+                                  U+00C1 ISOlat1 -->
+<!ENTITY Acirc  "&#194;"> <!-- latin capital letter A with circumflex,
+                                  U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+                                  U+00C3 ISOlat1 -->
+<!ENTITY Auml   "&#196;"> <!-- latin capital letter A with diaeresis,
+                                  U+00C4 ISOlat1 -->
+<!ENTITY Aring  "&#197;"> <!-- latin capital letter A with ring above
+                                  = latin capital letter A ring,
+                                  U+00C5 ISOlat1 -->
+<!ENTITY AElig  "&#198;"> <!-- latin capital letter AE
+                                  = latin capital ligature AE,
+                                  U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+                                  U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+                                  U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+                                  U+00C9 ISOlat1 -->
+<!ENTITY Ecirc  "&#202;"> <!-- latin capital letter E with circumflex,
+                                  U+00CA ISOlat1 -->
+<!ENTITY Euml   "&#203;"> <!-- latin capital letter E with diaeresis,
+                                  U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+                                  U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+                                  U+00CD ISOlat1 -->
+<!ENTITY Icirc  "&#206;"> <!-- latin capital letter I with circumflex,
+                                  U+00CE ISOlat1 -->
+<!ENTITY Iuml   "&#207;"> <!-- latin capital letter I with diaeresis,
+                                  U+00CF ISOlat1 -->
+<!ENTITY ETH    "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+                                  U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+                                  U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+                                  U+00D3 ISOlat1 -->
+<!ENTITY Ocirc  "&#212;"> <!-- latin capital letter O with circumflex,
+                                  U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+                                  U+00D5 ISOlat1 -->
+<!ENTITY Ouml   "&#214;"> <!-- latin capital letter O with diaeresis,
+                                  U+00D6 ISOlat1 -->
+<!ENTITY times  "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+                                  = latin capital letter O slash,
+                                  U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+                                  U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+                                  U+00DA ISOlat1 -->
+<!ENTITY Ucirc  "&#219;"> <!-- latin capital letter U with circumflex,
+                                  U+00DB ISOlat1 -->
+<!ENTITY Uuml   "&#220;"> <!-- latin capital letter U with diaeresis,
+                                  U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+                                  U+00DD ISOlat1 -->
+<!ENTITY THORN  "&#222;"> <!-- latin capital letter THORN,
+                                  U+00DE ISOlat1 -->
+<!ENTITY szlig  "&#223;"> <!-- latin small letter sharp s = ess-zed,
+                                  U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+                                  = latin small letter a grave,
+                                  U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+                                  U+00E1 ISOlat1 -->
+<!ENTITY acirc  "&#226;"> <!-- latin small letter a with circumflex,
+                                  U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+                                  U+00E3 ISOlat1 -->
+<!ENTITY auml   "&#228;"> <!-- latin small letter a with diaeresis,
+                                  U+00E4 ISOlat1 -->
+<!ENTITY aring  "&#229;"> <!-- latin small letter a with ring above
+                                  = latin small letter a ring,
+                                  U+00E5 ISOlat1 -->
+<!ENTITY aelig  "&#230;"> <!-- latin small letter ae
+                                  = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+                                  U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+                                  U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+                                  U+00E9 ISOlat1 -->
+<!ENTITY ecirc  "&#234;"> <!-- latin small letter e with circumflex,
+                                  U+00EA ISOlat1 -->
+<!ENTITY euml   "&#235;"> <!-- latin small letter e with diaeresis,
+                                  U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+                                  U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+                                  U+00ED ISOlat1 -->
+<!ENTITY icirc  "&#238;"> <!-- latin small letter i with circumflex,
+                                  U+00EE ISOlat1 -->
+<!ENTITY iuml   "&#239;"> <!-- latin small letter i with diaeresis,
+                                  U+00EF ISOlat1 -->
+<!ENTITY eth    "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+                                  U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+                                  U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+                                  U+00F3 ISOlat1 -->
+<!ENTITY ocirc  "&#244;"> <!-- latin small letter o with circumflex,
+                                  U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+                                  U+00F5 ISOlat1 -->
+<!ENTITY ouml   "&#246;"> <!-- latin small letter o with diaeresis,
+                                  U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+                                  = latin small letter o slash,
+                                  U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+                                  U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+                                  U+00FA ISOlat1 -->
+<!ENTITY ucirc  "&#251;"> <!-- latin small letter u with circumflex,
+                                  U+00FB ISOlat1 -->
+<!ENTITY uuml   "&#252;"> <!-- latin small letter u with diaeresis,
+                                  U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+                                  U+00FD ISOlat1 -->
+<!ENTITY thorn  "&#254;"> <!-- latin small letter thorn with,
+                                  U+00FE ISOlat1 -->
+<!ENTITY yuml   "&#255;"> <!-- latin small letter y with diaeresis,
+                                  U+00FF ISOlat1 -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig   "&#338;"> <!--  latin capital ligature OE,
+                                    U+0152 ISOlat2 -->
+<!ENTITY oelig   "&#339;"> <!--  latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron  "&#352;"> <!--  latin capital letter S with caron,
+                                    U+0160 ISOlat2 -->
+<!ENTITY scaron  "&#353;"> <!--  latin small letter s with caron,
+                                    U+0161 ISOlat2 -->
+<!ENTITY Yuml    "&#376;"> <!--  latin capital letter Y with diaeresis,
+                                    U+0178 ISOlat2 -->
+
+<!-- Greek -->
+<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta     "&#914;"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma    "&#915;"> <!-- greek capital letter gamma,
+                                    U+0393 ISOgrk3 -->
+<!ENTITY Delta    "&#916;"> <!-- greek capital letter delta,
+                                    U+0394 ISOgrk3 -->
+<!ENTITY Epsilon  "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta     "&#918;"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta      "&#919;"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta    "&#920;"> <!-- greek capital letter theta,
+                                    U+0398 ISOgrk3 -->
+<!ENTITY Iota     "&#921;"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa    "&#922;"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda   "&#923;"> <!-- greek capital letter lambda,
+                                    U+039B ISOgrk3 -->
+<!ENTITY Mu       "&#924;"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu       "&#925;"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi       "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron  "&#927;"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi       "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho      "&#929;"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma    "&#931;"> <!-- greek capital letter sigma,
+                                    U+03A3 ISOgrk3 -->
+<!ENTITY Tau      "&#932;"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon  "&#933;"> <!-- greek capital letter upsilon,
+                                    U+03A5 ISOgrk3 -->
+<!ENTITY Phi      "&#934;"> <!-- greek capital letter phi,
+                                    U+03A6 ISOgrk3 -->
+<!ENTITY Chi      "&#935;"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi      "&#936;"> <!-- greek capital letter psi,
+                                    U+03A8 ISOgrk3 -->
+<!ENTITY Omega    "&#937;"> <!-- greek capital letter omega,
+                                    U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha    "&#945;"> <!-- greek small letter alpha,
+                                    U+03B1 ISOgrk3 -->
+<!ENTITY beta     "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma    "&#947;"> <!-- greek small letter gamma,
+                                    U+03B3 ISOgrk3 -->
+<!ENTITY delta    "&#948;"> <!-- greek small letter delta,
+                                    U+03B4 ISOgrk3 -->
+<!ENTITY epsilon  "&#949;"> <!-- greek small letter epsilon,
+                                    U+03B5 ISOgrk3 -->
+<!ENTITY zeta     "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta      "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta    "&#952;"> <!-- greek small letter theta,
+                                    U+03B8 ISOgrk3 -->
+<!ENTITY iota     "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa    "&#954;"> <!-- greek small letter kappa,
+                                    U+03BA ISOgrk3 -->
+<!ENTITY lambda   "&#955;"> <!-- greek small letter lambda,
+                                    U+03BB ISOgrk3 -->
+<!ENTITY mu       "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu       "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi       "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron  "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi       "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho      "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf   "&#962;"> <!-- greek small letter final sigma,
+                                    U+03C2 ISOgrk3 -->
+<!ENTITY sigma    "&#963;"> <!-- greek small letter sigma,
+                                    U+03C3 ISOgrk3 -->
+<!ENTITY tau      "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon  "&#965;"> <!-- greek small letter upsilon,
+                                    U+03C5 ISOgrk3 -->
+<!ENTITY phi      "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi      "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi      "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega    "&#969;"> <!-- greek small letter omega,
+                                    U+03C9 ISOgrk3 -->
+
+<!--  special symbols -->
+
+<!ENTITY dagger  "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger  "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+
+<!-- General Punctuation -->
+<!ENTITY bull     "&#8226;"> <!-- bullet = black small circle,
+                                     U+2022 ISOpub  -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip   "&#8230;"> <!-- horizontal ellipsis = three dot leader,
+                                     U+2026 ISOpub  -->
+<!ENTITY prime    "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime    "&#8243;"> <!-- double prime = seconds = inches,
+                                     U+2033 ISOtech -->
+<!ENTITY oline    "&#8254;"> <!-- overline = spacing overscore,
+                                     U+203E NEW -->
+
+<!ENTITY euro   "&#8364;"> <!--  euro sign, U+20AC NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp   "&#8472;"> <!-- script capital P = power set
+                                     = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image    "&#8465;"> <!-- blackletter capital I = imaginary part,
+                                     U+2111 ISOamso -->
+<!ENTITY real     "&#8476;"> <!-- blackletter capital R = real part symbol,
+                                     U+211C ISOamso -->
+<!ENTITY trade    "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym  "&#8501;"> <!-- alef symbol = first transfinite cardinal,
+                                     U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+     U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr     "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr     "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr     "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr     "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr     "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr    "&#8629;"> <!-- downwards arrow with corner leftwards
+                                     = carriage return, U+21B5 NEW -->
+<!ENTITY lArr     "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+    but also does not have any other character for that function. So ? lArr can
+    be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr     "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr     "&#8658;"> <!-- rightwards double arrow,
+                                     U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have 
+     another character with this function so ?
+     rArr can be used for 'implies' as ISOtech suggests -->
+<!ENTITY dArr     "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr     "&#8660;"> <!-- left right double arrow,
+                                     U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall   "&#8704;"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part     "&#8706;"> <!-- partial differential, U+2202 ISOtech  -->
+<!ENTITY exist    "&#8707;"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty    "&#8709;"> <!-- empty set = null set = diameter,
+                                     U+2205 ISOamso -->
+<!ENTITY nabla    "&#8711;"> <!-- nabla = backward difference,
+                                     U+2207 ISOtech -->
+<!ENTITY isin     "&#8712;"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin    "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni       "&#8715;"> <!-- contains as member, U+220B ISOtech -->
+<!-- should there be a more memorable name than 'ni'? -->
+<!ENTITY prod     "&#8719;"> <!-- n-ary product = product sign,
+                                     U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+     the same glyph might be used for both -->
+<!ENTITY sum      "&#8721;"> <!-- n-ary sumation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+     though the same glyph might be used for both -->
+<!ENTITY minus    "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast   "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic    "&#8730;"> <!-- square root = radical sign,
+                                     U+221A ISOtech -->
+<!ENTITY prop     "&#8733;"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin    "&#8734;"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang      "&#8736;"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and      "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or       "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap      "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup      "&#8746;"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int      "&#8747;"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4   "&#8756;"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim      "&#8764;"> <!-- tilde operator = varies with = similar to,
+                                     U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+     although the same glyph might be used to represent both  -->
+<!ENTITY cong     "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp    "&#8776;"> <!-- almost equal to = asymptotic to,
+                                     U+2248 ISOamsr -->
+<!ENTITY ne       "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv    "&#8801;"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le       "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge       "&#8805;"> <!-- greater-than or equal to,
+                                     U+2265 ISOtech -->
+<!ENTITY sub      "&#8834;"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup      "&#8835;"> <!-- superset of, U+2283 ISOtech -->
+<!-- note that nsup, 'not a superset of, U+2283' is not covered by the Symbol 
+     font encoding and is not included. Should it be, for symmetry?
+     It is in ISOamsn  --> 
+<!ENTITY nsub     "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube     "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe     "&#8839;"> <!-- superset of or equal to,
+                                     U+2287 ISOtech -->
+<!ENTITY oplus    "&#8853;"> <!-- circled plus = direct sum,
+                                     U+2295 ISOamsb -->
+<!ENTITY otimes   "&#8855;"> <!-- circled times = vector product,
+                                     U+2297 ISOamsb -->
+<!ENTITY perp     "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
+                                     U+22A5 ISOtech -->
+<!ENTITY sdot     "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil    "&#8968;"> <!-- left ceiling = apl upstile,
+                                     U+2308 ISOamsc  -->
+<!ENTITY rceil    "&#8969;"> <!-- right ceiling, U+2309 ISOamsc  -->
+<!ENTITY lfloor   "&#8970;"> <!-- left floor = apl downstile,
+                                     U+230A ISOamsc  -->
+<!ENTITY rfloor   "&#8971;"> <!-- right floor, U+230B ISOamsc  -->
+<!ENTITY lang     "&#9001;"> <!-- left-pointing angle bracket = bra,
+                                     U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than' 
+     or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang     "&#9002;"> <!-- right-pointing angle bracket = ket,
+                                     U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than' 
+     or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz      "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades   "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs    "&#9827;"> <!-- black club suit = shamrock,
+                                     U+2663 ISOpub -->
+<!ENTITY hearts   "&#9829;"> <!-- black heart suit = valentine,
+                                     U+2665 ISOpub -->
+<!ENTITY diams    "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
diff --git a/doc/block.xml b/doc/block.xml
new file mode 100644 (file)
index 0000000..36a593e
--- /dev/null
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+<!DOCTYPE chapter SYSTEM "../doc.dtd">
+<?xml-stylesheet type="text/xsl" href="../html.xsl"?>
+
+<!--
+      XML documentation system
+      Original author :  Arjen Baart - arjen@andromeda.nl
+      Version         : $Revision: 1.1 $
+-->
+
+<chapter>
+<heading><label name='block'/>Block-level content</heading>
+<para>
+The actual content of your document is organized in <emph>block-level</emph>
+elements, such a paragraphs, lists or tables.
+</para>
+
+<section>
+<heading>Paragraphs</heading>
+<para>
+The most basic type of content block is an ordinary paragraph, contained
+in a <strong>para</strong> element.
+To make several separate paragraphs, you must enclose each paragraph
+in a <strong>para</strong> open tag and a <strong>para</strong> close tag.
+Here is an example of two small paragraphs:
+<verbatim>
+
+&lt;para&gt;
+  This is an example of a small paragraph.
+&lt;/para&gt;
+&lt;para&gt;
+  And here is another paragraph.
+&lt;/para&gt;
+
+</verbatim>
+
+</para>
+
+<para>
+A second type of paragraph is a <strong>quote</strong>.
+You can make a quote by using the <code>quote</code> element:
+
+<verbatim>
+   &lt;quote&gt;
+   This is an example of a quote.
+   The text within a quoted paragraph is usually slightly indented on both
+   the left and the right margin.
+   &lt;/quote&gt;
+</verbatim>
+
+Which results in:
+
+<quote>
+This is an example of a quote.
+The text within a quoted paragraph is usually slightly indented on both
+the left and the right margin.
+</quote>
+</para>
+
+<para>
+A special kind of paragraph is the <strong>verbatim</strong> environment.
+Just as in LaTeX, this is used to include literal text output with spaces,
+indentation and line breaks preserved.
+The practical use for the <strong>verbatim</strong> element is to
+include coding examples, such as:
+
+<verbatim>
+   &lt;verbatim&gt;
+      struct complex
+      {
+         double   real;
+         double   imaginary;
+      };
+   &lt;/verbatim&gt;
+</verbatim>
+
+Which comes out like this:
+
+<verbatim>
+   struct complex
+   {
+      double   real;
+      double   imaginary;
+   };
+</verbatim>
+</para>
+</section>
+
+<section>
+<heading>Footnotes</heading>
+<para>
+Footnotes are created with the <strong>footnote</strong> element:
+<footnote>This is an example of a footnote</footnote>
+
+<verbatim>
+&lt;footnote&gt;This is an example of a footnote&lt;/footnote&gt;
+</verbatim>
+
+Within a footnote, you can use <emph>inline</emph> content <footnote>described in the
+next chapter</footnote> to format the type
+styles of the text in the footnote. 
+It is not possible to use the block content described in this chapter within
+a footnote.
+</para>
+
+<para>
+Footnotes appear at the bottom of the page, with a small number in the
+running text referring to that footnote.
+</para>
+
+</section>
+
+<section>
+<heading>Lists</heading>
+<para>
+Two types of lists<footnote>A description list is not implemented yet</footnote> are supported:
+<itemize>
+<item><code>itemize</code> for bulleted lists such as this one.</item>
+<item><code>enumerate</code> for numbered lists.</item>
+</itemize>
+
+Each item in such a list must be in an <strong>item</strong> element.
+In fact, an <strong>item</strong> is the only element allowed in an
+<strong>itemize</strong> or <strong>enumerate</strong> element.
+You should not put ordinary text or any other element in a list without
+enclosing them in <code>&lt;item&gt;</code> and <code>&lt;/item&gt;</code>.
+Here is an example of a numbered list:
+
+<verbatim>
+
+&lt;enumerate&gt;
+   &lt;item&gt;First you need an enumerate or itemize tag.&lt;/item&gt;
+   &lt;item&gt;Second, include one or more item elements.&lt;/item&gt;
+   &lt;item&gt;Finally, put the content inside the items.&lt;/item&gt;
+&lt;/enumerate&gt;
+
+</verbatim>
+
+And this is what the list turns into:
+
+<enumerate>
+   <item>First you need an enumerate or itemize tag.</item>
+   <item>Second, include one or more item elements.</item>
+   <item>Finally, put the content inside the items.</item>
+</enumerate>
+
+</para>
+</section>
+
+<section>
+<heading>Including graphics</heading>
+<para>
+The empty element <strong>picture</strong> is used to include
+graphics in your document, like this:
+
+<verbatim>
+   &lt;picture src='diagram.png' eps='diagram' scale='0.5'/&gt;
+</verbatim>
+
+The two attributes are used in either HTML or LaTeX.
+</para>
+</section>
+
+<section>
+<heading>Tables</heading>
+<para>
+Creating tables in XMLDoc is much like creating tables in HTML.
+First, there is the <strong>table</strong> element.
+The <strong>table</strong> element may contain any number of
+<strong>row</strong> elements, which may in turn contain any number
+of <strong>col</strong> elements.
+The <strong>col</strong> elements hold the actual content of
+the table, which must be inline content (see next chapter).
+To use the tables in LaTeX, you must supply a <strong>cpos</strong>
+attribute in the <strong>table</strong> tag.
+<para>
+<emph>...tune in next week for a table example...</emph>
+</para>
+</para>
+</section>
+
+</chapter>
+
diff --git a/doc/guide.xml b/doc/guide.xml
new file mode 100644 (file)
index 0000000..8a5659b
--- /dev/null
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<!DOCTYPE doc SYSTEM "../doc.dtd">
+<?xml-stylesheet type="text/xsl" href="../html.xsl"?>
+<doc style="main.css">
+
+<!--
+      XML documentation system
+      Original author :  Arjen Baart - arjen@andromeda.nl
+      Version         : $Revision: 1.1 $
+
+      This document is prepared for XMLDoc. Transform to HTML,
+      LaTeX, Postscript or plain text with XMLDoc utilities and
+      XSLT sheets from http://www.andromeda.nl/projects/xmldoc/
+-->
+
+<report>
+<titlepage>
+   <title>XML documentation system</title>
+   <subtitle>Document preparation and conversion in XML</subtitle>
+
+   <author>Arjen Baart <code>&lt;arjen@andromeda.nl&gt;</code></author>
+   <date>Aug 28, 2002</date>
+   <docinfo>
+      <infoitem label="Version">0.4</infoitem>
+      <infoitem label="Organization">Andromeda Technology &amp; Automation</infoitem>
+   </docinfo>
+   <abstract>
+   This guide explains the concepts of <strong>XMLDoc</strong> and discusses
+   the features available to prepare documentation.
+   <strong>XMLDoc</strong> uses XSLT transformations to turn the XML source
+   document into a number of other formats.
+   </abstract>
+</titlepage>
+
+<toc/>
+
+<include href="intro.xml"/>
+
+<include href="overall.xml"/>
+
+<include href="block.xml"/>
+
+<include href="inline.xml"/>
+
+<chapter>
+<heading>References</heading>
+<para>
+Creating hypertext references is as simple as it is in HTML.
+The element used for references is <strong>reference</strong>, which
+adheres to the <emph>XLink</emph> syntax.
+We need to add one more attribute to the usual <strong>href</strong>
+attribute.
+For example:
+<verbatim>
+&lt;reference xml:link="simple"
+    href="http://www.andromeda.nl/project/xmldoc/xmldoc.html"&gt;
+The XMLDoc website
+&lt;/reference&gt;
+provide the installation instructions.
+</verbatim>
+<reference xml:link="simple"
+    href="http://www.andromeda.nl/projects/xmldoc/xmldoc.html">
+The XMLDoc website
+</reference>
+provides the installation instructions.
+</para>
+
+<para>
+Internal references with label, ref and page (page=LaTeX only).
+</para>
+</chapter>
+
+<include href="multifiles.xml"/>
+
+<chapter>
+
+<heading>Things to do</heading>
+<itemize>
+<item>Internal cross-referencing</item>
+<item>Newline and newpage</item>
+<item>Center environment</item>
+<item>A utility to create XMLDoc tables from raw ASCII data</item>
+<item>Index generation</item>
+<item>Bibliographics</item>
+<item>Man pages</item>
+</itemize>
+</chapter>
+</report>
+</doc>
diff --git a/doc/inline.xml b/doc/inline.xml
new file mode 100644 (file)
index 0000000..80acf69
--- /dev/null
@@ -0,0 +1,773 @@
+<?xml version="1.0"?>
+<!DOCTYPE chapter SYSTEM "../doc.dtd">
+<?xml-stylesheet type="text/xsl" href="../html.xsl"?>
+
+<!--
+      XML documentation system
+      Original author :  Arjen Baart - arjen@andromeda.nl
+      Version         : $Revision: 1.1 $
+-->
+
+<chapter>
+<heading>Type styles and special characters</heading>
+<para>
+There are six type styles:
+<enumerate>
+   <item><code>emph</code> : <emph>Emphasized text</emph></item>
+   <item><code>strong</code> : <strong>Usually bold face</strong></item>
+   <item><code>code</code> : <code>For literal coding names</code></item>
+   <item><code>remark</code> : <remark>For highlighted remarks</remark></item>
+   <item><code>sub</code> : For <sub>subscript</sub> text.</item>
+   <item><code>sup</code> : For <sup>superscript</sup> text.</item>
+</enumerate>
+</para>
+
+<section>
+<heading>Special characters</heading>
+
+<para>
+LaTeX special characters: #, $, %, &amp;, ~, _, ^, \, { and }
+</para>
+
+<para>
+You can include special characters, such as accented letters, Greek letter and
+mathematical symbols with the <code>&amp;<emph>symbol</emph>;</code> syntax,
+just as in HTML.
+The special characters defined in the XMLDoc's DTD are listed in the following tables.
+</para>
+
+
+<subsection>
+<heading>Special characters from the Latin-1 set</heading>
+
+<table cpos='lcl'>
+<thead>
+  <col>code</col><col>symbol</col>
+  <col>Description</col>
+</thead>
+<row>
+  <col>iexcl</col><col>&iexcl;</col><col>Inverted exclamation mark</col>
+</row>
+<row>
+  <col>cent</col><col>&cent;</col><col>Cent sign</col>
+</row>
+<row>
+  <col>pound</col><col>&pound;</col><col>Pound sign</col>
+</row>
+<row>
+  <col>curren</col><col>&curren;</col><col>Currency sign</col>
+</row>
+<row>
+  <col>yen</col><col>&yen;</col><col>Yen sign</col>
+</row>
+<row>
+  <col>brvbar</col><col>&brvbar;</col><col>Broken vertical bar</col>
+</row>
+<row>
+  <col>sect</col><col>&sect;</col><col>Section sign</col>
+</row>
+<row>
+  <col>uml</col><col>&uml;</col><col>Spacing diaeresis</col>
+</row>
+<row>
+  <col>copy</col><col>&copy;</col><col>Copyright sign</col>
+</row>
+<row>
+  <col>ordf</col><col>&ordf;</col><col>Feminine oridinal indicator</col>
+</row>
+<row>
+  <col>laquo</col><col>&laquo;</col><col>Left pointing double angle quotation</col>
+</row>
+<row>
+  <col>not</col><col>&not;</col><col>Not sign</col>
+</row>
+<row>
+  <col>shy</col><col>&shy;</col><col>Soft hyphen</col>
+</row>
+<row>
+  <col>reg</col><col>&reg;</col><col>Registered sign</col>
+</row>
+<row>
+  <col>macr</col><col>&macr;</col><col>Spacing macron</col>
+</row>
+<row>
+  <col>deg</col><col>&deg;</col><col>Degree sign</col>
+</row>
+<row>
+  <col>plusmn</col><col>&plusmn;</col><col>Plus-minus sign</col>
+</row>
+<row>
+  <col>sup2</col><col>&sup2;</col><col>Superscript digit 2</col>
+</row>
+<row>
+  <col>sup3</col><col>&sup3;</col><col>Superscript digit 3</col>
+</row>
+<row>
+  <col>acute</col><col>&acute;</col><col>Spacing acute accent</col>
+</row>
+<row>
+  <col>micro</col><col>&micro;</col><col>Micro sign</col>
+</row>
+<row>
+  <col>para</col><col>&para;</col><col>Paragraph sign</col>
+</row>
+<row>
+  <col>middot</col><col>&middot;</col><col>Middot sign</col>
+</row>
+<row>
+  <col>cedil</col><col>&cedil;</col><col>Spacing cedilla</col>
+</row>
+<row>
+  <col>sup1</col><col>&sup1;</col><col>Superscript digit 1</col>
+</row>
+<row>
+  <col>ordm</col><col>&ordm;</col><col>Masculine ordinal indicator</col>
+</row>
+<row>
+  <col>raquo</col><col>&raquo;</col><col>Right pointing double angle quotation</col>
+</row>
+<row>
+  <col>frac14</col><col>&frac14;</col><col>Vulgar fraction one quarter</col>
+</row>
+<row>
+  <col>frac12</col><col>&frac12;</col><col>Vulgar fraction one half</col>
+</row>
+<row>
+  <col>frac34</col><col>&frac34;</col><col>Vulgar fraction three quarters</col>
+</row>
+<row>
+  <col>iquest</col><col>&iquest;</col><col>Inverted question mark</col>
+</row>
+<row>
+  <col>AElig</col><col>&AElig;</col><col>Capital ligature AE</col>
+</row>
+<row>
+  <col>aelig</col><col>&aelig;</col><col>Small ligature ae</col>
+</row>
+<row>
+  <col>OElig</col><col>&OElig;</col><col>Capital ligature OE</col>
+</row>
+<row>
+  <col>oelig</col><col>&oelig;</col><col>Small ligature oe</col>
+</row>
+<row>
+  <col>szlig</col><col>&szlig;</col><col>Small letter sharp s</col>
+</row>
+<row>
+  <col>ETH</col><col>&ETH;</col><col>Capital letter ETH</col>
+</row>
+<row>
+  <col>THORN</col><col>&THORN;</col><col>Capital letter THORN</col>
+</row>
+<row>
+  <col>eth</col><col>&eth;</col><col>Small letter eth</col>
+</row>
+<row>
+  <col>thorn</col><col>&thorn;</col><col>Small letter thorn</col>
+</row>
+<row>
+  <col>times</col><col>&times;</col><col>Multiplication sign</col>
+</row>
+<row>
+  <col>divide</col><col>&divide;</col><col>Division sign</col>
+</row>
+</table>
+</subsection>
+
+<subsection>
+<heading>Accented letters</heading>
+
+<table cpos='lcl'>
+<row>
+  <col><strong>code</strong></col><col><strong>symbol</strong></col>
+  <col><strong>Description</strong></col>
+</row>
+<row>
+  <col>Agrave</col><col>&Agrave;</col><col>Capital letter A with grave</col>
+</row>
+<row>
+  <col>Aacute</col><col>&Aacute;</col><col>Capital letter A with acute</col>
+</row>
+<row>
+  <col>Acirc</col><col>&Acirc;</col><col>Capital letter A with circumflex</col>
+</row>
+<row>
+  <col>Atilde</col><col>&Atilde;</col><col>Capital letter A with tilde</col>
+</row>
+<row>
+  <col>Auml</col><col>&Auml;</col><col>Capital letter A with diaeresis</col>
+</row>
+<row>
+  <col>Aring</col><col>&Aring;</col><col>Capital letter A with ring above</col>
+</row>
+<row>
+  <col>Ccedil</col><col>&Ccedil;</col><col>Capital letter C with cedilla</col>
+</row>
+<row>
+  <col>Egrave</col><col>&Egrave;</col><col>Capital letter E with grave</col>
+</row>
+<row>
+  <col>Eacute</col><col>&Eacute;</col><col>Capital letter E with acute</col>
+</row>
+<row>
+  <col>Ecirc</col><col>&Ecirc;</col><col>Capital letter E with circumflex</col>
+</row>
+<row>
+  <col>Euml</col><col>&Euml;</col><col>Capital letter E with diaeresis</col>
+</row>
+<row>
+  <col>Igrave</col><col>&Igrave;</col><col>Capital letter I with grave</col>
+</row>
+<row>
+  <col>Iacute</col><col>&Iacute;</col><col>Capital letter I with acute</col>
+</row>
+<row>
+  <col>Icirc</col><col>&Icirc;</col><col>Capital letter I with circumflex</col>
+</row>
+<row>
+  <col>Iuml</col><col>&Iuml;</col><col>Capital letter I with diaeresis</col>
+</row>
+<row>
+  <col>Ntilde</col><col>&Ntilde;</col><col>Capital letter N with tilde</col>
+</row>
+<row>
+  <col>Ograve</col><col>&Ograve;</col><col>Capital letter O with grave</col>
+</row>
+<row>
+  <col>Oacute</col><col>&Oacute;</col><col>Capital letter O with acute</col>
+</row>
+<row>
+  <col>Ocirc</col><col>&Ocirc;</col><col>Capital letter O with circumflex</col>
+</row>
+<row>
+  <col>Otilde</col><col>&Otilde;</col><col>Capital letter O with tilde</col>
+</row>
+<row>
+  <col>Ouml</col><col>&Ouml;</col><col>Capital letter O with diaeresis</col>
+</row>
+<row>
+  <col>Oslash</col><col>&Oslash;</col><col>Capital letter O with stroke</col>
+</row>
+<row>
+  <col>Ugrave</col><col>&Ugrave;</col><col>Capital letter U with grave</col>
+</row>
+<row>
+  <col>Uacute</col><col>&Uacute;</col><col>Capital letter U with acute</col>
+</row>
+<row>
+  <col>Ucirc</col><col>&Ucirc;</col><col>Capital letter U with circumflex</col>
+</row>
+<row>
+  <col>Uuml</col><col>&Uuml;</col><col>Capital letter U with diaeresis</col>
+</row>
+<row>
+  <col>Yacute</col><col>&Yacute;</col><col>Capital letter Y with acute</col>
+</row>
+<row>
+  <col>Yuml</col><col>&Yuml;</col><col>Capital letter Y with diaeresis</col>
+</row>
+<row>
+  <col>agrave</col><col>&agrave;</col><col>Small letter a with grave</col>
+</row>
+<row>
+  <col>aacute</col><col>&aacute;</col><col>Small letter a with acute</col>
+</row>
+<row>
+  <col>acirc</col><col>&acirc;</col><col>Small letter a with circumflex</col>
+</row>
+<row>
+  <col>atilde</col><col>&atilde;</col><col>Small letter a with tilde</col>
+</row>
+<row>
+  <col>auml</col><col>&auml;</col><col>Small letter a with diaeresis</col>
+</row>
+<row>
+  <col>aring</col><col>&aring;</col><col>Small letter a with ring above</col>
+</row>
+<row>
+  <col>ccedil</col><col>&ccedil;</col><col>Small letter c with cedilla</col>
+</row>
+<row>
+  <col>egrave</col><col>&egrave;</col><col>Small letter e with grave</col>
+</row>
+<row>
+  <col>eacute</col><col>&eacute;</col><col>Small letter e with acute</col>
+</row>
+<row>
+  <col>ecirc</col><col>&ecirc;</col><col>Small letter e with circumflex</col>
+</row>
+<row>
+  <col>euml</col><col>&euml;</col><col>Small letter e with diaeresis</col>
+</row>
+<row>
+  <col>igrave</col><col>&igrave;</col><col>Small letter i with grave</col>
+</row>
+<row>
+  <col>iacute</col><col>&iacute;</col><col>Small letter i with acute</col>
+</row>
+<row>
+  <col>icirc</col><col>&icirc;</col><col>Small letter i with circumflex</col>
+</row>
+<row>
+  <col>iuml</col><col>&iuml;</col><col>Small letter i with diaeresis</col>
+</row>
+</table>
+
+<table cpos='lcl'>
+<row>
+  <col><strong>code</strong></col><col><strong>symbol</strong></col>
+  <col><strong>Description</strong></col>
+</row>
+<row>
+  <col>ntilde</col><col>&ntilde;</col><col>Small letter n with tilde</col>
+</row>
+<row>
+  <col>ograve</col><col>&ograve;</col><col>Small letter o with grave</col>
+</row>
+<row>
+  <col>oacute</col><col>&oacute;</col><col>Small letter o with acute</col>
+</row>
+<row>
+  <col>ocirc</col><col>&ocirc;</col><col>Small letter o with circumflex</col>
+</row>
+<row>
+  <col>otilde</col><col>&otilde;</col><col>Small letter o with tilde</col>
+</row>
+<row>
+  <col>ouml</col><col>&ouml;</col><col>Small letter o with diaeresis</col>
+</row>
+<row>
+  <col>oslash</col><col>&oslash;</col><col>Capital letter o with stroke</col>
+</row>
+<row>
+  <col>ugrave</col><col>&ugrave;</col><col>Small letter u with grave</col>
+</row>
+<row>
+  <col>uacute</col><col>&uacute;</col><col>Small letter u with acute</col>
+</row>
+<row>
+  <col>ucirc</col><col>&ucirc;</col><col>Small letter u with circumflex</col>
+</row>
+<row>
+  <col>uuml</col><col>&uuml;</col><col>Small letter u with diaeresis</col>
+</row>
+<row>
+  <col>yacute</col><col>&yacute;</col><col>Small letter y with acute</col>
+</row>
+<row>
+  <col>yuml</col><col>&yuml;</col><col>Small letter y with diaeresis</col>
+</row>
+<row>
+  <col>Scaron</col><col>&Scaron;</col><col>Capital letter S with caron</col>
+</row>
+<row>
+  <col>scaron</col><col>&scaron;</col><col>Small letter s with caron</col>
+</row>
+</table>
+</subsection>
+
+<subsection>
+<heading>Greek Letters</heading>
+
+<table cpos='lcl'>
+<row>
+  <col><strong>code</strong></col><col><strong>symbol</strong></col>
+  <col><strong>Description</strong></col>
+</row>
+<row>
+  <col>Alpha</col><col>&Alpha;</col><col>Greek capital letter Alpha</col>
+</row>
+<row>
+  <col>Beta</col><col>&Beta;</col><col>Greek capital letter Beta</col>
+</row>
+<row>
+  <col>Gamma</col><col>&Gamma;</col><col>Greek capital letter Gamma</col>
+</row>
+<row>
+  <col>Delta</col><col>&Delta;</col><col>Greek capital letter Delta</col>
+</row>
+<row>
+  <col>Epsilon</col><col>&Epsilon;</col><col>Greek capital letter Epsilon</col>
+</row>
+<row>
+  <col>Zeta</col><col>&Zeta;</col><col>Greek capital letter Zeta</col>
+</row>
+<row>
+  <col>Eta</col><col>&Eta;</col><col>Greek capital letter Eta</col>
+</row>
+<row>
+  <col>Theta</col><col>&Theta;</col><col>Greek capital letter Theta</col>
+</row>
+<row>
+  <col>Iota</col><col>&Iota;</col><col>Greek capital letter Iota</col>
+</row>
+<row>
+  <col>Kappa</col><col>&Kappa;</col><col>Greek capital letter Kappa</col>
+</row>
+<row>
+  <col>Lambda</col><col>&Lambda;</col><col>Greek capital letter Lambda</col>
+</row>
+<row>
+  <col>Mu</col><col>&Mu;</col><col>Greek capital letter Mu</col>
+</row>
+<row>
+  <col>Nu</col><col>&Nu;</col><col>Greek capital letter Nu</col>
+</row>
+<row>
+  <col>Xi</col><col>&Xi;</col><col>Greek capital letter Xi</col>
+</row>
+<row>
+  <col>Omicron</col><col>&Omicron;</col><col>Greek capital letter Omicron</col>
+</row>
+<row>
+  <col>Pi</col><col>&Pi;</col><col>Greek capital letter Pi</col>
+</row>
+<row>
+  <col>Rho</col><col>&Rho;</col><col>Greek capital letter Rho</col>
+</row>
+<row>
+  <col>Sigma</col><col>&Sigma;</col><col>Greek capital letter Sigma</col>
+</row>
+<row>
+  <col>Tau</col><col>&Tau;</col><col>Greek capital letter Tau</col>
+</row>
+<row>
+  <col>Upsilon</col><col>&Upsilon;</col><col>Greek capital letter Upsilon</col>
+</row>
+<row>
+  <col>Phi</col><col>&Phi;</col><col>Greek capital letter Phi</col>
+</row>
+<row>
+  <col>Chi</col><col>&Chi;</col><col>Greek capital letter Chi</col>
+</row>
+<row>
+  <col>Psi</col><col>&Psi;</col><col>Greek capital letter Psi</col>
+</row>
+<row>
+  <col>Omega</col><col>&Omega;</col><col>Greek capital letter Omega</col>
+</row>
+<row>
+  <col>alpha</col><col>&alpha;</col><col>Greek small letter alpha</col>
+</row>
+<row>
+  <col>beta</col><col>&beta;</col><col>Greek small letter beta</col>
+</row>
+<row>
+  <col>gamma</col><col>&gamma;</col><col>Greek small letter gamma</col>
+</row>
+<row>
+  <col>delta</col><col>&delta;</col><col>Greek small letter delta</col>
+</row>
+<row>
+  <col>epsilon</col><col>&epsilon;</col><col>Greek small letter epsilon</col>
+</row>
+<row>
+  <col>zeta</col><col>&zeta;</col><col>Greek small letter zeta</col>
+</row>
+<row>
+  <col>eta</col><col>&eta;</col><col>Greek small letter eta</col>
+</row>
+<row>
+  <col>theta</col><col>&theta;</col><col>Greek small letter theta</col>
+</row>
+<row>
+  <col>iota</col><col>&iota;</col><col>Greek small letter iota</col>
+</row>
+<row>
+  <col>kappa</col><col>&kappa;</col><col>Greek small letter kappa</col>
+</row>
+<row>
+  <col>lambda</col><col>&lambda;</col><col>Greek small letter lambda</col>
+</row>
+<row>
+  <col>mu</col><col>&mu;</col><col>Greek small letter mu</col>
+</row>
+<row>
+  <col>nu</col><col>&nu;</col><col>Greek small letter nu</col>
+</row>
+<row>
+  <col>xi</col><col>&xi;</col><col>Greek small letter xi</col>
+</row>
+<row>
+  <col>omicron</col><col>&omicron;</col><col>Greek small letter omicron</col>
+</row>
+<row>
+  <col>pi</col><col>&pi;</col><col>Greek small letter pi</col>
+</row>
+<row>
+  <col>rho</col><col>&rho;</col><col>Greek small letter rho</col>
+</row>
+<row>
+  <col>sigmaf</col><col>&sigmaf;</col><col>Greek small letter final sigma</col>
+</row>
+<row>
+  <col>sigma</col><col>&sigma;</col><col>Greek small letter sigma</col>
+</row>
+<row>
+  <col>tau</col><col>&tau;</col><col>Greek small letter tau</col>
+</row>
+<row>
+  <col>upsilon</col><col>&upsilon;</col><col>Greek small letter upsilon</col>
+</row>
+<row>
+  <col>phi</col><col>&phi;</col><col>Greek small letter phi</col>
+</row>
+<row>
+  <col>chi</col><col>&chi;</col><col>Greek small letter chi</col>
+</row>
+<row>
+  <col>psi</col><col>&psi;</col><col>Greek small letter psi</col>
+</row>
+<row>
+  <col>omega</col><col>&omega;</col><col>Greek small letter omega</col>
+</row>
+</table>
+</subsection>
+
+<subsection>
+<heading>Special Symbols</heading>
+
+<table cpos='lcl'>
+<row>
+  <col><strong>code</strong></col><col><strong>symbol</strong></col>
+  <col><strong>Description</strong></col>
+</row>
+<row>
+  <col>euro</col><col>&euro;</col><col>Euro symbol</col>
+</row>
+<row>
+  <col>dagger</col><col>&dagger;</col><col>Dagger</col>
+</row>
+<row>
+  <col>Dagger</col><col>&Dagger;</col><col>Double dagger</col>
+</row>
+<row>
+  <col>bull</col><col>&bull;</col><col>Bullet</col>
+</row>
+<row>
+  <col>hellip</col><col>&hellip;</col><col>Horizontal ellipsis</col>
+</row>
+<row>
+  <col>prime</col><col>&prime;</col><col>Prime</col>
+</row>
+<row>
+  <col>Prime</col><col>&Prime;</col><col>Double prime</col>
+</row>
+<row>
+  <col>oline</col><col>&oline;</col><col>Overline</col>
+</row>
+<row>
+  <col>weierp</col><col>&weierp;</col><col>Power set</col>
+</row>
+<row>
+  <col>image</col><col>&image;</col><col>Imaginary part</col>
+</row>
+<row>
+  <col>real</col><col>&real;</col><col>Real part</col>
+</row>
+<row>
+  <col>trade</col><col>&trade;</col><col>Trade mark sign</col>
+</row>
+<row>
+  <col>alefsym</col><col>&alefsym;</col><col>First transfinite cardinal</col>
+</row>
+<row>
+  <col>larr</col><col>&larr;</col><col>Leftwards arrow</col>
+</row>
+<row>
+  <col>uarr</col><col>&uarr;</col><col>Upwards arrow</col>
+</row>
+<row>
+  <col>rarr</col><col>&rarr;</col><col>Rightwards arrow</col>
+</row>
+<row>
+  <col>darr</col><col>&darr;</col><col>Downwards arrow</col>
+</row>
+<row>
+  <col>harr</col><col>&harr;</col><col>Left right arrow</col>
+</row>
+<row>
+  <col>crarr</col><col>&crarr;</col><col>Carriage return</col>
+</row>
+<row>
+  <col>lArr</col><col>&lArr;</col><col>Leftwards double arrow</col>
+</row>
+<row>
+  <col>uArr</col><col>&uArr;</col><col>Upwards double arrow</col>
+</row>
+<row>
+  <col>rArr</col><col>&rArr;</col><col>Rightwards double arrow</col>
+</row>
+<row>
+  <col>dArr</col><col>&dArr;</col><col>Downwards double arrow</col>
+</row>
+<row>
+  <col>hArr</col><col>&hArr;</col><col>Left right double arrow</col>
+</row>
+<row>
+  <col>loz</col><col>&loz;</col><col>Lozenge</col>
+</row>
+<row>
+  <col>spades</col><col>&spades;</col><col>Spade suit</col>
+</row>
+<row>
+  <col>clubs</col><col>&clubs;</col><col>Club suit</col>
+</row>
+<row>
+  <col>hearts</col><col>&hearts;</col><col>Heart suit</col>
+</row>
+<row>
+  <col>diams</col><col>&diams;</col><col>Diamond suit</col>
+</row>
+</table>
+</subsection>
+
+<subsection>
+<heading>Mathematical Symbols</heading>
+
+<table cpos='lcl'>
+<row>
+  <col><strong>code</strong></col><col><strong>symbol</strong></col>
+  <col><strong>Description</strong></col>
+</row>
+<row>
+  <col>forall</col><col>&forall;</col><col>For all</col>
+</row>
+<row>
+  <col>part</col><col>&part;</col><col>Partial differential</col>
+</row>
+<row>
+  <col>exist</col><col>&exist;</col><col>There exists</col>
+</row>
+<row>
+  <col>empty</col><col>&empty;</col><col>Empty set</col>
+</row>
+<row>
+  <col>nabla</col><col>&nabla;</col><col>Nabla, backward difference</col>
+</row>
+<row>
+  <col>isin</col><col>&isin;</col><col>Element of</col>
+</row>
+<row>
+  <col>notin</col><col>&notin;</col><col>Not an element of</col>
+</row>
+<row>
+  <col>ni</col><col>&ni;</col><col>Contains as member</col>
+</row>
+<row>
+  <col>prod</col><col>&prod;</col><col>Product sign</col>
+</row>
+<row>
+  <col>sum</col><col>&sum;</col><col>Summation sign</col>
+</row>
+<row>
+  <col>minus</col><col>&minus;</col><col>Minus sign</col>
+</row>
+<row>
+  <col>lowast</col><col>&lowast;</col><col>Asterisk operator</col>
+</row>
+<row>
+  <col>radic</col><col>&radic;</col><col>Square root</col>
+</row>
+<row>
+  <col>prop</col><col>&prop;</col><col>Proportional to</col>
+</row>
+<row>
+  <col>infin</col><col>&infin;</col><col>Infinity</col>
+</row>
+<row>
+  <col>ang</col><col>&ang;</col><col>Angle</col>
+</row>
+<row>
+  <col>and</col><col>&and;</col><col>Logical AND</col>
+</row>
+<row>
+  <col>or</col><col>&or;</col><col>Logical OR</col>
+</row>
+<row>
+  <col>cap</col><col>&cap;</col><col>Intersection</col>
+</row>
+<row>
+  <col>cup</col><col>&cup;</col><col>Union</col>
+</row>
+<row>
+  <col>int</col><col>&int;</col><col>Integral</col>
+</row>
+<row>
+  <col>there4</col><col>&there4;</col><col>Therefore</col>
+</row>
+<row>
+  <col>sim</col><col>&sim;</col><col>Similar to</col>
+</row>
+<row>
+  <col>cong</col><col>&cong;</col><col>Approximately equal to</col>
+</row>
+<row>
+  <col>asymp</col><col>&asymp;</col><col>Asymptotic to</col>
+</row>
+<row>
+  <col>ne</col><col>&ne;</col><col>Not equal to</col>
+</row>
+<row>
+  <col>equiv</col><col>&equiv;</col><col>Equivalent to</col>
+</row>
+<row>
+  <col>le</col><col>&le;</col><col>Less than or equal to</col>
+</row>
+<row>
+  <col>ge</col><col>&ge;</col><col>Greater than or equal to</col>
+</row>
+<row>
+  <col>sub</col><col>&sub;</col><col>Subset of</col>
+</row>
+<row>
+  <col>sup</col><col>&sup;</col><col>Superset of</col>
+</row>
+<row>
+  <col>nsub</col><col>&nsub;</col><col>Not a subset of</col>
+</row>
+<row>
+  <col>sube</col><col>&sube;</col><col>Subset of or equal to</col>
+</row>
+<row>
+  <col>supe</col><col>&supe;</col><col>Superset of or equal to</col>
+</row>
+<row>
+  <col>oplus</col><col>&oplus;</col><col>Direct sum</col>
+</row>
+<row>
+  <col>otimes</col><col>&otimes;</col><col>Vector product</col>
+</row>
+<row>
+  <col>perp</col><col>&perp;</col><col>Perpendicular to</col>
+</row>
+<row>
+  <col>sdot</col><col>&sdot;</col><col>Dot operator</col>
+</row>
+<row>
+  <col>lceil</col><col>&lceil;</col><col>Left ceiling</col>
+</row>
+<row>
+  <col>rceil</col><col>&rceil;</col><col>Right ceiling</col>
+</row>
+<row>
+  <col>lfloor</col><col>&lfloor;</col><col>Left floor</col>
+</row>
+<row>
+  <col>rfloor</col><col>&rfloor;</col><col>Right floor</col>
+</row>
+<row>
+  <col>lang</col><col>&lang;</col><col>Left pointing angle bracket</col>
+</row>
+<row>
+  <col>rang</col><col>&rang;</col><col>Right pointing angle bracket</col>
+</row>
+</table>
+
+
+<para>
+Note that some symbols are not available in LaTeX.
+</para>
+</subsection>
+</section>
+</chapter>
diff --git a/doc/intro.xml b/doc/intro.xml
new file mode 100644 (file)
index 0000000..6e80a81
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!DOCTYPE chapter SYSTEM "../doc.dtd">
+<?xml-stylesheet type="text/xsl" href="../html.xsl"?>
+
+<!--
+      XML documentation system
+      Original author :  Arjen Baart - arjen@andromeda.nl
+      Version         : $Revision: 1.1 $
+-->
+
+<chapter>
+<heading>Introduction</heading>
+
+<para>
+<LaTeX command='\setlength{\parindent}{0cm}'/>
+<LaTeX command='\setlength{\parskip}{0.4cm}'/>
+XML-doc is a collection of stylesheets and utilities, resembling a
+documentation system like sgmltools and Linuxdoc.
+The objective is to prepare documentation in XML format.
+Other formats, like LaTeX, PostScript or HTML are then generated by
+transforming the XML source document into other formats.
+The transformation is performed by an XSLT processor and using
+XSL stylesheets for a specific output format.
+</para>
+
+<section>
+<heading>XML-doc concepts</heading>
+
+<para>
+Writing documents in XML is rather like writing them in HTML.
+The content is just plain text and the markup, or layout, is defined
+with tags, which are marked in angle brackets (&lt; and &gt;).
+A tag marks the beginning or end of an element, where an element is something
+like a chapter, a section or a phrase of emphasized text.
+The tags are processed by the XML parser and translated to the output
+format commands, as defined by the XSL stylesheet.
+</para>
+
+<para>
+You can not use every tag just anywhere in your document.
+There is a certain amount of structure you must adhere to.
+This structure is defined in the <emph>Document Type Definition (DTD)</emph>.
+</para>
+</section>
+</chapter>
diff --git a/doc/main.css b/doc/main.css
new file mode 100644 (file)
index 0000000..4ada333
--- /dev/null
@@ -0,0 +1,66 @@
+
+body
+{
+   background : white;
+   color      : black;
+}
+
+h1
+{
+   color : blue;
+   font-family : sans-serif ;
+   font-size : 150%;
+}
+
+h1.titlepage
+{
+   color : black;
+   font-family : sans-serif ;
+   font-size : 150%;
+   text-align : center ;
+}
+
+h2.titlepage
+{
+   color : black;
+   font-family : sans-serif ;
+   font-size : 120%;
+   text-align : center ;
+}
+
+h2
+{
+   color : green;
+}
+
+div.titlepage
+{
+   background : rgb(204, 204, 255) ;
+   border: solid;
+   border-width: thin;
+   padding : 1em;
+   margin : 5% ;
+   width: 90%;
+   text-align : center ;
+}
+
+p
+{
+   font-size : 90%;
+}
+
+span.remark
+{
+   font-size : 90%;
+   background : yellow ;
+   color : rgb(0, 0, 150);
+}
+
+table
+{
+   width : 80% ;
+   border-width : medium ;
+   border-style : solid ;
+   border-collapse : collapse;
+   padding : 1px ;
+}
diff --git a/doc/makefile b/doc/makefile
new file mode 100644 (file)
index 0000000..9c1daa2
--- /dev/null
@@ -0,0 +1,50 @@
+
+.SUFFIXES: .obj .eps .png
+
+.obj.png:
+       tgif -print -png $<
+
+.obj.eps:
+       tgif -print -eps -color $<
+
+XMLS = guide.xml intro.xml overall.xml block.xml inline.xml multifiles.xml
+IMAGES=
+
+PICTURES=
+
+html: guide.html
+
+ps: guide.ps
+
+txt: guide.txt
+
+all:  ps html txt
+
+guide.html : $(XMLS) $(IMAGES) ../html.xsl
+       ../xp ../preprocess.xsl guide.xml >guide.tmp
+       ../xp ../html.xsl guide.tmp > guide.html
+       rm guide.tmp
+
+guide.ps : $(XMLS)  $(PICTURES) ../latex.xsl ../xp
+       ../xp ../preprocess.xsl guide.xml >guide.tmp
+       ../xp --latex ../latex.xsl guide.tmp > guide.tex 
+       latex guide.tex
+       dvips -o guide.ps guide.dvi
+       rm guide.tmp
+
+guide.pdf : $(XMLS)  $(PICTURES) ../latex.xsl ../xp
+       ../xp ../preprocess.xsl guide.xml >guide.tmp
+       ../xp --latex ../latex.xsl guide.tmp > guide.tex 
+       pdflatex guide.tex
+       rm guide.tmp
+
+guide.txt : $(XMLS) ../text.xsl
+       ../xp ../preprocess.xsl guide.xml >guide.tmp
+       ../xp ../text.xsl guide.tmp > guide.txt
+       rm guide.tmp
+
+check:
+       xmllint --noout --valid $(XMLS)
+clean:
+       rm -f guide.html guide.ps guide.tex guide.dvi guide.log guide.txt guide.pdf
+       rm -f $(IMAGES) $(PICTURES)
diff --git a/doc/multifiles.xml b/doc/multifiles.xml
new file mode 100644 (file)
index 0000000..6a44031
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!DOCTYPE chapter SYSTEM "../doc.dtd">
+<?xml-stylesheet type="text/css" href="xmldoc.css"?>
+
+<!--
+      XML documentation system
+      Original author :  Arjen Baart - arjen@andromeda.nl
+      Version         : $Revision: 1.1 $
+-->
+
+<chapter>
+<heading>Using multiple files</heading>
+<para>
+The XMLDoc system allows you to use multiple files for both input
+and output.
+<emph>Well, not really. Multiple output files is not implemented yet :-)</emph>
+</para>
+<section>
+<heading>Multiple input files</heading>
+<para>
+You do not need to create one single big XML file that contains
+all of your story.
+Especially when writing a large book or report, it is often convenient
+to origanize your document in multiple files.
+For example, one file for each chapter and a single 'root' document
+with all the header stuff, such as a title page and a table of
+contents which binds all chapters together.
+As a matter of fact, this XMLDoc guide is organized in such a way.
+</para>
+<para>
+To include another XML file in your root document, use the
+<strong>include</strong> element with a single attribute to specify
+the name of the file to be included.
+For example, this chapter is in a file called "multifiles.xml", which
+is included in the main document with:
+<verbatim>
+&lt;include href="multifiles.xml"/&gt;
+</verbatim>
+There is one restriction to including other files: The included files
+must be valid XML files as well.
+It is not possible to include other kinds of files, such as raw text
+or source code.
+So, the included XML file starts with the usual XML declaration, but has
+a different root element declared in the &lt;!DOCTYPE...&gt; declaration:
+
+<verbatim>
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE chapter SYSTEM "../doc.dtd"&gt;
+&lt;chapter&gt;
+&lt;--  The content of this chapter --&gt;
+&lt;/chapter&gt;
+</verbatim>
+
+</para>
+</section>
+<section>
+<heading>Multiple output files</heading>
+<para>
+Creating multiple output files would be a handy feature.
+Certainly when you create your documents for the web, it would be nice
+to have one title page with an index or table of contents
+and put each chapter or section in a separate HTML or XML file.
+Unfortunately, to implement this, we need the &lt;xsl:document&gt; element
+which is proposed in version 1.1 of the XSLT recommendation.
+We'll have to wait until this is supported by the XSLT processor;
+just hang in there for a while.
+</para>
+</section>
+</chapter>
diff --git a/doc/overall.xml b/doc/overall.xml
new file mode 100644 (file)
index 0000000..d662a76
--- /dev/null
@@ -0,0 +1,157 @@
+<?xml version="1.0"?>
+<!DOCTYPE chapter SYSTEM "../doc.dtd">
+<?xml-stylesheet type="text/xsl" href="../html.xsl"?>
+
+<!--
+      XML documentation system
+      Original author :  Arjen Baart - arjen@andromeda.nl
+      Version         : $Revision: 1.1 $
+-->
+
+
+<chapter>
+<heading>Overall document structure</heading>
+
+<para>
+All XML-doc documents are set up in a similar way.
+Just as every other XML file, a doument starts with the XML and DOCTYPE
+declarations:
+</para>
+
+<verbatim>
+
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE doc SYSTEM "doc.dtd"&gt;
+
+</verbatim>
+
+<para>
+These declarations are followed by the <strong>doc</strong> element.
+The <strong>doc</strong> element contains the entire document.
+The next element within the <strong>doc</strong> element defines the
+type of document.
+This can be a <strong>book</strong>, <strong>article</strong> or a
+<strong>report</strong>.
+Structurally, there is no real difference between either type of
+document but in LaTeX, they result in different layout styles.
+Each type of document contains any number
+of <strong>chapter</strong> elements.
+The example shows a minimal XML-doc document:
+</para>
+
+<verbatim>
+
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE doc SYSTEM "doc.dtd"&gt;
+
+&lt;doc&gt;
+
+   &lt;book&gt;
+
+      &lt;chapter&gt;
+         &lt;heading&gt;The only chapter&lt;/heading&gt;
+
+      &lt;/chapter&gt;
+
+   &lt;/book&gt;
+
+&lt;/doc&gt;
+
+</verbatim>
+
+<section>
+<heading>Preamble</heading>
+<para>
+The document preamble is everything that comes before the real page of text.
+Typical elements of the preamble are the title page and the table of contents.
+You can create a title page with the <strong>titlepage</strong> tag.
+As the name suggests, the title page holds at least the title of the document.
+Other elements in the title page are the author(s),
+the date and the abstract.
+Here is an example of a title page:
+</para>
+
+<verbatim>
+&lt;titlepage&gt;
+   &lt;title&gt;XML documentation system&lt;/title&gt;
+   &lt;author&gt;Arjen Baart  &lt;arjen@andromeda.nl&gt;&lt;/author&gt;
+   &lt;date&gt;April 8, 2002&lt;/date&gt;
+   &lt;abstract&gt;
+   This guide explains the concepts of &lt;strong&gt;XMLDoc&lt;/strong&gt; and discusses
+   the features available to prepare documentation.
+   &lt;strong&gt;XMLDoc&lt;/strong&gt; uses XSLT transformations to turn the XML source
+   document into a number of other formats.
+   &lt;/abstract&gt;
+&lt;/titlepage&gt;
+</verbatim>
+
+<para>
+The <strong>titlepage</strong> must have a <strong>title</strong> and
+at least one <strong>author</strong> element.
+The <strong>date</strong> and <strong>abstract</strong> elements are
+optional, but if you use them, you must put them in this order.
+</para>
+
+<para>
+The table of contents is particularly easy to create.
+All it takes is an empty <strong>toc</strong> element:
+</para>
+
+<verbatim>
+   &lt;toc/&gt;
+</verbatim>
+
+<para>
+The table of contents is optional, but if you use it, it must come
+between the title page and the first chapter.
+</para>
+
+</section>
+
+<section>
+<heading>Sectioning and Paragraphs</heading>
+
+<para>
+After the opening tag of the first chapter, the document really begins.
+The structure of the document is layed out by its chapters, sections
+within the chapters, subsections within the sections and so on.
+Just as in LaTeX and HTML, there are six levels of sectioning elements available:
+<enumerate>
+<item><code>chapter</code>: For top-level chapters.</item>
+<item><code>section</code>: For second-level sections, i.e. 1.1, 1.2, 1.3
+      and so on.</item>
+<item><code>subsection</code>: For third-level sections, i.e. 1.1.1, 1.1.2
+      and so on.</item>
+<item><code>subsubsection</code>: For fourth-level sections
+      (you get the idea).</item>
+<item><code>paragraph</code>: The fifth-level sections</item>
+<item><code>subparagraph</code>: The sixth and final level.</item>
+</enumerate>
+Note that the names are equivalent to their counterparts in LaTeX.
+</para>
+
+<para>
+After the open tag of a sectioning element (<code>chapter</code>,
+<code>section</code>, <code>subsection</code> or <code>subsubsection</code>, etc.)
+comes the <strong>heading</strong> element, followed by the block level content
+as discussed in <ref to='block'>chapter </ref><page to='block'> on page </page>.
+</para>
+
+</section>
+
+<section>
+<heading>Linking with style sheets</heading>
+<para>
+You can use a 'normal' CSS stylesheet with the HTML output from
+<strong>xml2html</strong>, by using the <strong>style</strong> attribute
+in the <strong>doc</strong> element.
+Here is an example:
+<verbatim>
+
+&lt;doc style="main.css"&gt;
+
+</verbatim>
+</para>
+</section>
+</chapter>
+
diff --git a/doc/structure.obj b/doc/structure.obj
new file mode 100644 (file)
index 0000000..5cbde05
--- /dev/null
@@ -0,0 +1,487 @@
+%TGIF 4.1.3
+state(1,37,100.000,0,233,0,16,1,9,2,2,0,0,1,0,1,0,'Helvetica',0,69120,0,0,1,10,0,0,1,0,0,16,0,0,1,1,1,0,1408,1088,0,0,2880,0).
+%
+% @(#)$Header: /cvsroot/xmldoc/doc/structure.obj,v 1.1 2002-08-28 14:50:54 arjen Exp $
+% %W%
+%
+unit("1 pixel/pixel").
+color_info(11,65535,0,[
+       "magenta", 65535, 0, 65535, 65535, 0, 65535, 1,
+       "red", 65535, 0, 0, 65535, 0, 0, 1,
+       "green", 0, 65535, 0, 0, 65535, 0, 1,
+       "blue", 0, 0, 65535, 0, 0, 65535, 1,
+       "yellow", 65535, 65535, 0, 65535, 65535, 0, 1,
+       "pink", 65535, 49931, 53052, 65535, 49344, 52171, 1,
+       "cyan", 0, 65535, 65535, 0, 65535, 65535, 1,
+       "CadetBlue", 22885, 40569, 42649, 24415, 40606, 41120, 1,
+       "white", 65535, 65535, 65535, 65535, 65535, 65535, 1,
+       "black", 0, 0, 0, 0, 0, 0, 1,
+       "DarkSlateGray", 10402, 19764, 18724, 12079, 20303, 20303, 1
+]).
+script_frac("0.6").
+fg_bg_colors('black','white').
+page(1,"",1,'').
+group([
+box('black','',380,50,460,80,0,1,1,0,0,0,0,0,0,'1',0,[
+]),
+text('black',420,58,1,1,1,47,15,1,12,3,0,0,0,0,2,47,15,0,0,"",0,0,0,0,70,'',[
+minilines(47,15,0,0,1,0,0,[
+mini_line(47,12,3,0,0,0,[
+str_block(0,47,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,47,12,3,0,-1,0,0,0,0,0,
+       "linuxdoc")])
+])
+])])
+],
+12,0,0,[
+]).
+group([
+box('black','',60,160,140,190,0,1,1,14,0,0,0,0,0,'1',0,[
+]),
+text('black',100,168,1,1,1,34,15,15,12,3,0,0,0,0,2,34,15,0,0,"",0,0,0,0,180,'',[
+minilines(34,15,0,0,1,0,0,[
+mini_line(34,12,3,0,0,0,[
+str_block(0,34,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,34,12,3,0,-1,0,0,0,0,0,
+       "article")])
+])
+])])
+],
+13,0,0,[
+]).
+group([
+box('black','',180,160,260,190,0,1,1,23,0,0,0,0,0,'1',0,[
+]),
+text('black',220,168,1,1,1,32,15,24,12,3,0,0,0,0,2,32,15,0,0,"",0,0,0,0,180,'',[
+minilines(32,15,0,0,1,0,0,[
+mini_line(32,12,3,0,0,0,[
+str_block(0,32,12,3,0,0,0,0,0,[
+str_seg('black','Helvetica',0,69120,32,12,3,0,0,0,0,0,0,0,
+       "report")])
+])
+])])
+],
+22,0,0,[
+]).
+group([
+box('black','',280,160,360,190,0,1,1,29,0,0,0,0,0,'1',0,[
+]),
+text('black',320,168,1,1,1,27,15,30,12,3,0,0,0,0,2,27,15,0,0,"",0,0,0,0,180,'',[
+minilines(27,15,0,0,1,0,0,[
+mini_line(27,12,3,0,0,0,[
+str_block(0,27,12,3,0,0,0,0,0,[
+str_seg('black','Helvetica',0,69120,27,12,3,0,0,0,0,0,0,0,
+       "book")])
+])
+])])
+],
+28,0,0,[
+]).
+group([
+box('black','',550,160,630,190,0,1,1,32,0,0,0,0,0,'1',0,[
+]),
+text('black',590,168,1,1,1,27,15,33,12,3,0,0,0,0,2,27,15,0,0,"",0,0,0,0,180,'',[
+minilines(27,15,0,0,1,0,0,[
+mini_line(27,12,3,0,0,0,[
+str_block(0,27,12,3,0,0,0,0,0,[
+str_seg('black','Helvetica',0,69120,27,12,3,0,0,0,0,0,0,0,
+       "letter")])
+])
+])])
+],
+31,0,0,[
+]).
+group([
+box('black','',70,630,150,660,0,1,1,35,0,0,0,0,0,'1',0,[
+]),
+text('black',110,638,1,1,1,45,15,36,12,3,0,0,0,0,2,45,15,0,0,"",0,0,0,0,650,'',[
+minilines(45,15,0,0,1,0,0,[
+mini_line(45,12,3,0,0,0,[
+str_block(0,45,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,45,12,3,0,-1,0,0,0,0,0,
+       "heading")])
+])
+])])
+],
+34,0,0,[
+]).
+group([
+box('black','',410,630,490,660,0,1,1,53,0,0,0,0,0,'1',0,[
+]),
+text('black',450,638,1,1,1,7,15,54,12,3,0,0,0,0,2,7,15,0,0,"",0,0,0,0,650,'',[
+minilines(7,15,0,0,1,0,0,[
+mini_line(7,12,3,0,0,0,[
+str_block(0,7,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,7,12,3,0,-1,0,0,0,0,0,
+       "p")])
+])
+])])
+],
+52,0,0,[
+]).
+group([
+box('black','',890,160,970,190,0,1,1,59,0,0,0,0,0,'1',0,[
+]),
+text('black',930,168,1,1,1,30,15,60,12,3,0,0,0,0,2,30,15,0,0,"",0,0,0,0,180,'',[
+minilines(30,15,0,0,1,0,0,[
+mini_line(30,12,3,0,0,0,[
+str_block(0,30,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,30,12,3,0,-1,0,0,0,0,0,
+       "notes")])
+])
+])])
+],
+58,0,0,[
+]).
+group([
+box('black','',230,630,310,660,0,1,1,62,0,0,0,0,0,'1',0,[
+]),
+text('black',270,638,1,1,1,39,15,63,12,3,0,0,0,0,2,39,15,0,0,"",0,0,0,0,650,'',[
+minilines(39,15,0,0,1,0,0,[
+mini_line(39,12,3,0,0,0,[
+str_block(0,39,12,3,0,0,0,0,0,[
+str_seg('black','Helvetica',0,69120,39,12,3,0,0,0,0,0,0,0,
+       "header")])
+])
+])])
+],
+61,0,0,[
+]).
+group([
+box('black','',370,250,450,280,0,1,1,76,0,0,0,0,0,'1',0,[
+]),
+text('black',410,258,1,1,1,31,15,77,12,3,0,0,0,0,2,31,15,0,0,"",0,0,0,0,270,'',[
+minilines(31,15,0,0,1,0,0,[
+mini_line(31,12,3,0,0,0,[
+str_block(0,31,12,3,0,0,0,0,0,[
+str_seg('black','Helvetica',0,69120,31,12,3,0,0,0,0,0,0,0,
+       "chapt")])
+])
+])])
+],
+75,0,0,[
+]).
+group([
+box('black','',440,330,520,360,0,1,1,82,0,0,0,0,0,'1',0,[
+]),
+text('black',480,338,1,1,1,23,15,83,12,3,0,0,0,0,2,23,15,0,0,"",0,0,0,0,350,'',[
+minilines(23,15,0,0,1,0,0,[
+mini_line(23,12,3,0,0,0,[
+str_block(0,23,12,3,0,0,0,0,0,[
+str_seg('black','Helvetica',0,69120,23,12,3,0,0,0,0,0,0,0,
+       "sect")])
+])
+])])
+],
+81,0,0,[
+]).
+poly('black','',2,[
+       410,280,480,330],1,1,1,95,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+group([
+box('black','',470,400,550,430,0,1,1,136,0,0,0,0,0,'1',0,[
+]),
+text('black',510,408,1,1,1,30,15,137,12,3,0,0,0,0,2,30,15,0,0,"",0,0,0,0,420,'',[
+minilines(30,15,0,0,1,0,0,[
+mini_line(30,12,3,0,0,0,[
+str_block(0,30,12,3,0,-3,0,0,0,[
+str_seg('black','Helvetica',0,69120,30,12,3,0,-3,0,0,0,0,0,
+       "sect1")])
+])
+])])
+],
+135,0,0,[
+]).
+group([
+box('black','',510,470,590,500,0,1,1,142,0,0,0,0,0,'1',0,[
+]),
+text('black',550,478,1,1,1,30,15,143,12,3,0,0,0,0,2,30,15,0,0,"",0,0,0,0,490,'',[
+minilines(30,15,0,0,1,0,0,[
+mini_line(30,12,3,0,0,0,[
+str_block(0,30,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,30,12,3,0,-1,0,0,0,0,0,
+       "sect2")])
+])
+])])
+],
+141,0,0,[
+]).
+group([
+box('black','',540,540,620,570,0,1,1,145,0,0,0,0,0,'1',0,[
+]),
+text('black',580,548,1,1,1,30,15,146,12,3,0,0,0,0,2,30,15,0,0,"",0,0,0,0,560,'',[
+minilines(30,15,0,0,1,0,0,[
+mini_line(30,12,3,0,0,0,[
+str_block(0,30,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,30,12,3,0,-1,0,0,0,0,0,
+       "sect3")])
+])
+])])
+],
+144,0,0,[
+]).
+poly('black','',2,[
+       480,360,510,400],1,1,1,156,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       510,430,550,470],1,1,1,157,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       550,500,580,540],1,1,1,158,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       380,280,120,590],1,1,1,197,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       460,360,140,590],1,1,1,200,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       490,430,180,590],1,1,1,201,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       530,500,220,590],1,1,1,202,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       560,570,300,590],1,1,1,217,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+oval('black','',410,100,430,120,0,1,1,241,0,0,0,0,0,'1',0,[
+]).
+group([
+box('black','',660,160,740,190,0,1,1,243,0,0,0,0,0,'1',0,[
+]),
+text('black',700,168,1,1,1,36,15,244,12,3,0,0,0,0,2,36,15,0,0,"",0,0,0,0,180,'',[
+minilines(36,15,0,0,1,0,0,[
+mini_line(36,12,3,0,0,0,[
+str_block(0,36,12,3,0,0,0,0,0,[
+str_seg('black','Helvetica',0,69120,36,12,3,0,0,0,0,0,0,0,
+       "telefax")])
+])
+])])
+],
+242,0,0,[
+]).
+group([
+box('black','',780,160,860,190,0,1,1,249,0,0,0,0,0,'1',0,[
+]),
+text('black',820,168,1,1,1,32,15,250,12,3,0,0,0,0,2,32,15,0,0,"",0,0,0,0,180,'',[
+minilines(32,15,0,0,1,0,0,[
+mini_line(32,12,3,0,0,0,[
+str_block(0,32,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,32,12,3,0,-1,0,0,0,0,0,
+       "slides")])
+])
+])])
+],
+248,0,0,[
+]).
+poly('black','',2,[
+       420,80,420,100],1,1,1,303,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       420,120,100,160],1,1,1,304,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       420,120,220,160],1,1,1,305,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       420,120,320,160],1,1,1,306,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       420,120,590,160],1,1,1,307,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       420,120,700,160],1,1,1,308,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       420,120,820,160],1,1,1,309,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       420,120,930,160],1,1,1,310,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+group([
+box('black','',450,160,530,190,0,1,1,328,0,0,0,0,0,'1',0,[
+]),
+text('black',490,168,1,1,1,51,15,329,12,3,0,0,0,0,2,51,15,0,0,"",0,0,0,0,180,'',[
+minilines(51,15,0,0,1,0,0,[
+mini_line(51,12,3,0,0,0,[
+str_block(0,51,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,51,12,3,0,-1,0,0,0,0,0,
+       "manpage")])
+])
+])])
+],
+327,0,0,[
+]).
+poly('black','',2,[
+       420,120,490,160],1,1,1,336,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       420,120,400,250],1,1,1,337,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       420,120,500,330],1,1,1,338,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+group([
+box('black','',40,250,120,280,0,1,1,350,0,0,0,0,0,'1',0,[
+]),
+text('black',80,258,1,1,1,40,15,351,12,3,0,0,0,0,2,40,15,0,0,"",0,0,0,0,270,'',[
+minilines(40,15,0,0,1,0,0,[
+mini_line(40,12,3,0,0,0,[
+str_block(0,40,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,40,12,3,0,-1,0,0,0,0,0,
+       "titlepag")])
+])
+])])
+],
+349,0,0,[
+]).
+group([
+box('black','',130,250,210,280,0,1,1,359,0,0,0,0,0,'1',0,[
+]),
+text('black',170,258,1,1,1,17,15,360,12,3,0,0,0,0,2,17,15,0,0,"",0,0,0,0,270,'',[
+minilines(17,15,0,0,1,0,0,[
+mini_line(17,12,3,0,0,0,[
+str_block(0,17,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,17,12,3,0,-1,0,0,0,0,0,
+       "toc")])
+])
+])])
+],
+358,0,0,[
+]).
+group([
+box('black','',220,250,300,280,0,1,1,427,0,0,0,0,0,'1',0,[
+]),
+text('black',260,258,1,1,1,13,15,428,12,3,0,0,0,0,2,13,15,0,1,"",0,0,0,0,270,'',[
+minilines(13,15,0,1,1,0,0,[
+mini_line(13,12,3,0,1,0,[
+str_block(0,13,12,3,0,1,0,0,0,[
+str_seg('black','Helvetica',0,69120,13,12,3,0,1,0,0,0,0,0,
+       "lof")])
+])
+])])
+],
+426,0,0,[
+]).
+group([
+box('black','',260,290,340,320,0,1,1,433,0,0,0,0,0,'1',0,[
+]),
+text('black',300,298,1,1,1,13,15,434,12,3,0,0,0,0,2,13,15,0,0,"",0,0,0,0,310,'',[
+minilines(13,15,0,0,1,0,0,[
+mini_line(13,12,3,0,0,0,[
+str_block(0,13,12,3,0,0,0,0,0,[
+str_seg('black','Helvetica',0,69120,13,12,3,0,0,0,0,0,0,0,
+       "lot")])
+])
+])])
+],
+432,0,0,[
+]).
+poly('black','',2,[
+       70,190,60,250],1,1,1,462,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       190,190,80,250],1,1,1,463,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       290,190,100,250],1,1,1,464,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       90,190,260,630],1,1,1,465,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       200,190,270,630],1,1,1,466,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       320,190,280,630],1,1,1,467,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+group([
+box('black','',190,710,270,740,0,1,1,469,0,0,0,0,0,'1',0,[
+]),
+text('black',230,718,1,1,1,31,15,470,12,3,0,0,0,0,2,31,15,0,0,"",0,0,0,0,730,'',[
+minilines(31,15,0,0,1,0,0,[
+mini_line(31,12,3,0,0,0,[
+str_block(0,31,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,31,12,3,0,-1,0,0,0,0,0,
+       "lhead")])
+])
+])])
+],
+468,0,0,[
+]).
+group([
+box('black','',290,710,370,740,0,1,1,475,0,0,0,0,0,'1',0,[
+]),
+text('black',330,718,1,1,1,32,15,476,12,3,0,0,0,0,2,32,15,0,0,"",0,0,0,0,730,'',[
+minilines(32,15,0,0,1,0,0,[
+mini_line(32,12,3,0,0,0,[
+str_block(0,32,12,3,0,-1,0,0,0,[
+str_seg('black','Helvetica',0,69120,32,12,3,0,-1,0,0,0,0,0,
+       "rhead")])
+])
+])])
+],
+474,0,0,[
+]).
+poly('black','',2,[
+       260,660,230,710],1,1,1,488,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
+poly('black','',2,[
+       290,660,330,710],1,1,1,489,0,0,0,0,0,0,0,'1',0,0,
+    "0","",[
+    0,8,3,0,'8','3','0'],[0,8,3,0,'8','3','0'],[
+]).
diff --git a/html.xsl b/html.xsl
new file mode 100644 (file)
index 0000000..8e4a16e
--- /dev/null
+++ b/html.xsl
@@ -0,0 +1,295 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:strip-space elements="doc chapter section"/>
+<xsl:output method="html" indent="yes" encoding="iso-8859-1"/>
+
+<xsl:template match="doc">
+<html>
+<head>
+   <link>
+   <xsl:attribute name="rel">stylesheet</xsl:attribute>
+   <xsl:attribute name="type">text/css</xsl:attribute>
+   <xsl:attribute name="href"><xsl:value-of select="@style"/></xsl:attribute>
+   </link>
+   <title>
+      <xsl:value-of select="*/titlepage/title"/>
+   </title>
+</head>
+<body>
+   <xsl:apply-templates/>
+   <hr/>
+   <xsl:apply-templates select="//footnote" mode="footnotes"/>
+</body>
+</html>
+</xsl:template>
+
+<xsl:template match="titlepage">
+   <div>
+   <xsl:attribute name="class">titlepage</xsl:attribute>
+   <xsl:apply-templates/>
+   </div>
+</xsl:template>
+
+<xsl:template match="title">
+   <h1>
+   <xsl:attribute name="class">titlepage</xsl:attribute>
+   <xsl:apply-templates/>
+   </h1>
+</xsl:template>
+
+<xsl:template match="subtitle">
+   <h2>
+   <xsl:attribute name="class">titlepage</xsl:attribute>
+   <xsl:apply-templates/>
+   </h2>
+</xsl:template>
+
+<xsl:template match="author">
+   <xsl:apply-templates/><br/>
+</xsl:template>
+
+<xsl:template match="date">
+   <p><xsl:apply-templates/></p>
+</xsl:template>
+
+<xsl:template match="docinfo">
+   <center><table border="2" width="90%">
+   <tr><th colspan="2">Document Information</th></tr>
+   <xsl:apply-templates/>
+   </table></center>
+</xsl:template>
+
+<xsl:template match="infoitem">
+   <tr>
+     <td><xsl:value-of select="@label"/></td>
+     <td><xsl:apply-templates/></td>
+   </tr>
+</xsl:template>
+
+<xsl:template match="abstract">
+   <blockquote>
+   <b>Abstract:</b><br/>
+   <xsl:apply-templates/>
+   </blockquote>
+</xsl:template>
+
+<!--  A template to create the section number for a node -->
+
+<xsl:template name="section-number" mode="section-number" match="node()">
+   <xsl:number count="chapter|section" level="multiple" format="1.1 "/>
+</xsl:template>
+
+<!--  Create a table of contents -->
+
+<xsl:template match="toc">
+<h1>Table Of Contents</h1>
+<xsl:for-each select="../chapter">
+   <h2>
+   <xsl:number count="chapter"/>
+   <xsl:text>  </xsl:text>
+   <a>
+   <xsl:attribute name="href">#CH<xsl:number count="chapter"/></xsl:attribute>
+   <xsl:value-of select="heading"/>
+   </a>
+   </h2>
+   <ul>
+   <xsl:for-each select="section">
+      <h3>
+      <xsl:number count="chapter|section" level="multiple" format="1.1 "/>
+      <a>
+      <xsl:attribute name="href">#SEC<xsl:number count="chapter|section" level="multiple" format="1.1"/></xsl:attribute>
+      <xsl:value-of select="heading"/>
+      </a>
+      </h3>
+   </xsl:for-each>
+   </ul>
+</xsl:for-each>
+<hr></hr>
+</xsl:template>
+
+<!--  Chapter and section headings are all automatically numbered -->
+
+<xsl:template match="chapter/heading">
+   <h1>
+     <xsl:number count="chapter"/>
+     <xsl:text>  </xsl:text>
+      <a>
+      <xsl:attribute name="name">CH<xsl:number count="chapter"/></xsl:attribute>
+      </a>
+     <xsl:apply-templates/>
+   </h1>
+</xsl:template>
+
+<xsl:template match="section/heading">
+   <h2>
+     <xsl:number count="chapter|section" level="multiple" format="1.1 "/>
+     <a>
+     <xsl:attribute name="name">SEC<xsl:number count="chapter|section" level="multiple" format="1.1"/></xsl:attribute>
+     </a>
+     <xsl:apply-templates/>
+   </h2>
+</xsl:template>
+
+<xsl:template match="subsection/heading">
+   <h3>
+     <xsl:number count="chapter|section|subsection" level="multiple" format="1.1.1 "/>
+     <xsl:apply-templates/>
+   </h3>
+</xsl:template>
+
+<xsl:template match="subsubsection/heading">
+   <h4>
+     <xsl:number count="chapter|section|subsection|subsubsection" level="multiple"
+                 format="1.1.1.1 "/>
+     <xsl:apply-templates/>
+   </h4>
+</xsl:template>
+
+<xsl:template match="paragraph/heading">
+   <h4>
+     <xsl:number count="chapter|section|subsection|subsubsection|paragraph"
+                 level="multiple"
+                 format="1.1.1.1.1 "/>
+     <xsl:apply-templates/>
+   </h4>
+</xsl:template>
+
+<xsl:template match="subparagraph/heading">
+   <h4>
+     <xsl:number count="chapter|section|subsection|subsubsection|paragraph|subparagraph"
+                 level="multiple"
+                 format="1.1.1.1.1.1 "/>
+     <xsl:apply-templates/>
+   </h4>
+</xsl:template>
+
+<!--  Trivial elements are convreted directly -->
+
+<xsl:template match="para">
+   <p>
+     <xsl:apply-templates/>
+   </p>
+</xsl:template>
+
+<xsl:template match="quote">
+   <blockquote>
+     <xsl:apply-templates/>
+   </blockquote>
+</xsl:template>
+
+<xsl:template match="verbatim">
+<pre>
+ <xsl:apply-templates/>
+</pre>
+</xsl:template>
+
+<xsl:template match="itemize">
+<ul>
+   <xsl:apply-templates/>
+</ul>
+</xsl:template>
+
+<xsl:template match="enumerate">
+<ol>
+   <xsl:apply-templates/>
+</ol>
+</xsl:template>
+
+<xsl:template match="item">
+<li>
+   <xsl:apply-templates/>
+</li>
+</xsl:template>
+
+<xsl:template match="footnote">
+<sup><a>
+  <xsl:attribute name='href'>#footnote<xsl:number level='any'/></xsl:attribute>
+  <xsl:number level='any'/>
+</a></sup>
+</xsl:template>
+
+<xsl:template match="footnote" mode="footnotes">
+<sup><a><xsl:attribute name='name'>footnote<xsl:number level='any'/></xsl:attribute>
+        <xsl:number level='any'/></a></sup> <xsl:apply-templates/><br/>
+
+</xsl:template>
+
+<xsl:template match="emph">
+<em><xsl:apply-templates/></em>
+</xsl:template>
+
+<xsl:template match="strong">
+<strong><xsl:apply-templates/></strong>
+</xsl:template>
+
+<xsl:template match="code">
+<code><xsl:apply-templates/></code>
+</xsl:template>
+
+<xsl:template match="remark">
+<span><xsl:attribute name="class">remark</xsl:attribute><xsl:apply-templates/></span>
+</xsl:template>
+
+<xsl:template match="sub">
+<sub><xsl:apply-templates/></sub>
+</xsl:template>
+
+<xsl:template match="sup">
+<sup><xsl:apply-templates/></sup>
+</xsl:template>
+
+<xsl:template match="table">
+<table>
+<xsl:apply-templates/>
+</table>
+</xsl:template>
+
+
+<xsl:template match="row">
+<tr><xsl:apply-templates/></tr>
+</xsl:template>
+
+<xsl:template match="thead">
+<tr><xsl:apply-templates/></tr>
+</xsl:template>
+
+<xsl:template match="thead/col">
+<th><xsl:apply-templates/></th>
+</xsl:template>
+
+<xsl:template match="row/col">
+<td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="picture">
+   <img><xsl:attribute name="src"><xsl:value-of select="@src"/></xsl:attribute>
+   </img>
+</xsl:template>
+
+<xsl:template match="label">
+   <a><xsl:attribute name='name'>
+      <xsl:value-of select="@name"/>
+   </xsl:attribute></a>
+</xsl:template>
+
+<xsl:template match="ref">
+   <a><xsl:attribute name='href'>#<xsl:value-of select="@to"/></xsl:attribute>
+     <xsl:apply-templates/>
+     <xsl:apply-templates select="id(@to)" mode="section-number"/>
+   </a>
+</xsl:template>
+
+<xsl:template match="page"></xsl:template>
+
+<xsl:template match="reference">
+<a>
+<xsl:attribute name="href">
+<xsl:value-of select="@href"/>
+</xsl:attribute>
+<xsl:apply-templates/>
+</a>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/install-sh b/install-sh
new file mode 100755 (executable)
index 0000000..e9de238
--- /dev/null
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+       -c) instcmd="$cpprog"
+           shift
+           continue;;
+
+       -d) dir_arg=true
+           shift
+           continue;;
+
+       -m) chmodcmd="$chmodprog $2"
+           shift
+           shift
+           continue;;
+
+       -o) chowncmd="$chownprog $2"
+           shift
+           shift
+           continue;;
+
+       -g) chgrpcmd="$chgrpprog $2"
+           shift
+           shift
+           continue;;
+
+       -s) stripcmd="$stripprog"
+           shift
+           continue;;
+
+       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+           shift
+           continue;;
+
+       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+           shift
+           continue;;
+
+       *)  if [ x"$src" = x ]
+           then
+               src=$1
+           else
+               # this colon is to work around a 386BSD /bin/sh bug
+               :
+               dst=$1
+           fi
+           shift
+           continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+       echo "install:  no input file specified"
+       exit 1
+else
+       true
+fi
+
+if [ x"$dir_arg" != x ]; then
+       dst=$src
+       src=""
+       
+       if [ -d $dst ]; then
+               instcmd=:
+               chmodcmd=""
+       else
+               instcmd=mkdir
+       fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+       if [ -f $src -o -d $src ]
+       then
+               true
+       else
+               echo "install:  $src does not exist"
+               exit 1
+       fi
+       
+       if [ x"$dst" = x ]
+       then
+               echo "install:  no destination specified"
+               exit 1
+       else
+               true
+       fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+       if [ -d $dst ]
+       then
+               dst="$dst"/`basename $src`
+       else
+               true
+       fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='   
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+       pathcomp="${pathcomp}${1}"
+       shift
+
+       if [ ! -d "${pathcomp}" ] ;
+        then
+               $mkdirprog "${pathcomp}"
+       else
+               true
+       fi
+
+       pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+       $doit $instcmd $dst &&
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+       if [ x"$transformarg" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               dstfile=`basename $dst $transformbasename | 
+                       sed $transformarg`$transformbasename
+       fi
+
+# don't allow the sed command to completely eliminate the filename
+
+       if [ x"$dstfile" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               true
+       fi
+
+# Make a temp file name in the proper directory.
+
+       dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+       $doit $instcmd $src $dsttmp &&
+
+       trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+       $doit $rmcmd -f $dstdir/$dstfile &&
+       $doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/latex.xsl b/latex.xsl
new file mode 100644 (file)
index 0000000..3f171d4
--- /dev/null
+++ b/latex.xsl
@@ -0,0 +1,212 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet SYSTEM "xsl.dtd">
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+<xsl:strip-space elements="doc chapter section"/>
+<xsl:output method="text" indent="yes" encoding="iso-8859-1"/>
+
+<xsl:template match="article">
+\documentclass[a4paper]{article}
+\usepackage{graphics}
+\usepackage{latexsym}
+\usepackage{marvosym}
+\begin{document}
+   <xsl:apply-templates/>
+\end{document}
+</xsl:template>
+
+<xsl:template match="book">
+\documentclass[a4paper]{book}
+\usepackage{graphics}
+\usepackage{latexsym}
+\usepackage{marvosym}
+\begin{document}
+   <xsl:apply-templates/>
+\end{document}
+</xsl:template>
+
+<xsl:template match="report">
+\documentclass[a4paper]{report}
+\usepackage{graphics}
+\usepackage{latexsym}
+\usepackage{marvosym}
+\begin{document}
+   <xsl:apply-templates/>
+\end{document}
+</xsl:template>
+
+<xsl:template match="titlepage">
+   \begin{titlepage}
+   <xsl:apply-templates/>
+   \end{titlepage}
+</xsl:template>
+
+<xsl:template match="title">
+   \begin{center}
+   \sffamily\bfseries\LARGE{<xsl:apply-templates/>}
+   \end{center}
+</xsl:template>
+
+<xsl:template match="subtitle">
+   \begin{center}
+   \sffamily\bfseries\Large{<xsl:apply-templates/>}
+   \end{center}
+</xsl:template>
+
+<xsl:template match="author">
+   \begin{center}
+   \sffamily{<xsl:apply-templates/>}
+   \end{center}
+</xsl:template>
+
+<xsl:template match="date">
+   \begin{center}
+   \sffamily{<xsl:apply-templates/>}
+   \end{center}
+</xsl:template>
+
+<xsl:template match="docinfo">
+   \begin{tabular}{|l|l|}
+   \hline
+   \multicolumn{2}{|c|}{\textbf{Document Information}} \\
+   \hline
+   <xsl:apply-templates/>
+   \end{tabular}
+</xsl:template>
+
+<xsl:template match="infoitem">
+     <xsl:value-of select="@label"/> &amp;
+     <xsl:apply-templates/> \\
+     \hline
+</xsl:template>
+
+<xsl:template match="abstract">
+   
+   \vspace{0.5cm}
+   \begin{bfseries}Abstract:\end{bfseries}
+
+   \begin{quote}
+   <xsl:apply-templates/>
+   \end{quote}
+</xsl:template>
+
+<xsl:template match="toc">
+\tableofcontents
+\newpage
+</xsl:template>
+
+<xsl:template match="chapter/heading">
+   \chapter{<xsl:apply-templates/>}
+</xsl:template>
+
+<xsl:template match="section/heading">
+   \section{<xsl:apply-templates/>}
+</xsl:template>
+
+<xsl:template match="subsection/heading">
+   \subsection{<xsl:apply-templates/>}
+</xsl:template>
+
+<xsl:template match="subsubsection/heading">
+   \subsubsection{<xsl:apply-templates/>}
+</xsl:template>
+
+<xsl:template match="paragraph/heading">
+   \paragraph{<xsl:apply-templates/>}
+</xsl:template>
+
+<xsl:template match="subparagraph/heading">
+   \subparagraph{<xsl:apply-templates/>}
+</xsl:template>
+
+<xsl:template match="para">
+   
+     <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="quote">
+\begin{quote} 
+     <xsl:apply-templates/>
+\end{quote}
+</xsl:template>
+
+<xsl:template match="verbatim">
+\begin{verbatim} 
+     <xsl:apply-templates/>
+\end{verbatim}
+</xsl:template>
+
+<xsl:template match="itemize">
+\begin{itemize}
+   <xsl:apply-templates/>
+\end{itemize}
+</xsl:template>
+
+<xsl:template match="enumerate">
+\begin{enumerate}
+   <xsl:apply-templates/>
+\end{enumerate}
+</xsl:template>
+
+<xsl:template match="item">
+\item <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="footnote">\footnote{<xsl:apply-templates/>}</xsl:template>
+
+<xsl:template match="emph">\begin{itshape}<xsl:apply-templates/>\end{itshape}</xsl:template>
+
+<xsl:template match="strong">\begin{bfseries}<xsl:apply-templates/>\end{bfseries}</xsl:template>
+
+<xsl:template match="code">\begin{ttfamily}<xsl:apply-templates/>\end{ttfamily}</xsl:template>
+
+<xsl:template match="remark">\begin{slshape}<xsl:apply-templates/>\end{slshape}</xsl:template>
+
+<xsl:template match="sub">$_{<xsl:apply-templates/>}$</xsl:template>
+<xsl:template match="sup">$^{<xsl:apply-templates/>}$</xsl:template>
+
+<xsl:template match="table">
+\begin{tabular}{<xsl:value-of select="@cpos"/>c}
+<xsl:apply-templates/>
+\end{tabular}
+</xsl:template>
+
+<xsl:template match="thead">
+<xsl:apply-templates/>\\
+</xsl:template>
+
+<xsl:template match="thead/col">
+\begin{bfseries}<xsl:apply-templates/>\end{bfseries}&amp;
+</xsl:template>
+
+<xsl:template match="row">
+<xsl:apply-templates/>\\
+</xsl:template>
+
+<xsl:template match="row/col">
+<xsl:apply-templates/>&amp;
+</xsl:template>
+
+<xsl:template match="picture">
+\scalebox{<xsl:value-of select="@scale"/>}{\includegraphics{<xsl:value-of select="@eps"/>}}
+</xsl:template>
+
+<xsl:template match="label">\label{<xsl:value-of select="@name"/>}</xsl:template>
+
+<xsl:template match="ref"><xsl:apply-templates/>\ref{<xsl:value-of select="@to"/>}</xsl:template>
+<xsl:template match="page"><xsl:apply-templates/>\pageref{<xsl:value-of select="@to"/>}</xsl:template>
+<xsl:template match="reference">
+<xsl:apply-templates/>[<xsl:value-of select="@href"/>]
+</xsl:template>
+
+<xsl:template match="include">
+   <xsl:apply-templates select="document(@href)"/>
+</xsl:template>
+
+<xsl:template match="LaTeX">
+ <xsl:value-of select="@command"/>
+</xsl:template>
+</xsl:stylesheet>
+
diff --git a/missing b/missing
new file mode 100755 (executable)
index 0000000..d46f79f
--- /dev/null
+++ b/missing
@@ -0,0 +1,198 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.in; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing - GNU libit 0.0"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`$configure_ac'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`$configure_ac'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`$configure_ac'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' $configure_ac`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`$configure_ac'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+       case "$LASTARG" in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if [ -f "$SRCFILE" ]; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if [ -f "$SRCFILE" ]; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if [ ! -f y.tab.h ]; then
+       echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+       case "$LASTARG" in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if [ -f "$SRCFILE" ]; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755 (executable)
index 0000000..9f56185
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.1 2002-08-28 14:50:50 arjen Exp $
+
+errstatus=0
+
+for file
+do
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+   shift
+
+   pathcomp=
+   for d
+   do
+     pathcomp="$pathcomp$d"
+     case "$pathcomp" in
+       -* ) pathcomp=./$pathcomp ;;
+     esac
+
+     if test ! -d "$pathcomp"; then
+        echo "mkdir $pathcomp"
+
+        mkdir "$pathcomp" || lasterr=$?
+
+        if test ! -d "$pathcomp"; then
+         errstatus=$lasterr
+        fi
+     fi
+
+     pathcomp="$pathcomp/"
+   done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/preprocess.xsl b/preprocess.xsl
new file mode 100644 (file)
index 0000000..7b3079f
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet SYSTEM "xsl.dtd">
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+<xsl:output method="xml" indent="yes" encoding="iso-8859-1"
+            doctype-system="/usr/local/xslt/doc.dtd"/>
+
+
+<xsl:template match="include">
+   <xsl:apply-templates select="document(@href)"/>
+</xsl:template>
+
+<!--
+<xsl:template match="*">
+   <doc>
+   <xsl:copy-of select="@*"/>
+   <xsl:copy-of select="node()"/>
+   </doc>
+</xsl:template>
+-->
+
+<xsl:template match="*">
+   <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+   </xsl:copy>
+</xsl:template>
+</xsl:stylesheet>
+
diff --git a/text.xsl b/text.xsl
new file mode 100644 (file)
index 0000000..df827f0
--- /dev/null
+++ b/text.xsl
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet SYSTEM "xsl.dtd">
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+<xsl:strip-space elements="doc chapter section"/>
+<xsl:output method="text" indent="yes" encoding="iso-8859-1"/>
+
+<xsl:template match="doc">
+<xsl:apply-templates/>
+
+------------------------------------------------------------------
+<xsl:apply-templates select="//footnote" mode="footnotes"/>
+</xsl:template>
+
+<xsl:template match="article">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="book">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="report">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="titlepage">
+*********************************************************************************
+
+   <xsl:apply-templates/>
+
+*********************************************************************************
+
+</xsl:template>
+
+<xsl:template match="title">
+<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="date">
+<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="author">
+<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="docinfo">
+   Document Information
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="infoitem">
+   <xsl:value-of select="@label"/>: <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="abstract">
+
+Abstract:
+
+<xsl:apply-templates/>
+</xsl:template>
+
+
+<xsl:template match="chapter/heading">
+   Chapter <xsl:number count="chapter"/>: <xsl:apply-templates/>
+   ===========================================================
+   
+</xsl:template>
+
+<xsl:template match="section/heading">
+   <xsl:text>
+   </xsl:text>
+   <xsl:number count="chapter|section" level="multiple" format="1.1 "/>. <xsl:apply-templates/>
+   <xsl:text>
+   </xsl:text>
+
+</xsl:template>
+
+<xsl:template match="subsection/heading">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="subsubsection/heading">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="paragraph/heading">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="subparagraph/heading">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="para|quote">
+   
+     <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="verbatim">
+     <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="itemize">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="enumerate">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="item">
+ - <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="footnote">(<xsl:number/>)</xsl:template>
+
+<xsl:template match="footnote" mode="footnotes">
+ (<xsl:number/>) <xsl:apply-templates/>
+
+</xsl:template>
+
+<xsl:template match="sub|sup"><xsl:apply-templates/></xsl:template>
+<xsl:template match="emph"><xsl:apply-templates/></xsl:template>
+
+<xsl:template match="strong"><xsl:apply-templates/></xsl:template>
+
+<xsl:template match="code"><xsl:apply-templates/></xsl:template>
+
+<xsl:template match="remark"><xsl:apply-templates/></xsl:template>
+
+<xsl:template match="table">
+<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="row">
+<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="col">
+<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="picture">
+</xsl:template>
+
+<xsl:template match="reference">
+<xsl:apply-templates/>[<xsl:value-of select="@href"/>]
+</xsl:template>
+
+<xsl:template match="include">
+<xsl:apply-templates select="document(@href)"/>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/xml2html b/xml2html
new file mode 100755 (executable)
index 0000000..b960d22
--- /dev/null
+++ b/xml2html
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+XSLDIR=/usr/local/xslt
+
+stylesheet=$XSLDIR/html.xsl
+inputs=
+
+while [ $# -gt 0 ]
+do
+   case $1 in
+   -s)
+      stylesheet=$2
+      shift
+   ;;
+
+   -*)
+      echo Usage: $0 [-s stylesheet] file...
+      exit 1
+   ;;
+
+   *)
+      inputs=`echo $inputs $1`
+   ;;
+
+   esac
+   shift
+done
+TMPFILE=`mktemp /tmp/xmldoc.XXXXXX`
+xp $XSLDIR/preprocess.xsl $inputs >$TMPFILE
+xp $stylesheet $TMPFILE
diff --git a/xml2latex b/xml2latex
new file mode 100755 (executable)
index 0000000..fca54c2
--- /dev/null
+++ b/xml2latex
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+XSLDIR=/usr/local/xslt
+
+
+stylesheet=$XSLDIR/latex.xsl
+inputs=
+
+while [ $# -gt 0 ]
+do
+   case $1 in
+   -s)
+      stylesheet=$2
+      shift
+   ;;
+
+   -*)
+      echo Usage: $0 [-s stylesheet] file...
+      exit 1
+   ;;
+
+   *)
+      inputs=`echo $inputs $1`
+   ;;
+
+   esac
+   shift
+done
+TMPFILE=`mktemp /tmp/xmldoc.XXXXXX`
+xp $XSLDIR/preprocess.xsl $inputs >$TMPFILE
+xp --latex $stylesheet $TMPFILE
diff --git a/xml2text b/xml2text
new file mode 100755 (executable)
index 0000000..82c01da
--- /dev/null
+++ b/xml2text
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+XSLDIR=/usr/local/xslt
+
+stylesheet=$XSLDIR/text.xsl
+inputs=
+
+while [ $# -gt 0 ]
+do
+   case $1 in
+   -s)
+      stylesheet=$2
+      shift
+   ;;
+
+   -*)
+      echo Usage: $0 [-s stylesheet] file...
+      exit 1
+   ;;
+
+   *)
+      inputs=`echo $inputs $1`
+   ;;
+
+   esac
+   shift
+done
+TMPFILE=`mktemp /tmp/xmldoc.XXXXXX`
+xp $XSLDIR/preprocess.xsl $inputs >$TMPFILE
+xp $stylesheet $TMPFILE
diff --git a/xmldoc.html b/xmldoc.html
new file mode 100644 (file)
index 0000000..3a4e399
--- /dev/null
@@ -0,0 +1,107 @@
+<html>
+<head>
+<title>XMLDoc - XML Document preparation</title>
+</head>
+<body bgcolor='white'>
+
+<h1>XMLDoc Introduction</h1>
+
+<p>
+XML-doc is a collection of stylesheets and utilities, resembling a
+documentation system like sgmltools and Linuxdoc.
+The objective is to prepare documentation in XML format.
+Other formats, like LaTeX, PostScript or HTML are then generated by
+transforming the XML source document into other formats.
+The transformation is performed by an XSLT processor and using
+XSL stylesheets for a specific output format.
+</p>
+
+<h1>Installing XMLDoc</h1>
+
+<p>
+XMLDoc uses the XML and XSLT software libraries from
+<a href="http://www.gnome.org/">GNOME</a>.
+You first need to download, configure, make and install these packages
+from the <a href="ftp://xmlsoft.org/">XML C Library</a> site.
+Make sure you get the latest <strong>libxml2</strong> and
+<strong>libxslt</strong> libraries.
+</p>
+<p>
+The Gnome xml and xslt libraries are also included in the latest Linux
+distributions, such as <a href='http://www.redhat.com/'>RedHat</a> 7.x.
+You can install the <strong>libxml2</strong> and <strong>libxslt</strong>
+RPM packages if they are not already installled on your system.
+To compile the XSLT Processor <em>xp</em>, you also need to install the
+<strong>libxml2-devel</strong> and <strong>libxslt-devel</strong> packages.
+</p>
+
+<p>
+Download and unpack the XMLDoc utilities, stylesheets and DTDs
+from <a href="xmldoc-0.4.tar.bz2">here</a>.
+The tarball unpacks into a directory 'xmldoc-0.4'.
+In there you will find:
+</p>
+<ul>
+<li>A special version of an XSLT Processor, called <strong>xp</strong>.
+    This XSLT processor performs the translation of ASCII characters that have
+    a special meaning in LaTeX and a number of UTF-8 sequences into
+    escape sequences for LaTeX.
+</li>
+<li>The shell scripts <strong>xml2html</strong>, <strong>xml2latex</strong>
+    and <strong>xml2text</strong>.
+    These are pretty simple scripts that just call <strong>xp</strong>
+    with the proper stylesheets.
+</li>
+<li>The XSL stylesheets <strong>html.xsl</strong>, <strong>latex.xsl</strong>
+    and <strong>text.xsl</strong>
+    that are used by the XSLT processor to transform the XML document
+    into HTML or LaTeX.
+</li>
+<li>The Document Type Definitions <strong>doc.dtd</strong> and
+    <strong>xsl.dtd</strong> to define the structure of the XML files.
+</li>
+<li>A <a href="guide.html">guide</a> in the <strong>doc</strong> subdirectory
+    which explains the features in XMLDoc.
+    You may want to use this guide and its makefile as an example.
+</li>
+</ul>
+
+<p>
+XMLDoc uses <strong>automake</strong> and <strong>autoconf</strong> to
+compile and install the software.
+To install XMLDoc, you can do the usual <code>./configure</code>,
+<code>make</code> and (as root) <code>make install</code>.
+</p>
+
+<p>
+The stylesheets and DTDs are installed in <code>/usr/local/xslt</code>.
+The utilities go into <code>/usr/local/bin</code>.
+A 'make install' will copy all necessary files to their proper place.
+If you want the stylesheets in a different place, you'll have to
+run the <code>configure</code> script with a <code>--prefix=/other/dir</code>
+argument.
+
+</p>
+
+<h1>Using XMLDoc</h1>
+
+<p>
+You are now ready to start writing in XML.
+Prepare your documents with your favorite editor as usual, doing
+all the proper XML stuff and use the <a href="guide.html">guide</a>
+to see how you can make the structure and layout.
+Convert you document to HTML with <strong>xml2html filename.xml</strong>,
+to LaTeX with <strong>xml2latex filename.xml</strong> or to
+plain ASCII text with <strong>xml2text filename.xml</strong>.
+Both scripts accept a single argument and send their output to stdout.
+There is one option to these scripts: <em>-s stylesheet</em> allows
+you to use a stylesheet different from the default.
+That's all there is to it; enjoy.
+</p>
+
+<p>
+If you encounter any problems or if you want to make suggestions,
+please don't hesitate to drop me an <a href="mailto:arjen@andromeda.nl">Email</a>
+</p>
+</body>
+</html>
diff --git a/xp.c b/xp.c
new file mode 100644 (file)
index 0000000..e56e35a
--- /dev/null
+++ b/xp.c
@@ -0,0 +1,758 @@
+/*
+ * xsltproc.c: user program for the XSL Transformation 1.0 engine
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+//#include <libxslt/libxslt.h>
+//#include <libexslt/exslt.h>
+#include <string.h>
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#include <libxml/xmlmemory.h>
+#include <libxml/debugXML.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/xmlIO.h>
+#ifdef LIBXML_DOCB_ENABLED
+#include <libxml/DOCBparser.h>
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+#include <libxml/xinclude.h>
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+#include <libxml/catalog.h>
+#endif
+#include <libxml/parserInternals.h>
+
+#include <libxslt/xslt.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/transform.h>
+#include <libxslt/xsltutils.h>
+#include <libxslt/extensions.h>
+
+#include <libexslt/exsltconfig.h>
+
+
+#ifndef HAVE_STAT
+#  ifdef HAVE__STAT
+     /* MS C library seems to define stat and _stat. The definition
+      *         is identical. Still, mapping them to each other causes a warning. */
+#    ifndef _MSC_VER
+#      define stat(x,y) _stat(x,y)
+#    endif
+#    define HAVE_STAT
+#  endif
+#endif
+
+xmlParserInputPtr xmlNoNetExternalEntityLoader(const char *URL,
+                                              const char *ID,
+                                              xmlParserCtxtPtr ctxt);
+
+static int debug = 0;
+static int novalid = 0;
+static int noout = 0;
+static int latex = 0;
+#ifdef LIBXML_DOCB_ENABLED
+static int docbook = 0;
+#endif
+#ifdef LIBXML_HTML_ENABLED
+static int html = 0;
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+static int xinclude = 0;
+#endif
+static int profile = 0;
+
+static const char *params[16 + 1];
+static int nbparams = 0;
+static const char *output = NULL;
+
+/*
+ *  The LaTeX translation table. Translate unicodes to LaTeX escape sequences.
+ */
+
+//#define DEBUG
+
+struct
+{
+   int           unicode;
+   unsigned char *sequence;
+} textab[] =
+{
+   {  '#',     "\\#"              },
+   {  '$',     "\\$"              },
+   {  '%',     "\\%"              },
+   {  '&',     "\\&"              },
+   {  '<',     "\\verb+<+"        },
+   {  '>',     "\\verb+>+"        },
+   {  '\\',    "$\\backslash$"    },
+   {  '^',     "\\verb+^+"        },
+   {  '_',     "\\_"              },
+   {  '{',     "\\{"              },
+   {  '}',     "\\}"              },
+   {  '~',     "\\verb+~+"        },
+   {  160,     "~"                },
+   {  161,     "!`"               },
+   {  162,     "..."              },
+   {  163,     "\\pounds"         },
+   {  164,     "..."              },
+   {  165,     "..."              },
+   {  166,     "..."              },
+   {  167,     "\\S"              },
+   {  168,     "\\\"{ }"          },
+   {  169,     "\\copyright"      },
+   {  170,     "..."              },
+   {  171,     "..."              },
+   {  172,     "$\\neg$"          },
+   {  173,     "..."              },
+   {  174,     "..."              },
+   {  175,     "\\={ }"           },
+   {  176,     "$^{\\circ}$"      },
+   {  177,     "$\\pm$"           },
+   {  178,     "$^{2}$"           },
+   {  179,     "$^{3}$"           },
+   {  180,     "\\'{ }"           },
+   {  181,     "$\\mu$"           },
+   {  182,     "\\P"              },
+   {  183,     "$\\cdot$"         },
+   {  184,     "\\c{ }"           },
+   {  185,     "$^{1}$"           },
+   {  186,     "..."              },
+   {  187,     "..."              },
+   {  188,     "$\\frac{1}{4}$"   },
+   {  189,     "$\\frac{1}{2}$"   },
+   {  190,     "$\\frac{3}{4}$"   },
+   {  191,     "?`"               },
+   {  192,     "\\`{A}"           },
+   {  193,     "\\'{A}"           },
+   {  194,     "\\^{A}"           },
+   {  195,     "\\~{A}"           },
+   {  196,     "\\\"{A}"          },
+   {  197,     "\\AA"             },
+   {  198,     "\\AE"             },
+   {  199,     "\\c{C}"           },
+   {  200,     "\\`{E}"           },
+   {  201,     "\\'{E}"           },
+   {  202,     "\\^{E}"           },
+   {  203,     "\\\"{E}"          },
+   {  204,     "\\`{I}"           },
+   {  205,     "\\'{I}"           },
+   {  206,     "\\^{I}"           },
+   {  207,     "\\\"{I}"          },
+   {  208,     "..."              },
+   {  209,     "\\~{N}"           },
+   {  210,     "\\`{O}"           },
+   {  211,     "\\'{O}"           },
+   {  212,     "\\^{O}"           },
+   {  213,     "\\~{O}"           },
+   {  214,     "\\\"{O}"          },
+   {  215,     "$\\times$"        },
+   {  216,     "\\O"              },
+   {  217,     "\\`{U}"           },
+   {  218,     "\\'{U}"           },
+   {  219,     "\\^{U}"           },
+   {  220,     "\\\"{U}"          },
+   {  221,     "\\'{Y}"           },
+   {  222,     "..."              },
+   {  223,     "\\ss"             },
+   {  224,     "\\`{a}"           },
+   {  225,     "\\'{a}"           },
+   {  226,     "\\^{a}"           },
+   {  227,     "\\~{a}"           },
+   {  228,     "\\\"{a}"          },
+   {  229,     "\\aa"             },
+   {  230,     "\\ae"             },
+   {  231,     "\\c{c}"           },
+   {  232,     "\\`{e}"           },
+   {  233,     "\\'{e}"           },
+   {  234,     "\\^{e}"           },
+   {  235,     "\\\"{e}"          },
+   {  236,     "\\`{i}"           },
+   {  237,     "\\'{i}"           },
+   {  238,     "\\^{i}"           },
+   {  239,     "\\\"{i}"          },
+   {  240,     "..."              },
+   {  241,     "\\~{n}"           },
+   {  242,     "\\`{o}"           },
+   {  243,     "\\'{o}"           },
+   {  244,     "\\^{o}"           },
+   {  245,     "\\~{o}"           },
+   {  246,     "\\\"{o}"          },
+   {  247,     "$\\div$"          },
+   {  248,     "\\o"              },
+   {  249,     "\\`{u}"           },
+   {  250,     "\\'{u}"           },
+   {  251,     "\\^{u}"           },
+   {  252,     "\\\"{u}"          },
+   {  253,     "\\'{y}"           },
+   {  254,     "..."              },
+   {  255,     "\\\"{y}"          },
+   {  338,     "\\OE"             },
+   {  339,     "\\oe"             },
+   {  352,     "\\u{S}"           },
+   {  353,     "\\u{s}"           },
+   {  376,     "\\\"{Y}"          },
+   {  913,     "A"                },
+   {  914,     "B"                },
+   {  915,     "$\\Gamma$"        },
+   {  916,     "$\\Delta$"        },
+   {  917,     "E"                },
+   {  918,     "Z"                },
+   {  919,     "H"                },
+   {  920,     "$\\Theta$"        },
+   {  921,     "I"                },
+   {  922,     "K"                },
+   {  923,     "$\\Lambda$"       },
+   {  924,     "M"                },
+   {  925,     "N"                },
+   {  926,     "$\\Xi$"           },
+   {  927,     "O"                },
+   {  928,     "$\\Pi$"           },
+   {  929,     "P"                },
+   {  931,     "$\\Sigma$"        },
+   {  932,     "T"                },
+   {  933,     "$\\Upsilon$"      },
+   {  934,     "$\\Phi$"          },
+   {  935,     "X"                },
+   {  936,     "$\\Psi$"          },
+   {  937,     "$\\Omega$"        },
+   {  945,     "$\\alpha$"        },
+   {  946,     "$\\beta$"         },
+   {  947,     "$\\gamma$"        },
+   {  948,     "$\\delta$"        },
+   {  949,     "$\\epsilon$"      },
+   {  950,     "$\\zeta$"         },
+   {  951,     "$\\eta$"          },
+   {  952,     "$\\theta$"        },
+   {  953,     "$\\iota$"         },
+   {  954,     "$\\kappa$"        },
+   {  955,     "$\\lambda$"       },
+   {  956,     "$\\mu$"           },
+   {  957,     "$\\nu$"           },
+   {  958,     "$\\xi$"           },
+   {  959,     "o"                },
+   {  960,     "$\\pi$"           },
+   {  961,     "$\\rho$"          },
+   {  962,     "$\\varsigma$"     },
+   {  963,     "$\\sigma$"        },
+   {  964,     "$\\tau$"          },
+   {  965,     "$\\upsilon$"      },
+   {  966,     "$\\phi$"          },
+   {  967,     "$\\chi$"          },
+   {  968,     "$\\psi$"          },
+   {  969,     "$\\omega$"        },
+   { 8224,     "\\dag"            },
+   { 8225,     "\\ddag"           },
+   { 8226,     "$\\bullet$"       },
+   { 8230,     "$\\ldots$"        },
+   { 8242,     "$\\prime$"        },
+   { 8243,     "$\\prime\\prime$" },
+   { 8254,     "\\={ }"           },
+   { 8364,     "\\EUR"            },
+   { 8465,     "$\\Im$"           },
+   { 8472,     "$\\wp$"           },
+   { 8476,     "$\\Re$"           },
+   { 8482,     "$^{TM}$"          },
+   { 8501,     "$\\aleph$"        },
+   { 8592,     "$\\leftarrow$"    },
+   { 8593,     "$\\uparrow$"      },
+   { 8594,     "$\\rightarrow$"   },
+   { 8595,     "$\\downarrow$"    },
+   { 8596,     "$\\leftrightarrow$" },
+   { 8629,     "$\\hookleftarrow$"},
+   { 8656,     "$\\Leftarrow$"    },
+   { 8657,     "$\\Uparrow$"      },
+   { 8658,     "$\\Rightarrow$"   },
+   { 8659,     "$\\Downarrow$"    },
+   { 8660,     "$\\Leftrightarrow$" },
+   { 8704,     "$\\forall$"       },
+   { 8706,     "$\\partial$"      },
+   { 8707,     "$\\exists$"       },
+   { 8709,     "$\\emptyset$"     },
+   { 8711,     "$\\nabla$"        },
+   { 8712,     "$\\in$"           },
+   { 8713,     "..."              },
+   { 8715,     "$\\ni$"           },
+   { 8719,     "$\\prod$"         },
+   { 8721,     "$\\sum$"          },
+   { 8722,     "$-$"              },
+   { 8727,     "$\\ast$"          },
+   { 8730,     "$\\surd$"         },
+   { 8733,     "$\\propto$"       },
+   { 8734,     "$\\infty$"        },
+   { 8736,     "$\\angle$"        },
+   { 8743,     "$\\wedge$"        },
+   { 8744,     "$\\vee$"          },
+   { 8745,     "$\\cap$"          },
+   { 8746,     "$\\cup$"          },
+   { 8747,     "$\\int$"          },
+   { 8756,     "$\\leadsto$"      },
+   { 8764,     "$\\sim$"          },
+   { 8773,     "$\\cong$"         },
+   { 8776,     "$\\approx$"       },
+   { 8800,     "$\\neq$"          },
+   { 8801,     "$\\equiv$"        },
+   { 8804,     "$\\leq$"          },
+   { 8805,     "$\\geq$"          },
+   { 8834,     "$\\subset$"       },
+   { 8835,     "$\\supset$"       },
+   { 8836,     "..."              },
+   { 8838,     "$\\subseteq$"     },
+   { 8839,     "$\\supseteq$"     },
+   { 8853,     "$\\oplus$"        },
+   { 8855,     "$\\otimes$"       },
+   { 8869,     "$\\perp$"         },
+   { 8901,     "$\\cdot$"         },
+   { 8968,     "$\\lceil$"        },
+   { 8969,     "$\\rceil$"        },
+   { 8970,     "$\\lfloor$"       },
+   { 8971,     "$\\rfloor$"       },
+   { 9001,     "$\\langle$"       },
+   { 9002,     "$\\rangle$"       },
+   { 9674,     "$\\Diamond$"      },
+   { 9824,     "$\\spadesuit$"    },
+   { 9827,     "$\\clubsuit$"     },
+   { 9829,     "$\\heartsuit$"    },
+   { 9830,     "$\\diamondsuit$"  },
+};
+
+unsigned char *latex_translate(int code)
+{
+   char   *translation;
+   int    i;
+
+   translation = 0;
+
+   for (i = 0; translation == 0 && textab[i].unicode <= code
+               && i < sizeof(textab) / sizeof(textab[0]); i++)
+   {
+      if (textab[i].unicode == code)
+      {
+         translation = textab[i].sequence;
+#ifdef DEBUG
+         fprintf(stderr, "\n*** translation for 0x%04x is %s\n", code, translation);
+#endif
+      }
+   }
+   return  translation;
+}
+
+static void
+xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur, const char *filename) {
+    xmlDocPtr res;
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+    if (xinclude) {
+       xmlXIncludeProcess(doc);
+    }
+#endif
+    if (output == NULL) {
+       if (profile) {
+           res = xsltProfileStylesheet(cur, doc, params, stderr);
+       } else {
+           res = xsltApplyStylesheet(cur, doc, params);
+       }
+       xmlFreeDoc(doc);
+       if (res == NULL) {
+           fprintf(stderr, "no result for %s\n", filename);
+           return;
+       }
+       if (noout) {
+           xmlFreeDoc(res);
+           return;
+       }
+#ifdef LIBXML_DEBUG_ENABLED
+       if (debug)
+           xmlDebugDumpDocument(stdout, res);
+       else {
+#endif
+           if (cur->methodURI == NULL) {
+               xsltSaveResultToFile(stdout, res, cur);
+           } else {
+               if (xmlStrEqual
+                   (cur->method, (const xmlChar *) "xhtml")) {
+                   fprintf(stderr, "non standard output xhtml\n");
+                   xsltSaveResultToFile(stdout, res, cur);
+               } else {
+                   fprintf(stderr,
+                           "Unsupported non standard output %s\n",
+                           cur->method);
+                   xsltSaveResultToFile(stdout, res, cur);
+               }
+           }
+#ifdef LIBXML_DEBUG_ENABLED
+       }
+#endif
+
+       xmlFreeDoc(res);
+    } else {
+       xsltRunStylesheet(cur, doc, params, output, NULL, NULL);
+       xmlFreeDoc(doc);
+    }
+}
+
+
+void LatexEscape(xmlNodePtr node)
+{
+   xmlNodePtr  child;
+   xmlChar     *byte;
+   int         unicode;
+
+   unsigned char  *translation, *replacement;
+   int            textlen;
+   int            i;
+
+   if (xmlNodeIsText(node))
+   {
+#ifdef DEBUG
+      fprintf(stderr, "\n-------- Text node (%d bytes):\n%s",
+                      strlen(node->content), node->content);
+#endif
+
+      textlen = strlen(node->content);
+      if (textlen < 100)
+      {
+         textlen = 100;
+      }
+      replacement = malloc(textlen);
+      i           = 0;
+      
+      for (byte = node->content; *byte != '\0'; byte++)
+      {
+         /* transform from utf-8 to unicode */
+
+         if ((*byte & 0x80) == 0)
+         {
+            unicode = *byte;
+         }
+         else if ((*byte & 0xe0) == 0xc0)
+         {
+#ifdef DEBUG
+            fprintf(stderr, "2-byte unicode: 0x%02x, 0x%02x\n",byte[0], byte[1]);
+#endif
+            unicode = (*byte & 0x1f) << 6;
+            byte++;
+            unicode |= *byte & 0x3f;
+#ifdef DEBUG
+            fprintf(stderr, "Unicode = 0x%04x\n", unicode);
+#endif
+         }
+         else if ((*byte & 0xf0) == 0xe0)
+         {
+             /*  3-byte unicode */
+
+            unicode = (*byte & 0x0f) << 12;
+            byte++;
+            unicode |= (*byte & 0x3f) << 6;
+            byte++;
+            unicode |= *byte & 0x3f;
+         }
+         else
+         {
+            fprintf(stderr, "More than 3 bytes utf-8 is not supported.\n");
+         }
+
+         translation = latex_translate(unicode);
+
+         /*  Append the original byte or the translation to the replacment text */
+
+         if (translation == 0)
+         {
+            if (i + 1 >= textlen)
+            {
+               textlen += 100;
+               replacement = realloc(replacement, textlen);
+            }
+            replacement[i++] = *byte;
+         }
+         else
+         {
+            int   j;
+
+            if (i + strlen(translation) + 1 >= textlen)
+            {
+               textlen += 100;
+               replacement = realloc(replacement, textlen);
+            }
+            for (j = 0; translation[j]; j++)
+            {
+               replacement[i++] = translation[j];
+            } 
+         }
+      }
+      replacement[i] = '\0';
+      xmlNodeSetContent(node, replacement);
+#ifdef DEBUG
+      fprintf(stderr, "\n-------- Replacement text:\n%s", replacement);
+#endif
+      free(replacement);
+   }
+   else
+   {
+      for (child = node->children; child != 0; child = child->next)
+      {
+         if (strcmp(child->name, "verbatim") != 0)
+         {
+            LatexEscape(child);
+         }
+      }
+   }
+}
+
+static void usage(const char *name)
+{
+    printf("Usage: %s [options] stylesheet file [file ...]\n", name);
+    printf("   Options:\n");
+    printf("\t--version or -V: show the version of libxml and libxslt used\n");
+    printf("\t--verbose or -v: show logs of what's happening\n");
+    printf("\t--output file or -o file: save to a given file\n");
+    printf("\t--debug: dump the tree of the result instead\n");
+    printf("\t--latex: transform special characters for latex\n");
+    printf("\t--novalid: skip the Dtd loading phase\n");
+    printf("\t--noout: do not dump the result\n");
+    printf("\t--maxdepth val : increase the maximum depth\n");
+#ifdef LIBXML_HTML_ENABLED
+    printf("\t--html: the input document is(are) an HTML file(s)\n");
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+    printf("\t--docbook: the input document is SGML docbook\n");
+#endif
+    printf("\t--param name value : pass a (parameter,value) pair\n");
+    printf("\t      string values must be quoted like \"'string'\"\n");
+    printf("\t--nonet refuse to fetch DTDs or entities over network\n");
+#ifdef LIBXML_CATALOG_ENABLED
+    printf("\t--catalogs : use SGML catalogs from $SGML_CATALOG_FILES\n");
+    printf("\t             otherwise XML Catalogs starting from \n");
+    printf("\t         file:///etc/xml/catalog are activated by default\n");
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+    printf("\t--xinclude : do XInclude processing on document intput\n");
+#endif
+    printf("\t--profile or --norman : dump profiling informations \n");
+}
+
+int
+main(int argc, char **argv)
+{
+    int i;
+    xsltStylesheetPtr cur = NULL;
+    xmlDocPtr doc, style;
+
+    if (argc <= 1) {
+        usage(argv[0]);
+        return (1);
+    }
+
+    xmlInitMemory();
+
+    LIBXML_TEST_VERSION
+
+    xmlLineNumbersDefault(1);
+
+    if (novalid == 0)
+        xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+    else
+        xmlLoadExtDtdDefaultValue = 0;
+    for (i = 1; i < argc; i++) {
+        if (!strcmp(argv[i], "-"))
+            break;
+
+        if (argv[i][0] != '-')
+            continue;
+#ifdef LIBXML_DEBUG_ENABLED
+        if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) {
+            debug++;
+        } else
+#endif
+        if ((!strcmp(argv[i], "-v")) ||
+                (!strcmp(argv[i], "-verbose")) ||
+                (!strcmp(argv[i], "--verbose"))) {
+            xsltSetGenericDebugFunc(stderr, NULL);
+        } else if ((!strcmp(argv[i], "-o")) ||
+                   (!strcmp(argv[i], "-output")) ||
+                   (!strcmp(argv[i], "--output"))) {
+            i++;
+            output = argv[i++];
+        } else if ((!strcmp(argv[i], "-V")) ||
+                   (!strcmp(argv[i], "-version")) ||
+                   (!strcmp(argv[i], "--version")))
+               {
+
+        } else if ((!strcmp(argv[i], "-novalid")) ||
+                   (!strcmp(argv[i], "--novalid"))) {
+            novalid++;
+        } else if ((!strcmp(argv[i], "-latex")) ||
+                   (!strcmp(argv[i], "--latex"))) {
+            latex++;
+        } else if ((!strcmp(argv[i], "-noout")) ||
+                   (!strcmp(argv[i], "--noout"))) {
+            noout++;
+#ifdef LIBXML_DOCB_ENABLED
+        } else if ((!strcmp(argv[i], "-docbook")) ||
+                   (!strcmp(argv[i], "--docbook"))) {
+            docbook++;
+#endif
+#ifdef LIBXML_HTML_ENABLED
+        } else if ((!strcmp(argv[i], "-html")) ||
+                   (!strcmp(argv[i], "--html"))) {
+            html++;
+#endif
+        } else if ((!strcmp(argv[i], "-profile")) ||
+                   (!strcmp(argv[i], "--profile"))) {
+            profile++;
+        } else if ((!strcmp(argv[i], "-norman")) ||
+                   (!strcmp(argv[i], "--norman"))) {
+            profile++;
+        } else if ((!strcmp(argv[i], "-nonet")) ||
+                   (!strcmp(argv[i], "--nonet"))) {
+            xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader);
+#ifdef LIBXML_CATALOG_ENABLED
+        } else if ((!strcmp(argv[i], "-catalogs")) ||
+                   (!strcmp(argv[i], "--catalogs"))) {
+            const char *catalogs;
+
+            catalogs = getenv("SGML_CATALOG_FILES");
+            if (catalogs == NULL) {
+                fprintf(stderr, "Variable $SGML_CATALOG_FILES not set\n");
+            } else {
+                xmlLoadCatalogs(catalogs);
+            }
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+        } else if ((!strcmp(argv[i], "-xinclude")) ||
+                   (!strcmp(argv[i], "--xinclude"))) {
+            xinclude++;
+            xsltSetXIncludeDefault(1);
+#endif
+        } else if ((!strcmp(argv[i], "-param")) ||
+                   (!strcmp(argv[i], "--param"))) {
+            i++;
+            params[nbparams++] = argv[i++];
+            params[nbparams++] = argv[i];
+            if (nbparams >= 16) {
+                fprintf(stderr, "too many params\n");
+                return (1);
+            }
+        } else if ((!strcmp(argv[i], "-maxdepth")) ||
+                   (!strcmp(argv[i], "--maxdepth"))) {
+            int value;
+
+            i++;
+            if (sscanf(argv[i], "%d", &value) == 1) {
+                if (value > 0)
+                    xsltMaxDepth = value;
+            }
+        } else {
+            fprintf(stderr, "Unknown option %s\n", argv[i]);
+            usage(argv[0]);
+            return (1);
+        }
+    }
+    params[nbparams] = NULL;
+
+    /*
+     * Replace entities with their content.
+     */
+    xmlSubstituteEntitiesDefault(1);
+
+    /*
+     * Register the EXSLT extensions and the test module
+     */
+    exsltRegisterAll();
+    //xsltRegisterTestModule();
+
+    for (i = 1; i < argc; i++) {
+        if ((!strcmp(argv[i], "-maxdepth")) ||
+            (!strcmp(argv[i], "--maxdepth"))) {
+            i++;
+            continue;
+        } else if ((!strcmp(argv[i], "-o")) ||
+                   (!strcmp(argv[i], "-output")) ||
+                   (!strcmp(argv[i], "--output"))) {
+            i++;
+           continue;
+       }
+        if ((!strcmp(argv[i], "-param")) || (!strcmp(argv[i], "--param"))) {
+            i += 2;
+            continue;
+        }
+        if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0)) {
+           style = xmlParseFile((const char *) argv[i]);
+           if (style == NULL) {
+               fprintf(stderr,  "cannot parse %s\n", argv[i]);
+               cur = NULL;
+           } else {
+               cur = xsltLoadStylesheetPI(style);
+               if (cur != NULL) {
+                   /* it is an embedded stylesheet */
+                   xsltProcess(style, cur, argv[i]);
+                   xsltFreeStylesheet(cur);
+                   goto done;
+               }
+               cur = xsltParseStylesheetDoc(style);
+               if (cur != NULL) {
+                   if (cur->indent == 1)
+                       xmlIndentTreeOutput = 1;
+                   else
+                       xmlIndentTreeOutput = 0;
+                   i++;
+               } else {
+                   xmlFreeDoc(style);
+                   goto done;
+               }
+           }
+            break;
+
+        }
+    }
+
+    /*
+     * disable CDATA from being built in the document tree
+     */
+    xmlDefaultSAXHandlerInit();
+    xmlDefaultSAXHandler.cdataBlock = NULL;
+
+    if ((cur != NULL) && (cur->errors == 0)) {
+        for (; i < argc; i++) {
+           doc = NULL;
+#ifdef LIBXML_HTML_ENABLED
+            if (html)
+                doc = htmlParseFile(argv[i], NULL);
+            else
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+            if (docbook)
+                doc = docbParseFile(argv[i], NULL);
+            else
+#endif
+                doc = xmlParseFile(argv[i]);
+            if (doc == NULL) {
+                fprintf(stderr, "unable to parse %s\n", argv[i]);
+                continue;
+            }
+            if (latex)
+            {
+               LatexEscape(xmlDocGetRootElement(doc));
+            }
+           xsltProcess(doc, cur, argv[i]);
+        }
+    }
+    if (cur != NULL)
+        xsltFreeStylesheet(cur);
+done:
+    //xsltCleanupGlobals();
+    xmlCleanupParser();
+    xmlMemoryDump();
+    return (0);
+}
+
diff --git a/xsl.dtd b/xsl.dtd
new file mode 100644 (file)
index 0000000..549bdaa
--- /dev/null
+++ b/xsl.dtd
@@ -0,0 +1,1296 @@
+<!ENTITY % result-elements "
+     | html
+">
+
+<!ENTITY % char-instructions "
+     | xsl:apply-templates
+     | xsl:call-template
+     | xsl:apply-imports
+     | xsl:for-each
+     | xsl:value-of
+     | xsl:copy-of
+     | xsl:number
+     | xsl:choose
+     | xsl:if
+     | xsl:text
+     | xsl:copy
+     | xsl:variable
+     | xsl:message
+     | xsl:fallback
+">
+
+<!ENTITY % instructions "
+     %char-instructions;
+     | xsl:processing-instruction
+     | xsl:comment
+     | xsl:element
+     | xsl:attribute
+">
+
+<!ENTITY % char-template "
+     (#PCDATA
+      %char-instructions;)*
+">
+
+<!ENTITY % template "
+     (#PCDATA
+      %instructions;
+      %result-elements;)*
+">
+<!-- Used for the type of an attribute value that is a URI reference.-->
+<!ENTITY % URI "CDATA">
+
+<!-- Used for the type of an attribute value that is a pattern.-->
+<!ENTITY % pattern "CDATA">
+
+<!-- Used for the type of an attribute value that is an
+     attribute value template.-->
+<!ENTITY % avt "CDATA">
+
+<!-- Used for the type of an attribute value that is a QName; the prefix
+     gets expanded by the XSLT processor. -->
+<!ENTITY % qname "NMTOKEN">
+
+<!-- Like qname but a whitespace-separated list of QNames. -->
+<!ENTITY % qnames "NMTOKENS">
+
+<!-- Used for the type of an attribute value that is an expression.-->
+<!ENTITY % expr "CDATA">
+
+<!-- Used for the type of an attribute value that consists
+     of a single character.-->
+<!ENTITY % char "CDATA">
+
+<!-- Used for the type of an attribute value that is a priority. -->
+<!ENTITY % priority "NMTOKEN">
+
+<!ENTITY % space-att "xml:space (default|preserve) #IMPLIED">
+
+<!-- This may be overridden to customize the set of elements allowed
+     at the top-level. -->
+
+<!ENTITY % non-xsl-top-level "">
+<!ENTITY % top-level "
+     (xsl:import*,
+     (xsl:include
+      | xsl:strip-space
+      | xsl:preserve-space
+      | xsl:output
+      | xsl:key
+      | xsl:decimal-format
+      | xsl:attribute-set
+      | xsl:variable
+      | xsl:param
+      | xsl:template
+      | xsl:namespace-alias
+      %non-xsl-top-level;)*)
+">
+
+<!ENTITY % top-level-atts '
+     extension-element-prefixes CDATA #IMPLIED
+     exclude-result-prefixes CDATA #IMPLIED
+     id ID #IMPLIED
+     version NMTOKEN #REQUIRED
+     xmlns:xsl CDATA #FIXED "http://www.w3.org/1999/XSL/Transform"
+     %space-att;
+'>
+
+<!-- This entity is defined for use in the ATTLIST declaration
+     for result elements. -->
+
+<!ENTITY % result-element-atts '
+     xsl:extension-element-prefixes CDATA #IMPLIED
+     xsl:exclude-result-prefixes CDATA #IMPLIED
+     xsl:use-attribute-sets %qnames; #IMPLIED
+     xsl:version NMTOKEN #IMPLIED
+'>
+
+<!ELEMENT xsl:stylesheet %top-level;>
+<!ATTLIST xsl:stylesheet %top-level-atts;>
+
+<!ELEMENT xsl:transform %top-level;>
+<!ATTLIST xsl:transform %top-level-atts;>
+
+<!ELEMENT xsl:import EMPTY>
+<!ATTLIST xsl:import href %URI; #REQUIRED>
+
+<!ELEMENT xsl:include EMPTY>
+<!ATTLIST xsl:include href %URI; #REQUIRED>
+
+<!ELEMENT xsl:strip-space EMPTY>
+<!ATTLIST xsl:strip-space elements CDATA #REQUIRED>
+
+<!ELEMENT xsl:preserve-space EMPTY>
+<!ATTLIST xsl:preserve-space elements CDATA #REQUIRED>
+<!ELEMENT xsl:output EMPTY>
+<!ATTLIST xsl:output
+     method %qname; #IMPLIED
+     version NMTOKEN #IMPLIED
+     encoding CDATA #IMPLIED
+     omit-xml-declaration (yes|no) #IMPLIED
+     standalone (yes|no) #IMPLIED
+     doctype-public CDATA #IMPLIED
+     doctype-system CDATA #IMPLIED
+     cdata-section-elements %qnames; #IMPLIED
+     indent (yes|no) #IMPLIED
+     media-type CDATA #IMPLIED
+>
+
+<!ELEMENT xsl:key EMPTY>
+<!ATTLIST xsl:key
+     name %qname; #REQUIRED
+     match %pattern; #REQUIRED
+     use %expr; #REQUIRED
+>
+
+<!ELEMENT xsl:decimal-format EMPTY>
+<!ATTLIST xsl:decimal-format
+     name %qname; #IMPLIED
+     decimal-separator %char; "."
+     grouping-separator %char; ","
+     infinity CDATA "Infinity"
+     minus-sign %char; "-"
+     NaN CDATA "NaN"
+     percent %char; "%"
+     per-mille %char; "&#x2030;"
+     zero-digit %char; "0"
+     digit %char; "#"
+     pattern-separator %char; ";"
+>
+<!ELEMENT xsl:namespace-alias EMPTY>
+<!ATTLIST xsl:namespace-alias
+     stylesheet-prefix CDATA #REQUIRED
+     result-prefix CDATA #REQUIRED
+>
+
+<!ELEMENT xsl:template
+     (#PCDATA
+     %instructions;
+     %result-elements;
+     | xsl:param)*
+>
+
+<!ATTLIST xsl:template
+     match %pattern; #IMPLIED
+     name %qname; #IMPLIED
+     priority %priority; #IMPLIED
+     mode %qname; #IMPLIED
+     %space-att;
+>
+
+<!ELEMENT xsl:value-of EMPTY>
+<!ATTLIST xsl:value-of
+     select %expr; #REQUIRED
+     disable-output-escaping (yes|no) "no"
+>
+
+<!ELEMENT xsl:copy-of EMPTY>
+<!ATTLIST xsl:copy-of select %expr; #REQUIRED>
+<!ELEMENT xsl:number EMPTY>
+<!ATTLIST xsl:number
+     level (single|multiple|any) "single"
+     count %pattern; #IMPLIED
+     from %pattern; #IMPLIED
+     value %expr; #IMPLIED
+     format %avt; '1'
+     lang %avt; #IMPLIED
+     letter-value %avt; #IMPLIED
+     grouping-separator %avt; #IMPLIED
+     grouping-size %avt; #IMPLIED
+>
+
+<!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*>
+<!ATTLIST xsl:apply-templates
+     select %expr; "node()"
+     mode %qname; #IMPLIED
+>
+
+<!ELEMENT xsl:apply-imports EMPTY>
+
+<!-- xsl:sort cannot occur after any other elements or
+     any non-whitespace character -->
+
+<!ELEMENT xsl:for-each
+     (#PCDATA
+     %instructions;
+     %result-elements;
+     | xsl:sort)*
+              >
+<!ATTLIST xsl:for-each
+     select %expr; #REQUIRED
+     %space-att;
+>
+
+<!ELEMENT xsl:sort EMPTY>
+<!ATTLIST xsl:sort
+     select %expr; "."
+     lang %avt; #IMPLIED
+     data-type %avt; "text"
+     order %avt; "ascending"
+     case-order %avt; #IMPLIED
+>
+
+<!ELEMENT xsl:if %template;>
+<!ATTLIST xsl:if
+     test %expr; #REQUIRED
+     %space-att;
+>
+
+<!ELEMENT xsl:choose (xsl:when+, xsl:otherwise?)>
+<!ATTLIST xsl:choose %space-att;>
+
+<!ELEMENT xsl:when %template;>
+<!ATTLIST xsl:when
+     test %expr; #REQUIRED
+     %space-att;
+>
+
+<!ELEMENT xsl:otherwise %template;>
+<!ATTLIST xsl:otherwise %space-att;>
+<!ELEMENT xsl:attribute-set (xsl:attribute)*>
+<!ATTLIST xsl:attribute-set
+     name %qname; #REQUIRED
+     use-attribute-sets %qnames; #IMPLIED
+>
+
+<!ELEMENT xsl:call-template (xsl:with-param)*>
+<!ATTLIST xsl:call-template
+     name %qname; #REQUIRED
+>
+
+<!ELEMENT xsl:with-param %template;>
+<!ATTLIST xsl:with-param
+     name %qname; #REQUIRED
+     select %expr; #IMPLIED
+>
+
+<!ELEMENT xsl:variable %template;>
+<!ATTLIST xsl:variable 
+     name %qname; #REQUIRED
+     select %expr; #IMPLIED
+>
+
+<!ELEMENT xsl:param %template;>
+<!ATTLIST xsl:param 
+     name %qname; #REQUIRED
+     select %expr; #IMPLIED
+>
+
+<!ELEMENT xsl:text (#PCDATA)>
+<!ATTLIST xsl:text
+     disable-output-escaping (yes|no) "no"
+>
+<!ELEMENT xsl:processing-instruction %char-template;>
+<!ATTLIST xsl:processing-instruction 
+     name %avt; #REQUIRED
+     %space-att;
+>
+
+<!ELEMENT xsl:element %template;>
+<!ATTLIST xsl:element 
+     name %avt; #REQUIRED
+     namespace %avt; #IMPLIED
+     use-attribute-sets %qnames; #IMPLIED
+     %space-att;
+>
+
+<!ELEMENT xsl:attribute %char-template;>
+<!ATTLIST xsl:attribute 
+     name %avt; #REQUIRED
+     namespace %avt; #IMPLIED
+     %space-att;
+>
+
+<!ELEMENT xsl:comment %char-template;>
+<!ATTLIST xsl:comment %space-att;>
+
+<!ELEMENT xsl:copy %template;>
+<!ATTLIST xsl:copy
+     %space-att;
+     use-attribute-sets %qnames; #IMPLIED
+>
+<!ELEMENT xsl:message %template;>
+<!ATTLIST xsl:message
+     %space-att;
+     terminate (yes|no) "no"
+>
+
+<!ELEMENT xsl:fallback %template;>
+<!ATTLIST xsl:fallback %space-att;>
+
+<!--   This is the included XTHML DTD   -->
+
+<!--
+   Extensible HTML version 1.0 Strict DTD
+
+   This is the same as HTML 4.0 Strict except for
+   changes due to the differences between XML and SGML.
+
+   Namespace = http://www.w3.org/1999/xhtml
+
+   For further information, see: http://www.w3.org/TR/xhtml1
+
+   Copyright (c) 1998-2000 W3C (MIT, INRIA, Keio),
+   All Rights Reserved. 
+
+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+
+   $Revision: 1.1 $
+   $Date: 2002-08-28 14:50:50 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+    <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+    <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+    <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+    <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+    <!-- a language code, as per [RFC1766] -->
+
+<!ENTITY % Character "CDATA">
+    <!-- a single character from [ISO10646] -->
+
+<!ENTITY % Number "CDATA">
+    <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+    <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+    <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+    <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+    <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+    <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+    <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+    <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+    <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+    <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+    <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+    <!-- pixel, percentage, or relative -->
+
+<!ENTITY % MultiLengths "CDATA">
+    <!-- comma-separated list of MultiLength -->
+
+<!ENTITY % Pixels "CDATA">
+    <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+    <!-- comma separated list of lengths -->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+  id       document-wide unique id
+  class    space separated list of classes
+  style    associated style info
+  title    advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id          ID             #IMPLIED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED"
+  >
+
+<!-- internationalization attributes
+  lang        language code (backwards compatible)
+  xml:lang    language code (as per XML 1.0 spec)
+  dir         direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #IMPLIED"
+  >
+
+<!-- attributes for common UI events
+  onclick     a pointer button was clicked
+  ondblclick  a pointer button was double clicked
+  onmousedown a pointer button was pressed down
+  onmouseup   a pointer button was released
+  onmousemove a pointer was moved onto the element
+  onmouseout  a pointer was moved away from the element
+  onkeypress  a key was pressed and released
+  onkeydown   a key was pressed down
+  onkeyup     a key was released
+-->
+<!ENTITY % events
+ "onclick     %Script;       #IMPLIED
+  ondblclick  %Script;       #IMPLIED
+  onmousedown %Script;       #IMPLIED
+  onmouseup   %Script;       #IMPLIED
+  onmouseover %Script;       #IMPLIED
+  onmousemove %Script;       #IMPLIED
+  onmouseout  %Script;       #IMPLIED
+  onkeypress  %Script;       #IMPLIED
+  onkeydown   %Script;       #IMPLIED
+  onkeyup     %Script;       #IMPLIED"
+  >
+
+<!-- attributes for elements that can get the focus
+  accesskey   accessibility key character
+  tabindex    position in tabbing order
+  onfocus     the element got the focus
+  onblur      the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey   %Character;    #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED"
+  >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special
+   "br | span | bdo | object | img | map">
+
+<!ENTITY % fontstyle "tt | i | b | big | small">
+
+<!ENTITY % phrase "em | strong | dfn | code | q | sub | sup |
+                   samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc "ins | del | script | noscript">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl">
+<!ENTITY % blocktext "pre | hr | blockquote | address">
+
+<!ENTITY % block
+     "p | %heading; | div | %lists; | %blocktext; | fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes Block and Inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc;)*">
+
+<!-- pre uses %Inline excluding img, object, big, small, sup or sup -->
+
+<!ENTITY % pre.content
+   "(#PCDATA | a | br | span | bdo | map | tt | i | b |
+      %phrase; | %inline.forms;)*">
+
+<!-- form uses %Block; excluding form -->
+
+<!ENTITY % form.content "(%block; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form and form controls -->
+
+<!ENTITY % button.content
+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+    table | %special; | %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+  %i18n;
+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'
+  >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object)*">
+
+<!-- content model is %head.misc; combined with a single
+     title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+     ((title, %head.misc;, (base, %head.misc;)?) |
+      (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+  %i18n;
+  profile     %URI;          #IMPLIED
+  >
+
+<!-- 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. Exactly one title is required per document.
+    -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title %i18n;>
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+  href        %URI;          #IMPLIED
+  >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+  %i18n;
+  http-equiv  CDATA          #IMPLIED
+  name        CDATA          #IMPLIED
+  content     CDATA          #REQUIRED
+  scheme      CDATA          #IMPLIED
+  >
+
+<!--
+  Relationship values can be used in principle:
+
+   a) for document specific toolbars/menus when used
+      with the link element in document head e.g.
+        start, contents, previous, next, index, end, help
+   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="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  type        %ContentType;  #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  media       %MediaDesc;    #IMPLIED
+  >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+  %i18n;
+  type        %ContentType;  #REQUIRED
+  media       %MediaDesc;    #IMPLIED
+  title       %Text;         #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #REQUIRED
+  src         %URI;          #IMPLIED
+  defer       (defer)        #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Block;>
+<!ATTLIST noscript
+  %attrs;
+  >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Block;>
+<!ATTLIST body
+  %attrs;
+  onload          %Script;   #IMPLIED
+  onunload        %Script;   #IMPLIED
+  >
+
+<!ELEMENT div %Flow;>  <!-- generic language/style container -->
+<!ATTLIST div
+  %attrs;
+  >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+  %attrs;
+  >
+
+<!--=================== Headings =========================================-->
+
+<!--
+  There are six levels of headings from h1 (the most important)
+  to h6 (the least important).
+-->
+
+<!ELEMENT h1  %Inline;>
+<!ATTLIST h1
+   %attrs;
+   >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+   %attrs;
+   >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+   %attrs;
+   >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+   %attrs;
+   >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+   %attrs;
+   >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+   %attrs;
+   >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+  %attrs;
+  >
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+  %attrs;
+  >
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+  %attrs;
+  >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+  %attrs;
+  >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+  %attrs;
+  >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+  %attrs;
+  >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address %Inline;>
+<!ATTLIST address
+  %attrs;
+  >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+  %attrs;
+  >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+  %attrs;
+  xml:space (preserve) #FIXED 'preserve'
+  >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Block;>
+<!ATTLIST blockquote
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+  ins/del are allowed in block and inline content, but its
+  inappropriate to include block content within an ins element
+  occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+  %attrs;
+  >
+
+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+  %coreattrs;
+  %events;
+  lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #REQUIRED
+  >
+
+<!ELEMENT br EMPTY>   <!-- forced line break -->
+<!ATTLIST br
+  %coreattrs;
+  >
+
+<!ELEMENT em %Inline;>   <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;>   <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;>   <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;>   <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;>  <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;>   <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;>   <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;>   <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;>   <!-- inlined quote -->
+<!ATTLIST q
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;>   <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;>   <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;>   <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;>   <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!--==================== Object ======================================-->
+<!--
+  object is used to embed objects as part of HTML pages.
+  param elements should precede other content. Parameters
+  can also be expressed as attribute/value pairs on the
+  object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+  %attrs;
+  declare     (declare)      #IMPLIED
+  classid     %URI;          #IMPLIED
+  codebase    %URI;          #IMPLIED
+  data        %URI;          #IMPLIED
+  type        %ContentType;  #IMPLIED
+  codetype    %ContentType;  #IMPLIED
+  archive     %UriList;      #IMPLIED
+  standby     %Text;         #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  >
+
+<!--
+  param is used to supply a named property value.
+  In XML it would seem natural to follow RDF and support an
+  abbreviated syntax where the param elements are replaced
+  by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+  id          ID             #IMPLIED
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  valuetype   (data|ref|object) "data"
+  type        %ContentType;  #IMPLIED
+  >
+
+<!--=================== Images ===========================================-->
+
+<!--
+   To avoid accessibility problems for people who aren't
+   able to see the image, you should provide a text
+   description using the alt and longdesc attributes.
+   In addition, avoid the use of server-side image maps.
+   Note that in this DTD there is no name attribute. That
+   is only available in the transitional and frameset DTD.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+  %attrs;
+  src         %URI;          #REQUIRED
+  alt         %Text;         #REQUIRED
+  longdesc    %URI;          #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  ismap       (ismap)        #IMPLIED
+  >
+
+<!-- usemap points to a map element which may be in this document
+  or an external document, although the latter is not widely supported -->
+
+<!--================== 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 -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+  %i18n;
+  %events;
+  id          ID             #REQUIRED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+  %attrs;
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  href        %URI;          #IMPLIED
+  nohref      (nohref)       #IMPLIED
+  alt         %Text;         #REQUIRED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!--================ Forms ===============================================-->
+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+  %attrs;
+  action      %URI;          #REQUIRED
+  method      (get|post)     "get"
+  enctype     %ContentType;  "application/x-www-form-urlencoded"
+  onsubmit    %Script;       #IMPLIED
+  onreset     %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  accept-charset %Charsets;  #IMPLIED
+  >
+
+<!--
+  Each label must not contain more than ONE field
+  Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+  %attrs;
+  for         IDREF          #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!ENTITY % InputType
+  "(text | password | checkbox |
+    radio | submit | reset |
+    file | hidden | image | button)"
+   >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY>     <!-- form control -->
+<!ATTLIST input
+  %attrs;
+  type        %InputType;    "text"
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  checked     (checked)      #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  size        CDATA          #IMPLIED
+  maxlength   %Number;       #IMPLIED
+  src         %URI;          #IMPLIED
+  alt         CDATA          #IMPLIED
+  usemap      %URI;          #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  >
+
+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->
+<!ATTLIST select
+  %attrs;
+  name        CDATA          #IMPLIED
+  size        %Number;       #IMPLIED
+  multiple    (multiple)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!ELEMENT optgroup (option)+>   <!-- option group -->
+<!ATTLIST optgroup
+  %attrs;
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #REQUIRED
+  >
+
+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->
+<!ATTLIST option
+  %attrs;
+  selected    (selected)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #IMPLIED
+  value       CDATA          #IMPLIED
+  >
+
+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
+<!ATTLIST textarea
+  %attrs;
+  name        CDATA          #IMPLIED
+  rows        %Number;       #REQUIRED
+  cols        %Number;       #REQUIRED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!--
+  The fieldset element is used to group form fields.
+  Only one legend element should occur in the content
+  and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+  %attrs;
+  >
+
+<!ELEMENT legend %Inline;>     <!-- fieldset label -->
+<!ATTLIST legend
+  %attrs;
+  accesskey   %Character;    #IMPLIED
+  >
+
+<!--
+ Content is %Flow; excluding a, form and form controls
+--> 
+<!ELEMENT button %button.content;>  <!-- push button -->
+<!ATTLIST button
+  %attrs;
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  type        (button|submit|reset) "submit"
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+     "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+  
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+  char        alignment char, e.g. char=':'
+  charoff     offset for alignment char
+-->
+<!ENTITY % cellhalign
+  "align      (left|center|right|justify|char) #IMPLIED
+   char       %Character;    #IMPLIED
+   charoff    %Length;       #IMPLIED"
+  >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+  "valign     (top|middle|bottom|baseline) #IMPLIED"
+  >
+
+<!ELEMENT table
+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption  %Inline;>
+<!ELEMENT thead    (tr)+>
+<!ELEMENT tfoot    (tr)+>
+<!ELEMENT tbody    (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col      EMPTY>
+<!ELEMENT tr       (th|td)+>
+<!ELEMENT th       %Flow;>
+<!ELEMENT td       %Flow;>
+
+<!ATTLIST table
+  %attrs;
+  summary     %Text;         #IMPLIED
+  width       %Length;       #IMPLIED
+  border      %Pixels;       #IMPLIED
+  frame       %TFrame;       #IMPLIED
+  rules       %TRules;       #IMPLIED
+  cellspacing %Length;       #IMPLIED
+  cellpadding %Length;       #IMPLIED
+  >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+  %attrs;
+  >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+     width=64        width in screen pixels
+     width=0.5*      relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+    Use thead to duplicate headers when breaking table
+    across page boundaries, or for static headers when
+    tbody sections are rendered in scrolling panel.
+
+    Use tfoot to duplicate footers when breaking table
+    across page boundaries, or for static footers when
+    tbody sections are rendered in scrolling panel.
+
+    Use multiple tbody sections when rules are needed
+    between groups of table rows.
+-->
+<!ATTLIST thead
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tfoot
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tbody
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tr
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST td
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  >
+