|
From: <smi...@us...> - 2004-01-02 00:39:39
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/template
In directory sc8-pr-cvs1:/tmp/cvs-serv17796/stylesheets/doc/template
Added Files:
ChangeLog titlepage.html
Log Message:
so that's hopefully it, with the new stylesheets
--- NEW FILE: ChangeLog ---
2002-03-09 Jirka Kosek <ko...@us...>
* Makefile: Removed hardcoded reference for XSLT processor as it is already set in Makefile.incl. Fixed typo in DocBook DTD URI.
2001-09-09 Norman Walsh <nw...@us...>
* .cvsignore, Makefile: New file.
--- NEW FILE: titlepage.html ---
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Template Stylesheet Reference</title>
<link rel="stylesheet" href="../reference.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.59.2">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="reference" lang="en"><a name="d0e1"></a><div class="titlepage">
<div>
<div>
<h1 class="title"><a name="d0e1"></a>Template Stylesheet Reference
</h1>
</div>
<div>
<div class="author">
<h3 class="author">Norman Walsh</h3>
</div>
</div>
<div>
<p class="releaseinfo">
$Id: titlepage.html,v 1.1 2004/01/02 00:39:31 smiley73 Exp $
</p>
</div>
<div>
<p class="copyright"><a href="../copyright.html">Copyright</a> © 19992000 by Norman Walsh. <a href="../warranty.html">No Warranty</a>.
</p>
</div>
</div>
<div></div>
<hr>
</div>
<div class="partintro" lang="en">
<div>
<div></div>
<div></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="d0e24"></a>Introduction
</h2>
</div>
</div>
<div></div>
</div>
<p>This is technical reference documentation for the DocBook XSL
Stylesheets; it documents (some of) the parameters, templates, and
other elements of the stylesheets.
</p>
<p>This is not intended to be “user” documentation.
It is provided for developers writing customization layers for the
stylesheets, and for anyone who's interested in “how it
works”.
</p>
<p>Although I am trying to be thorough, this documentation is known
to be incomplete. Don't forget to read the source, too :-)
</p>
</div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><a href="#d0e39">t:templates</a> - Construct a stylesheet for the templates provided
</dt>
<dt><a href="#d0e71">xsl:*</a> - Copy xsl: elements straight through
</dt>
<dt><a href="#d0e85">t:titlepage</a> - Create the templates necessary to construct a title page
</dt>
<dt><a href="#d0e178">@* (in copy.literal.atts mode)</a> - Copy t:titlepage attributes
</dt>
<dt><a href="#d0e198">t:titlepage-content</a> - Create templates for the content of one side of a title page
</dt>
<dt><a href="#d0e305">t:titlepage-separator</a> - Create templates for the separator
</dt>
<dt><a href="#d0e322">t:titlepage-before</a> - Create templates for what precedes a title page
</dt>
<dt><a href="#d0e339">* (in copy mode)</a> - Copy elements
</dt>
<dt><a href="#d0e353">@* (in copy mode)</a> - Copy attributes
</dt>
<dt><a href="#d0e367">* (in document.order mode)</a> - Create rules to process titlepage elements in document order
</dt>
<dt><a href="#d0e390">* (in document.order mode)</a> - Create rules to process titlepage elements in stylesheet order
</dt>
<dt><a href="#d0e416">* (in titlepage.specialrules mode)</a> - Create templates for special rules
</dt>
<dt><a href="#d0e436">* (in titlepage.subrules mode)</a> - Create template for individual special rules
</dt>
<dt><a href="#d0e450">t:or</a> - Process the t:or special rule
</dt>
<dt><a href="#d0e464">t:or (in titlepage.subrules mode)</a> - Process the t:or special rule in
titlepage.subrules mode
</dt>
<dt><a href="#template.element-or-list">element-or-list</a> - Construct the "or-list" used in the select attribute for
special rules.
</dt>
</dl>
</div>
</div>
<div class="refentry" lang="en"><a name="d0e39"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>t:templates — Construct a stylesheet for the templates provided</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="t:templates"/></pre></div>
<div class="refdescription"><a name="d0e48"></a>
<p>The <tt>t:templates</tt> element is the root of a
set of templates. This template creates an appropriate
<tt>xsl:stylesheet</tt> for the templates.
</p>
<p>If the <tt>t:templates</tt> element has a
<tt>base-stylesheet</tt> attribute, an
<tt>xsl:import</tt> statement is constructed for it.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e71"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>xsl:* — Copy xsl: elements straight through</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="xsl:*"/></pre></div>
<div class="refdescription"><a name="d0e80"></a>
<p>This template simply copies the xsl: elements
straight through into the result tree.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e85"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>t:titlepage — Create the templates necessary to construct a title page</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="t:titlepage"/></pre></div>
<div class="refdescription"><a name="d0e94"></a>
<p>The <tt>t:titlepage</tt> element creates a set of
templates for processing the titlepage for an element. The
“root” of this template set is the template named
“<tt>wrapper.titlepage</tt>”. That is the
template that should be called to generate the title page.
</p>
<p>The <tt>t:titlepage</tt> element has three attributes:
</p>
<div class="variablelist">
<dl>
<dt><span class="term">element</span></dt>
<dd>
<p>The name of the source document element for which
these templates apply. In other words, to make a title page for the
<tt class="sgmltag-element">article</tt> element, set the
<tt class="sgmltag-attribute">element</tt> attribute to
“<tt>article</tt>”. This attribute is required.
</p>
</dd>
<dt><span class="term">wrapper</span></dt>
<dd>
<p>The entire title page can be wrapped with an element.
This attribute identifies that element.
</p>
</dd>
<dt><span class="term">class</span></dt>
<dd>
<p>If the <tt class="sgmltag-attribute">class</tt> attribute
is set, a <tt class="sgmltag-attribute">class</tt> attribute with this
value will be added to the wrapper element that surrounds the entire
title page.
</p>
</dd>
</dl>
</div>
<p>
</p>
<p>Any other attributes are copied through literally to the
wrapper element.
</p>
<p>The content of a <tt>t:titlepage</tt> is one or
more <tt>t:titlepage-content</tt>,
<tt>t:titlepage-separator</tt>, and
<tt>t:titlepage-before</tt> elements.
</p>
<p>Each of these elements may be provided for the “recto”
and “verso” sides of the title page.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e178"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>@* (in copy.literal.atts mode) — Copy t:titlepage attributes</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="@*" mode="copy.literal.atts"/></pre></div>
<div class="refdescription"><a name="d0e187"></a>
<p>This template copies all of the “other” attributes
from a <tt>t:titlepage</tt> element onto the specified
wrapper.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e198"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>t:titlepage-content — Create templates for the content of one side of a title page</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="t:titlepage-content"/></pre></div>
<div class="refdescription"><a name="d0e207"></a>
<p>The title page content, that is, the elements from the source
document that are rendered on the title page, can be controlled independently
for the recto and verso sides of the title page.
</p>
<p>The <tt>t:titlepage-content</tt> element has two attributes:
</p>
<div class="variablelist">
<dl>
<dt><span class="term">side</span></dt>
<dd>
<p>Identifies the side of the page to which this title
page content applies. The
<tt class="sgmltag-attribute">side</tt> attribute is required and
must be set to either
“<tt>recto</tt>” or
“<tt>verso</tt>”. In addition, you must specify
exactly one <tt>t:titlepage-content</tt> for each side
within each <tt>t:titlepage</tt>.
</p>
</dd>
<dt><span class="term">order</span></dt>
<dd>
<p>Indicates how the order of the elements presented on
the title page is determined. If the
<tt class="sgmltag-attribute">order</tt> is
“<tt>document</tt>”, the elements are presented
in document order. Otherwise (if the
<tt class="sgmltag-attribute">order</tt> is
“<tt>stylesheet</tt>”), the elements are presented
in the order that they appear in the template (and consequently in
the stylesheet).
</p>
</dd>
</dl>
</div>
<p>
</p>
<p>The content of a <tt>t:titlepage-content</tt> element is
a list of element names. These names should be unqualified. They identify
the elements in the source document that should appear on the title page.
</p>
<p>Each element may have a single attribute:
<tt class="sgmltag-attribute">predicate</tt>. The value of this
attribute is used as a predicate for the expression that matches
the element on which it occurs.
</p>
<p>In other words, to put only the first three authors on the
recto-side of a title
page, you could specify:
</p><pre class="screen">
<t:titlepage-contents side="recto">
<!-- other titlepage elements -->
<author predicate="[count(previous-sibling::author)<2]"/>
<!-- other titlepage elements -->
</t:titlepage-contents>
</pre><p>
</p>
<p>Usually, the elements so named are empty. But it is possible to
make one level of selection within them. Suppose that you want to
process <tt>authorgroup</tt> elements on the title page, but
you want to select only proper authors, editors, or corporate authors,
not collaborators or other credited authors.
</p>
<p>In that case, you can put a <tt>t:or</tt> group inside
the <tt>authorgroup</tt> element:
</p><pre class="screen">
<t:titlepage-contents side="recto">
<!-- other titlepage elements -->
<authorgroup>
<t:or>
<author/>
<editor/>
<corpauthor/>
</t:or>
</authorgroup>
<!-- other titlepage elements -->
</t:titlepage-contents>
</pre><p>
</p>
<p>This will have the effect of automatically generating a template
for processing <tt>authorgroup</tt>s in the title page mode,
selecting only the specified children. If you need more complex processing,
you'll have to construct the templates by hand.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e305"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>t:titlepage-separator — Create templates for the separator</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="t:titlepage-separator"/></pre></div>
<div class="refdescription"><a name="d0e314"></a>
<p>The title page is separated from the content which follows it by
the markup specified in the <tt>t:titlepage-separator</tt>
element.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e322"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>t:titlepage-before — Create templates for what precedes a title page</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="t:titlepage-before"/></pre></div>
<div class="refdescription"><a name="d0e331"></a>
<p>Each side of the title page is preceded by the markup specified
in the <tt>t:titlepage-before</tt> element for that
side.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e339"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>* (in copy mode) — Copy elements</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="*" mode="copy"/></pre></div>
<div class="refdescription"><a name="d0e348"></a>
<p>This template simply copies the elements that it applies to
straight through into the result tree.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e353"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>@* (in copy mode) — Copy attributes</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="@*" mode="copy"/></pre></div>
<div class="refdescription"><a name="d0e362"></a>
<p>This template simply copies the attributes that it applies to
straight through into the result tree.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e367"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>* (in document.order mode) — Create rules to process titlepage elements in document order</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="*" mode="document.order"/></pre></div>
<div class="refdescription"><a name="d0e376"></a>
<p>This template is called to process all of the children of the
<tt>t:titlepage-content</tt> element. It creates the hairy
select expression necessary to process each of those elements in
the title page.
</p>
<p>Note that this template automatically handles the case where
some DocBook elements, like title and subtitle, can occur both inside
the *info elements where metadata is usually stored and outside.
</p>
<p>It also automatically calculates the name for the *info container
and handles elements that have historically had containers with different
names.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e390"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>* (in document.order mode) — Create rules to process titlepage elements in stylesheet order</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="*" mode="document.order"/></pre></div>
<div class="refdescription"><a name="d0e399"></a>
<p>This template is called to process all of the children of the
<tt>t:titlepage-content</tt> element. It creates the set
of <tt>xsl:apply-templates</tt> elements necessary
process each of those elements in the title page.
</p>
<p>Note that this template automatically handles the case where
some DocBook elements, like title and subtitle, can occur both inside
the *info elements where metadata is usually stored and outside.
</p>
<p>It also automatically calculates the name for the *info container
and handles elements that have historically had containers with different
names.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e416"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>* (in titlepage.specialrules mode) — Create templates for special rules</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="*" mode="titlepage.specialrules"/></pre></div>
<div class="refdescription"><a name="d0e425"></a>
<p>This template is called to process all of the descendants of the
<tt>t:titlepage-content</tt> element that require special
processing. At present, that's just <tt>t:or</tt> elements.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e436"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>* (in titlepage.subrules mode) — Create template for individual special rules</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="*" mode="titlepage.subrules"/></pre></div>
<div class="refdescription"><a name="d0e445"></a>
<p>This template is called to process the children of special
template elements.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e450"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>t:or — Process the t:or special rule</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="t:or"/><xsl:template match="t:or" mode="titlepage.subrules"/></pre></div>
<div class="refdescription"><a name="d0e459"></a>
<p>This template processes t:or.</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="d0e464"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>t:or (in titlepage.subrules mode) — Process the t:or special rule in
titlepage.subrules mode
</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template match="t:or" mode="titlepage.subrules"/></pre></div>
<div class="refdescription"><a name="d0e473"></a>
<p>The titlepage.subrules mode doesn't apply to t:or, so just
reprocess this node in the normal mode.
</p>
</div>
</div>
<div class="refentry" lang="en">
<div class="refentry.separator">
<hr>
</div><a name="template.element-or-list"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>element-or-list — Construct the "or-list" used in the select attribute for
special rules.
</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template name="element-or-list">
<xsl:param name="elements" select="*"/>
<xsl:param name="element.count" select="count($elements)"/>
<xsl:param name="count" select="1"/>
<xsl:param name="orlist"/>
...
</xsl:template></pre></div>
<div class="refdescription"><a name="d0e487"></a>
<p>Walk through each of the children of t:or, producing the
text of the select attribute.
</p>
</div>
</div>
</div>
</body>
</html>
|