MOON
Server: Apache
System: Linux vps.thepromohut.com 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: caretrak (507)
PHP: 5.2.10
Disabled: NONE
Upload Files
File: //usr/share/doc/docbook-style-xsl-1.69.1/doc/template/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.69.0">
   </head>
   <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
      <div class="reference" lang="en">
         <div class="titlepage">
            <div>
               <div>
                  <h1 class="title"><a name="d0e1"></a>Template Stylesheet Reference
                  </h1>
               </div>
               <div>
                  <div class="author">
                     <h3 class="author"><span class="firstname">Norman</span> <span class="surname">Walsh</span></h3>
                  </div>
               </div>
               <div>
                  <p class="releaseinfo">
                     $Id: titlepage.xsl,v 1.8 2005/04/29 20:05:36 kosek Exp $
                     
                  </p>
               </div>
               <div>
                  <p class="copyright"><a href="../copyright.html">Copyright</a> &copy; 19992000 by Norman Walsh. <a href="../warranty.html">No Warranty</a>.
                  </p>
               </div>
            </div>
            <hr>
         </div>
         <div class="partintro" lang="en">
            <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>
               <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 &#8220;<span class="quote">user</span>&#8221; documentation.
                  It is provided for developers writing customization layers for the
                  stylesheets, and for anyone who's interested in &#8220;<span class="quote">how it
                     works</span>&#8221;.
               </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><span class="refentrytitle"><a href="#d0e39">t:templates</a></span><span class="refpurpose"> - Construct a stylesheet for the templates provided</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e71">xsl:*</a></span><span class="refpurpose"> - Copy xsl: elements straight through</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e85">t:titlepage</a></span><span class="refpurpose"> - Create the templates necessary to construct a title page</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e178">@* (in copy.literal.atts mode)</a></span><span class="refpurpose"> - Copy t:titlepage attributes</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e198">t:titlepage-content</a></span><span class="refpurpose"> - Create templates for the content of one side of a title page</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e305">t:titlepage-separator</a></span><span class="refpurpose"> - Create templates for the separator</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e322">t:titlepage-before</a></span><span class="refpurpose"> - Create templates for what precedes a title page</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e339">* (in copy mode)</a></span><span class="refpurpose"> - Copy elements</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e353">@* (in copy mode)</a></span><span class="refpurpose"> - Copy attributes</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e367">* (in document.order mode)</a></span><span class="refpurpose"> - Create rules to process titlepage elements in document order</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e390">* (in document.order mode)</a></span><span class="refpurpose"> - Create rules to process titlepage elements in stylesheet order</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e416">* (in titlepage.specialrules mode)</a></span><span class="refpurpose"> - Create templates for special rules</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e436">* (in titlepage.subrules mode)</a></span><span class="refpurpose"> - Create template for individual special rules</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e450">t:or</a></span><span class="refpurpose"> - Process the t:or special rule</span></dt>
                  <dt><span class="refentrytitle"><a href="#d0e464">t:or (in titlepage.subrules mode)</a></span><span class="refpurpose"> - Process the t:or special rule in
                        titlepage.subrules mode</span></dt>
                  <dt><span class="refentrytitle"><a href="#template.element-or-list">element-or-list</a></span><span class="refpurpose"> - Construct the "or-list" used in the select attribute for
                        special rules.</span></dt>
               </dl>
            </div>
         </div>
         <div class="refentry" lang="en"><a name="d0e39"></a><div class="titlepage"></div>
            <div class="refnamediv">
               <h2>Name</h2>
               <p>t:templates &#8212; Construct a stylesheet for the templates provided</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="t:templates"/&gt;</pre></div>
            <div class="refdescription"><a name="d0e48"></a>
               
               
               <p>The <code class="literal">t:templates</code> element is the root of a
                  set of templates. This template creates an appropriate
                  <code class="literal">xsl:stylesheet</code> for the templates.
               </p>
               
               
               
               
               <p>If the <code class="literal">t:templates</code> element has a
                  <code class="literal">base-stylesheet</code> attribute, an
                  <code class="literal">xsl:import</code> 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 class="refnamediv">
               <h2>Name</h2>
               <p>xsl:* &#8212; Copy xsl: elements straight through</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="xsl:*"/&gt;</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 class="refnamediv">
               <h2>Name</h2>
               <p>t:titlepage &#8212; Create the templates necessary to construct a title page</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="t:titlepage"/&gt;</pre></div>
            <div class="refdescription"><a name="d0e94"></a>
               
               
               <p>The <code class="literal">t:titlepage</code> element creates a set of
                  templates for processing the titlepage for an element. The
                  &#8220;<span class="quote">root</span>&#8221; of this template set is the template named
                  &#8220;<span class="quote"><code class="literal">wrapper.titlepage</code></span>&#8221;. That is the
                  template that should be called to generate the title page.
                  
               </p>
               
               
               
               
               <p>The <code class="literal">t:titlepage</code> 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
                           <code class="sgmltag-element">article</code> element, set the
                           <code class="sgmltag-attribute">element</code> attribute to
                           &#8220;<span class="quote"><code class="literal">article</code></span>&#8221;. 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 <code class="sgmltag-attribute">class</code> attribute
                           is set, a <code class="sgmltag-attribute">class</code> 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 <code class="literal">t:titlepage</code> is one or
                  more <code class="literal">t:titlepage-content</code>,
                  <code class="literal">t:titlepage-separator</code>, and
                  <code class="literal">t:titlepage-before</code> elements.
               </p>
               
               
               
               
               <p>Each of these elements may be provided for the &#8220;<span class="quote">recto</span>&#8221;
                  and &#8220;<span class="quote">verso</span>&#8221; 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 class="refnamediv">
               <h2>Name</h2>
               <p>@* (in copy.literal.atts mode) &#8212; Copy t:titlepage attributes</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="@*" mode="copy.literal.atts"/&gt;</pre></div>
            <div class="refdescription"><a name="d0e187"></a>
               
               
               <p>This template copies all of the &#8220;<span class="quote">other</span>&#8221; attributes
                  from a <code class="literal">t:titlepage</code> 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 class="refnamediv">
               <h2>Name</h2>
               <p>t:titlepage-content &#8212; Create templates for the content of one side of a title page</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="t:titlepage-content"/&gt;</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 <code class="literal">t:titlepage-content</code> 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
                           <code class="sgmltag-attribute">side</code> attribute is required and
                           must be set to either 
                           &#8220;<span class="quote"><code class="literal">recto</code></span>&#8221; or
                           &#8220;<span class="quote"><code class="literal">verso</code></span>&#8221;. In addition, you must specify
                           exactly one <code class="literal">t:titlepage-content</code> for each side
                           within each <code class="literal">t:titlepage</code>.
                        </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
                           <code class="sgmltag-attribute">order</code> is
                           &#8220;<span class="quote"><code class="literal">document</code></span>&#8221;, the elements are presented
                           in document order. Otherwise (if the
                           <code class="sgmltag-attribute">order</code> is
                           &#8220;<span class="quote"><code class="literal">stylesheet</code></span>&#8221;), 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 <code class="literal">t:titlepage-content</code> 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:
                  <code class="sgmltag-attribute">predicate</code>. 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">
  &lt;t:titlepage-contents side="recto"&gt;
    &lt;!-- other titlepage elements --&gt;
    &lt;author predicate="[count(previous-sibling::author)&lt;2]"/&gt;
    &lt;!-- other titlepage elements --&gt;
  &lt;/t:titlepage-contents&gt;
</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 <code class="literal">authorgroup</code> 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 <code class="literal">t:or</code> group inside
                  the <code class="literal">authorgroup</code> element:
                  
                  
               </p><pre class="screen">
  &lt;t:titlepage-contents side="recto"&gt;
    &lt;!-- other titlepage elements --&gt;
    &lt;authorgroup&gt;
      &lt;t:or&gt;
        &lt;author/&gt;
        &lt;editor/&gt;
        &lt;corpauthor/&gt;
      &lt;/t:or&gt;
    &lt;/authorgroup&gt;
    &lt;!-- other titlepage elements --&gt;
  &lt;/t:titlepage-contents&gt;
</pre><p>
                  
               </p>
               
               
               
               
               <p>This will have the effect of automatically generating a template
                  for processing <code class="literal">authorgroup</code>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 class="refnamediv">
               <h2>Name</h2>
               <p>t:titlepage-separator &#8212; Create templates for the separator</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="t:titlepage-separator"/&gt;</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 <code class="literal">t:titlepage-separator</code>
                  element.
               </p>
               
               
            </div>
         </div>
         <div class="refentry" lang="en">
            <div class="refentry.separator">
               <hr>
            </div><a name="d0e322"></a><div class="titlepage"></div>
            <div class="refnamediv">
               <h2>Name</h2>
               <p>t:titlepage-before &#8212; Create templates for what precedes a title page</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="t:titlepage-before"/&gt;</pre></div>
            <div class="refdescription"><a name="d0e331"></a>
               
               
               <p>Each side of the title page is preceded by the markup specified
                  in the <code class="literal">t:titlepage-before</code> 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 class="refnamediv">
               <h2>Name</h2>
               <p>* (in copy mode) &#8212; Copy elements</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="*" mode="copy"/&gt;</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 class="refnamediv">
               <h2>Name</h2>
               <p>@* (in copy mode) &#8212; Copy attributes</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="@*" mode="copy"/&gt;</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 class="refnamediv">
               <h2>Name</h2>
               <p>* (in document.order mode) &#8212; Create rules to process titlepage elements in document order</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="*" mode="document.order"/&gt;</pre></div>
            <div class="refdescription"><a name="d0e376"></a>
               
               
               <p>This template is called to process all of the children of the
                  <code class="literal">t:titlepage-content</code> 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 class="refnamediv">
               <h2>Name</h2>
               <p>* (in document.order mode) &#8212; Create rules to process titlepage elements in stylesheet order</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="*" mode="document.order"/&gt;</pre></div>
            <div class="refdescription"><a name="d0e399"></a>
               
               
               <p>This template is called to process all of the children of the
                  <code class="literal">t:titlepage-content</code> element. It creates the set
                  of <code class="literal">xsl:apply-templates</code> 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 class="refnamediv">
               <h2>Name</h2>
               <p>* (in titlepage.specialrules mode) &#8212; Create templates for special rules</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="*" mode="titlepage.specialrules"/&gt;</pre></div>
            <div class="refdescription"><a name="d0e425"></a>
               
               
               <p>This template is called to process all of the descendants of the
                  <code class="literal">t:titlepage-content</code> element that require special
                  processing. At present, that's just <code class="literal">t:or</code> elements.
                  
               </p>
               
               
            </div>
         </div>
         <div class="refentry" lang="en">
            <div class="refentry.separator">
               <hr>
            </div><a name="d0e436"></a><div class="titlepage"></div>
            <div class="refnamediv">
               <h2>Name</h2>
               <p>* (in titlepage.subrules mode) &#8212; Create template for individual special rules</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="*" mode="titlepage.subrules"/&gt;</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 class="refnamediv">
               <h2>Name</h2>
               <p>t:or &#8212; Process the t:or special rule</p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="t:or"/&gt;&lt;xsl:template match="t:or" mode="titlepage.subrules"/&gt;</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 class="refnamediv">
               <h2>Name</h2>
               <p>t:or (in titlepage.subrules mode) &#8212; Process the t:or special rule in
                  titlepage.subrules mode
               </p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template match="t:or" mode="titlepage.subrules"/&gt;</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 class="refnamediv">
               <h2>Name</h2>
               <p>element-or-list &#8212; Construct the "or-list" used in the select attribute for
                  special rules.
               </p>
            </div>
            <div class="refsynopsisdiv">
               <h2>Synopsis</h2><pre class="synopsis">&lt;xsl:template name="element-or-list"&gt;
&lt;xsl:param name="elements" select="*"/&gt;
&lt;xsl:param name="element.count" select="count($elements)"/&gt;
&lt;xsl:param name="count" select="1"/&gt;
&lt;xsl:param name="orlist"/&gt;
  ...
&lt;/xsl:template&gt;</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>