You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(202) |
Nov
(201) |
Dec
(280) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(493) |
Feb
(106) |
Mar
(215) |
Apr
(163) |
May
(79) |
Jun
(193) |
Jul
(47) |
Aug
(71) |
Sep
(127) |
Oct
(41) |
Nov
(49) |
Dec
(120) |
2005 |
Jan
(147) |
Feb
(45) |
Mar
(26) |
Apr
(71) |
May
(52) |
Jun
(28) |
Jul
(92) |
Aug
(50) |
Sep
(35) |
Oct
(193) |
Nov
(106) |
Dec
(52) |
2006 |
Jan
(51) |
Feb
(38) |
Mar
(33) |
Apr
(79) |
May
(107) |
Jun
(67) |
Jul
(21) |
Aug
(65) |
Sep
(44) |
Oct
(87) |
Nov
(12) |
Dec
(56) |
2007 |
Jan
(48) |
Feb
(58) |
Mar
(63) |
Apr
(31) |
May
(25) |
Jun
(20) |
Jul
(72) |
Aug
(54) |
Sep
(30) |
Oct
(76) |
Nov
(74) |
Dec
(25) |
2008 |
Jan
(39) |
Feb
(39) |
Mar
(62) |
Apr
(64) |
May
(59) |
Jun
(31) |
Jul
(25) |
Aug
(25) |
Sep
(17) |
Oct
(24) |
Nov
|
Dec
(1) |
2009 |
Jan
(60) |
Feb
(39) |
Mar
(16) |
Apr
(30) |
May
(52) |
Jun
(35) |
Jul
(15) |
Aug
(15) |
Sep
(21) |
Oct
(32) |
Nov
(39) |
Dec
(52) |
2010 |
Jan
(42) |
Feb
(40) |
Mar
(23) |
Apr
(20) |
May
(27) |
Jun
(10) |
Jul
(30) |
Aug
(30) |
Sep
(66) |
Oct
(12) |
Nov
(35) |
Dec
(60) |
2011 |
Jan
(16) |
Feb
(1) |
Mar
(3) |
Apr
(28) |
May
(21) |
Jun
|
Jul
(12) |
Aug
(6) |
Sep
(10) |
Oct
(14) |
Nov
(40) |
Dec
(60) |
2012 |
Jan
(23) |
Feb
(17) |
Mar
(24) |
Apr
(18) |
May
(13) |
Jun
(1) |
Jul
|
Aug
(5) |
Sep
|
Oct
(5) |
Nov
(5) |
Dec
(15) |
2013 |
Jan
(2) |
Feb
(5) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2014 |
Jan
(3) |
Feb
(5) |
Mar
(8) |
Apr
(3) |
May
(1) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
(4) |
Oct
(10) |
Nov
|
Dec
(9) |
2015 |
Jan
(18) |
Feb
(17) |
Mar
(5) |
Apr
(2) |
May
|
Jun
(5) |
Jul
(1) |
Aug
(2) |
Sep
(1) |
Oct
(24) |
Nov
(20) |
Dec
(41) |
2016 |
Jan
(9) |
Feb
(3) |
Mar
(2) |
Apr
(7) |
May
(8) |
Jun
(1) |
Jul
(6) |
Aug
(5) |
Sep
(2) |
Oct
(6) |
Nov
(1) |
Dec
(6) |
2017 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
(4) |
May
(1) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/tools/olink In directory sc8-pr-cvs1:/tmp/cvs-serv12976/tools/olink Added Files: ChangeLog olink-common.xsl olink.xsl olinkchunk.xsl olinksum.dtd Log Message: updated stylesheets to latest version |
From: <smi...@us...> - 2004-01-02 00:16:58
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/tools/profile In directory sc8-pr-cvs1:/tmp/cvs-serv12976/tools/profile Added Files: ChangeLog profile.xsl Log Message: updated stylesheets to latest version |
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/profiling In directory sc8-pr-cvs1:/tmp/cvs-serv12976/profiling Added Files: ChangeLog profile-mode.xsl profile.xsl strip-attributes.xsl xsl2profile.xsl Log Message: updated stylesheets to latest version |
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc In directory sc8-pr-cvs1:/tmp/cvs-serv12976/doc Added Files: ChangeLog book.xsl ch01s02.html ch01s03.html ch01s04.html ch02s02.html ch03.html ch04.html ch05.html ch06s02.html ch06s03.html copyright.html extensions.html extensions.html.html htmlhelp.html htmlhelp.html.html index.html jrefhtml.xsl pr01.html publishing.html publishing.html.html ref.css reference.css reference.html reference.xsl warranty.html Log Message: updated stylesheets to latest version --- NEW FILE: ChangeLog --- 2003-05-01 Jirka Kosek <ko...@us...> * Makefile: Added skeleton for PI documentation 2002-06-11 Norman Walsh <nw...@us...> * Makefile, book.xsl: Fix dependencies; fix copyright formatting 2002-03-25 Norman Walsh <nw...@us...> * Makefile: Update documentation build to reflect use of lib.xweb 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. 2002-01-06 Norman Walsh <nw...@us...> * ref.css: New file. 2001-11-12 Norman Walsh <nw...@us...> * Makefile: Hacking at producing chunked parameter references 2001-10-13 Norman Walsh <nw...@us...> * Makefile, reference.xsl: Changes to make the documentation work with the new litprog sources 2001-09-09 Norman Walsh <nw...@us...> * Makefile: Add titlepage templates 2001-08-09 Norman Walsh <nw...@us...> * Makefile: Added tools to Makefile 2001-08-06 Norman Walsh <nw...@us...> * Makefile, book.xsl: Documentation and documentation generation tweaks 2001-06-20 Norman Walsh <nw...@us...> * Makefile: Back to Xalan; but it only sort of works * Makefile, book.xsl, reference.xsl: Use XT again (neither Saxon nor Xalan work) 2001-04-15 Norman Walsh <nw...@us...> * reference.css: New file. 2001-04-03 Norman Walsh <nw...@us...> * .cvsignore, Makefile, book.xsl, jrefhtml.xsl, reference.xsl: New file. * Makefile: Misc. cleanup in preparation for making a distrib --- NEW FILE: book.xsl --- <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:import href="../html/chunk.xsl"/> <xsl:param name="toc.section.depth" select="'1'"/> <xsl:param name="html.stylesheet" select="'reference.css'"/> <xsl:template match="olink[@type='title']"> <xsl:variable name="xml" select="document(unparsed-entity-uri(@targetdocent))"/> <xsl:variable name="title" select="($xml/*/title[1] |$xml/*/bookinfo/title[1] |$xml/*/referenceinfo/title[1])[1]"/> <i> <a href="{@localinfo}"> <xsl:apply-templates select="$title/*|$title/text()"/> </a> </i> </xsl:template> <xsl:template match="bookinfo/copyright|reference/copyright" mode="titlepage.mode"> <p class="{name(.)}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'Copyright'"/> </xsl:call-template> <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:call-template name="copyright.years"> <xsl:with-param name="years" select="year"/> <xsl:with-param name="print.ranges" select="$make.year.ranges"/> <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/> </xsl:call-template> <xsl:call-template name="gentext.space"/> <xsl:apply-templates select="holder" mode="titlepage.mode"/> <xsl:text>. </xsl:text> <a href="warranty.html">No Warranty</a> <xsl:text>.</xsl:text> </p> </xsl:template> </xsl:stylesheet> --- NEW FILE: ch01s02.html --- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title></title><link rel="stylesheet" href="reference.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title=""><link rel="up" href="publishing.html" title=""><link rel="previous" href="publishing.html" title=""><link rel="next" href="ch01s03.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="publishing.html"></a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="ch01s03.html"></a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e286"></a></h2></div></div><div></div></div><p>XSL is both a transformation language and a formatting language. The XSLT transformation part lets you scan through a document's structure and rearrange its content any way you like. You can write out the content using a different set of XML tags, and generate text as needed. For example, you can scan through a document to locate all headings and then insert a generated table of contents at the beginning of the document, at the same time writing out the content marked up as HTML. XSL is also a rich formatting language, letting you apply typesetting controls to all components of your output. With a good formatting backend, it is capable of producing high quality printed pages.</p><p>An XSL stylesheet is written using XML syntax, and is itself a well-formed XML document. That makes the basic syntax familiar, and enables an XML processor to check for basic syntax errors. The stylesheet instructions use special element names, which typically begin with <tt class="literal">xsl:</tt> to distinguish them from any XML tags you want to appear in the output. The XSL namespace is identified at the top of the stylesheet file. As with other XML, any XSL elements that are not empty will require a closing tag. And some XSL elements have specific attributes that control their behavior. It helps to keep a good XSL reference book handy.</p><p>Here is an example of a simple XSL stylesheet applied to a simple XML file to generate HTML output.</p><div class="example"><a name="d0e298"></a><p class="title"><b></b></p><pre class="programlisting"><?xml version="1.0"?> <document> <title>Using a mouse</title> <para>It's easy to use a mouse. Just roll it around and click the buttons.</para> </document></pre></div><div class="example"><a name="d0e303"></a><p class="title"><b></b></p><pre class="programlisting"><?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <xsl:output method="html"/> <xsl:template match="document"> <HTML><HEAD><TITLE> <xsl:value-of select="./title"/> </TITLE> </HEAD> <BODY> <xsl:apply-templates/> </BODY> </HTML> </xsl:template> <xsl:template match="title"> <H1><xsl:apply-templates/></H1> </xsl:template> <xsl:template match="para"> <P><xsl:apply-templates/></P> </xsl:template> </xsl:stylesheet> </pre></div><div class="example"><a name="d0e308"></a><p class="title"><b></b></p><pre class="programlisting"><HTML> <HEAD> <TITLE>Using a mouse</TITLE> </HEAD> <BODY> <H1>Using a mouse</H1> <P>It's easy to use a mouse. Just roll it around and click the buttons.</P> </BODY> </HTML> </pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="publishing.html"></a> </td><td width="20%" align="center"><a accesskey="u" href="publishing.html"></a></td><td width="40%" align="right"> <a accesskey="n" href="ch01s03.html"></a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html"></a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> --- NEW FILE: ch01s03.html --- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title></title><link rel="stylesheet" href="reference.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title=""><link rel="up" href="publishing.html" title=""><link rel="previous" href="ch01s02.html" title=""><link rel="next" href="ch01s04.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s02.html"></a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="ch01s04.html"></a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e313"></a></h2></div></div><div></div></div><p>XSL is a template language, not a procedural language. That means a stylesheet specifies a sample of the output, not a sequence of programming steps to generate it. A stylesheet consists of a mixture of output samples with instructions of what to put in each sample. Each bit of output sample and instructions is called a <span class="emphasis"><em>template</em></span>.</p><p>In general, you write a template for each element type in your document. That lets you concentrate on handling just one element at a time, and keeps a stylesheet modular. The power of XSL comes from processing the templates recursively. That is, each template handles the processing of its own element, and then calls other templates to process its children, and so on. Since an XML document is always a single root element at the top level that contains all of the nested descendent elements, the XSL templates also start at the top and work their way down through the hierarchy of elements.</p><p>Take the DocBook <tt class="literal"><para></tt> paragraph element as an example. To convert this to HTML, you want to wrap the paragraph content with the HTML tags <tt class="literal"><p></tt> and <tt class="literal"></p></tt>. But a DocBook <tt class="literal"><para></tt> can contain any number of in-line DocBook elements marking up the text. Fortunately, you can let other templates take care of those elements, so your XSL template for <tt class="literal"><para></tt> can be quite simple:</p><pre class="programlisting"><xsl:template match="para"> <p> <xsl:apply-templates/> </p> </xsl:template> </pre><p>The <tt class="literal"><xsl:template></tt> element starts a new template, and its <tt class="literal">match</tt> attribute indicates where to apply the template, in this case to any <tt class="literal"><para></tt> elements. The template says to output a literal <tt class="literal"><p></tt> string and then execute the <tt class="literal"><xsl:apply-templates/></tt> instruction. This tells the XSL processor to look among all the templates in the stylesheet for any that should be applied to the content of the paragraph. If each template in the stylesheet includes an <tt class="literal"><xsl:apply-templates/></tt> instruction, then all descendents will eventually be processed. When it is through recursively applying templates to the paragraph content, it outputs the <tt class="literal"></p></tt> closing tag.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e365"></a></h3></div></div><div></div></div><p>Since you aren't writing a linear procedure to process your document, the context of where and how to apply each modular template is important. The <tt class="literal">match</tt> attribute of <tt class="literal"><xsl:template></tt> provides that context for most templates. There is an entire expression language, XPath, for identifying what parts of your document should be handled by each template. The simplest context is just an element name, as in the example above. But you can also specify elements as children of other elements, elements with certain attribute values, the first or last elements in a sequence, and so on. Here is how the DocBook <tt class="literal"><formalpara></tt> element is handled:</p><pre class="programlisting"><xsl:template match="formalpara"> <p> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="formalpara/title"> <b><xsl:apply-templates/></b> <xsl:text> </xsl:text> </xsl:template> <xsl:template match="formalpara/para"> <xsl:apply-templates/> </xsl:template> </pre><p>There are three templates defined, one for the <tt class="literal"><formalpara></tt> element itself, and one for each of its children elements. The <tt class="literal">match</tt> attribute value <tt class="literal">formalpara/title</tt> in the second template is an XPath expression indicating a <tt class="literal"><title></tt> element that is an immediate child of a <tt class="literal"><formalpara></tt> element. This distinguishes such titles from other <tt class="literal"><title></tt> elements used in DocBook. XPath expressions are the key to controlling how your templates are applied.</p><p>In general, the XSL processor has internal rules that apply templates that are more specific before templates that are less specific. That lets you control the details, but also provides a fallback mechanism to a less specific template when you don't supply the full context for every combination of elements. This feature is illustrated by the third template, for <tt class="literal">formalpara/para</tt>. By including this template, the stylesheet processes a <tt class="literal"><para></tt> within <tt class="literal"><formalpara></tt> in a special way, in this case by not outputting the HTML <tt class="literal"><p></tt> tags already output by its parent. If this template had not been included, then the processor would have fallen back to the template specified by <tt class="literal">match="para"</tt> described above, which would have output a second set of <tt class="literal"><p></tt> tags.</p><p>You can also control template context with XSL <span class="emphasis"><em>modes</em></span>, which are used extensively in the DocBook stylesheets. Modes let you process the same input more than once in different ways. A <tt class="literal">mode</tt> attribute in an <tt class="literal"><xsl:template></tt> definition adds a specific mode name to that template. When the same mode name is used in <tt class="literal"><xsl:apply-templates/></tt>, it acts as a filter to narrow the selection of templates to only those selected by the <tt class="literal">match</tt> expression <span class="emphasis"><em>and</em></span> that have that mode name. This lets you define two different templates for the same element match that are applied under different contexts. For example, there are two templates defined for DocBook <tt class="literal"><listitem></tt> elements:</p><pre class="programlisting"><xsl:template match="listitem"> <li><xsl:apply-templates/></li> </xsl:template> <xsl:template match="listitem" mode="xref"> <xsl:number format="1"/> </xsl:template> </pre><p>The first template is for the normal list item context where you want to output the HTML <tt class="literal"><li></tt> tags. The second template is called with <tt class="literal"><xsl:apply-templates select="$target" mode="xref"/></tt> in the context of processing <tt class="literal"><xref></tt> elements. In this case the <tt class="literal">select</tt> attribute locates the ID of the specific list item and the <tt class="literal">mode</tt> attribute selects the second template, whose effect is to output its item number when it is in an ordered list. Because there are many such special needs when processing <tt class="literal"><xref></tt> elements, it is convenient to define a mode name <tt class="literal">xref</tt> to handle them all. Keep in mind that mode settings do <span class="emphasis"><em>not</em></span> automatically get passed down to other templates through <tt class="literal"><xsl:apply-templates/></tt>.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e475"></a></h3></div></div><div></div></div><p>Although XSL is template-driven, it also has some features of traditional programming languages. Here are some examples from the DocBook stylesheets. </p><pre class="programlisting"><i class="lineannotation"><span class="lineannotation">Assign a value to a variable:</span></i> <xsl:variable name="refelem" select="name($target)"/> <i class="lineannotation"><span class="lineannotation">If statement:</span></i> <xsl:if test="$show.comments"> <i><xsl:call-template name="inline.charseq"/></i> </xsl:if> <i class="lineannotation"><span class="lineannotation">Case statement:</span></i> <xsl:choose> <xsl:when test="@columns"> <xsl:value-of select="@columns"/> </xsl:when> <xsl:otherwise>1</xsl:otherwise> </xsl:choose> <i class="lineannotation"><span class="lineannotation">Call a template by name like a subroutine, passing parameter values and accepting a return value:</span></i> <xsl:call-template name="xref.xreflabel"> <xsl:with-param name="target" select="$target"/> </xsl:call-template> </pre><p>However, you can't always use these constructs as you do in other programming languages. Variables in particular have very different behavior.</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="d0e495"></a></h4></div></div><div></div></div><p>XSL provides two elements that let you assign a value to a name: <tt class="literal"><xsl:variable></tt> and <tt class="literal"><xsl:param></tt>. These share the same name space and syntax for assigning names and values. Both can be referred to using the <tt class="literal">$name</tt> syntax. The main difference between these two elements is that a param's value acts as a default value that can be overridden when a template is called using a <tt class="literal"><xsl:with-param></tt> element as in the last example above.</p><p>Here are two examples from DocBook:</p><pre class="programlisting"><xsl:param name="cols">1</xsl:param> <xsl:variable name="segnum" select="position()"/> </pre><p>In both elements, the name of the parameter or variable is specified with the <tt class="literal">name</tt> attribute. So the name of the <tt class="literal">param</tt> here is <tt class="literal">cols</tt> and the name of the <tt class="literal">variable</tt> is <tt class="literal">segnum</tt>. The value of either can be supplied in two ways. The value of the first example is the text node "1" and is supplied as the content of the element. The value of the second example is supplied as the result of the expression in its <tt class="literal">select</tt> attribute, and the element itself has no content.</p><p>The feature of XSL variables that is odd to new users is that once you assign a value to a variable, you cannot assign a new value within the same scope. Doing so will generate an error. So variables are not used as dynamic storage bins they way they are in other languages. They hold a fixed value within their scope of application, and then disappear when the scope is exited. This feature is a result of the design of XSL, which is template-driven and not procedural. This means there is no definite order of processing, so you can't rely on the values of changing variables. To use variables in XSL, you need to understand how their scope is defined.</p><p>Variables defined outside of all templates are considered global variables, and they are readable within all templates. The value of a global variable is fixed, and its global value can't be altered from within any template. However, a template can create a local variable of the same name and give it a different value. That local value remains in effect only within the scope of the local variable.</p><p>Variables defined within a template remain in effect only within their permitted scope, which is defined as all following siblings and their descendants. To understand such a scope, you have to remember that XSL instructions are true XML elements that are embedded in an XML family hierarchy of XSL elements, often referred to as parents, children, siblings, ancestors and descendants. Taking the family analogy a step further, think of a variable assignment as a piece of advice that you are allowed to give to certain family members. You can give your advice only to your younger siblings (those that follow you) and their descendents. Your older siblings won't listen, neither will your parents or any of your ancestors. To stretch the analogy a bit, it is an error to try to give different advice under the same name to the same group of listeners (in other words, to redefine the variable). Keep in mind that this family is not the elements of your document, but just the XSL instructions in your stylesheet. To help you keep track of such scopes in hand-written stylesheets, it helps to indent nested XSL elements. Here is an edited snippet from the DocBook stylesheet file <tt class="filename">pi.xsl</tt> that illustrates different scopes for two variables:</p><pre class="programlisting"> 1 <xsl:template name="dbhtml-attribute"> 2 ... 3 <xsl:choose> 4 <xsl:when test="$count>count($pis)"> 5 <!-- not found --> 6 </xsl:when> 7 <xsl:otherwise> 8 <xsl:variable name="pi"> 9 <xsl:value-of select="$pis[$count]"/> 10 </xsl:variable> 11 <xsl:choose> 12 <xsl:when test="contains($pi,concat($attribute, '='))"> 13 <xsl:variable name="rest" select="substring-after($pi,concat($attribute,'='))"/> 14 <xsl:variable name="quote" select="substring($rest,1,1)"/> 15 <xsl:value-of select="substring-before(substring($rest,2),$quote)"/> 16 </xsl:when> 17 <xsl:otherwise> 18 ... 19 </xsl:otherwise> 20 </xsl:choose> 21 </xsl:otherwise> 22 </xsl:choose> 23 </xsl:template> </pre><p>The scope of the variable <tt class="literal">pi</tt> begins on line 8 where it is defined in this template, and ends on line 20 when its last sibling ends.<sup>[<a name="d0e552" href="#ftn.d0e552">1</a>]</sup> The scope of the variable <tt class="literal">rest</tt> begins on line 13 and ends on line 15. Fortunately, line 15 outputs an expression using the value before it goes out of scope.</p><p>What happens when an <tt class="literal"><xsl:apply-templates/></tt> element is used within the scope of a local variable? Do the templates that are applied to the document children get the variable? The answer is no. The templates that are applied are not actually within the scope of the variable. They exist elsewhere in the stylesheet and are not following siblings or their descendants. </p><p>To pass a value to another template, you pass a parameter using the <tt class="literal"><xsl:with-param></tt> element. This parameter passing is usually done with calls to a specific named template using <tt class="literal"><xsl:call-template></tt>, although it works with <tt class="literal"><xsl:apply-templates></tt> too. That's because the called template must be expecting the parameter by defining it using a <tt class="literal"><xsl:param></tt> element with the same parameter name. Any passed parameters whose names are not defined in the called template are ignored.</p><p>Here is an example of parameter passing from <tt class="filename">docbook.xsl</tt>:</p><pre class="programlisting"><xsl:call-template name="head.content"> <xsl:with-param name="node" select="$doc"/> </xsl:call-template> </pre><p>Here a template named <tt class="literal">head.content</tt> is being called and passed a parameter named <tt class="literal">node</tt> whose content is the value of the <tt class="literal">$doc</tt> variable in the current context. The top of that template looks like this:</p><pre class="programlisting"><xsl:template name="head.content"> <xsl:param name="node" select="."/> </pre><p>The template is expecting the parameter because it has a <tt class="literal"><xsl:param></tt> defined with the same name. The value in this definition is the default value. This would be the parameter value used in the template if the template was called without passing that parameter.</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e606"></a></h3></div></div><div></div></div><p>You generate HTML from your DocBook XML files by applying the HTML version of the stylesheets. This is done by using the HTML driver file <tt class="filename">docbook/html/docbook.xsl</tt> as your stylesheet. That is the master stylesheet file that uses <tt class="literal"><xsl:include></tt> to pull in the component files it needs to assemble a complete stylesheet for producing HTML. </p><p>The way the DocBook stylesheet generates HTML is to apply templates that output a mix of text content and HTML elements. Starting at the top level in the main file <tt class="filename">docbook.xsl</tt>:</p><pre class="programlisting"><xsl:template match="/"> <xsl:variable name="doc" select="*[1]"/> <html> <head> <xsl:call-template name="head.content"> <xsl:with-param name="node" select="$doc"/> </xsl:call-template> </head> <body> <xsl:apply-templates/> </body> </html> </xsl:template> </pre><p>This template matches the root element of your input document, and starts the process of recursively applying templates. It first defines a variable named <tt class="literal">doc</tt> and then outputs two literal HTML elements <tt class="literal"><html></tt> and <tt class="literal"><head></tt>. Then it calls a named template <tt class="literal">head.content</tt> to process the content of the HTML <tt class="literal"><head></tt>, closes the <tt class="literal"><head></tt> and starts the <tt class="literal"><body></tt>. There it uses <tt class="literal"><xsl:apply-templates/></tt> to recursively process the entire input document. Then it just closes out the HTML file.</p><p>Simple HTML elements can generated as literal elements as shown here. But if the HTML being output depends on the context, you need something more powerful to select the element name and possibly add attributes and their values. Here is a fragment from <tt class="filename">sections.xsl</tt> that shows how a heading tag is generated using the <tt class="literal"><xsl:element></tt> and <tt class="literal"><xsl:attribute></tt> elements:</p><pre class="programlisting"> 1 <xsl:element name="h{$level}"> 2 <xsl:attribute name="class">title</xsl:attribute> 3 <xsl:if test="$level<3"> 4 <xsl:attribute name="style">clear: all</xsl:attribute> 5 </xsl:if> 6 <a> 7 <xsl:attribute name="name"> 8 <xsl:call-template name="object.id"/> 9 </xsl:attribute> 10 <b><xsl:copy-of select="$title"/></b> 11 </a> 12 </xsl:element> </pre><p>This whole example is generating a single HTML heading element. Line 1 begins the HTML element definition by identifying the name of the element. In this case, the name is an expression that includes the variable <tt class="literal">$level</tt> passed as a parameter to this template. Thus a single template can generate <tt class="literal"><h1></tt>, <tt class="literal"><h2></tt>, etc. depending on the context in which it is called. Line 2 defines a <tt class="literal">class="title"</tt> attribute that is added to this element. Lines 3 to 5 add a <tt class="literal">style="clear all"</tt> attribute, but only if the heading level is less than 3. Line 6 opens an <tt class="literal"><a></tt> anchor element. Although this looks like a literal output string, it is actually modified by lines 7 to 9 that insert the <tt class="literal">name</tt> attribute into the <tt class="literal"><a></tt> element. This illustrates that XSL is managing output elements as active element nodes, not just text strings. Line 10 outputs the text of the heading title, also passed as a parameter to the template, enclosed in HTML boldface tags. Line 11 closes the anchor tag with the literal <tt class="literal"></a></tt> syntax, while line 12 closes the heading tag by closing the element definition. Since the actual element name is a variable, it couldn't use the literal syntax.</p><p>As you follow the sequence of nested templates processing elements, you might be wondering how the ordinary text of your input document gets to the output. In the file <tt class="filename">docbook.xsl</tt> you will find this template that handles any text not processed by any other template:</p><pre class="programlisting"><xsl:template match="text()"> <xsl:value-of select="."/> </xsl:template> </pre><p>This template's body consists of the "value" of the text node, which is just its text. In general, all XSL processors have some built-in templates to handle any content for which your stylesheet doesn't supply a matching template. This template serves the same function but appears explicitly in the stylesheet.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e701"></a></h3></div></div><div></div></div><p>You generate formatting objects from your DocBook XML files by applying the fo version of the stylesheets. This is done by using the fo driver file <tt class="filename">docbook/fo/docbook.xsl</tt> as your stylesheet. That is the master stylesheet file that uses <tt class="literal"><xsl:include></tt> to pull in the component files it needs to assemble a complete stylesheet for producing formatting objects. Generating a formatting objects file is only half the process of producing typeset output. You also need a formatting object processor such as the Apache XML Project's FOP as described in an earlier section.</p><p>The DocBook fo stylesheet works in a similar manner to the HTML stylesheet. Instead of outputting HTML tags, it outputs text marked up with <tt class="literal"><fo:<i class="replaceable"><tt>something</tt></i>></tt> tags. For example, to indicate that some text should be kept in-line and typeset with a monospace font, it might look like this:</p><pre class="programlisting"><fo:inline-sequence font-family="monospace">/usr/man</fo:inline-sequence></pre><p>The templates in <tt class="filename">docbook/fo/inline.xsl</tt> that produce this output for a DocBook <tt class="literal"><filename></tt> element look like this:</p><pre class="programlisting"><xsl:template match="filename"> <xsl:call-template name="inline.monoseq"/> </xsl:template> <xsl:template name="inline.monoseq"> <xsl:param name="content"> <xsl:apply-templates/> </xsl:param> <fo:inline-sequence font-family="monospace"> <xsl:copy-of select="$content"/> </fo:inline-sequence> </xsl:template> </pre><p>There are dozens of fo tags and attributes specified in the XSL standard. It is beyond the scope of this document to cover how all of them are used in the DocBook stylesheets. Fortunately, this is only an intermediate format that you probably won't have to deal with very much directly unless you are writing your own stylesheets.</p></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.d0e552" href="#d0e552">1</a>] </sup>Technically, the scope extends to the end tag of the parent of the <tt class="literal"><xsl:variable></tt> element. That is effectively the last sibling.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s02.html"></a> </td><td width="20%" align="center"><a accesskey="u" href="publishing.html"></a></td><td width="40%" align="right"> <a accesskey="n" href="ch01s04.html"></a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html"></a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> --- NEW FILE: ch01s04.html --- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title></title><link rel="stylesheet" href="reference.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title=""><link rel="up" href="publishing.html" title=""><link rel="previous" href="ch01s03.html" title=""><link rel="next" href="extensions.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s03.html"></a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="extensions.html"></a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e734"></a></h2></div></div><div></div></div><p>The DocBook XSL stylesheets are written in a modular fashion. Each of the HTML and FO stylesheets starts with a driver file that assembles a collection of component files into a complete stylesheet. This modular design puts similar things together into smaller files that are easier to write and maintain than one big stylesheet. The modular stylesheet files are distributed among four directories:</p><div class="variablelist"><dl><dt><span class="term">common/</span></dt><dd><p>contains code common to both stylesheets, including localization data </p></dd><dt><span class="term">fo/</span></dt><dd><p>a stylesheet that produces XSL FO result trees </p></dd><dt><span class="term">html/</span></dt><dd><p>a stylesheet that produces HTML/XHTML result trees </p></dd><dt><span class="term">lib/</span></dt><dd><p>contains schema-independent functions </p></dd></dl></div><p>The driver files for each of HTML and FO stylesheets are <tt class="filename">html/docbook.xsl</tt> and <tt class="filename">fo/docbook.xsl</tt>, respectively. A driver file consists mostly of a bunch of <tt class="literal"><xsl:include></tt> instructions to pull in the component templates, and then defines some top-level templates. For example:</p><pre class="programlisting"><xsl:include href="../VERSION"/> <xsl:include href="../lib/lib.xsl"/> <xsl:include href="../common/l10n.xsl"/> <xsl:include href="../common/common.xsl"/> <xsl:include href="autotoc.xsl"/> <xsl:include href="lists.xsl"/> <xsl:include href="callout.xsl"/> ... <xsl:include href="param.xsl"/> <xsl:include href="pi.xsl"/> </pre><p>The first four modules are shared with the FO stylesheet and are referenced using relative pathnames to the common directories. Then the long list of component stylesheets starts. Pathnames in include statements are always taken to be relative to the including file. Each included file must be a valid XSL stylesheet, which means its root element must be <tt class="literal"><xsl:stylesheet></tt>.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e782"></a></h3></div></div><div></div></div><p>XSL actually provides two inclusion mechanisms: <tt class="literal"><xsl:include></tt> and <tt class="literal"><xsl:import></tt>. Of the two, <tt class="literal"><xsl:include></tt> is the simpler. It treats the included content as if it were actually typed into the file at that point, and doesn't give it any more or less precedence relative to the surrounding text. It is best used when assembling dissimilar templates that don't overlap what they match. The DocBook driver files use this instruction to assemble a set of modules into a stylesheet.</p><p>In contrast, <tt class="literal"><xsl:import></tt> lets you manage the precedence of templates and variables. It is the preferred mode of customizing another stylesheet because it lets you override definitions in the distributed stylesheet with your own, without altering the distribution files at all. You simply import the whole stylesheet and add whatever changes you want.</p><p>The precedence rules for import are detailed and rigorously defined in the XSL standard. The basic rule is that any templates and variables in the importing stylesheet have precedence over equivalent templates and variables in the imported stylesheet. Think of the imported stylesheet elements as a fallback collection, to be used only if a match is not found in the current stylesheet. You can customize the templates you want to change in your stylesheet file, and let the imported stylesheet handle the rest.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"></h3><p>Customizing a DocBook XSL stylesheet is the opposite of customizing a DocBook DTD. When you customize a DocBook DTD, the rules of XML and SGML dictate that the <span class="emphasis"><em>first</em></span> of any duplicate declarations wins. Any subsequent declarations of the same element or entity are ignored. The architecture of the DTD provides slots for inserting your own custom declarations early enough in the DTD for them to override the standard declarations. In contrast, customizing an XSL stylesheet is simpler because your definitions have precedence over imported ones.</p></div><p>You can carry modularization to deeper levels because module files can also include or import other modules. You'll need to be careful to maintain the precedence that you want as the modules get rolled up into a complete stylesheet. </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e811"></a></h3></div></div><div></div></div><p>There is currently one example of customizing with <tt class="literal"><xsl:import></tt> in the HTML version of the DocBook stylesheets. The <tt class="filename">xtchunk.xsl</tt> stylesheet modifies the HTML processing to output many smaller HTML files rather than a single large file per input document. It uses XSL extensions defined only in the XSL processor <span><b class="command">XT</b></span>. In the driver file <tt class="filename">xtchunk.xsl</tt>, the first instruction is <tt class="literal"><xsl:import href="docbook.xsl"/></tt>. That instruction imports the original driver file, which in turn uses many <tt class="literal"><xsl:include></tt> instructions to include all the modules. That single import instruction gives the new stylesheet the complete set of DocBook templates to start with.</p><p>After the import, <tt class="filename">xtchunk.xsl</tt> redefines some of the templates and adds some new ones. Here is one example of a redefined template:</p><pre class="programlisting"><i class="lineannotation"><span class="lineannotation">Original template in autotoc.xsl</span></i> <xsl:template name="href.target"> <xsl:param name="object" select="."/> <xsl:text>#</xsl:text> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$object"/> </xsl:call-template> </xsl:template> <i class="lineannotation"><span class="lineannotation">New template in xtchunk.xsl</span></i> <xsl:template name="href.target"> <xsl:param name="object" select="."/> <xsl:variable name="ischunk"> <xsl:call-template name="chunk"> <xsl:with-param name="node" select="$object"/> </xsl:call-template> </xsl:variable> <xsl:apply-templates mode="chunk-filename" select="$object"/> <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> </pre><p>The new template handles the more complex processing of HREFs when the output is split into many HTML files. Where the old template could simply output <tt class="literal">#<i class="replaceable"><tt>object.id</tt></i></tt>, the new one outputs <tt class="literal"><i class="replaceable"><tt>filename</tt></i>#<i class="replaceable"><tt>object.id</tt></i></tt>.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e862"></a></h3></div></div><div></div></div><p>You may not have to define any new templates, however. The DocBook stylesheets are parameterized using XSL variables rather than hard-coded values for many of the formatting features. Since the <tt class="literal"><xsl:import></tt> mechanism also lets you redefine global variables, this gives you an easy way to customize many features of the DocBook stylesheets. Over time, more features will be parameterized to permit customization. If you find hardcoded values in the stylesheets that would be useful to customize, please let the maintainer know.</p><p>Near the end of the list of includes in the main DocBook driver file is the instruction <tt class="literal"><xsl:include href="param.xsl"/></tt>. The <tt class="filename">param.xsl</tt> file is the most important module for customizing a DocBook XSL stylesheet. This module contains no templates, only definitions of stylesheet variables. Since these variables are defined outside of any template, they are global variables and apply to the entire stylesheet. By redefining these variables in an importing stylesheet, you can change the behavior of the stylesheet.</p><p>To create a customized DocBook stylesheet, you simply create a new stylesheet file such as <tt class="filename">mystyle.xsl</tt> that imports the standard stylesheet and adds your own new variable definitions. Here is an example of a complete custom stylesheet that changes the depth of sections listed in the table of contents from two to three:</p><pre class="programlisting"><?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0' xmlns="http://www.w3.org/TR/xhtml1/transitional" exclude-result-prefixes="#default"> <xsl:import href="docbook.xsl"/> <xsl:variable name="toc.section.depth">3</xsl:variable> <!-- Add other variable definitions here --> </xsl:stylesheet> </pre><p>Following the opening stylesheet element are the import instruction and one variable definition. The variable <tt class="literal">toc.section.depth</tt> was defined in <tt class="filename">param.xsl</tt> with value "2", and here it is defined as "3". Since the importing stylesheet takes precedence, this new value is used. Thus documents processed with <tt class="filename">mystyle.xsl</tt> instead of <tt class="filename">docbook.xsl</tt> will have three levels of sections in the tables of contents, and all other processing will be the same.</p><p>Use the list of variables in <tt class="filename">param.xsl</tt> as your guide for creating a custom stylesheet. If the changes you want are controlled by a variable there, then customizing is easy. </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e904"></a></h3></div></div><div></div></div><p>If the changes you want are more extensive than what is supported by variables, you can write new templates. You can put your new templates directly in your importing stylesheet, or you can modularize your importing stylesheet as well. You can write your own stylesheet module containing a collection of templates for processing lists, for example, and put them in a file named <tt class="filename">mylists.xsl</tt>. Then your importing stylesheet can pull in your list templates with a <tt class="literal"><xsl:include href="mylists.xsl"/></tt> instruction. Since your included template definitions appear after the main import instruction, your templates will take precedence.</p><p>You'll need to make sure your new templates are compatible with the remaining modules, which means:</p><div class="itemizedlist"><ul type="disc"><li><p>Any named templates should use the same name so calling templates in other modules can find them.</p></li><li><p>Your template set should process the same elements matched by templates in the original module, to ensure complete coverage.</p></li><li><p>Include the same set of <tt class="literal"><xsl:param></tt> elements in each template to interface properly with any calling templates, although you can set different values for your parameters.</p></li><li><p>Any templates that are used like subroutines to return a value should return the same data type.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e933"></a></h3></div></div><div></div></div><p>Another approach to customizing the stylesheets is to write your own driver file. Instead of using <tt class="literal"><xsl:import href="docbook.xsl"/></tt>, you copy that file to a new name and rewrite any of the <tt class="literal"><xsl:include/></tt> instructions to assemble a custom collection of stylesheet modules. One reason to do this is to speed up processing by reducing the size of the stylesheet. If you are using a customized DocBook DTD that omits many elements you never use, you might be able to omit those modules of the stylesheet.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e944"></a></h3></div></div><div></div></div><p>The DocBook stylesheets include features for localizing generated text, that is, printing any generated text in a language other than the default English. In general, the stylesheets will switch to the language identified by a <tt class="literal">lang</tt> attribute when processing elements in your documents. If your documents use the <tt class="literal">lang</tt> attribute, then you don't need to customize the stylesheets at all for localization.</p><p>As far as the stylesheets go, a <tt class="literal">lang</tt> attribute is inherited by the descendents of a document element. The stylesheet searches for a <tt class="literal">lang</tt> attribute using this XPath expression:</p><pre class="programlisting"><xsl:variable name="lang-attr" select="($target/ancestor-or-self::*/@lang |$target/ancestor-or-self::*/@xml:lang)[last()]"/></pre><p>This locates the attribute on the current element or its most recent ancestor. Thus a <tt class="literal">lang</tt> attribute is in effect for an element and all of its descendents, unless it is reset in one of those descendents. If you define it in only your document root element, then it applies to the whole document:</p><pre class="programlisting"><?xml version="1.0"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN" "docbook.dtd"> <book lang="fr"> ... </book></pre><p>When text is being generated, the stylesheet checks the most recent <tt class="literal">lang</tt> attribute and looks up the generated text strings for that language in a localization XML file. These are located in the <tt class="filename">common</tt> directory of the stylesheets, one file per language. Here is the top of the file <tt class="filename">fr.xml</tt>:</p><pre class="programlisting"><localization language="fr"> <gentext key="abstract" text="R&#x00E9;sum&#x00E9;"/> <gentext key="answer" text="R:"/> <gentext key="appendix" text="Annexe"/> <gentext key="article" text="Article"/> <gentext key="bibliography" text="Bibliographie"/> ... </pre><p>The stylesheet templates use the gentext key names, and then the stylesheet looks up the associated text value when the document is processed with that lang setting. The file <tt class="filename">l10n.xml</tt> (note the <tt class="filename">.xml</tt> suffix) lists the filenames of all the supported languages.</p><p>You can also create a custom stylesheet that sets the language. That might be useful if your documents don't make appropriate use of the <tt class="literal">lang</tt> attribute. The module <tt class="filename">l10n.xsl</tt> defines two global variables that can be overridden with an importing stylesheet as described above. Here are their default definitions:</p><pre class="programlisting"><xsl:variable name="l10n.gentext.language"></xsl:variable> <xsl:variable name="l10n.gentext.default.language">en</xsl:variable> </pre><p>The first one sets the language for all elements, regardless of an element's <tt class="literal">lang</tt> attribute value. The second just sets a default language for any elements that haven't got a <tt class="literal">lang</tt> setting of their own (or their ancestors).</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s03.html"></a> </td><td width="20%" align="center"><a accesskey="u" href="publishing.html"></a></td><td width="40%" align="right"> <a accesskey="n" href="extensions.html"></a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html"></a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> --- NEW FILE: ch02s02.html --- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Xalan Extensions</title><link rel="stylesheet" href="reference.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.51.1"><link rel="home" href="index.html" title="DocBook XSL Stylesheet Documentation"><link rel="up" href="extensions.html" title="Chapter 2. Extensions"><link rel="previous" href="extensions.html" title="Chapter 2. Extensions"><link rel="next" href="ch03.html" title="Chapter 3. Tools documentation"><link rel="preface" href="pr01.html" title="Preface"><link rel="chapter" href="publishing.html" title="Chapter 1. DocBook XSL"><link rel="chapter" href="extensions.html" title="Chapter 2. Extensions"><link rel="chapter" href="ch03.html" title="Chapter 3. Tools documentation"><link rel="chapter" href="ch04.html" title="Chapter 4. Reference Documentation"><link rel="chapter" href="ch05.html" title="Chapter 5. The Template System"><link rel="chapter" href="htmlhelp.html" title="Chapter 6. Using the XSL stylesheets to generate HTML Help"><link rel="subsection" href="ch02s02.html#d0e1072" title="Installation"><link rel="subsection" href="ch02s02.html#d0e1082" title="Using the Extensions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Xalan Extensions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="ch03.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1067"></a>Xalan Extensions</h2></div></div><p>The DocBook XSL Stylesheets include a set of Java extensions for XalanJ version 2. Extensions are not provided for XalanC at this time.</p><div class="section"><div class="titlepage"><div><h3 class="title"><a name="d0e1072"></a>Installation</h3></div></div><p>The extensions are included in the distribution in <tt>extensions/xalan2.jar</tt>. Xalan 1 is not supported.</p><p>Just make sure that the jar file is in your CLASSPATH when you run Xalan.</p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="d0e1082"></a>Using the Extensions</h3></div></div><p>For compatibility with other processors, the extensions are disabled by default. To enable the extensions, turn on <tt>$xalan.extensions</tt>, for example by passing <tt>-PARAM xalan.extensions 1</tt> to Xalan.</p><p>For more control over the specific extensions, see <i><a href="html/param.html">HTML Parameter Reference</a></i>.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Extensions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Tools documentation</td></tr></table></div></body></html> --- NEW FILE: ch03.html --- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title></title><link rel="stylesheet" href="reference.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title=""><link rel="up" href="index.html" title=""><link rel="previous" href="extensions.html" title=""><link rel="next" href="ch04.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html"></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch04.html"></a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="d0e1158"></a></h2></div></div><div></div></div><p>There are several tools useful for usage with DocBook in directory <tt class="filename">tools</tt>.</p><div class="itemizedlist"><ul type="disc"><li><p><a href="tools/profiling.html" target="_top">Profiling</a></p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="extensions.html"></a> </td><td width="20%" align="center"><a accesskey="u" href="index.html"></a></td><td width="40%" align="right"> <a accesskey="n" href="ch04.html"></a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html"></a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> --- NEW FILE: ch04.html --- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title></title><link rel="stylesheet" href="reference.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title=""><link rel="up" href="index.html" title=""><link rel="previous" href="ch03.html" title=""><link rel="next" href="ch05.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03.html"></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch05.html"></a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="d0e1171"></a></h2></div></div><div></div></div><p>Reference documentation is also available:</p><div class="itemizedlist"><ul type="disc"><li><p><i><a href="reference.html">DocBook XSL Stylesheet Reference Documentation</a></i></p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03.html"></a> </td><td width="20%" align="center"><a accesskey="u" href="index.html"></a></td><td width="40%" align="right"> <a accesskey="n" href="ch05.html"></a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html"></a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> --- NEW FILE: ch05.html --- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title></title><link rel="stylesheet" href="reference.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title=""><link rel="up" href="index.html" title=""><link rel="previous" href="ch04.html" title=""><link rel="next" href="htmlhelp.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04.html"></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="htmlhelp.html"></a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="d0e1180"></a></h2></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: ch05.html,v 1.1 2004/01/02 00:16:46 smiley73 Exp $ </p></div><div><p class="copyright"> © 2000 Norman Walsh</p></div></div><div></div></div><div class="toc"><p><b></b></p><dl><dt><span class="section"><a href="ch05.html#d0e1204">Changing the Article Title Page</a></span></dt></dl></div><p>Some parts of the DocBook XSL Stylesheets are actually generated using XSL Stylesheets. In particular, the formatting of title pages is generated using a special template system. The same template system will eventually allow you to easily customize bibliography entries and perhaps other parts of the system as well.</p><p>FIXME: there needs to be more introductory/explanatory text here!</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e1204"></a></h2></div></div><div></div></div><p>In order to demonstrate how this system works, let's consider how we can use it to change the format of article title pages.</p><p>By default, the stylesheets print the following elements on the article title page, in this order: <span class="simplelist"><tt class="sgmltag-element">title</tt>, <tt class="sgmltag-element">subtitle</tt>, <tt class="sgmltag-element">corpauthor</tt>, <tt class="sgmltag-element">authorgroup</tt>, <tt class="sgmltag-element">author</tt>, <tt class="sgmltag-element">releaseinfo</tt>, <tt class="... [truncated message content] |
From: <smi...@us...> - 2004-01-02 00:14:11
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/javahelp In directory sc8-pr-cvs1:/tmp/cvs-serv12539/stylesheets/javahelp Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/javahelp added to the repository |
From: <smi...@us...> - 2004-01-02 00:14:01
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/eclipse In directory sc8-pr-cvs1:/tmp/cvs-serv12437/stylesheets/eclipse Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/eclipse added to the repository |
From: <smi...@us...> - 2004-01-02 00:14:01
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/template In directory sc8-pr-cvs1:/tmp/cvs-serv12437/stylesheets/doc/template Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/template added to the repository |
From: <smi...@us...> - 2004-01-02 00:14:01
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/params In directory sc8-pr-cvs1:/tmp/cvs-serv12437/stylesheets/params Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/params added to the repository |
From: <smi...@us...> - 2004-01-02 00:14:01
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/htmlhelp In directory sc8-pr-cvs1:/tmp/cvs-serv12437/stylesheets/htmlhelp Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/htmlhelp added to the repository |
From: <smi...@us...> - 2004-01-02 00:14:01
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv12437/stylesheets/doc/tools Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/tools added to the repository |
From: <smi...@us...> - 2004-01-02 00:14:01
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/common In directory sc8-pr-cvs1:/tmp/cvs-serv12437/stylesheets/doc/common Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/common added to the repository |
From: <smi...@us...> - 2004-01-02 00:14:01
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/manpages In directory sc8-pr-cvs1:/tmp/cvs-serv12437/stylesheets/manpages Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/manpages added to the repository |
From: <smi...@us...> - 2004-01-02 00:13:34
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/html In directory sc8-pr-cvs1:/tmp/cvs-serv12321/stylesheets/doc/html Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/html added to the repository |
From: <smi...@us...> - 2004-01-02 00:13:33
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/pi In directory sc8-pr-cvs1:/tmp/cvs-serv12321/stylesheets/doc/pi Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/pi added to the repository |
From: <smi...@us...> - 2004-01-02 00:13:33
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv12321/stylesheets/doc/lib Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/lib added to the repository |
From: <smi...@us...> - 2004-01-02 00:13:33
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc In directory sc8-pr-cvs1:/tmp/cvs-serv12321/stylesheets/doc Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc added to the repository |
From: <smi...@us...> - 2004-01-02 00:13:33
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/fo In directory sc8-pr-cvs1:/tmp/cvs-serv12321/stylesheets/doc/fo Log Message: Directory /cvsroot/devil-linux/build/docs/documentation/stylesheets/doc/fo added to the repository |
From: <fr...@us...> - 2004-01-02 00:09:49
|
Update of /cvsroot/devil-linux/web In directory sc8-pr-cvs1:/tmp/cvs-serv11474 Modified Files: index.shtml Log Message: add support for the more complicated documentation pages Index: index.shtml =================================================================== RCS file: /cvsroot/devil-linux/web/index.shtml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- index.shtml 1 Jan 2004 17:13:19 -0000 1.3 +++ index.shtml 2 Jan 2004 00:09:45 -0000 1.4 @@ -3,17 +3,24 @@ <html> <head> <meta content="text/html; charset=ISO-8859-15" http-equiv="content-type"> - <!--#include virtual="head.shtml" --> + <!--#if expr="${THIS_PAGE}" --><!--#include virtual="head_${THIS_PAGE}.shtml" --><!--#else --><!--#include virtual="head.shtml" --><!--#endif --> <link rel="stylesheet" type="text/css" href="/dl.css"> </head> <body> +<!--#if expr="${THIS_PAGE}" --><!-- THIS_PAGE="<!--#echo var="THIS_PAGE" -->" --><!--#endif --> <!--#if expr="${SECTION}" --><!-- SECTION="<!--#echo var="SECTION" -->" --><!--#endif --> + +<!--#set var="CONTENT_FRAME" value="content" --> +<!--#set var="CONTENT_FRAME_EXT" value="shtml" --> +<!--#if expr="${THIS_PAGE}" --><!--#set var="CONTENT_FRAME" value="${CONTENT_FRAME}_${THIS_PAGE}" --><!--#endif --> +<!--#if expr="${SECTION}" --><!--#set var="CONTENT_FRAME" value="${SECTION}/${CONTENT_FRAME}" --><!--#endif --> + <table border=0 width="100%"> <tr> <td class="frameleft"><!--#include virtual="menu.shtml" --></td> <td class="top"><p> </p></td> - <td class="frameright"><!--#if expr="${SECTION}" --><!--#include virtual="${SECTION}/content.shtml" --><!--#else --><!--#include virtual="content.shtml" --><!--#endif --></td> + <td class="frameright"><!--#include virtual="${CONTENT_FRAME}.${CONTENT_FRAME_EXT}" --></td> </tr> </table> |
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/xhtml In directory sc8-pr-cvs1:/tmp/cvs-serv10201/xhtml Removed Files: ChangeLog admon.xsl autoidx.xsl autotoc.xsl biblio.xsl block.xsl callout.xsl changebars.xsl chunk-common.xsl chunk.xsl chunker.xsl chunkfast.xsl chunktoc.xsl component.xsl division.xsl docbook.xsl ebnf.xsl fixme.bak footnote.xsl formal.xsl glossary.xsl graphics.xsl html-rtf.xsl html.xsl html2xhtml.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl maketoc.xsl manifest.xsl math.xsl oldchunker.xsl onechunk.xsl param.xsl pi.xsl profile-chunk.xsl profile-docbook.xsl profile-onechunk.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xref.xsl Log Message: preparing for stylesheet update --- ChangeLog DELETED --- --- admon.xsl DELETED --- --- autoidx.xsl DELETED --- --- autotoc.xsl DELETED --- --- biblio.xsl DELETED --- --- block.xsl DELETED --- --- callout.xsl DELETED --- --- changebars.xsl DELETED --- --- chunk-common.xsl DELETED --- --- chunk.xsl DELETED --- --- chunker.xsl DELETED --- --- chunkfast.xsl DELETED --- --- chunktoc.xsl DELETED --- --- component.xsl DELETED --- --- division.xsl DELETED --- --- docbook.xsl DELETED --- --- ebnf.xsl DELETED --- --- fixme.bak DELETED --- --- footnote.xsl DELETED --- --- formal.xsl DELETED --- --- glossary.xsl DELETED --- --- graphics.xsl DELETED --- --- html-rtf.xsl DELETED --- --- html.xsl DELETED --- --- html2xhtml.xsl DELETED --- --- index.xsl DELETED --- --- info.xsl DELETED --- --- inline.xsl DELETED --- --- keywords.xsl DELETED --- --- lists.xsl DELETED --- --- maketoc.xsl DELETED --- --- manifest.xsl DELETED --- --- math.xsl DELETED --- --- oldchunker.xsl DELETED --- --- onechunk.xsl DELETED --- --- param.xsl DELETED --- --- pi.xsl DELETED --- --- profile-chunk.xsl DELETED --- --- profile-docbook.xsl DELETED --- --- profile-onechunk.xsl DELETED --- --- qandaset.xsl DELETED --- --- refentry.xsl DELETED --- --- sections.xsl DELETED --- --- synop.xsl DELETED --- --- table.xsl DELETED --- --- titlepage.templates.xsl DELETED --- --- titlepage.xsl DELETED --- --- toc.xsl DELETED --- --- verbatim.xsl DELETED --- --- xref.xsl DELETED --- |
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/profiling In directory sc8-pr-cvs1:/tmp/cvs-serv10201/profiling Removed Files: ChangeLog profile-mode.xsl profile.xsl strip-attributes.xsl xsl2profile.xsl Log Message: preparing for stylesheet update --- ChangeLog DELETED --- --- profile-mode.xsl DELETED --- --- profile.xsl DELETED --- --- strip-attributes.xsl DELETED --- --- xsl2profile.xsl DELETED --- |
From: <smi...@us...> - 2004-01-02 00:03:57
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/tools/profile In directory sc8-pr-cvs1:/tmp/cvs-serv10201/tools/profile Removed Files: ChangeLog profile.xsl Log Message: preparing for stylesheet update --- ChangeLog DELETED --- --- profile.xsl DELETED --- |
From: <smi...@us...> - 2004-01-02 00:03:56
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/template In directory sc8-pr-cvs1:/tmp/cvs-serv10201/template Removed Files: biblioentry.xsl titlepage.xsl Log Message: preparing for stylesheet update --- biblioentry.xsl DELETED --- --- titlepage.xsl DELETED --- |
From: <smi...@us...> - 2004-01-02 00:03:56
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/tools In directory sc8-pr-cvs1:/tmp/cvs-serv10201/tools Removed Files: ChangeLog Log Message: preparing for stylesheet update --- ChangeLog DELETED --- |
From: <smi...@us...> - 2004-01-02 00:03:56
|
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/lib In directory sc8-pr-cvs1:/tmp/cvs-serv10201/lib Removed Files: ChangeLog lib.xml lib.xsl lib.xweb Log Message: preparing for stylesheet update --- ChangeLog DELETED --- --- lib.xml DELETED --- --- lib.xsl DELETED --- --- lib.xweb DELETED --- |
Update of /cvsroot/devil-linux/build/docs/documentation/stylesheets/tools/olink In directory sc8-pr-cvs1:/tmp/cvs-serv10201/tools/olink Removed Files: ChangeLog olink-common.xsl olink.xsl olinkchunk.xsl olinksum.dtd Log Message: preparing for stylesheet update --- ChangeLog DELETED --- --- olink-common.xsl DELETED --- --- olink.xsl DELETED --- --- olinkchunk.xsl DELETED --- --- olinksum.dtd DELETED --- |