--- /dev/null
+README for the Website DTD V1.10
+
+Website is an XML DTD for building, er, web sites.
+
+Manifest
+--------
+
+README - This readme file
+VERSION - The version number
+website.dtd - The DTD, a customization layer on top of DocBook XML
+example/ - An example website
+xsl/ - XSL stylesheets for converting the Website DTD to HTML
+
+DTD Installation
+----------------
+
+Place the files in this distribution somewhere on your machine. Adjust
+your catalog(s) if appropriate (XML tools frequently do not support
+catalogs, so this may be irrelevant for you).
+
+Please use the following formal public identifier to identify this DTD:
+
+ "-//Norman Walsh//DTD Website V1.10//EN"
+
+For example:
+
+ <!DOCTYPE website PUBLIC "-//Norman Walsh//DTD Website V1.10//EN"
+ "http://docbook.sourceforge.net/repository/website/1.10/website.dtd" [
+ ...
+ ]>
+
+XSL Installation
+----------------
+
+Place the XSL files in this distribution somewhere on your machine.
+
+Use
+---
+
+Process your Website documents with one of the following stylesheets
+using your favorite XSLT processor:
+
+ website.xsl produces a flat-text website
+ tabular.xsl produces a tabular website with navigation in the
+ left-hand column and page contents in the right-hand
+ column.
+
+ Both of these stylesheets produce a monolithic file that must be
+ chunked. The chunk control files and libraries included in this
+ distribution simplify this process, if you are using the chunk.pl
+ file included in the DocBook XSL Stylesheet distribution.
+
+ chunk-website.xsl produces a flat-text website, chunked by XSLT
+ chunk-tabular.xsl produces a tabular website, chunked by XSLT
+
+ In order for the chunking process to succeed, all necessary
+ subdirectories must be created before you begin running the
+ XSLT engine. The chunking versions support XT, Saxon, and Xalan.
+
+Copyright
+---------
+
+Copyright (C) 1999, 2000, 2001 Norman Walsh
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the ``Software''), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+Except as contained in this notice, the names of individuals
+credited with contribution to this software shall not be used in
+advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization
+from the individuals in question.
+
+Any stylesheet derived from this Software that is publically
+distributed will be identified with a different name and the
+version strings in any derived Software will be changed so that
+no possibility of confusion between the derived package and this
+Software will exist.
+
+You may distribute this software under the same terms as DocBook.
+This software is a customization of the DocBook XML V4.1.2, which
+is governed by the following copyright:
+
+ [DocBook is] Copyright 1992, 1993, 1994, 1995, 1996, 1998,
+ 1999 HaL Computer Systems, Inc., O'Reilly & Associates, Inc.,
+ ArborText, Inc., Fujitsu Software Corporation, and the
+ Organization for the Advancement of Structured Information
+ Standards (OASIS).
+
+ Permission to use, copy, modify and distribute the DocBook
+ DTD and its accompanying documentation for any purpose and
+ without fee is hereby granted in perpetuity, provided that
+ the above copyright notice and this paragraph appear in all
+ copies. The copyright holders make no representation about
+ the suitability of the DTD for any purpose. It is provided
+ "as is" without expressed or implied warranty.
+
+For more information about the DocBook DTD, see
+http://www.oasis-open.org/docbook/
+
+Warranty
+--------
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Contacting the Author
+---------------------
+
+This DTD is maintained by Norman Walsh, <ndw@nwalsh.com>.
--- /dev/null
+PROC=saxon
+PROCOPT=
+
+.PHONY : clean
+
+all: test
+
+test:
+ xjparse website.xml
+ifeq ($(PROC),xt)
+ $(PROC) $(PROCOPT) website.xml ../xsl/xtchunk-website.xsl
+else
+ $(PROC) $(PROCOPT) website.xml ../xsl/chunk-website.xsl
+endif
+
+tabular:
+ xnsgmls -sv -c /share/doctypes/catalog website.xml
+ifeq ($(PROC),xt)
+ $(PROC) $(PROCOPT) website.xml ../xsl/xtchunk-tabular.xsl
+else
+ $(PROC) $(PROCOPT) website.xml ../xsl/chunk-tabular.xsl
+endif
+
+clean:
+ rm -f *.html subdir/*.html
+
--- /dev/null
+<webpage id="about">
+<config param="rcsdate" value="$Date$"/>
+<config param="filename" value="about.html"/><head>
+<title>About the Test Home Page</title>
+<summary>About the Test Home Page</summary>
+</head>
+<para>This collection of pages is built from a single SGML
+document using
+<ulink url="http://www.jclark.com/jade/">Jade</ulink> and a
+customization of the DSSSL
+<ulink url="http://nwalsh.com/docbook/dsssl/">DocBook Stylesheet</ulink>
+for HTML.</para>
+<sect1>
+<title>Why?</title>
+<para>There are a number of compelling reasons to maintain these pages in
+SGML rather than HTML.</para>
+<orderedlist>
+<listitem><para>First and foremost, they provide a test environment for the
+HTML stylesheet. Ok, maybe that's not compelling to you, but it's compelling
+to me ;-).</para>
+</listitem>
+<listitem><para>Traditional printed documents are desirable for several of
+these pages.</para>
+<para>Using a more structurally rich format to represent the documents makes
+it possible to produce print as well as online versions.</para>
+</listitem>
+<listitem><para>All of the intra-document linking is automatic.</para>
+<para>The SGML system provides validation for the inra-document links, so
+there is no danger of broken links. (Links to external pages still have to
+be validated by an external program.)</para>
+</listitem>
+<listitem><para>Migrating these pages to XML and/or future versions of HTML
+will only require a new or updated style sheet. No pages will have to be recoded.
+And the pages will conform to whatever output format is required, with no
+possibility of random human error.</para>
+</listitem>
+</orderedlist>
+</sect1>
+</webpage>
+
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE xbel
+ PUBLIC "+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML"
+ "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd">
+<xbel><info><metadata owner="Norman Walsh <ndw@nwalsh.com>"/></info>
+<folder id="perlbookmarks"><title>Perl</title>
+<bookmark href="http://www.perl.com/"><title>Perl.com</title></bookmark>
+<bookmark href="http://www.activestate.com/"><title>ActiveState Tool Corp. (Perl
+for Win32)</title></bookmark>
+<bookmark href="http://194.247.167.1/DADA/PERL/"><title>dada meets Perl!</title></bookmark>
+</folder>
+</xbel>
--- /dev/null
+SGMLDECL xml.dcl
--- /dev/null
+<!SGML -- SGML Declaration for valid XML documents --
+ "ISO 8879:1986 (WWW)"
+
+ CHARSET
+ BASESET
+ "ISO Registration Number 176//CHARSET
+ ISO/IEC 10646-1:1993 UCS-4 with implementation
+ level 3//ESC 2/5 2/15 4/6"
+ DESCSET
+ 0 9 UNUSED
+ 9 2 9
+ 11 2 UNUSED
+ 13 1 13
+ 14 18 UNUSED
+ 32 95 32
+ 127 1 UNUSED
+ 128 32 UNUSED
+ -- use this instead of the official declaration because SP only
+ supports 16-bit characters --
+ 160 65374 160
+ 65534 2 UNUSED
+ -- 55296 2048 UNUSED
+ 57344 8190 57344
+ 65534 2 UNUSED
+ 65536 1048576 65536 --
+ CAPACITY NONE
+
+ SCOPE DOCUMENT
+
+ SYNTAX
+ SHUNCHAR NONE
+ BASESET "ISO Registration Number 176//CHARSET
+ ISO/IEC 10646-1:1993 UCS-4 with implementation
+ level 3//ESC 2/5 2/15 4/6"
+ DESCSET
+ 0 1114112 0
+ FUNCTION
+ RE 13
+ RS 10
+ SPACE 32
+ TAB SEPCHAR 9
+
+ NAMING
+ LCNMSTRT ""
+ UCNMSTRT ""
+ NAMESTRT
+ 58 95 192-214 216-246 248-305 308-318 321-328
+ 330-382 384-451 461-496 500-501 506-535 592-680
+ 699-705 902 904-906 908 910-929 931-974 976-982
+ 986 988 990 992 994-1011 1025-1036 1038-1103
+ 1105-1116 1118-1153 1168-1220 1223-1224
+ 1227-1228 1232-1259 1262-1269 1272-1273
+ 1329-1366 1369 1377-1414 1488-1514 1520-1522
+ 1569-1594 1601-1610 1649-1719 1722-1726
+ 1728-1742 1744-1747 1749 1765-1766 2309-2361
+ 2365 2392-2401 2437-2444 2447-2448 2451-2472
+ 2474-2480 2482 2486-2489 2524-2525 2527-2529
+ 2544-2545 2565-2570 2575-2576 2579-2600
+ 2602-2608 2610-2611 2613-2614 2616-2617
+ 2649-2652 2654 2674-2676 2693-2699 2701
+ 2703-2705 2707-2728 2730-2736 2738-2739
+ 2741-2745 2749 2784 2821-2828 2831-2832
+ 2835-2856 2858-2864 2866-2867 2870-2873 2877
+ 2908-2909 2911-2913 2949-2954 2958-2960
+ 2962-2965 2969-2970 2972 2974-2975 2979-2980
+ 2984-2986 2990-2997 2999-3001 3077-3084
+ 3086-3088 3090-3112 3114-3123 3125-3129
+ 3168-3169 3205-3212 3214-3216 3218-3240
+ 3242-3251 3253-3257 3294 3296-3297 3333-3340
+ 3342-3344 3346-3368 3370-3385 3424-3425
+ 3585-3630 3632 3634-3635 3648-3653 3713-3714
+ 3716 3719-3720 3722 3725 3732-3735 3737-3743
+ 3745-3747 3749 3751 3754-3755 3757-3758 3760
+ 3762-3763 3773 3776-3780 3904-3911 3913-3945
+ 4256-4293 4304-4342 4352 4354-4355 4357-4359
+ 4361 4363-4364 4366-4370 4412 4414 4416 4428
+ 4430 4432 4436-4437 4441 4447-4449 4451 4453
+ 4455 4457 4461-4462 4466-4467 4469 4510 4520
+ 4523 4526-4527 4535-4536 4538 4540-4546 4587
+ 4592 4601 7680-7835 7840-7929 7936-7957
+ 7960-7965 7968-8005 8008-8013 8016-8023 8025
+ 8027 8029 8031-8061 8064-8116 8118-8124 8126
+ 8130-8132 8134-8140 8144-8147 8150-8155
+ 8160-8172 8178-8180 8182-8188 8486 8490-8491
+ 8494 8576-8578 12295 12321-12329 12353-12436
+ 12449-12538 12549-12588 19968-40869 44032-55203
+
+ LCNMCHAR ""
+ UCNMCHAR ""
+ NAMECHAR
+ 45-46 183 720-721 768-837 864-865 903 1155-1158
+ 1425-1441 1443-1465 1467-1469 1471 1473-1474
+ 1476 1600 1611-1618 1632-1641 1648 1750-1764
+ 1767-1768 1770-1773 1776-1785 2305-2307 2364
+ 2366-2381 2385-2388 2402-2403 2406-2415
+ 2433-2435 2492 2494-2500 2503-2504 2507-2509
+ 2519 2530-2531 2534-2543 2562 2620 2622-2626
+ 2631-2632 2635-2637 2662-2673 2689-2691 2748
+ 2750-2757 2759-2761 2763-2765 2790-2799
+ 2817-2819 2876 2878-2883 2887-2888 2891-2893
+ 2902-2903 2918-2927 2946-2947 3006-3010
+ 3014-3016 3018-3021 3031 3047-3055 3073-3075
+ 3134-3140 3142-3144 3146-3149 3157-3158
+ 3174-3183 3202-3203 3262-3268 3270-3272
+ 3274-3277 3285-3286 3302-3311 3330-3331
+ 3390-3395 3398-3400 3402-3405 3415 3430-3439
+ 3633 3636-3642 3654-3662 3664-3673 3761
+ 3764-3769 3771-3772 3782 3784-3789 3792-3801
+ 3864-3865 3872-3881 3893 3895 3897 3902-3903
+ 3953-3972 3974-3979 3984-3989 3991 3993-4013
+ 4017-4023 4025 8400-8412 8417 12293 12330-12335
+ 12337-12341 12441-12442 12445-12446 12540-12542
+
+ NAMECASE
+ GENERAL NO
+ ENTITY NO
+
+ DELIM
+ GENERAL SGMLREF
+ HCRO "&#x" -- 38 is the number for ampersand --
+ NESTC "/"
+ NET ">"
+ PIC "?>"
+ SHORTREF NONE
+
+ NAMES
+ SGMLREF
+
+ QUANTITY NONE
+
+ ENTITIES
+ "amp" 38
+ "lt" 60
+ "gt" 62
+ "quot" 34
+ "apos" 39
+
+ FEATURES
+ MINIMIZE
+ DATATAG NO
+ OMITTAG NO
+ RANK NO
+ SHORTTAG
+ STARTTAG
+ EMPTY NO
+ UNCLOSED NO
+ NETENABL IMMEDNET
+ ENDTAG
+ EMPTY NO
+ UNCLOSED NO
+ ATTRIB
+ DEFAULT YES
+ OMITNAME NO
+ VALUE NO
+ EMPTYNRM YES
+ IMPLYDEF
+ ATTLIST NO
+ DOCTYPE NO
+ ELEMENT NO
+ ENTITY NO
+ NOTATION NO
+ LINK
+ SIMPLE NO
+ IMPLICIT NO
+ EXPLICIT NO
+ OTHER
+ CONCUR NO
+ SUBDOC NO
+ FORMAL NO
+ URN NO
+ KEEPRSRE YES
+ VALIDITY TYPE
+ ENTITIES
+ REF ANY
+ INTEGRAL YES
+ APPINFO NONE
+ SEEALSO "ISO 8879:1986//NOTATION
+ Extensible Markup Language (XML) 1.0//EN"
+>
--- /dev/null
+function toggleList(list) {
+ var display = eval("document.all." + list + ".style.display");
+ if (display == "none") {
+ eval("document.all." + list + ".style.display = \"\"");
+ } else {
+ eval("document.all." + list + ".style.display = \"none\"");
+ }
+}
--- /dev/null
+.navhomehead { padding-top: 0;
+ margin-bottom: 0;
+ padding-bottom: 0;
+ font-size: 80%
+ }
+
+.navhomehead { color: black; }
+.navhomehead a:link { color: black; }
+.navhomehead a:visited { color: black; }
+
+.navhead { padding-top: 0;
+ margin-bottom: 0;
+ padding-bottom: 0;
+ font-size: 80%
+ }
+
+.navhead { color: black; }
+.navhead a:link { color: black; }
+.navhead a:visited { color: black; }
+
+.navfoot { color: black;
+ font-size: 70%;
+ }
+
+.navfoot a:link { color: black; }
+.navfoot a:visited { color: black; }
+
+span.footdate { color: black;
+ font-size: 70%;
+ font-family: Arial, sans-serif;
+ }
+
+span.foothome { color: black;
+ font-size: 70%;
+ font-family: Arial, sans-serif;
+ }
+
+span.footfeed { color: black;
+ font-size: 70%;
+ font-family: Arial, sans-serif;
+ }
+
+span.footcopy { color: black;
+ font-size: 70%;
+ font-family: Arial, sans-serif;
+ }
--- /dev/null
+<webpage id="test1">
+<config param="rcsdate" value="$Date$"/>
+<config param="filename" value="test1.html"/><head>
+<title>Test 1</title>
+<summary>Test 1 Page</summary>
+</head>
+<para>This is just a test page.</para>
+<webtoc/>
+
+&test1a;
+&test1b;
+</webpage>
+
--- /dev/null
+<webpage id="test1a">
+<config param="rcsdate" value="$Date$"/>
+<config param="filename" value="test1a.html"/>
+<config param="dir" value="subdir"/>
+<head>
+<title>Test 1a</title>
+<summary>Test 1a Page</summary>
+</head>
+<para>This is just a test page.</para>
+
+<para>But it contains a broken inlinegraphic:
+<ulink url="foo.com"><inlinegraphic fileref="foo.jpg"/></ulink>.
+</para>
+
+</webpage>
+
--- /dev/null
+<webpage id="test1b">
+<config param="rcsdate" value="$Date$"/>
+<config param="filename" value="test1b.html"/>
+<config param="dir" value="subdir"/>
+<head>
+<title>Test 1b</title>
+<summary>Test 1b Page</summary>
+</head>
+<para>This is just a test page.</para>
+</webpage>
+
--- /dev/null
+<webpage id="test2">
+<config param="rcsdate" value="$Date$"/>
+<config param="filename" value="formtest.html"/><head>
+<title>Form Test</title>
+<summary>Form Test Page</summary>
+</head>
+<para>This is just a form test page.</para>
+<html:form action="javascript:alert('you did something');">
+<para>An input field: <html:input name="text"/>.</para>
+<para>A label: <html:label>label</html:label>.</para>
+<para>A button: <html:button><emphasis>This</emphasis> Button</html:button>.</para>
+<para>Selection: <html:select>
+<html:option>foo</html:option>
+<html:option selected="selected">bar</html:option>
+<html:option>baz</html:option>
+</html:select>.
+</para>
+<para><html:input type="submit" value="Do it!"/>.</para>
+</html:form>
+</webpage>
+
--- /dev/null
+<webpage id="test3">
+<config param="rcsdate" value="$Date$"/>
+<config param="filename" value="test3.html"/><head>
+<title>XBEL Bookmarks</title>
+<summary>XBEL Bookmark test</summary>
+</head>
+<para>This test page demonstrates how to incorporate XBEL bookmarks into
+your web pages. Use an xlink as follows:
+</para>
+
+<screen><![CDATA[<xlink href="bookmark/bookmark.xml" show="embed" actuate="auto"/>]]></screen>
+
+<xlink href="bookmark/bookmark.xml" show="embed" actuate="auto"/>
+
+<para>
+You can use dynamic HTML for your bookmarks, if you specify
+<literal>role="dynamic"</literal> on the xlink:</para>
+
+<xlink href="bookmark/bookmark.xml" show="embed" actuate="auto"
+ role="dynamic"/>
+
+</webpage>
+
--- /dev/null
+<!DOCTYPE website SYSTEM "../website.dtd" [
+<!ENTITY about SYSTEM "about.xml">
+<!ENTITY test1 SYSTEM "test1.xml">
+<!ENTITY test1a SYSTEM "test1a.xml">
+<!ENTITY test1b SYSTEM "test1b.xml">
+<!ENTITY test2 SYSTEM "test2.xml">
+<!ENTITY test3 SYSTEM "test3.xml">
+]>
+<website>
+<homepage>
+<config param="desc" value="The Test Home Page"/>
+<config param="filename" value="index.html"/>
+<config param="rcsdate" value="$Date$"/>
+<config param="footer" value="about.html" altval="About..."/>
+<config param="homebanner" value="graphics/homebanner.png"
+ altval="Home Banner"/>
+<config param="banner" value="graphics/banner.png"
+ altval="Banner"/>
+<head>
+<title>Test Home Page</title>
+<summary>The Test Site</summary>
+<keywords>Norman Walsh, DSSSL, SGML, XML, DocBook, Website</keywords>
+<copyright><year>1999</year><year>2000</year>
+<holder role="http://nwalsh.com/~ndw/">Norman Walsh</holder></copyright>
+<style src="example.css" class="global"></style>
+</head>
+
+<sect1><title>Hello, and Welcome!</title>
+
+<para>
+This website demonstrates the Website DTD. In order to generate HTML
+web pages from documents using this DTD, you must format them with
+an XSLT processor (well, you could do it with any tool you wanted,
+I suppose, but XSLT is the popular choice :-).
+</para>
+
+<webtoc/>
+
+<sect2><title>XSLT</title>
+<para>To format this website using XSLT, use
+the <filename>website.xsl</filename>
+or <filename>tabular.xsl</filename> stylesheets from the
+<ulink url="http://nwalsh.com/website/">Website distribution</ulink>:
+
+<screen>
+xt website.xml website.xsl
+</screen>
+
+You must chunk the resulting document yourself. The XSL stylesheet
+distribution includes a chunking configuration file suitable for use
+with <command>chunk.pl</command> from the
+<ulink url="http://nwalsh.com/docbook/xsl/">DocBook stylesheet
+distribution</ulink>.</para>
+
+</sect2>
+<sect2><title>XSLT With Chunking</title>
+
+<para>Alternatively, you can use <filename>chunk-website.xsl</filename>
+or <filename>chunk-tabular.xsl</filename> and let the XSLT
+processor do the chunking for you.</para>
+
+<para>The XT, Saxon, and Xalan processors are supported by the chunking
+stylesheets. If you're using a alternate processor, you'll have to do
+the chunking with another tool.</para>
+
+</sect2>
+
+<sect2><title>Customizing the Stylesheets</title>
+
+<para>You can customize the stylesheets for your particular website
+by making a driver like this:</para>
+
+<screen><![CDATA[
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:import href="/path/to/the/stylesheet.xsl"/>
+
+<!-- put your customizations here -->
+</xsl:stylesheet>]]></screen>
+
+<para>If you use the tabular processors, you'll discover that the
+Website home page has two ugly features: "home.navhead" and
+"home.navhead.upperright".</para>
+
+<para>In order to remove these, you have to write a custom stylesheet
+that puts the text you want on the homepage in those locations. Your
+stylesheet should look like this:</para>
+
+<screen><![CDATA[
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:import href="/path/to/the/stylesheet.xsl"/>
+
+<!-- Replace the text in these templates with whatever you want -->
+<!-- to appear in the respective location on the home page. -->
+
+<xsl:template name="home.navhead">
+<xsl:text>home.navhead</xsl:text>
+</xsl:template>
+
+<xsl:template name="home.navhead.upperright">
+<xsl:text>home.navhead.upperright</xsl:text>
+</xsl:template>
+
+<!-- put your customizations here -->
+</xsl:stylesheet>]]></screen>
+
+<para>You will also want to change some of the <config>
+parameters (to select different banner graphics, etc.).</para>
+
+</sect2>
+
+<sect2>
+<title>What's New</title>
+<variablelist>
+<varlistentry><term>24 Aug 2000</term>
+<listitem>
+<para>Improved documentation, merged distribution of stylesheets
+and the DTD.</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>29 Mar 2000</term>
+<listitem>
+<para>Updated description of XSL support.</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>28 Feb 2000</term>
+<listitem>
+<para>Updated to mention XSL.</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>24 Feb 1999</term>
+<listitem>
+<para>First release.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+</sect1>
+
+&about;
+
+</homepage>
+
+&test1;
+&test2;
+&test3;
+
+</website>
+
+<!--
+Local variables:
+mode: docbook
+End:
+-->
--- /dev/null
+<!-- ====================================================================== -->
+<!-- Website DTD Forms Module V1.7
+ Part of the Website DTD
+ http://nwalsh.com/website/
+
+ See COPYRIGHT for more information
+
+ Please direct all questions and comments about this DTD to
+ Norman Walsh, <ndw@nwalsh.com>.
+ -->
+<!-- ====================================================================== -->
+
+<!ENTITY % events
+ "onclick CDATA #IMPLIED
+ ondblclick CDATA #IMPLIED
+ onmousedown CDATA #IMPLIED
+ onmouseup CDATA #IMPLIED
+ onmouseover CDATA #IMPLIED
+ onmousemove CDATA #IMPLIED
+ onmouseout CDATA #IMPLIED
+ onkeypress CDATA #IMPLIED
+ onkeydown CDATA #IMPLIED
+ onkeyup CDATA #IMPLIED"
+>
+
+<!ELEMENT html:form ((%component.mix;)|html:input|html:button
+ |html:label|html:select|html:textarea)+>
+
+<!ATTLIST html:form
+ %common.attrib;
+ %events;
+ action CDATA #REQUIRED
+ method (GET|POST) "GET"
+ onsubmit CDATA #IMPLIED
+ onreset CDATA #IMPLIED
+>
+
+<!ENTITY % inputtype "(text | password | checkbox | radio
+ | submit | reset | file | hidden | image | button)">
+
+<!ELEMENT html:input EMPTY>
+<!ATTLIST html:input
+ %common.attrib;
+ %events;
+ type %inputtype; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength CDATA #IMPLIED
+ src CDATA #IMPLIED
+ alt CDATA #IMPLIED
+ usemap CDATA #IMPLIED
+ tabindex CDATA #IMPLIED
+ accesskey CDATA #IMPLIED
+ onfocus CDATA #IMPLIED
+ onblur CDATA #IMPLIED
+ onselect CDATA #IMPLIED
+ onchange CDATA #IMPLIED
+>
+
+<!ELEMENT html:button (%para.char.mix;)*>
+<!ATTLIST html:button
+ %common.attrib;
+ %events;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ tabindex CDATA #IMPLIED
+ accesskey CDATA #IMPLIED
+ onfocus CDATA #IMPLIED
+ onblur CDATA #IMPLIED
+>
+
+<!ELEMENT html:label (%para.char.mix;)*>
+<!ATTLIST html:label
+ %common.attrib;
+ %events;
+ for IDREF #IMPLIED
+ accesskey CDATA #IMPLIED
+ onfocus CDATA #IMPLIED
+ onblur CDATA #IMPLIED
+>
+
+<!ELEMENT html:select (html:option)+>
+<!ATTLIST html:select
+ %common.attrib;
+ %events;
+ name CDATA #IMPLIED
+ size CDATA #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex CDATA #IMPLIED
+ onfocus CDATA #IMPLIED
+ onblur CDATA #IMPLIED
+ onchange CDATA #IMPLIED
+>
+
+<!ELEMENT html:option (#PCDATA)>
+<!ATTLIST html:option
+ %common.attrib;
+ %events;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ value CDATA #IMPLIED
+>
+
+<!ELEMENT html:textarea (#PCDATA)>
+<!ATTLIST html:textarea
+ %common.attrib;
+ %events;
+ name CDATA #IMPLIED
+ rows CDATA #REQUIRED
+ cols CDATA #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ tabindex CDATA #IMPLIED
+ accesskey CDATA #IMPLIED
+ onfocus CDATA #IMPLIED
+ onblur CDATA #IMPLIED
+ onselect CDATA #IMPLIED
+ onchange CDATA #IMPLIED
+>
+
+<!-- End of forms.mod V1.7 ................................................ -->
+<!-- ...................................................................... -->
--- /dev/null
+<!-- ...................................................................... -->
+<!-- Website DTD V1.7 ..................................................... -->
+
+<!-- Copyright 1997, 1998 Norman Walsh
+
+ $Id$
+
+ This DTD defines a document that represents a website.
+
+ A typical invocation is:
+
+ <!DOCTYPE website PUBLIC "-//Norman Walsh//DTD Website V1.7//EN"
+ "http://nwalsh.com/website/xml/1.7beta2/website.dtd">
+
+-->
+
+<!-- allow xlinks to occur anywhere a para can occur -->
+<!ENTITY % local.para.class "|xlink|webtoc">
+
+<!-- Forms? -->
+<!ENTITY % allowforms "INCLUDE">
+<![%allowforms;[
+<!ENTITY % local.para.char.mix "|html:input|html:button|html:label|html:select|html:textarea">
+<!ENTITY % local.divcomponent.mix "|html:form">
+]]>
+
+<!ENTITY % docbook PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://docbook.org/xml/4.1.2/docbookx.dtd">
+%docbook;
+
+<!ELEMENT xlink (%para.char.mix;)*>
+<!ATTLIST xlink
+ xml:link CDATA #FIXED "simple"
+ href CDATA #REQUIRED
+ role CDATA #IMPLIED
+ title CDATA #IMPLIED
+ content-role CDATA #IMPLIED
+ show (embed | replace | new) "replace"
+ actuate (user | auto) "user"
+>
+
+<!ENTITY % webpage.mix "(config*, head, (%bookcomponent.content;),
+ appendix*, bibliography*, glossary*)">
+
+<!ELEMENT head (title, titleabbrev?, subtitle?, summary?, keywords?,
+ (copyright | author | edition
+ | meta | script | style | abstract | revhistory)*)>
+
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ name CDATA #REQUIRED
+ content CDATA #REQUIRED
+>
+
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ class (local|global) "local"
+ src CDATA #IMPLIED
+ language CDATA #IMPLIED
+>
+
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ class (local|global) "local"
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+>
+
+<!ELEMENT config EMPTY>
+<!ATTLIST config
+ class (html|print) "html"
+ param CDATA #REQUIRED
+ value CDATA #REQUIRED
+ altval CDATA #IMPLIED
+>
+
+<!ELEMENT summary (%word.char.mix;)*>
+<!ELEMENT keywords (#PCDATA)>
+
+<!ELEMENT website (homepage, webpage*)>
+<!ATTLIST website
+ xmlns:html CDATA #FIXED "http://www.w3.org/1999/xhtml"
+>
+
+<!ELEMENT homepage ((%webpage.mix;),webpage*)>
+<!ATTLIST homepage
+ role CDATA #IMPLIED
+ id ID #IMPLIED
+>
+
+<!ELEMENT webpage ((%webpage.mix;),webpage*)>
+<!ATTLIST webpage
+ navto (yes|no) "yes"
+ role CDATA #IMPLIED
+ id ID #IMPLIED
+>
+
+<!ELEMENT webtoc EMPTY>
+
+<![%allowforms;[
+<!ENTITY % forms.mod SYSTEM "forms.mod">
+%forms.mod;
+]]>
+
+<!-- End of Website DTD V1.7 .............................................. -->
+<!-- ...................................................................... -->
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+<xsl:variable name="WSVERSION">1.7</xsl:variable>
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html='http://www.w3.org/1999/xhtml'
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="html doc">
+
+<!-- ********************************************************************
+ $Id$
+ ******************************************************************** -->
+
+<xsl:import href="tabular.xsl"/>
+<xsl:include href="/share/xsl/docbook/html/chunker.xsl"/>
+
+<xsl:output method="html"
+ encoding="iso-8859-1"
+/>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="using.chunker">0</xsl:param>
+
+<xsl:template match="/">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="website">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="homepage">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:apply-templates select="." mode="filename"/>
+ </xsl:variable>
+
+ <!-- Note that we can't call apply-imports in here because we must -->
+ <!-- process webpage children *outside* of xt:document or interior -->
+ <!-- webpages inherit the directory specified on their parent as -->
+ <!-- their default base directory. Which is not the intended -->
+ <!-- semantic. -->
+
+ <xsl:variable name="page-content">
+ <html>
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+ <body>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <xsl:if test="$nav.table.summary!=''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$nav.table.summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <tr>
+ <td width="{$navtocwidth}" bgcolor="{$navbgcolor}"
+ valign="top" align="left" rowspan="3">
+ <p class="navtoc">
+ <xsl:call-template name="nav.toc">
+ <xsl:with-param name="pages" select="/website/webpage"/>
+ </xsl:call-template>
+ </p>
+ </td>
+ <td valign="bottom" bgcolor="{$textbgcolor}"> </td>
+ <td align="left" valign="bottom" bgcolor="{$textbgcolor}"
+ height="35">
+ <xsl:call-template name="home.navhead"/>
+ </td>
+ <td align="center" valign="bottom" bgcolor="{$textbgcolor}"
+ height="35">
+ <xsl:call-template name="home.navhead.upperright"/>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td colspan="2" bgcolor="{$textbgcolor}">
+ <xsl:if test="$footer.hr != '0'"><hr/></xsl:if>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td colspan="2" bgcolor="{$textbgcolor}">
+ <xsl:apply-templates select="child::*[name(.) != 'webpage']"/>
+ <xsl:call-template name="process.footnotes"/>
+ </td>
+ </tr>
+
+ <xsl:if test="$footer.spans.page = '0'">
+ <tr>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td colspan="2" bgcolor="{$textbgcolor}">
+ <xsl:call-template name="webpage.footer"/>
+ </td>
+ </tr>
+ </xsl:if>
+
+ </table>
+
+ <xsl:if test="$footer.spans.page != '0'">
+ <xsl:call-template name="webpage.footer"/>
+ </xsl:if>
+ </div>
+ </body>
+ </html>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="method" select="'html'"/>
+ <xsl:with-param name="encoding" select="'ISO-8859-1'"/>
+ <xsl:with-param name="content" select="$page-content"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="webpage"/>
+
+</xsl:template>
+
+<xsl:template match="webpage">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="relpath">
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:apply-templates select="." mode="filename"/>
+ </xsl:variable>
+
+ <!-- Note that we can't call apply-imports in here because we must -->
+ <!-- process webpage children *outside* of xt:document or interior -->
+ <!-- webpages inherit the directory specified on their parent as -->
+ <!-- their default base directory. Which is not the intended -->
+ <!-- semantic. -->
+
+ <xsl:variable name="page-content">
+ <html>
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+ <body>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <xsl:if test="$nav.table.summary!=''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$nav.table.summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <tr>
+ <td width="{$navtocwidth}" bgcolor="{$navbgcolor}"
+ valign="top" align="left">
+ <p class="navtoc">
+ <xsl:call-template name="nav.toc">
+ <xsl:with-param name="pages" select="/website/webpage"/>
+ </xsl:call-template>
+ </p>
+ </td>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td align="left" valign="top" bgcolor="{$textbgcolor}">
+ <xsl:apply-templates select="./head/title" mode="title.mode"/>
+ <xsl:apply-templates select="child::*[name(.) != 'webpage']"/>
+ <xsl:call-template name="process.footnotes"/>
+ <br/>
+ </td>
+ </tr>
+ </table>
+
+ <xsl:call-template name="webpage.footer"/>
+ </div>
+
+ </body>
+ </html>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="method" select="'html'"/>
+ <xsl:with-param name="encoding" select="'ISO-8859-1'"/>
+ <xsl:with-param name="content" select="$page-content"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="webpage"/>
+
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="homepage|webpage" mode="filename">
+ <xsl:variable name="dir">
+ <xsl:choose>
+ <xsl:when test="config[@param='dir']/@value">
+ <xsl:value-of select="config[@param='dir']/@value"/>
+ <xsl:text>/</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="fname">
+ <xsl:choose>
+ <xsl:when test="config[@param='filename']/@value">
+ <xsl:value-of select="config[@param='filename']/@value"/>
+ </xsl:when>
+ <xsl:otherwise>index.html</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:value-of select="concat($dir, $fname)"/>
+</xsl:template>
+
+<xsl:template name="href.target">
+ <xsl:param name="object" select="."/>
+ <xsl:param name="from-page" select="(ancestor-or-self::webpage
+ |ancestor-or-self::homepage)[last()]"/>
+
+ <xsl:variable name="ischunk">
+ <xsl:if test="local-name($object) = 'webpage'
+ or local-name($object) = 'homepage'">1</xsl:if>
+ <xsl:text>0</xsl:text>
+ </xsl:variable>
+ <xsl:variable name="chunk" select="($object/ancestor-or-self::webpage
+ |$object/ancestor-or-self::homepage)[last()]"/>
+
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="$from-page"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="$chunk" mode="filename"/>
+
+ <xsl:if test="$ischunk='0'">
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="html:*">
+ <xsl:element name="{local-name(.)}" namespace="">
+ <xsl:apply-templates select="@*" mode="copy"/>
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="@*" mode="copy">
+ <xsl:attribute name="{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html='http://www.w3.org/1999/xhtml'
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="html doc">
+
+<!-- ********************************************************************
+ $Id$
+ ******************************************************************** -->
+
+<xsl:import href="website.xsl"/>
+
+<xsl:output method="html"
+ encoding="iso-8859-1"
+/>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="using.chunker">0</xsl:param>
+
+<xsl:template match="/">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="website">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="homepage">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:apply-templates select="." mode="filename"/>
+ </xsl:variable>
+
+ <!-- Note that we can't call apply-imports in here because we must -->
+ <!-- process webpage children *outside* of xt:document or interior -->
+ <!-- webpages inherit the directory specified on their parent as -->
+ <!-- their default base directory. Which is not the intended -->
+ <!-- semantic. -->
+
+ <xsl:variable name="page-content">
+ <html>
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+ <body>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <xsl:call-template name="home.navhead"/>
+
+ <xsl:apply-templates select="./head/title" mode="title.mode"/>
+
+ <xsl:apply-templates select="child::*[name(.)!='webpage']"/>
+
+ <xsl:call-template name="process.footnotes"/>
+
+ <xsl:call-template name="webpage.footer"/>
+ </div>
+ </body>
+ </html>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="method" select="'html'"/>
+ <xsl:with-param name="encoding" select="'ISO-8859-1'"/>
+ <xsl:with-param name="content" select="$page-content"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="webpage"/>
+
+</xsl:template>
+
+<xsl:template match="webpage">
+ <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:apply-templates select="." mode="filename"/>
+ </xsl:variable>
+
+ <!-- Note that we can't call apply-imports in here because we must -->
+ <!-- process webpage children *outside* of xt:document or interior -->
+ <!-- webpages inherit the directory specified on their parent as -->
+ <!-- their default base directory. Which is not the intended -->
+ <!-- semantic. -->
+
+ <xsl:variable name="page-content">
+ <html>
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+ <body>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <xsl:call-template name="page.navhead"/>
+
+ <xsl:apply-templates select="./head/title" mode="title.mode"/>
+
+ <xsl:apply-templates select="child::*[name(.)!='webpage']"/>
+
+ <xsl:call-template name="process.footnotes"/>
+
+ <xsl:call-template name="webpage.footer"/>
+ </div>
+ </body>
+ </html>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="method" select="'html'"/>
+ <xsl:with-param name="encoding" select="'ISO-8859-1'"/>
+ <xsl:with-param name="content" select="$page-content"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="webpage"/>
+
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="homepage|webpage" mode="filename">
+ <xsl:variable name="dir">
+ <xsl:choose>
+ <xsl:when test="config[@param='dir']/@value">
+ <xsl:value-of select="config[@param='dir']/@value"/>
+ <xsl:text>/</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="fname">
+ <xsl:choose>
+ <xsl:when test="config[@param='filename']/@value">
+ <xsl:value-of select="config[@param='filename']/@value"/>
+ </xsl:when>
+ <xsl:otherwise>index.html</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:value-of select="concat($dir, $fname)"/>
+</xsl:template>
+
+<xsl:template name="href.target">
+ <xsl:param name="object" select="."/>
+ <xsl:param name="from-page" select="(ancestor-or-self::webpage
+ |ancestor-or-self::homepage)[last()]"/>
+
+ <xsl:variable name="ischunk">
+ <xsl:if test="local-name($object) = 'webpage'
+ or local-name($object) = 'homepage'">1</xsl:if>
+ <xsl:text>0</xsl:text>
+ </xsl:variable>
+ <xsl:variable name="chunk" select="($object/ancestor-or-self::webpage
+ |$object/ancestor-or-self::homepage)[last()]"/>
+
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="$from-page"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="$chunk" mode="filename"/>
+
+ <xsl:if test="$ischunk='0'">
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="html:*">
+ <xsl:element name="{local-name(.)}" namespace="">
+ <xsl:apply-templates select="@*" mode="copy"/>
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="@*" mode="copy">
+ <xsl:attribute name="{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html='http://www.w3.org/1999/xhtml'
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="html doc">
+
+<!-- ********************************************************************
+ $Id$
+ ******************************************************************** -->
+
+<xsl:import href="chunk-website-common.xsl"/>
+<xsl:include href="/share/xsl/docbook/html/chunker.xsl"/>
+
+<xsl:output method="html"
+ encoding="iso-8859-1"
+/>
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+
+<!-- Note: the perl version of the chunker doesn't do namespaces, so
+ this is sortof imaginary. The chunker actually cares about and
+ uses the namespace prefix at the moment. -->
+
+<chunk-control xmlns="http://nwalsh.com/docbook/xsl/chunker/1.0"
+ xmlns:ch="http://nwalsh.com/docbook/xsl/chunker/1.0"
+ xmlns:html="http://www.w3.org/TR/REC-html40"
+ chunk-extension=".html"
+ transclude="1">
+
+<chunk-library src="n:/share/xsl/docbook/bin/dingbat.pl"/>
+<chunk-library src="n:/share/xsl/docbook/bin/docbook.pl"/>
+<chunk-library src="n:/share/xsl/docbook/bin/removexmlns.pl"/>
+<chunk-library src="n:/share/doctypes/website/xsl/chunklib.pl"/>
+<chunk-library src="n:/share/doctypes/website/xsl/hrefencode.pl"/>
+
+<character-mapping>
+ <dingbat name="bullet" entity="bull"/>
+ <dingbat name="copyright" entity="copy"/>
+ <dingbat name="trademark" entity="trade"/>
+ <dingbat name="ldquo">"</dingbat>
+ <dingbat name="rdquo">"</dingbat>
+ <dingbat name="lsquo">'</dingbat>
+ <dingbat name="rsquo">'</dingbat>
+ <dingbat name="em-dash" entity="mdash"/>
+ <dingbat name="en-dash" entity="ndash"/>
+ <dingbat name="emdash" entity="mdash"/>
+ <dingbat name="endash" entity="ndash"/>
+ <dingbat name="mdash" entity="mdash"/>
+ <dingbat name="ndash" entity="ndash"/>
+ <dingbat name="nbsp" entity="nbsp"/>
+
+ <unicode char="60" entity="lt"/>
+ <unicode char="38" entity="amp"/>
+ <unicode char="62" entity="gt"/>
+ <unicode char="160" entity="nbsp"/>
+ <unicode char="169" entity="copy"/>
+ <unicode char="229" entity="#229"/>
+ <unicode char="233" entity="eacute"/>
+ <unicode char="224" entity="agrave"/>
+ <unicode char="8220" entity="#147"/>
+ <unicode char="8221" entity="#148"/>
+ <unicode char="8212" entity="#150"/>
+ <unicode char="8482" entity="trade"/>
+ <unicode char="8211">-</unicode>
+ <unicode char="8240" entity="#137"/>
+ <unicode char="0x07e2">'</unicode>
+ <unicode char="0x00ae" entity="reg"/>
+</character-mapping>
+
+<chunk-elements>
+ <element name="homepage" abbrev="home"/>
+ <element name="webpage" abbrev="web"/>
+</chunk-elements>
+
+<chunk-enumeration-nesting>
+</chunk-enumeration-nesting>
+
+<empty-elements>
+ <element name="br"/>
+ <element name="hr"/>
+ <element name="img"/>
+ <element name="link"/>
+ <element name="meta"/>
+</empty-elements>
+
+<ch:chunk-head xmlns="http://www.w3.org/TR/REC-html40">
+</ch:chunk-head>
+
+<ch:chunk-header-navigation xmlns="http://www.w3.org/TR/REC-html40">
+</ch:chunk-header-navigation>
+
+<ch:chunk-foot xmlns="http://www.w3.org/TR/REC-html40">
+</ch:chunk-foot>
+
+<ch:chunk-footer-navigation xmlns="http://www.w3.org/TR/REC-html40">
+</ch:chunk-footer-navigation>
+
+</chunk-control>
--- /dev/null
+# -*- Perl -*-
+# This is a chunk.pl library file
+
+package chunklib;
+
+use XML::DOM;
+use Time::Local;
+
+sub init {
+ return 1;
+}
+
+sub applies {
+ my $doc = shift;
+ my $node = shift;
+ my $parent = shift;
+
+ return 0 if $node->getNodeType() != ELEMENT_NODE;
+ return 0 if $node->getTagName() ne 'span';
+ return 0 if $node->getAttribute('class') ne 'footdate';
+ return 1;
+}
+
+sub apply {
+ my $doc = shift;
+ my $node = shift;
+ my $parent = shift;
+
+ if ($node->getTagName() eq 'span'
+ && $node->getAttribute('class') eq 'footdate') {
+ my @months = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
+
+ my $textnode = $node->getFirstChild();
+ my $ucsdate = $textnode->getData();
+
+ if ($ucsdate =~ /\$(Date): (....)\/(..)\/(..)\s+(\d+):(..):(..) \$/) {
+ # NB: the extra ()'s around Date prevent CVS from mangling it!
+ # ok, let's convert this sucker!
+ my ($year, $month, $day, $hour, $min, $sec) = ($2,$3,$4,$5,$6,$7);
+ my ($wday, $yday, $isdst);
+
+ $month--; # perl months are zero based
+ $year -= 1900; # perl years are 1900 based
+
+ # convert GMT into local time
+ my $time = timegm($sec,$min,$hour,$day,$month,$year);
+ ($sec,$min,$hour,$day,$month,$year,$wday,$yday,$isdst)
+ = localtime($time);
+
+ # Calculate the abbreviation for the local timezone.
+ # I don't know how portable this is. My machine returns
+ # "Eastern Standard Time", so I'm just going to grab
+ # all the capitals out of that.
+
+ my ($tzs, $tzd) = POSIX::tzname;
+ my $tz = $isdst ? $tzd : $tzs;
+ $tz =~ s/[^A-Z]//g;
+
+ $year += 1900;
+
+ my $ampm = $hour >= 12 ? "pm" : "am";
+ my $lcldate = sprintf("Updated: %02d %s %04d @ %02d:%02d%s %s",
+ $day, $months[$month], $year,
+ $hour > 12 ? $hour - 12 : $hour, $min,
+ $ampm, $tz);
+
+# print STDERR "GMT: $ucsdate\n";
+# print STDERR "EDT: $lcldate\n";
+
+ $textnode->deleteData(0, $textnode->getLength());
+ $textnode->appendData($lcldate);
+ }
+ }
+}
+
+'chunklib';
+
--- /dev/null
+<?xml version='1.0'?>
+
+<!-- Note: the perl version of the chunker doesn't do namespaces, so
+ this is sortof imaginary. The chunker actually cares about and
+ uses the namespace prefix at the moment. -->
+
+<chunk-control xmlns="http://nwalsh.com/docbook/xsl/chunker/1.0"
+ xmlns:ch="http://nwalsh.com/docbook/xsl/chunker/1.0"
+ xmlns:html="http://www.w3.org/TR/REC-html40"
+ chunk-extension=".html"
+ transclude="1">
+
+<chunk-library src="n:/share/xsl/docbook/bin/dingbat.pl"/>
+<chunk-library src="n:/share/xsl/docbook/bin/docbook.pl"/>
+<chunk-library src="n:/share/xsl/docbook/bin/removexmlns.pl"/>
+<chunk-library src="n:/share/xsl/website/chunklib.pl"/>
+<chunk-library src="n:/share/xsl/website/hrefencode.pl"/>
+
+<character-mapping>
+ <dingbat name="bullet" entity="bull"/>
+ <dingbat name="copyright" entity="copy"/>
+ <dingbat name="trademark" entity="trade"/>
+ <dingbat name="ldquo">"</dingbat>
+ <dingbat name="rdquo">"</dingbat>
+ <dingbat name="lsquo">'</dingbat>
+ <dingbat name="rsquo">'</dingbat>
+ <dingbat name="em-dash" entity="mdash"/>
+ <dingbat name="en-dash" entity="ndash"/>
+ <dingbat name="emdash" entity="mdash"/>
+ <dingbat name="endash" entity="ndash"/>
+ <dingbat name="mdash" entity="mdash"/>
+ <dingbat name="ndash" entity="ndash"/>
+ <dingbat name="nbsp" entity="nbsp"/>
+
+ <unicode char="60" entity="lt"/>
+ <unicode char="38" entity="amp"/>
+ <unicode char="62" entity="gt"/>
+ <unicode char="160" entity="nbsp"/>
+ <unicode char="169" entity="copy"/>
+ <unicode char="229" entity="#229"/>
+ <unicode char="233" entity="eacute"/>
+ <unicode char="224" entity="agrave"/>
+ <unicode char="8220" entity="#147"/>
+ <unicode char="8221" entity="#148"/>
+ <unicode char="8212" entity="#150"/>
+ <unicode char="8482" entity="trade"/>
+ <unicode char="8211">-</unicode>
+ <unicode char="8240" entity="#137"/>
+ <unicode char="0x07e2">'</unicode>
+ <unicode char="0x00ae" entity="reg"/>
+</character-mapping>
+
+<chunk-elements>
+ <element name="homepage" abbrev="home"/>
+ <element name="webpage" abbrev="web"/>
+</chunk-elements>
+
+<chunk-enumeration-nesting>
+</chunk-enumeration-nesting>
+
+<empty-elements>
+ <element name="br"/>
+ <element name="hr"/>
+ <element name="img"/>
+ <element name="link"/>
+ <element name="meta"/>
+</empty-elements>
+
+<doctype
+ public-id="-//W3C//DTD HTML 4.0 Transitional//EN"
+ system-id="http://www.w3.org/TR/REC-html40/loose.dtd"/>
+
+<ch:body-attributes>
+ <attribute name="bgcolor" value='#CEDDFC'/>
+ <attribute name="style" value='margin-top: 0pt; margin-left: 0pt'/>
+ <attribute name="text" value='#000000'/>
+ <attribute name="vlink" value='#840084'/>
+ <attribute name="alink" value='#0000FF'/>
+</ch:body-attributes>
+
+<ch:chunk-head xmlns="http://www.w3.org/TR/REC-html40">
+</ch:chunk-head>
+
+<ch:chunk-header-navigation xmlns="http://www.w3.org/TR/REC-html40">
+</ch:chunk-header-navigation>
+
+<ch:chunk-foot xmlns="http://www.w3.org/TR/REC-html40">
+</ch:chunk-foot>
+
+<ch:chunk-footer-navigation xmlns="http://www.w3.org/TR/REC-html40">
+</ch:chunk-footer-navigation>
+
+</chunk-control>
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<xsl:template match="head" mode="head.mode">
+ <xsl:variable name="nodes" select="*"/>
+ <xsl:variable name="global"
+ select="/website/homepage/head/*[@class='global']"/>
+ <head>
+ <meta name="generator" content="Website XSL Stylesheet V{$WSVERSION}"/>
+ <xsl:if test="$html.stylesheet != ''">
+ <link rel="stylesheet" href="{$html.stylesheet}" type="text/css">
+ <xsl:if test="$html.stylesheet.type != ''">
+ <xsl:attribute name="type">
+ <xsl:value-of select="$html.stylesheet.type"/>
+ </xsl:attribute>
+ </xsl:if>
+ </link>
+ </xsl:if>
+ <xsl:apply-templates select="$nodes" mode="head.mode"/>
+ <xsl:if test="not(.=/website/homepage/head)">
+ <xsl:call-template name="process.globals">
+ <xsl:with-param name="nodelist" select="$global"/>
+ </xsl:call-template>
+ </xsl:if>
+ <!-- this is potentially slow -->
+ <xsl:if test="..//xlink[@role='dynamic']">
+ <script src="dynxbel.js" language="JavaScript"/>
+ </xsl:if>
+ </head>
+</xsl:template>
+
+<xsl:template name="process.globals">
+ <xsl:param name="nodelist"></xsl:param>
+ <xsl:if test="count($nodelist)>0">
+ <xsl:variable name="node" select="$nodelist[1]"/>
+ <xsl:variable name="rest" select="$nodelist[position()>1]"/>
+ <xsl:apply-templates select="$node" mode="head.mode">
+ <xsl:with-param name="current.page" select="ancestor-or-self::webpage"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="process.globals">
+ <xsl:with-param name="nodelist" select="$rest"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="title" mode="head.mode">
+ <title><xsl:value-of select="."/></title>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="head.mode">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="subtitle" mode="head.mode">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="summary" mode="head.mode">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="keywords" mode="head.mode">
+ <meta name="keyword" content="{.}"/>
+</xsl:template>
+
+<xsl:template match="copyright" mode="head.mode">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="author" mode="head.mode">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="edition" mode="head.mode">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="meta" mode="head.mode">
+ <meta name="{@name}" content="{@content}"/>
+</xsl:template>
+
+<xsl:template match="script" mode="head.mode">
+ <script>
+ <xsl:choose>
+ <xsl:when test="@language">
+ <xsl:attribute name="language">
+ <xsl:value-of select="@language"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="language">JavaScript</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:apply-templates/>
+
+ </script>
+</xsl:template>
+
+<xsl:template match="script[@src]" mode="head.mode">
+ <xsl:param name="current.page" select="ancestor-or-self::webpage"/>
+ <xsl:variable name="relpath">
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="$current.page"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="language">
+ <xsl:choose>
+ <xsl:when test="@language">
+ <xsl:value-of select="@language"/>
+ </xsl:when>
+ <xsl:otherwise>JavaScript</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <script src="{$relpath}{@src}" language="{$language}"></script>
+</xsl:template>
+
+<xsl:template match="style" mode="head.mode">
+ <style>
+ <xsl:if test="@type">
+ <xsl:attribute name="type">
+ <xsl:value-of select="@type"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:apply-templates/>
+
+ </style>
+</xsl:template>
+
+<xsl:template match="style[@src]" mode="head.mode">
+ <xsl:param name="current.page" select="ancestor-or-self::webpage"/>
+ <xsl:variable name="relpath">
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="$current.page"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <link rel="stylesheet" href="{$relpath}{@src}" type="text/css">
+ <xsl:if test="@type">
+ <xsl:attribute name="type">
+ <xsl:value-of select="@type"/>
+ </xsl:attribute>
+ </xsl:if>
+ </link>
+</xsl:template>
+
+<xsl:template match="abstract" mode="head.mode">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="revhistory" mode="head.mode">
+ <!--nop-->
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+# -*- Perl -*-
+# This is a chunk.pl library file
+
+package hrefencode;
+
+use XML::DOM;
+
+sub init {
+ return 1;
+}
+
+sub applies {
+ my $doc = shift;
+ my $node = shift;
+ my $parent = shift;
+
+ return 0 if $node->getNodeType() != ELEMENT_NODE;
+ return 0 if $node->getTagName() ne 'a';
+ return 1;
+}
+
+sub apply {
+ my $doc = shift;
+ my $node = shift;
+ my $parent = shift;
+
+ if ($node->getTagName() eq 'a' && $node->getAttribute('href') ne '') {
+ my $href = $node->getAttribute('href');
+ if ($href =~ /^(.*)?([\?\&])(.*)$/) {
+ my $prefix = $1;
+ my $sep = $2;
+ my $rest = $3;
+
+ $rest =~ s/[\s\&\?\{\}\|\\\/\^\~\[\]\`\%\+]/sprintf("%%%02X", ord($&))/eg;
+
+ $node->setAttribute('href', $prefix . $sep . $rest);
+ }
+ }
+}
+
+'hrefencode';
+
+
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html='http://www.w3.org/1999/xhtml'
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ exclude-result-prefixes="html doc"
+ version='1.0'>
+
+<xsl:import href="website.xsl"/>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="textbgcolor">white</xsl:param>
+
+<doc:param name="textbgcolor" xmlns="">
+<refpurpose>Background color of the text panel of the page</refpurpose>
+<refdescription>
+<para>The <varname>textbgcolor</varname> specifies the background color
+used in the text panel of the web page.</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="navbgcolor">red</xsl:param>
+
+<doc:param name="navbgcolor" xmlns="">
+<refpurpose>Background color of the navigation panel of the page</refpurpose>
+<refdescription>
+<para>The <varname>navbgcolor</varname> specifies the background color
+used in the navigation panel of the web page.</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="navtocwidth">220</xsl:param>
+
+<doc:param name="navtocwidth" xmlns="">
+<refpurpose>Width of the navigation panel of the page</refpurpose>
+<refdescription>
+<para>The <varname>navtocwidth</varname> specifies the width (generally
+in pixels) of the navigation panel (column) of the web page.</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="toc.pointer.graphic" select="0"/>
+
+<doc:param name="toc.pointer.graphic" xmlns="">
+<refpurpose>Toggle use of graphic for indicating the current position
+in the navigation panel</refpurpose>
+<refdescription>
+<para>If <varname>toc.pointer.graphic</varname> is non-zero, a graphic
+will be used to indicate the current position in the navigation panel.</para>
+</refdescription>
+</doc:param>
+
+<xsl:param name="toc.pointer.image">images/rarrow.gif</xsl:param>
+
+<doc:param name="toc.pointer.image" xmlns="">
+<refpurpose>Filename of the graphic to use to indicate the current
+position in the navigation panel</refpurpose>
+<refdescription>
+<para>If <varname>toc.pointer.graphic</varname> is non-zero, the
+graphic specified by <varname>toc.pointer.image</varname> will be used
+to highlight the current position in the navigation panel.</para>
+</refdescription>
+</doc:param>
+
+<xsl:param name="toc.pointer.text">></xsl:param>
+
+<doc:param name="toc.pointer.text" xmlns="">
+<refpurpose>Text to use to indicate the current
+position in the navigation panel</refpurpose>
+<refdescription>
+<para>If <varname>toc.pointer.graphic</varname> is zero, the
+text specified by <varname>toc.pointer.text</varname> will be used
+to highlight the current position in the navigation panel.</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="toc.spacer.graphic" select="0"/>
+
+<doc:param name="toc.spacer.graphic" xmlns="">
+<refpurpose>Toggle use of graphic for indenting the lines
+in the navigation panel</refpurpose>
+<refdescription>
+<para>If <varname>toc.spacer.graphic</varname> is non-zero, a graphic
+will be used to indent the lines in the navigation panel.</para>
+</refdescription>
+</doc:param>
+
+<xsl:param name="toc.spacer.image"></xsl:param>
+
+<doc:param name="toc.spacer.image" xmlns="">
+<refpurpose>Filename of the graphic to use to indent the lines
+in the navigation panel</refpurpose>
+<refdescription>
+<para>If <varname>toc.spacer.graphic</varname> is non-zero, the
+graphic specified by <varname>toc.spacer.image</varname> will be used
+to indent the lines in the navigation panel.</para>
+</refdescription>
+</doc:param>
+
+<xsl:param name="toc.spacer.text">   </xsl:param>
+
+<doc:param name="toc.spacer.text" xmlns="">
+<refpurpose>Text to use to indent the lines
+in the navigation panel</refpurpose>
+<refdescription>
+<para>If <varname>toc.spacer.graphic</varname> is zero, the
+text specified by <varname>toc.spacer.text</varname> will be used
+to indent the lines in the navigation panel.</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="footer.spans.page" select="1"/>
+
+<doc:param name="footer.spans.page" xmlns="">
+<refpurpose>Toggle footer width</refpurpose>
+<refdescription>
+<para>If non-zero, the page footer will span the entire page. If zero,
+the footer spans only the text panel.</para>
+</refdescription>
+</doc:param>
+
+<xsl:param name="nav.table.summary"></xsl:param>
+
+<doc:param name="nav.table.summary" xmlns="">
+<refpurpose>Summary attribute for HTML Table</refpurpose>
+<refdescription>
+<para>If not-empty, this value will be used for the summary
+attribute on the navigation tables.</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="home.navhead">
+<xsl:text>home.navhead</xsl:text>
+</xsl:template>
+
+<xsl:template name="home.navhead.upperright">
+<xsl:text>home.navhead.upperright</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="homepage">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+
+ <table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <xsl:if test="$nav.table.summary!=''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$nav.table.summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <tr>
+ <td width="{$navtocwidth}" bgcolor="{$navbgcolor}"
+ valign="top" align="left" rowspan="3">
+ <p class="navtoc">
+ <xsl:call-template name="nav.toc">
+ <xsl:with-param name="pages" select="/website/webpage"/>
+ </xsl:call-template>
+ </p>
+ </td>
+ <td valign="bottom" bgcolor="{$textbgcolor}"> </td>
+ <td align="left" valign="bottom" bgcolor="{$textbgcolor}" height="35">
+ <xsl:call-template name="home.navhead"/>
+ </td>
+ <td align="right" valign="bottom" bgcolor="{$textbgcolor}" height="35">
+ <xsl:call-template name="home.navhead.upperright"/>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td colspan="2" bgcolor="{$textbgcolor}">
+ <xsl:text> </xsl:text>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td colspan="2" bgcolor="{$textbgcolor}">
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ </td>
+ </tr>
+
+ <xsl:if test="$footer.spans.page = '0'">
+ <tr>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td colspan="2" bgcolor="{$textbgcolor}">
+ <xsl:call-template name="webpage.footer"/>
+ </td>
+ </tr>
+ </xsl:if>
+
+ </table>
+
+ <xsl:if test="$footer.spans.page != '0'">
+ <xsl:call-template name="webpage.footer"/>
+ </xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template match="webpage">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="relpath">
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+
+ <table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <xsl:if test="$nav.table.summary!=''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$nav.table.summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <tr>
+ <td width="{$navtocwidth}" bgcolor="{$navbgcolor}"
+ valign="top" align="left">
+ <p class="navtoc">
+ <xsl:call-template name="nav.toc">
+ <xsl:with-param name="pages" select="/website/webpage"/>
+ </xsl:call-template>
+ </p>
+ </td>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td align="left" valign="top" bgcolor="{$textbgcolor}">
+ <xsl:apply-templates select="./head/title" mode="title.mode"/>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ <br/>
+ </td>
+ </tr>
+ </table>
+
+ <xsl:call-template name="webpage.footer"/>
+ </div>
+</xsl:template>
+
+<xsl:template name="nav.toc">
+ <xsl:param name="curpage" select="."/>
+ <xsl:param name="pages"></xsl:param>
+
+ <xsl:variable name="homebanner"
+ select="/website/homepage/config[@param='homebanner']/@value"/>
+ <xsl:variable name="homebanneralt"
+ select="/website/homepage/config[@param='homebanner']/@altval"/>
+ <xsl:variable name="banner"
+ select="/website/homepage/config[@param='banner']/@value"/>
+ <xsl:variable name="banneralt"
+ select="/website/homepage/config[@param='banner']/@altval"/>
+
+ <xsl:variable name="hometitle" select="/website/homepage/head/title[1]"/>
+
+ <xsl:variable name="relpath">
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="$curpage"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="/website/homepage=$curpage">
+ <img src="{$relpath}{$homebanner}"
+ alt="{$homebanneralt}" align="left" border="0"/>
+ <br clear="all"/>
+ <br/>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="/website/homepage"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <img src="{$relpath}{$banner}"
+ alt="{$banneralt}" align="left" border="0"/>
+ </a>
+ <br clear="all"/>
+ <br/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:apply-templates select="$pages" mode="table.toc">
+ <xsl:with-param name="curpage" select="$curpage"/>
+ </xsl:apply-templates>
+ <br/>
+</xsl:template>
+
+<xsl:template match="webpage" mode="table.toc">
+ <xsl:param name="curpage" select="."/>
+ <xsl:param name="toclevel" select="1"/>
+
+ <xsl:variable name="notoc" select="config[@param='notoc']/@value"/>
+
+ <xsl:choose>
+ <xsl:when test="$notoc='1'">
+<!--
+ <xsl:message>
+ <xsl:text>Not in TOC: </xsl:text>
+ <xsl:value-of select="head/title"/>
+ </xsl:message>
+-->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="webpage.nav.toc">
+ <xsl:with-param name="curpage" select="$curpage"/>
+ <xsl:with-param name="toclevel" select="$toclevel"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="insert.spacers">
+ <xsl:param name="count" select="0"/>
+ <xsl:param name="relpath"></xsl:param>
+ <xsl:if test="$count>0">
+ <xsl:choose>
+ <xsl:when test="$toc.spacer.graphic">
+ <img src="{$relpath}{$toc.spacer.image}" alt="{$toc.spacer.text}"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$toc.spacer.text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="insert.spacers">
+ <xsl:with-param name="count" select="$count - 1"/>
+ <xsl:with-param name="relpath" select="$relpath"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="webpage.nav.toc">
+ <xsl:param name="curpage" select="."/>
+ <xsl:param name="toclevel" select="1"/>
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="title" select="(head/title|head/titleabbrev)[last()]"/>
+
+ <xsl:variable name="summary" select="head/summary[1]"/>
+
+ <xsl:variable name="relpath">
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="$curpage"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="insert.spacers">
+ <xsl:with-param name="count" select="$toclevel"/>
+ <xsl:with-param name="relpath" select="$relpath"/>
+ </xsl:call-template>
+
+ <span>
+ <xsl:if test="$toclevel>1">
+ <xsl:attribute name="class">
+ <xsl:text>shrink</xsl:text>
+ <xsl:value-of select="$toclevel - 1"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:variable name="isdescendant">
+ <xsl:call-template name="isdescendant">
+ <xsl:with-param name="curpage" select="$curpage"/>
+ <xsl:with-param name="here" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test=".=$curpage">
+ <span class="xnavtoc">
+ <xsl:choose>
+ <xsl:when test="$toc.pointer.graphic != 0">
+ <img src="{$relpath}{$toc.pointer.image}"
+ alt="{$toc.pointer.text}"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$toc.pointer.text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates select="$title" mode="table.toc"/>
+ </span>
+ <br/>
+ </xsl:when>
+ <xsl:otherwise>
+ <span>
+ <xsl:choose>
+ <xsl:when test="$isdescendant='0'">
+ <xsl:attribute name="class">navtoc</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">ynavtoc</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:call-template name="insert.spacers">
+ <xsl:with-param name="count" select="1"/>
+ <xsl:with-param name="relpath" select="$relpath"/>
+ </xsl:call-template>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="from-page" select="$curpage"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$title" mode="table.toc"/>
+ </a>
+ </span>
+ <br/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+
+ <xsl:variable name="isancestor">
+ <xsl:call-template name="isancestor">
+ <xsl:with-param name="curpage" select="$curpage"/>
+ <xsl:with-param name="here" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="$isancestor='1'">
+ <xsl:apply-templates select="webpage" mode="table.toc">
+ <xsl:with-param name="curpage" select="$curpage"/>
+ <xsl:with-param name="toclevel" select="$toclevel + 1"/>
+ </xsl:apply-templates>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="isancestor">
+ <!-- returns 1 iff here is an ancestor of curpage -->
+ <xsl:param name="curpage" select="."/>
+ <xsl:param name="here" select="."/>
+
+ <xsl:choose>
+ <xsl:when test="$curpage = $here">1</xsl:when>
+ <xsl:when test="count($curpage/parent::*)>0">
+ <xsl:call-template name="isancestor">
+ <xsl:with-param name="curpage" select="($curpage/parent::*)[1]"/>
+ <xsl:with-param name="here" select="$here"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="isdescendant">
+ <!-- returns 1 iff here is an descendant of curpage -->
+ <xsl:param name="curpage" select="."/>
+ <xsl:param name="here" select="."/>
+
+ <xsl:choose>
+ <xsl:when test="$curpage = $here">1</xsl:when>
+ <xsl:when test="count($here/parent::*)>0">
+ <xsl:call-template name="isdescendant">
+ <xsl:with-param name="curpage" select="$curpage"/>
+ <xsl:with-param name="here" select="($here/parent::*)[1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="head/title" mode="navtoc.title.mode">
+ <b><xsl:apply-templates/></b>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="title" mode="table.toc">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="table.toc">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="summary" mode="table.toc">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="webtoc">
+</xsl:template>
+
+<xsl:template match="config[@param='filename']">
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html='http://www.w3.org/1999/xhtml'
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ exclude-result-prefixes="doc html"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the WebSite distribution.
+ See ../README or http://nwalsh.com/website/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="/share/xsl/docbook/xhtml/docbook.xsl"/>
+<xsl:import href="xbel.xsl"/>
+<xsl:include href="VERSION"/>
+<xsl:include href="head.xsl"/>
+
+<xsl:param name="using.chunker">1</xsl:param>
+
+<xsl:preserve-space elements="*"/>
+<xsl:strip-space elements="website homepage webpage"/>
+
+<xsl:output method="xml"
+ indent="no"
+ doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/html4/loose.dtd"
+/>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="footer.hr" select="1"/>
+
+<doc:param name="footer.hr" xmlns="">
+<refpurpose>Toggle <HR> before footer</refpurpose>
+<refdescription>
+<para>If non-zero, an <HR> is generated at the bottom of each web page,
+before the footer.</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="feedback.href"></xsl:param>
+
+<doc:param name="feedback.href" xmlns="">
+<refpurpose>HREF for feedback link</refpurpose>
+<refdescription>
+<para>The <varname>feedback.href</varname> value is used as the value
+for the <sgmltag class="attribute">href</sgmltag> attribute on the feedback
+link, if it is not the empty string. If <varname>feedback.href</varname>
+is empty, no feedback link is generated.</para>
+</refdescription>
+</doc:param>
+
+<xsl:param name="feedback.title" select="0"/>
+
+<doc:param name="feedback.title" xmlns="">
+<refpurpose>Toggle use of titles in feedback</refpurpose>
+<refdescription>
+<para>If <varname>feedback.title</varname> is non-zero, the title of the
+current page will be added to the feedback link. This can be used, for
+example, if the <varname>feedback.href</varname> is a CGI script.</para>
+</refdescription>
+</doc:param>
+
+<xsl:param name="feedback.link.text">Feedback</xsl:param>
+
+<doc:param name="feedback.link.text" xmlns="">
+<refpurpose>The text of the feedback link</refpurpose>
+<refdescription>
+<para>The contents of this variable is used as the text of the feedback
+link if <varname>feedback.href</varname> is not empty. If
+<varname>feedback.href</varname> is empty, no feedback link is
+generated.</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="admon.graphic">
+ <xsl:param name="node" select="."/>
+ <xsl:call-template name="root-rel-path"/>
+ <xsl:value-of select="$admon.graphics.path"/>
+ <xsl:choose>
+ <xsl:when test="name($node)='note'">note.gif</xsl:when>
+ <xsl:when test="name($node)='warning'">warning.gif</xsl:when>
+ <xsl:when test="name($node)='caution'">caution.gif</xsl:when>
+ <xsl:when test="name($node)='tip'">tip.gif</xsl:when>
+ <xsl:when test="name($node)='important'">important.gif</xsl:when>
+ <xsl:otherwise>note.gif</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<doc:template name="admon.graphic">
+<refpurpose>Select appropriate admonition graphic</refpurpose>
+<refdescription>
+<para>Selects the appropriate admonition graphic file and returns the
+fully qualified path to it.</para>
+</refdescription>
+<refparam>
+<variablelist>
+<varlistentry><term>node</term>
+<listitem>
+<para>The source node to use for the purpose of selection. It should
+be one of the admonition elements (<sgmltag>note</sgmltag>,
+<sgmltag>warning</sgmltag>, etc.). The default node is the context
+node.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparam>
+<refreturns>
+<para>The fully qualified path to the admonition graphic. If the
+<varname>node</varname> is not an admonition element, the
+ <quote>note</quote> graphic is returned.</para>
+</refreturns>
+</doc:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="/">
+ <html>
+ <head>
+ <title>nothing matters here since the chunker reworks the head</title>
+ </head>
+ <body>
+ <xsl:apply-templates/>
+ </body>
+ </html>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="website">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="home.navhead">
+ <div class="navhomehead">
+ <div class="navbar">
+ <xsl:text>Home</xsl:text>
+ <xsl:text>@</xsl:text>
+ <xsl:call-template name="webpage.header">
+ <xsl:with-param name="thispage" select="."/>
+ <xsl:with-param name="pages" select="/website/webpage"/>
+ <xsl:with-param name="text.before"> | </xsl:with-param>
+ </xsl:call-template>
+ <hr/>
+ </div>
+ </div>
+</xsl:template>
+
+<xsl:template match="homepage">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+
+ <xsl:call-template name="home.navhead"/>
+
+ <xsl:apply-templates select="./head/title" mode="title.mode"/>
+
+ <xsl:apply-templates/>
+
+ <xsl:call-template name="process.footnotes"/>
+
+ <xsl:call-template name="webpage.footer"/>
+ </div>
+</xsl:template>
+
+<xsl:template name="page.navhead">
+ <div class="navhead">
+ <div class="navbar">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="/website/homepage"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Home</xsl:text>
+ </a>
+ <xsl:call-template name="webpage.header">
+ <xsl:with-param name="thispage" select="."/>
+ <xsl:with-param name="pages" select="/website/webpage"/>
+ <xsl:with-param name="text.before"> | </xsl:with-param>
+ </xsl:call-template>
+ </div>
+
+ <div class="navbar">
+ <xsl:if test="ancestor::webpage">
+ <xsl:call-template name="webpage.subheaders">
+ <xsl:with-param name="pages" select="ancestor::webpage"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="./head/title[1]" mode="toc.mode"/>
+ <xsl:text>@</xsl:text>
+ </xsl:if>
+
+ <hr/>
+ </div>
+ </div>
+</xsl:template>
+
+<xsl:template match="webpage">
+ <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+
+ <xsl:call-template name="page.navhead"/>
+
+ <xsl:apply-templates select="./head/title" mode="title.mode"/>
+
+ <xsl:apply-templates/>
+
+ <xsl:call-template name="process.footnotes"/>
+
+ <xsl:call-template name="webpage.footer"/>
+ </div>
+</xsl:template>
+
+<xsl:template name="webpage.subheaders">
+ <xsl:param name="pages"></xsl:param>
+ <xsl:param name="count" select="count($pages)"/>
+
+ <xsl:call-template name="webpage.header">
+ <xsl:with-param name="thispage" select="pages[$count=position()]"/>
+ <xsl:with-param name="pages" select="$pages"/>
+ <xsl:with-param name="text.after"> - </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="webpage.header">
+ <xsl:param name="thispage" select="."/>
+ <xsl:param name="pages"></xsl:param>
+ <xsl:param name="text.before"></xsl:param>
+ <xsl:param name="text.after"></xsl:param>
+ <xsl:param name="count" select="1"/>
+ <xsl:choose>
+ <xsl:when test="$count>count($pages)"></xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="curpage" select="$pages[$count=position()]"/>
+ <xsl:variable name="title">
+ <xsl:apply-templates select="$curpage/head/title[1]" mode="toc.mode"/>
+ </xsl:variable>
+
+ <xsl:value-of select="$text.before"/>
+ <xsl:choose>
+ <xsl:when test="$thispage=$curpage">
+ <xsl:copy-of select="$title"/>
+ <xsl:text>@</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$curpage"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:copy-of select="$title"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="$text.after"/>
+ <xsl:call-template name="webpage.header">
+ <xsl:with-param name="thispage" select="$thispage"/>
+ <xsl:with-param name="pages" select="$pages"/>
+ <xsl:with-param name="text.before" select="$text.before"/>
+ <xsl:with-param name="text.after" select="$text.after"/>
+ <xsl:with-param name="count" select="$count+1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="webpage.footer">
+ <xsl:variable name="page" select="."/>
+ <xsl:variable name="rcsdate" select="$page/config[@param='rcsdate']/@value"/>
+ <xsl:variable name="title">
+ <xsl:value-of select="$page/head/title[1]"/>
+ </xsl:variable>
+ <xsl:variable name="footers" select="$page/config[@param='footer']"/>
+ <xsl:variable name="copyright" select="/website/homepage/head/copyright[1]"/>
+
+ <div class="navfoot">
+ <xsl:if test="$footer.hr != 0"><hr/></xsl:if>
+ <table width="100%" border="0" summary="Footer navigation">
+ <tr>
+ <td width="33%" align="left">
+ <span class="footdate"><xsl:value-of select="$rcsdate"/></span>
+ </td>
+ <td width="34%" align="center">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="/website/homepage"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <span class="foothome">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="/website/homepage"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Home</xsl:text>
+ </a>
+ </span>
+
+ <xsl:apply-templates select="$footers" mode="footer.link.mode"/>
+ </td>
+ <td width="33%" align="right">
+ <span class="footfeed">
+ <xsl:if test="$feedback.href != ''">
+ <a>
+ <xsl:choose>
+ <xsl:when test="$feedback.title != 0">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$feedback.href"/>
+ <xsl:value-of select="$title"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$feedback.href"/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="$feedback.link.text"/>
+ </a>
+ </xsl:if>
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" align="right">
+ <span class="footcopy">
+ <xsl:apply-templates select="$copyright" mode="footer.mode"/>
+ </span>
+ </td>
+ </tr>
+ </table>
+ </div>
+</xsl:template>
+
+<xsl:template match="config" mode="footer.link.mode">
+ <span class="foothome">
+ <xsl:text> | </xsl:text>
+ <a href="{@value}"><xsl:value-of select="@altval"/></a>
+ </span>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="copyright" mode="footer.mode">
+ <span class="{name(.)}">
+ <xsl:call-template name="gentext.element.name"/>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat">copyright</xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="year" mode="footer.mode"/>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="holder" mode="footer.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="year" mode="footer.mode">
+ <xsl:apply-templates/><xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="year[position()=last()]" mode="footer.mode">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="holder" mode="footer.mode">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="holder[@role]" mode="footer.mode">
+ <a href="{@role}">
+ <xsl:apply-templates/>
+ </a>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="config">
+</xsl:template>
+
+<xsl:template match="config[@param='filename']" mode="head.mode">
+ <xsl:variable name="dir" select="../config[@param='dir']"/>
+ <xsl:if test="$using.chunker = '1'">
+ <xsl:choose>
+ <xsl:when test="$dir">
+ <xsl:processing-instruction name="dbhtml">
+ <xsl:text>filename="</xsl:text>
+ <xsl:value-of select="$dir/@value"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="@value"/>
+ <xsl:text>"</xsl:text>
+ </xsl:processing-instruction>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:processing-instruction name="dbhtml">
+ <xsl:text>filename="</xsl:text>
+ <xsl:value-of select="@value"/>
+ <xsl:text>"</xsl:text>
+ </xsl:processing-instruction>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="head">
+</xsl:template>
+
+<xsl:template match="head/title" mode="title.mode">
+ <h1><xsl:apply-templates/></h1>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="directory-depth">
+ <xsl:param name="dir"></xsl:param>
+ <xsl:param name="count" select="0"/>
+
+ <xsl:choose>
+ <xsl:when test='contains($dir,"/")'>
+ <xsl:call-template name="directory-depth">
+ <xsl:with-param name="dir" select="substring-after($dir,'/')"/>
+ <xsl:with-param name="count" select="$count + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test='$dir=""'>
+ <xsl:value-of select="$count"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$count + 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="root-rel-path">
+ <xsl:param name="webpage" select="ancestor-or-self::webpage"/>
+ <xsl:variable name="dir" select="$webpage[last()]/config[@param='dir']"/>
+ <xsl:variable name="depth">
+ <xsl:call-template name="directory-depth">
+ <xsl:with-param name="dir" select="$dir/@value"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$dir">
+ <xsl:call-template name="copy-string">
+ <xsl:with-param name="string">../</xsl:with-param>
+ <xsl:with-param name="count" select="$depth"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="webtoc">
+ <xsl:choose>
+ <xsl:when test="ancestor::homepage">
+ <xsl:call-template name="toc">
+ <xsl:with-param name="pages" select="/website/webpage"/>
+ <xsl:with-param name="from-page"
+ select="(ancestor-or-self::webpage
+ |ancestor-or-self::homepage)[last()]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="toc">
+ <xsl:with-param name="pages" select="ancestor::webpage[1]/webpage"/>
+ <xsl:with-param name="from-page"
+ select="(ancestor-or-self::webpage
+ |ancestor-or-self::homepage)[last()]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="toc">
+ <xsl:param name="pages"></xsl:param>
+ <xsl:param name="from-page"></xsl:param>
+ <ul>
+ <xsl:apply-templates select="$pages" mode="toc.mode">
+ <xsl:with-param name="from-page" select="$from-page"/>
+ </xsl:apply-templates>
+ </ul>
+</xsl:template>
+
+<xsl:template match="webpage" mode="toc.mode">
+ <xsl:variable name="notoc" select="config[@param='notoc']/@value"/>
+ <xsl:param name="from-page"></xsl:param>
+
+ <xsl:choose>
+ <xsl:when test="$notoc='1'">
+<!--
+ <xsl:message>
+ <xsl:text>Not in TOC: </xsl:text>
+ <xsl:value-of select="head/title"/>
+ </xsl:message>
+-->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="title" select="./head/title[1]"/>
+ <xsl:variable name="summary" select="./head/summary[1]"/>
+ <li>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="from-page" select="$from-page"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$title" mode="toc.mode"/>
+ </a>
+ <xsl:if test="$summary">
+ <xsl:text> - </xsl:text>
+ <xsl:apply-templates select="$summary" mode="toc.mode"/>
+ </xsl:if>
+ </li>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="title" mode="toc.mode">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="summary" mode="toc.mode">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="titleabbrev">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="footnote" mode="footnote.number">
+ <xsl:choose>
+ <xsl:when test="ancestor::table|ancestor::informaltable">
+ <xsl:number level="any" from="table|informaltable" format="a"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number level="any" from="webpage|homepage" format="1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.footnotes">
+ <!-- we're only interested in footnotes that occur on this page, not
+ on descendants of this page (which will be similarly processed) -->
+ <xsl:variable name="thispage"
+ select="(ancestor-or-self::webpage
+ |ancestor-or-self::homepage)[last()]"/>
+ <xsl:variable name="footnotes"
+ select=".//footnote[(ancestor-or-self::webpage
+ |ancestor-or-self::homepage)[last()]
+ =$thispage]"/>
+ <xsl:variable name="table.footnotes"
+ select=".//table//footnote[(ancestor-or-self::webpage
+ |ancestor-or-self::homepage)[last()]
+ =$thispage]
+ |.//informaltable//footnote[(ancestor-or-self::webpage
+ |ancestor-or-self::homepage)[last()]
+ =$thispage]"/>
+
+ <!-- Only bother to do this if there's at least one non-table footnote -->
+ <xsl:if test="count($footnotes)>count($table.footnotes)">
+ <div class="footnotes">
+ <hr width="100" align="left"/>
+ <xsl:apply-templates select="$footnotes" mode="process.footnote.mode"/>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="xlink">
+ <xsl:choose>
+ <xsl:when test="@actuate='auto'">
+ <xsl:choose>
+ <xsl:when test="@role='dynamic'">
+ <xsl:apply-templates select="document(@href,.)" mode="dynamic"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="document(@href,.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="@role='olink'">
+ <a href="/cgi-bin/olink?{@href}"><xsl:apply-templates/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{@href}"><xsl:apply-templates/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="olink">
+ <xsl:text disable-output-escaping="yes"></p></xsl:text>
+ <xsl:apply-templates select="document(unparsed-entity-uri(@targetdocent),.)"/>
+ <xsl:text disable-output-escaping="yes"><p></xsl:text>
+</xsl:template>
+
+<xsl:template match="html:*">
+ <xsl:element name="{local-name(.)}" namespace="">
+ <xsl:apply-templates select="@*" mode="copy"/>
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="@*" mode="copy">
+ <xsl:attribute name="{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:output method="xml"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="xbel">
+ <ul>
+ <xsl:apply-templates/>
+ </ul>
+</xsl:template>
+
+<xsl:template match="info">
+</xsl:template>
+
+<xsl:template match="folder">
+ <li><xsl:apply-templates select="title"/></li>
+ <ul>
+ <xsl:apply-templates select="folder|bookmark"/>
+ </ul>
+</xsl:template>
+
+<xsl:template match="folder/title">
+ <b><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match="bookmark">
+ <li>
+ <a href="{@href}" target="_top">
+ <xsl:apply-templates select="title"/>
+ </a>
+ </li>
+</xsl:template>
+
+<xsl:template match="bookmark/title">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="xbel" mode="dynamic">
+ <ul>
+ <xsl:apply-templates mode="dynamic"/>
+ </ul>
+</xsl:template>
+
+<xsl:template match="info" mode="dynamic">
+</xsl:template>
+
+<xsl:template match="folder" mode="dynamic">
+ <li><xsl:apply-templates select="title" mode="dynamic"/></li>
+ <ul style="display:none" id="{@id}">
+ <xsl:apply-templates select="folder|bookmark" mode="dynamic"/>
+ </ul>
+</xsl:template>
+
+<xsl:template match="folder/title" mode="dynamic">
+ <b>
+ <span>
+ <xsl:choose>
+ <xsl:when test="../@id">
+ <xsl:attribute name="onClick">
+ <xsl:text>toggleList('</xsl:text>
+ <xsl:value-of select="../@id"/>
+ <xsl:text>')</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="class">exlist</xsl:attribute>
+ <xsl:attribute name="style">color: blue</xsl:attribute>
+ <xsl:apply-templates mode="dynamic"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="dynamic"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ </b>
+</xsl:template>
+
+<xsl:template match="bookmark" mode="dynamic">
+ <li>
+ <a href="{@href}" target="_top">
+ <xsl:apply-templates select="title" mode="dynamic"/>
+ </a>
+ </li>
+</xsl:template>
+
+<xsl:template match="bookmark/title" mode="dynamic">
+ <xsl:apply-templates mode="dynamic"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html='http://www.w3.org/1999/xhtml'
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="html doc">
+
+<!-- ********************************************************************
+ $Id$
+ ******************************************************************** -->
+
+<xsl:import href="tabular.xsl"/>
+<xsl:include href="/share/xsl/docbook/html/xtchunker.xsl"/>
+
+<xsl:output method="html"
+ encoding="iso-8859-1"
+/>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="using.chunker">0</xsl:param>
+
+<xsl:template match="/">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="website">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="homepage">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:apply-templates select="." mode="filename"/>
+ </xsl:variable>
+
+ <!-- Note that we can't call apply-imports in here because we must -->
+ <!-- process webpage children *outside* of xt:document or interior -->
+ <!-- webpages inherit the directory specified on their parent as -->
+ <!-- their default base directory. Which is not the intended -->
+ <!-- semantic. -->
+
+ <xsl:variable name="page-content">
+ <html>
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+ <body>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <xsl:if test="$nav.table.summary!=''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$nav.table.summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <tr>
+ <td width="{$navtocwidth}" bgcolor="{$navbgcolor}"
+ valign="top" align="left" rowspan="3">
+ <p class="navtoc">
+ <xsl:call-template name="nav.toc">
+ <xsl:with-param name="pages" select="/website/webpage"/>
+ </xsl:call-template>
+ </p>
+ </td>
+ <td valign="bottom" bgcolor="{$textbgcolor}"> </td>
+ <td align="left" valign="bottom" bgcolor="{$textbgcolor}"
+ height="35">
+ <xsl:call-template name="home.navhead"/>
+ </td>
+ <td align="center" valign="bottom" bgcolor="{$textbgcolor}"
+ height="35">
+ <xsl:call-template name="home.navhead.upperright"/>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td colspan="2" bgcolor="{$textbgcolor}">
+ <xsl:if test="$footer.hr != '0'"><hr/></xsl:if>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td colspan="2" bgcolor="{$textbgcolor}">
+ <xsl:apply-templates select="child::*[name(.) != 'webpage']"/>
+ <xsl:call-template name="process.footnotes"/>
+ </td>
+ </tr>
+
+ <xsl:if test="$footer.spans.page = '0'">
+ <tr>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td colspan="2" bgcolor="{$textbgcolor}">
+ <xsl:call-template name="webpage.footer"/>
+ </td>
+ </tr>
+ </xsl:if>
+
+ </table>
+
+ <xsl:if test="$footer.spans.page != '0'">
+ <xsl:call-template name="webpage.footer"/>
+ </xsl:if>
+ </div>
+ </body>
+ </html>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="method" select="'html'"/>
+ <xsl:with-param name="encoding" select="'ISO-8859-1'"/>
+ <xsl:with-param name="content" select="$page-content"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="webpage"/>
+
+</xsl:template>
+
+<xsl:template match="webpage">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="relpath">
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:apply-templates select="." mode="filename"/>
+ </xsl:variable>
+
+ <!-- Note that we can't call apply-imports in here because we must -->
+ <!-- process webpage children *outside* of xt:document or interior -->
+ <!-- webpages inherit the directory specified on their parent as -->
+ <!-- their default base directory. Which is not the intended -->
+ <!-- semantic. -->
+
+ <xsl:variable name="page-content">
+ <html>
+ <xsl:apply-templates select="head" mode="head.mode"/>
+ <xsl:apply-templates select="config" mode="head.mode"/>
+ <body>
+
+ <div id="{$id}" class="{name(.)}">
+ <a name="{$id}"/>
+
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <xsl:if test="$nav.table.summary!=''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$nav.table.summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <tr>
+ <td width="{$navtocwidth}" bgcolor="{$navbgcolor}"
+ valign="top" align="left">
+ <p class="navtoc">
+ <xsl:call-template name="nav.toc">
+ <xsl:with-param name="pages" select="/website/webpage"/>
+ </xsl:call-template>
+ </p>
+ </td>
+ <td bgcolor="{$textbgcolor}"> </td>
+ <td align="left" valign="top" bgcolor="{$textbgcolor}">
+ <xsl:apply-templates select="./head/title" mode="title.mode"/>
+ <xsl:apply-templates select="child::*[name(.) != 'webpage']"/>
+ <xsl:call-template name="process.footnotes"/>
+ <br/>
+ </td>
+ </tr>
+ </table>
+
+ <xsl:call-template name="webpage.footer"/>
+ </div>
+
+ </body>
+ </html>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="method" select="'html'"/>
+ <xsl:with-param name="encoding" select="'ISO-8859-1'"/>
+ <xsl:with-param name="content" select="$page-content"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="webpage"/>
+
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="homepage|webpage" mode="filename">
+ <xsl:variable name="dir">
+ <xsl:choose>
+ <xsl:when test="config[@param='dir']/@value">
+ <xsl:value-of select="config[@param='dir']/@value"/>
+ <xsl:text>/</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="fname">
+ <xsl:choose>
+ <xsl:when test="config[@param='filename']/@value">
+ <xsl:value-of select="config[@param='filename']/@value"/>
+ </xsl:when>
+ <xsl:otherwise>index.html</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:value-of select="concat($dir, $fname)"/>
+</xsl:template>
+
+<xsl:template name="href.target">
+ <xsl:param name="object" select="."/>
+ <xsl:param name="from-page" select="(ancestor-or-self::webpage
+ |ancestor-or-self::homepage)[last()]"/>
+
+ <xsl:variable name="ischunk">
+ <xsl:if test="local-name($object) = 'webpage'
+ or local-name($object) = 'homepage'">1</xsl:if>
+ <xsl:text>0</xsl:text>
+ </xsl:variable>
+ <xsl:variable name="chunk" select="($object/ancestor-or-self::webpage
+ |$object/ancestor-or-self::homepage)[last()]"/>
+
+ <xsl:call-template name="root-rel-path">
+ <xsl:with-param name="webpage" select="$from-page"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="$chunk" mode="filename"/>
+
+ <xsl:if test="$ischunk='0'">
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="html:*">
+ <xsl:element name="{local-name(.)}" namespace="">
+ <xsl:apply-templates select="@*" mode="copy"/>
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="@*" mode="copy">
+ <xsl:attribute name="{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html='http://www.w3.org/1999/xhtml'
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="html doc">
+
+<!-- ********************************************************************
+ $Id$
+ ******************************************************************** -->
+
+<xsl:import href="chunk-website-common.xsl"/>
+<xsl:include href="/share/xsl/docbook/html/xtchunker.xsl"/>
+
+<xsl:output method="html"
+ encoding="iso-8859-1"
+/>
+
+</xsl:stylesheet>