--- /dev/null
+# Makefile to demonstrate the use of
+# newolink for linking between documents.
+
+# User guide and reference books
+
+UG-BASEURI = "../docroot/UserGuide/userguide.html"
+INCL-BASEURI = "../docroot/Modular/"
+REF-BASEURI = "../docroot/Reference"
+
+
+ugtargets.xml : userguide.xml
+ xsltproc ../tools/targets.xsl userguide.xml > ugtargets.xml
+
+reftargets.xml : ref.xml
+ xsltproc ../tools/chunktargets.xsl ref.xml > reftargets.xml
+
+# Single-file output user guide
+
+$(UG-BASEURI) : userguide.xml reftargets.xml targetdb.xml ugtargets.xml
+ xsltproc --param target.database.document '"../docsrc/targetdb.xml"' \
+ ../tools/custom.xsl userguide.xml > $(UG-BASEURI) 2> ug.err
+
+# Chunked output reference
+
+$(REF)/index.html : ref.xml ugtargets.xml targetdb.xml reftargets.xml
+ xsltproc --param target.database.document '"../docsrc/targetdb.xml"' \
+ --output "../docroot/Reference/" \
+ --param quiet 1 \
+ ../tools/chunkcustom.xsl ref.xml 2> ref.err
+
+ug : $(UG-BASEURI)
+
+ref : $(REF)/index.html
+
+all: ug ref
+
+# Modular doc
+
+SRC = modular.xml preface.xml introduction.xml
+
+# Make the targets file
+modtargets.xml : $(SRC)
+ xsltproc --xinclude \
+ ../tools/chunktargets.xsl modular.xml > modtargets.xml
+
+# Process the whole book
+modular: modtargets.xml
+ rm -f ../docroot/Modular/*
+ xsltproc --param target.database.document '"../docsrc/targetdb.xml"' \
+ --xinclude \
+ --output "../docroot/Modular/" \
+ ../tools/chunkcustom.xsl modular.xml 2> mod.err
+
+# Process the preface only
+preface : preface.xml
+ xsltproc --param target.database.document '"../docsrc/targetdb.xml"' \
+ --xinclude \
+ --output "../docroot/Modular/" \
+ ../tools/chunkcustom.xsl preface.xml
+
+# Process the chapter only
+intro : introduction.xml
+ xsltproc --param target.database.document '"../docsrc/targetdb.xml"' \
+ --xinclude \
+ --output "../docroot/Modular/" \
+ ../tools/chunkcustom.xsl introduction.xml
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE chapter SYSTEM "../../docbook412/docbookx.dtd" [
+<!ENTITY % local.olink.attrib
+ "targetdoc CDATA #IMPLIED
+ targetid CDATA #IMPLIED"
+>
+]>
+<chapter id="intro">
+<title>Introduction to modular doc</title>
+<para>
+A paragraph in my chapter so far to see
+how it will work when I form an olink to
+<olink targetdoc="incl" targetid="preface" type="stylesheet"/>.
+</para>
+</chapter>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book SYSTEM "../../docbook412/docbookx.dtd" [
+<!ENTITY % local.olink.attrib
+ "targetdoc CDATA #IMPLIED
+ targetid CDATA #IMPLIED"
+>
+]>
+<book id="IncludeTest">
+<bookinfo>
+<title>Testing modular doc</title>
+</bookinfo>
+<xi:include href="preface.xml#preface"
+ xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="introduction.xml#intro"
+ xmlns:xi="http://www.w3.org/2001/XInclude"/>
+</book>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE preface SYSTEM "../../docbook412/docbookx.dtd" [
+<!ENTITY % local.olink.attrib
+ "targetdoc CDATA #IMPLIED
+ targetid CDATA #IMPLIED"
+>
+]>
+<preface id="preface">
+<title>Preface in modular doc</title>
+<para>
+My only paragraph in my preface so far to see
+how it will work when I form an olink to
+<olink targetdoc="incl" targetid="intro" type="stylesheet"/>
+</para>
+</preface>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE reference SYSTEM "../../docbook412/docbookx.dtd" [
+<!ENTITY % local.olink.attrib
+ "targetdoc CDATA #IMPLIED
+ targetid CDATA #IMPLIED"
+>
+]>
+<reference>
+<referenceinfo>
+<author><surname>Walsh</surname>
+<firstname>Norman</firstname></author>
+<copyright><year>1999</year><year>2000</year>
+<holder>Norman Walsh</holder>
+</copyright>
+</referenceinfo>
+<title>HTML Parameter Reference</title>
+
+<partintro>
+<section><title>Introduction</title>
+
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>For general information on XSL architecture, see
+<olink type="stylesheet"
+ targetdoc="ug"
+ targetid="xsl-stylesheets"/>.
+</para>
+
+
+<para>This reference describes each of the HTML Stylesheet parameters.
+These are the <quote>easily customizable</quote> parts of the stylesheet.
+If you want to specify an alternate value for one or more of these
+parameters, you can do so in a <quote>driver</quote> stylesheet.</para>
+
+
+
+<para>For example, if you want to change the <literal>html.stylesheet</literal>
+to <filename>reference.css</filename>, you might create a driver
+stylesheet like this:</para>
+
+
+<programlisting><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+ <xsl:import href="/path/to/html/docbook.xsl"/>
+
+ <xsl:param name="html.stylesheet">reference.css</xsl:param>
+
+</xsl:stylesheet></programlisting>
+
+
+<para>Naturally, you have to change the
+<sgmltag class="attribute">href</sgmltag> attribute on
+<literal><xsl:import></literal>
+to point to <filename>docbook.xsl</filename>
+on your system. (Or <filename>chunk.xsl</filename>, if you're using
+chunking.)</para>
+
+
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+
+</section>
+</partintro>
+
+<refentry id="param.author.othername.in.middle">
+<refnamediv>
+<refname>author.othername.in.middle</refname>
+<refpurpose>Is <sgmltag>othername</sgmltag> in <sgmltag>author</sgmltag> a
+middle name?</refpurpose>
+</refnamediv>
+<refsynopsisdiv>
+<synopsis>
+<xsl:param name="author.othername.in.middle" select="1" doc:type="boolean"/></synopsis>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the <sgmltag>othername</sgmltag> of an <sgmltag>author</sgmltag>
+appears between the <sgmltag>firstname</sgmltag> and
+<sgmltag>surname</sgmltag>. Otherwise, <sgmltag>othername</sgmltag>
+is suppressed.
+</para>
+
+</refsect1></refentry>
+
+<refentry id="param.html.stylesheet">
+<refnamediv>
+<refname>html.stylesheet</refname>
+<refpurpose>Name of the stylesheet to use in the generated HTML</refpurpose>
+</refnamediv>
+<refsynopsisdiv>
+<synopsis>
+<xsl:param name="html.stylesheet" select="''" doc:type="string"/></synopsis>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+
+<para>The name of the stylesheet to place in the HTML <sgmltag>LINK</sgmltag>
+tag, or the empty string to suppress the stylesheet <sgmltag>LINK</sgmltag>.
+</para>
+
+</refsect1></refentry>
+
+<refentry id="param.html.stylesheet.type">
+<refnamediv>
+<refname>html.stylesheet.type</refname>
+<refpurpose>The type of the stylesheet used in the generated HTML</refpurpose>
+</refnamediv>
+<refsynopsisdiv>
+<synopsis>
+<xsl:param name="html.stylesheet.type" doc:type="string">text/css</xsl:param></synopsis>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+
+<para>The type of the stylesheet to place in the HTML <sgmltag>link</sgmltag> tag.
+</para>
+
+</refsect1></refentry>
+
+</reference>
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE t:targetset SYSTEM "../tools/targetdatabase.dtd" [
+]>
+<t:targetset xmlns:t="http://sagehill.net/xsl/target/1.0">
+ <t:targetsetinfo>Information about this example
+ targets database</t:targetsetinfo>
+ <t:document
+ targetdoc="ug"
+ uri="urn:x-omf:sagehill:userguide:1.0:en:html"
+ baseuri="../UserGuide/userguide.html"
+ href="../examples/ugtargets.xml" />
+ <t:document
+ targetdoc="ref"
+ uri="urn:x-omf:sagehill:ref:1.0:en:html"
+ baseuri="../Reference"
+ href="../examples/reftargets.xml" />
+ <t:document
+ targetdoc="modular"
+ uri="urn:x-omf:sagehill:modular:1.0:en:html"
+ baseuri="../Modular"
+ href="../examples/modtargets.xml" />
+</t:targetset>
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<t:div xmlns:t="http://sagehill.net/xsl/target/1.0" element="article" href="#publish" name="Article" number="" targetid="publish">
+ <t:ttl>Publishing DocBook Documents</t:ttl>
+ <t:xreftext>???</t:xreftext>
+ <t:page/>
+ <t:div element="section" href="#stylesheet.languages" name="Section" number="" targetid="stylesheet.languages">
+ <t:ttl>A Survey of Stylesheet Languages</t:ttl>
+ <t:xreftext>the section called “A Survey of Stylesheet Languages”</t:xreftext>
+ <t:page/>
+ <t:div element="section" href="#id2713646" name="Section" number="">
+ <t:ttl>Stylesheet Examples</t:ttl>
+ <t:xreftext>the section called “Stylesheet Examples”</t:xreftext>
+ <t:page/>
+ <t:div element="section" href="#fosi-stylesheets" name="Section" number="" targetid="fosi-stylesheets">
+ <t:ttl>FOSI stylesheet</t:ttl>
+ <t:xreftext>the section called “FOSI stylesheet”</t:xreftext>
+ <t:page/>
+ <t:obj element="example" href="#ex-fosi" name="Example" number="1" targetid="ex-fosi">
+ <t:ttl>A Fragment of a FOSI Stylesheet</t:ttl>
+ <t:xreftext>Example 1</t:xreftext>
+ </t:obj>
+ </t:div>
+ <t:div element="section" href="#dsssl-stylesheets" name="Section" number="" targetid="dsssl-stylesheets">
+ <t:ttl>DSSSL stylesheet</t:ttl>
+ <t:xreftext>the section called “DSSSL stylesheet”</t:xreftext>
+ <t:page/>
+ <t:obj element="example" href="#ex-dsssl" name="Example" number="2" targetid="ex-dsssl">
+ <t:ttl>A Fragment of a DSSSL Stylesheet</t:ttl>
+ <t:xreftext>Example 2</t:xreftext>
+ </t:obj>
+ </t:div>
+ <t:div element="section" href="#css-stylesheets" name="Section" number="" targetid="css-stylesheets">
+ <t:ttl>CSS stylesheet</t:ttl>
+ <t:xreftext>the section called “CSS stylesheet”</t:xreftext>
+ <t:page/>
+ <t:obj element="example" href="#ex-css" name="Example" number="3" targetid="ex-css">
+ <t:ttl>A Fragment of a CSS Stylesheet</t:ttl>
+ <t:xreftext>Example 3</t:xreftext>
+ </t:obj>
+ </t:div>
+ <t:div element="section" href="#xsl-stylesheets" name="Section" number="" targetid="xsl-stylesheets">
+ <t:ttl>XSL stylesheet</t:ttl>
+ <t:xreftext>the section called “XSL stylesheet”</t:xreftext>
+ <t:page/>
+ <t:obj element="example" href="#ex-xsl" name="Example" number="4" targetid="ex-xsl">
+ <t:ttl>A Fragment of an XSL Stylesheet</t:ttl>
+ <t:xreftext>Example 4</t:xreftext>
+ </t:obj>
+ </t:div>
+ </t:div>
+ </t:div>
+</t:div>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article SYSTEM "../../docbook412/docbookx.dtd" [
+<!ENTITY % local.olink.attrib
+ "targetdoc CDATA #IMPLIED
+ targetid CDATA #IMPLIED"
+>
+]>
+<article id="publish">
+<title>Publishing DocBook Documents</title>
+<para>
+Creating and editing SGML/XML documents is usually only half the
+battle. After you've composed your document, you'll want to publish
+it. Publishing, for our purposes, means either print or web
+publishing. For SGML and XML documents, this is usually
+accomplished with some kind of <glossterm>stylesheet</glossterm>. In
+the (not too distant) future, you may be able to publish an XML
+document on the Web by simply putting it online with a stylesheet, but
+for now you'll probably have to translate your document into HTML.
+</para>
+<para>
+Stylesheets provide the means for converting your documents
+to HTML. You can use the stock stylesheets, or your can
+customize them to meet your particular needs.
+For example, if you have a CSS stylesheet you always want to be
+used by your published HTML files, then you can set the
+<olink type="stylesheet"
+ targetdoc="ref"
+ targetid="param.html.stylesheet">
+html.stylesheet</olink> parameter in the XSL stylesheet
+to the name of your CSS stylesheet.
+You will also want to set the stylesheet type
+using the
+<olink type="stylesheet"
+ targetdoc="ref"
+ targetid="param.html.stylesheet.type"/>
+parameter.
+</para>
+<para>
+There are many ways, using both free and commercial tools, to publish
+SGML documents. In this chapter, we're going to survey a number of
+possibilities, and then look at just one solution in detail: <ulink url="http://www.jclark.com/jade/">Jade</ulink> and the <ulink url="http://nwalsh.com/docbook/dsssl/">Modular DocBook
+Stylesheets.</ulink> We used jade to produce this
+book and to produce the online versions on the
+<acronym>CD-ROM</acronym>; it is also being deployed in other projects
+such as <ulink url="http://www.sgmltools.org/"><literal><SGML>&tools;</literal>,</ulink>
+which originated with the Linux Documentation Project.
+</para>
+<para>
+For a brief survey of other tools, see elsewhere.
+</para>
+<section id="stylesheet.languages"><title>A Survey of Stylesheet Languages</title>
+<para>
+Over the years, a number of attempts have been made to produce a
+standard stylesheet language and, failing that, a large number of
+proprietary languages have been developed.
+</para>
+<variablelist>
+<varlistentry><term>FOSIs</term>
+<listitem>
+<para>
+First, the U.S. Department of Defense, in an attempt to
+standardize stylesheets across military branches, created the
+<citetitle>Output Specification</citetitle>, which is defined in
+<acronym>MIL-PRF-28001C</acronym>, <citetitle>Markup Requirements and
+Generic Style Specification for Electronic Printed Output and Exchange
+of Text</citetitle>.<footnote>
+<para>
+See <citetitle><ulink url="http://www-cals.itsi.disa.mil/core/formal/fps.htm">Formally
+Published CALS Standards</ulink></citetitle> for more information.
+</para>
+</footnote>
+</para>
+<para>
+Commonly called FOSIs (for Formatting Output Specification Instances),
+they are supported by a few products including ADEPT Publisher by
+<ulink url="http://www.arbortext.com/">Arbortext</ulink> and DL
+Composer by <ulink url="http://www.datalogics.com/">Datalogics</ulink>.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>DSSSL</term>
+<listitem>
+<para>
+Next, the International Organization for Standardization
+(<acronym>ISO</acronym>) created <acronym>DSSSL</acronym>, the
+Document Style Semantics and Specification Language. Subsets of
+<acronym>DSSSL</acronym> are supported by Jade and a few other tools,
+but it never achieved widespread support.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>CSS</term>
+<listitem>
+<para>
+The <acronym>W3C</acronym> CSS Working Group created
+<acronym>CSS</acronym> as a style attachment language for HTML, and,
+more recently, XML.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>XSL</term>
+<listitem>
+<para>
+Most recently, the XML effort has identified a standard Extensible Style
+Language (<acronym>XSL</acronym>) as a requirement. The
+<acronym>W3C</acronym> <acronym>XSL</acronym> Working Group is
+currently pursuing that effort.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+<section><title>Stylesheet Examples</title>
+<para>
+By way of comparison, here's an example of each of the standard style
+languages. In each case, the stylesheet fragment shown contains the
+rules that reasonably formatted the following paragraph:
+</para>
+<screen>
+<para>
+This is an example paragraph. It should be presented in a
+reasonable body font. <emphasis>Emphasized</emphasis> words
+should be printed in italics. A single level of
+<emphasis>Nested <emphasis>emphasis</emphasis> should also
+be supported.</emphasis>
+</para>
+</screen>
+<section id="fosi-stylesheets">
+<title><acronym>FOSI</acronym> stylesheet</title>
+<para>
+<acronym>FOSI</acronym>s are SGML documents. The element in the
+<acronym>FOSI</acronym> that controls the presentation of specific
+elements is the <sgmltag>e-i-c</sgmltag> (element in context) element.
+A sample <acronym>FOSI</acronym> fragment is shown in <xref linkend="ex-fosi"/>.
+</para>
+<example id="ex-fosi">
+<title>A Fragment of a <acronym>FOSI</acronym> Stylesheet</title>
+<programlisting><inlinegraphic fileref="examples/style-fosi.txt"/></programlisting>
+</example>
+</section>
+<section id="dsssl-stylesheets"><title><acronym>DSSSL</acronym> stylesheet</title>
+<para>
+<acronym>DSSSL</acronym> stylesheets are written in a Scheme-like
+language (see “Scheme” later in this chapter). It is the
+<function>element</function> function that controls the presentation of
+individual elements. See the example in <xref linkend="ex-dsssl"/>.
+</para>
+<example id="ex-dsssl">
+<title>A Fragment of a <acronym>DSSSL</acronym> Stylesheet</title>
+<programlisting><inlinegraphic fileref="examples/style-dsssl.txt"/></programlisting>
+</example>
+</section>
+<section id="css-stylesheets"><title><acronym>CSS</acronym> stylesheet</title>
+<para>
+<acronym>CSS</acronym> stylesheets consist of selectors and formatting
+properties, as shown in <xref linkend="ex-css"/>.
+</para>
+<example id="ex-css">
+<title>A Fragment of a <acronym>CSS</acronym> Stylesheet</title>
+<programlisting><inlinegraphic fileref="examples/style-css.txt"/></programlisting>
+</example>
+</section>
+<section id="xsl-stylesheets"><title><acronym>XSL</acronym> stylesheet</title>
+<para>
+<acronym>XSL</acronym> stylesheets are XML documents, as shown in
+<xref linkend="ex-xsl"/>. The element in the <acronym>XSL</acronym>
+stylesheet that controls the presentation of specific elements is the
+<sgmltag>xsl:template</sgmltag> element.
+</para>
+<example id="ex-xsl">
+<title>A Fragment of an <acronym>XSL</acronym> Stylesheet</title>
+<programlisting><inlinegraphic fileref="examples/style-xsl.txt"/></programlisting>
+</example>
+</section>
+</section>
+</section>
+</article>