<?xml version='1.0'?>
<!DOCTYPE slides PUBLIC "-//Norman Walsh//DTD Slides
V3.1.0//EN" "../../../doctools/1.0/DocBookXSL/slides-3.1.0/schema/dtd/slides.dtd">
<?dbhtml graphics-dir="../graphics" css-stylesheet-dir="../browser"?>
<?dbhtml script-dir="../browser"?>
<slides>
  <slidesinfo>
    <title>How to avoid learning XML</title>

    <author><firstname>David</firstname><surname>Cramer</surname>
      <email>dcramer @ motive dot com</email>
      <email>david @ thingbag dot net</email>
      <address>
        <street>12515 Research Blvd.</street>
        <street>Building 5</street>
        <city>Austin</city>
        <state>Texas</state>
        <postcode>78759</postcode>
      </address>
    </author>
    <pubdate>May 18, 2003</pubdate>
    <releaseinfo role="version">1.1</releaseinfo>
    <revhistory>
	  <revision>
		<revnumber>1.1</revnumber>
		<date>May 18, 2004</date>
		<revremark>Mentioning new editors like XMLMind's XXE
		and Syntext's Serna. Other minor updates.</revremark>
	  </revision>
	  <revision>
		<revnumber>1.0</revnumber>
		<date>March 25, 2003</date>
		<revremark>Version delivered to Online SIG at local
		STC meeting.</revremark>
	  </revision>
      <revision>
        <revnumber>.1</revnumber>
        <date>March 23, 2003</date>
        <revremark>Initial draft.</revremark>
      </revision>
    </revhistory>
    <copyright><year>2003</year>
      <holder><ulink url="mailto:david @ thingbag DOT net">David Cramer</ulink></holder></copyright>
  </slidesinfo>
<!-- 
role="screen" = screen (web page) only
role="projection" = projection (slide show) only

Notes to self:
GemDoc: beta, but easy way to do dsssl on windows.

Re operashow.xsl:
Don't put role="screen" on inlines or footnote...

 -->
  <foil>
    <title>Why would I want to avoid learning XML?</title> 
    <para>
      The title of this talk is actually an allusion to Mike Smith's
      article <ulink
      url="http://xml.oreilly.com/news/dontlearn_0701.html"><citetitle
      pubwork="article">Don't learn XML</citetitle></ulink>,
      where he suggests using the DocBook DTD and
      stylesheets to get started using XML for documentation
      rather than starting from scratch, writing your own
      DTD, stylesheets, and so on. <phrase role="screen">My
      title is more than a little misleading. I'll explain
      how to get started with DocBook without learning much
      XML, but I also hope to show you how to get started
      learning the technologies that make a DocBook-based
		system tick.</phrase>
	  <indexterm>
		<primary>Smith, Michael</primary>
		<secondary><citetitle>Don't Learn XML</citetitle></secondary>
	  </indexterm>
	  <indexterm>
		<primary><citetitle>Don't Learn XML</citetitle></primary>
		<secondary>Smith, Michael</secondary>
	  </indexterm>
    </para>
    <note role="screen">
      <para>The html version of this page can be viewed with any browser. If
        you're viewing this page as html in the <ulink
        url="http://www.opera.com">Opera web
        browser</ulink>, press <keycap>F11</keycap> to view
        the slide show version in full screen. 
		<indexterm>
		  <primary>Opera</primary>
		</indexterm>
		<indexterm>
		  <primary>Operashow</primary>
		</indexterm>
      </para>
    </note>
  </foil>
  <foil>
    <title>Goals of this talk</title>
	<indexterm>
	  <primary>goals, of talk</primary>
	</indexterm>
    <itemizedlist>
      <listitem>
        <para>
          To explain what DocBook <emphasis>is</emphasis>, what the pieces
          are, and how they fit together in a production environment.
        </para>
      </listitem>
      <listitem>
        <para>
          To show examples of what kind of output is possible from DocBook
          using the stock stylesheets and customizations of
          them and give you an idea of what it takes to
          create and maintain them.
        </para>
      </listitem>
      <listitem>
        <para>To give me a reason to play with <ulink
            url="http://www.opera.com/support/tutorials/operashow/">Operashow</ulink>
            and DocBook.
            <phrase role="screen">Operashow is a feature of
            the <ulink
            url="http://www.opera.com">Opera</ulink> web
            browser that causes it to key off of simple css
            and present an html page as a slide
            show. The advantages of Operashow:</phrase>
		  <indexterm>
			<primary>Operashow</primary>
		  </indexterm>
		  <indexterm>
			<primary>Opera</primary>
		  </indexterm>
          <itemizedlist role="screen">
            <listitem>
              <para>Very light weight</para>
            </listitem>
            <listitem>
              <para>Easy to publish a fuller version of the talk on the Web</para>
            </listitem>
            <listitem>
              <para>The published version can easily be made accessible to <ulink url="http://tntluoma.com/opera/operashow/molly/">those with disabilities</ulink> (contrast PowerPoint)</para>
            </listitem>
            <listitem>
              <para>Opera is free and PowerPoint isn't
				<indexterm>
				  <primary>PowerPoint</primary>
				</indexterm>
			  </para>
            </listitem>
			<listitem>
			  <para>No temptation to use goofy DHTML effects</para>
			</listitem>
          </itemizedlist>
          </para>
      </listitem>
    </itemizedlist>
  </foil>
  <foilgroup>
    <title>What is DocBook?</title>
	<para>What is this <quote>DocBook</quote> you speak of?</para>
    <itemizedlist>
      <listitem>
        <para>
          <quote>DocBook</quote> is <emphasis role="bold">not</emphasis> an
          application in the sense that you're probably used
          to. <phrase role="screen">It is not a program that
            runs on a computer like FrameMaker or Word.  </phrase>
		  <indexterm>
			<primary>DocBook</primary>
			<secondary>defined</secondary>
		  </indexterm>
        </para>
      </listitem>
      <listitem>
        <para>Strictly speaking, DocBook is a set of rules
          that defines how to <emphasis>structure</emphasis>
          a document. <phrase role="screen">These rules can
          be and are expressed in English prose, as a DTD
          (Document Type Definition), and in a few schema
          languages. The English prose version is useful for
          authors and stylesheet writers. The DTD and
          schemas are useful for applications such as XML
          editors, validators, and processors.</phrase>
		  <indexterm>
			<primary>DTD</primary>
		  </indexterm>
        </para>
        <para>
          This structure is intended to provide the basis
          for the more specific needs of those who want to
          document computer software and hardware. <phrase
          role="screen">You are expected to customize
          DocBook, at the very least removing some elements,
          there are two type of sections, recursive and
          non-recursive. You should pick one for your needs
          and remove the other.</phrase>
        </para>
        <itemizedlist>
          <listitem>
            <para>The set of rules is an open standard
              supported by <ulink
                url="http://www.oasis-open.org/">Oasis</ulink><phrase role="screen">(<quote>OASIS is a not-for-profit, global consortium that drives the development, convergence and adoption of e-business standards.</quote>)</phrase>.</para>
          </listitem>
          <listitem>
            <para>The set of rules has been officially
            released as an SGML and XML DTD (Document Type
            Definition). </para>
          </listitem>
          <listitem>
            <para>The DocBook DTD has been around since 1991. The
            current version is 4.2, so it is a mature content model. </para>
          </listitem>
        </itemizedlist>
      </listitem>
    </itemizedlist>
  <foil>
    <title>What does DocBook look like?</title>
    <para role="screen">A DocBook XML document looks a lot like the xhtml
    source&mdash;both are instances XML DTDs. The key difference
    is that DocBook is primarily semantic markup for
    describing software and hardware documentation. xhtml is
    more general and less focused on semantics. </para>
<example>
      <title>Sample DocBook XML:</title>
<programlisting linenumbering="numbered">&lt;para>&lt;command>ControlProcess&lt;/command> writes 
its trace information to &lt;filename>
&lt;envar>$BJROOT&lt;/envar>/logs/ControlProcess_
&lt;replaceable>hostname&lt;/replaceable>.out&lt;/filename> 
(where &lt;replaceable>hostname&lt;/replaceable> is the name 
of the activation host on which 
&lt;command>ControlProcess&lt;/command> is running).&lt;/para></programlisting>
    </example>
    <example>
      <title>Sample XHTML:</title>
    <programlisting linenumbering="numbered">&lt;p>&lt;tt>ControlProcess&lt;/tt> writes 
its trace information to &lt;tt>
&lt;i>&lt;tt>$BJROOT&lt;/tt>&lt;/i>/logs/ControlProcess_
&lt;i>hostname&lt;/i>.out&lt;/tt> 
(where &lt;i>hostname&lt;/i> is the name 
of the activation host on which 
&lt;tt>ControlProcess&lt;/tt> is running).&lt;/p></programlisting>
    </example>
	  <example>
		<title>The DocBook converted to html and rendered:</title>
		<para><command>ControlProcess</command> writes 
its trace information to <filename>
<envar>$BJROOT</envar>/logs/ControlProcess_<replaceable>hostname</replaceable>.out</filename> 
(where <replaceable>hostname</replaceable> is the name 
of the activation host on which 
<command>ControlProcess</command> is running).</para>
	  </example>
  </foil>
  <foil>
    <title>Ok, but what is DocBook <emphasis>really</emphasis>?</title>

        <para>More broadly defined, DocBook is the DTD
        mention above and the mechanisms to
        transform DocBook documents to a useful format. </para>

        <para role="screen">There are at least three
        separate existing mechanisms that I know of for transforming
        DocBook instances, each based on a different
        stylesheet language. If none of these mechanisms
        suit your needs, it is possible to create a new one
        from scratch, though that would be non-trivial. The
        important point is that DocBook is an open standard,
        so ultimately <ulink url="http://www.troubleshooters.com/tpromag/200104/200104.htm">you own your data</ulink>. 
        </para>
          <para> Of the existing mechanisms, two are free
            (as in <ulink url="http://www.gnu.org/fsf/fsf.html">freedom and beer</ulink>) open source and a third is
            commercial:
          </para>

          <itemizedlist>

            <listitem>
              <para>XSL stylesheets maintained by Norm Walsh and others at the
                <ulink
                url="https://sourceforge.net/projects/docbook/">DocBook Open Repository</ulink> for converting DocBook
              XML documents to html, chunked html, html help, xsl-fo
              (which can in turn be converted to postscript
              or pdf), UNIX man pages. In addition, html can
              be converted to text using a text browser like
              links or lynx.</para>
		  <indexterm>
			<primary>DocBook Open Repository</primary>
			<secondary>XSL stylesheets</secondary>
		  </indexterm>
            </listitem>
            <listitem>
              <para>DSSSL (Document Style Semantics and Specification Language) stylesheets maintained by Norm Walsh and others at the <ulink
                url="https://sourceforge.net/projects/docbook/">DocBook
                Open Repository</ulink> for converting
                DocBook XML
                or SGML documents to html, chunked html,
              pdf, rtf, UNIX man pages. <phrase
                role="screen">I have limited knowledge about
                the DSSSL stylesheets since I've primarily
                used the XSL stylesheets. </phrase> 
			<indexterm>
			  <primary>DocBook Open Repository</primary>
			  <secondary>DSSSL stylesheets</secondary>
			</indexterm>
			
		  </para>
            </listitem>
          <listitem>
            <para>FOSI stylesheets that are part of some 
            Arbortext products for converting DocBook
            instances to html, html help, cross-browser html
              base help, and print. <phrase
            role="screen">...and possibly more, I have
            limited knowledge about Arbortext's products. I
            only looked at some demos briefly and long
            ago. Their content engine is pricey.</phrase></para>
		  <indexterm>
			<primary>FOSI</primary>
		  </indexterm>
          </listitem>
          </itemizedlist>

  </foil>
    <foil>
      <title>What can DocBook be made to look like?</title>
    <para>XML facilitates creating multiple output from a
    single source. All of the documents linked below were
    created from the identical <ulink
    url="XML2PDF-presentation.xml">XML file</ulink>. This
    talk also is what it is about. I wrote it in a form of
    DocBook (the slides DTD) and use XSLs to transform it
    into various output types.</para>
    <itemizedlist>
      <listitem>
        <para>The slide show you're looking at
        now/a single, monolithic html<phrase
        role="screen">If you
        are viewing this page on the web, open this page in
          the <ulink url="http://www.opera.com">Opera web
            browser</ulink> and press <keycap>F11</keycap>
        to view as a full screen slide show.</phrase></para>
      </listitem>
      <listitem>
        <para><quote>chunked</quote>
        html <ulink security="writeronly" 
        url="../../stage/STCTalk.book/chunk/downdir/index.html">(example)</ulink><phrase role="screen">: each chapter,
        section, and so on is broken into a separate html
        page to create an online book.</phrase>
			<indexterm>
			  <primary>chunked html</primary>
			</indexterm>
		  </para>
      </listitem>
      <listitem>
        <para>
          HTML Help or RoboHELP's WebHelp <ulink
          security="writeronly" 
          url="../../stage/STCTalk.book/chm/downdir/STCTalk.book.chm">(example)</ulink><phrase role="screen">: We also created chms from our
          server books because that format was more
          convenient in some circumstances. We used a less
          booklike variant for help sets. If you have a chm
          file, you can easily create WebHelp by opening the
          .hhp file in RoboHELP and generating the
          WebHelp. This requires owning RoboHELP.</phrase>
        </para>
      </listitem>
      <listitem>
        <para>Print output using the stock DocBook
        XSLs<phrase role="screen">: the output of the
        DocBook XSL stylesheets if you don't customize
        anything.</phrase></para>
      </listitem>
      <listitem>
        <para>The
            Motive pdf <ulink security="writeronly" 
            url="../../stage/STCTalk.book/motive-pdf/downdir/STCTalk.book.pdf">(example)</ulink><phrase role="screen">: this is the output from the
        stylesheets we use at Motive. After Motive acquired BroadJump, I customized the
        DocBook stylesheets to mimic the FrameMaker template
        they were using.</phrase></para>
      </listitem>
		<listitem>
		  <para><ulink
		  url="http://help.eclipse.org/help21/index.jsp">Eclipse
		  documentation plugins</ulink>.</para>
		</listitem>
      <listitem>
        <para>The
            BroadJump pdf <ulink security="writeronly" 
            url="../../stage/STCTalk.book/pdf/downdir/STCTalk.book.pdf">(example)</ulink><phrase role="screen">: this is the output from the
        stylesheets we used at BroadJump.</phrase></para>
      </listitem>
      <listitem>
        <para>The BroadJump <quote>technical
              whitepaper</quote> pdf <ulink
              security="writeronly" 
        url="../../stage/STCTalk.article/techwp-pdf/downdir/STCTalk.article.pdf">(example)</ulink><phrase
        role="screen">: We created this stylesheet
        for a series of whitepapers that described our
        product's architecture.</phrase></para>
      </listitem>
      <listitem>
        <para>The DocBook 'slides' XSLs <phrase role="screen">: A browser based
        slide show that doesn't depend on Opera like the one
        you're viewing now does. There are XSLs to create
        html with and without frames as well as fo/pdf.</phrase></para>
      </listitem>
		<listitem>
		  <para>You can even create a Word doc out of
			  it. <ulink security="writeronly" 
			  url="STCTalk.book.doc">(example)</ulink></para>
		</listitem>
    </itemizedlist>
    </foil>
  </foilgroup>
  <foilgroup>
    <title>How do I write a DocBook document?</title>
    <para role="screen">
      This is easily the most difficult thing to get used to
      when composing in DocBook or DTD that tries to focus
      on semantics rather than presentation. 
      There's not one short or even long answer to the
      question of what the best authoring environment is,
      but recently a couple of editors have made strides in
      solving the problem of how to represent semantics and
      reasonable presentation at the same time.  
    </para>
    <para>
      WYSIWYG is ultimately impossible any time you produce
      multiple outputs from a single source. This subject is
      discussed every few months on one of the XML or
      DocBook lists. 
    </para>
    <para role="screen">
      See a <ulink
        url="http://wiki.docbook.org/topic/DocBookAuthoringTools">list</ulink>
      of DocBook authoring tools at the DocBook Wiki.
	  <indexterm>
		<primary>DocBook Wiki</primary>
	  </indexterm>
    </para>
    <para>
      In addition to providing help authoring instances of
      DocBook XML (or any DTD) by indicating what elements
      are valid at what points, these tools validate
      documents. <phrase role="screen">When a tool validates a document, it
      compares the XML to its DTD to see if it conforms to
      the DTD. If the document does not conform to the DTD,
      the tools typically try to indicate what and where the
      problem is, though they can't always tell you exactly
      what is wrong.</phrase>
    </para>
    <itemizedlist>
	  <listitem>
		<para><ulink
		url="http://www.xmlmind.com/xmleditor/">XMLMind XML
			Editor - XXE (Lite, but functional version free for <quote>internal
		use</quote>; ~$220 for a fully enabled version)</ulink><phrase
		role="screen">: XMLMind uses CSS2 plus some
		extensions to present the document in a way that
		approximates what its final presentation might
		be. That is, lists look like lists, tables like
			tables, and so on. The editor also provides
		visual cues to indicate what element is currently
		selected and what your context is. A node-path bar
		shows the exact context and allows the writer to
		select a specific node. XMLMind supports xinclude,
		but has limited support for entities. If you're
		starting out, you can probably avoid the things that
		XMLMind can't do with entities, but if your existing
		docs or publishing system already requires that you
		use them, XMLMind may not be for you.</phrase></para>
	  </listitem>
	  <listitem>
		<para><ulink
		url="http://www.syntext.com/products/serna/">Syntext
		Serna (~$254)</ulink><phrase role="screen">: Serna
		uses xslt and xsl-fo to style the document while you
		type and also uses tooltip-like visual cues to
		indicate where you are in the markup. Serna has full
		support for entities and allows you to edit them in
		context in the document. Another nice feature is
		that xrefs are resolved in the editing view, so it's
		even closer to wysiwyg.</phrase></para>
	  </listitem>
      <listitem>
        <para>emacs + psgml mode and nsgmls(free)<phrase role="screen">: The one true editor. Great if you like to look at tags. psgml mode gives you quite a bit of help and it is very stable. You have to edit tables by hand, however.</phrase>
		  <indexterm>
			<primary>emacs</primary>
			<secondary>psgml</secondary>
		  </indexterm>
</para>
      </listitem>
      <listitem>
        <para>Arbortext Epic (c. $700?/seat)<phrase role="screen">: I have only demoed this briefly, but it has got a reputation of being the Rolls Royce of XML editors. </phrase>
		  <indexterm>
			<primary>Arbortext</primary>
			<secondary>Epic</secondary>
		  </indexterm>
		  <indexterm>
			<primary>Epic</primary>
		  </indexterm>
		</para>
      </listitem>
      <listitem>
        <para>XMetaL: BlastRadius, formerly Corel, and
		  before that Softquad (c. $470?/seat)<phrase
		  role="screen">: XMetaL has some nice features, but
		  requires that you customize it to make it's WYSIWG
		  interface usable. It's really unfortunate that
			they don't include a DocBook kit that works
			<quote>out-of-the-box</quote>. I'm happy to
		  share my macros etc. if anybody asks though.</phrase>
		  <indexterm>
			<primary>XMetaL</primary>
		  </indexterm>
		</para>
      </listitem>
      <listitem>
        <para>Adobe FrameMaker 7 ($870)<phrase
        role="screen">: Based on <ulink url="http://www.getnet.net/~swhitlat/DocBook/Frame_Project_Readme.html">what I've read on mailing
        lists</ulink>, FrameMaker is not up to the task of
        providing you with and editing environment for
        DocBook. It contains a DocBook kit, but it would need lots of configuration before it would be useful. </phrase>
		  <indexterm>
			<primary>FrameMaker</primary>
		  </indexterm>
		</para>
      </listitem>
      <listitem>
        <para>XML Spy/Authentic ($400 / $0)<phrase role="screen">: Really more suited to the needs of <quote>dataheads</quote> and forms. Authentic, which allows you to edit and validate documents, is now free. It contains a DocBook kit, but it would need lots of configuration before it would be useful. </phrase>
		  <indexterm>
			<primary>XML Spy</primary>
		  </indexterm>
		</para>
      </listitem>
    </itemizedlist>
    <para>
      There are a few other editors at various levels of
      maturity. I hear Oxygen and Morphon mentioned
      sometimes. 
    </para>
  <foil>
    <title>How do I transform a DocBook document?</title>
    <para>
      I'm <emphasis role="bold">not</emphasis> discussing
      DSSSL or fosi here.
    </para>
    <para>Most of the tools that transform XML documents are
    command line. Example using
    <command>xsltproc</command>:
<programlisting>xsltproc -o <replaceable>output.xml path/to/</replaceable>html/docbook.xsl <replaceable>input.xml</replaceable> </programlisting>
    </para>
    <para>To use XSL to go to HTML Help, you must also run
    <command>hhc</command> or use the HTML Help workshop to
    compile the chm.</para> 
    <para>
      XSL does not take you directly to pdf. You use XSL to
      convert the DocBook document to xsl-fo, then use a fo
      renderer to convert that document to a pdf or
      postscript file. 
    </para>
    <para>
      There are several <ulink
        url="http://wiki.docbook.org/topic/DocBookTools">
        convenience tools</ulink> that hide the
      transformation process from you to one degree or
      another. You certainly need either one of these or
      something you write yourself (a batch file, shell
      script, perl script, make file, ant script)
    </para>
  </foil>
  <foil>
    <title>What is fo and what is a fo renderer?</title>
    <para>
		FO (Formatting Objects) is part of the <ulink
      url="http://www.w3.org/TR/xsl/">w3c's XSL</ulink>
      specification. It is like html in that it describes
      how content should be presented, but unlike html, fo
      focuses on the printed page, so it provides for
      headers, footers, page number, and so on.
	  <blockquote role="screen">
		  <attribution>
			<ulink url="http://www.w3.org/Style/XSL/">w3c</ulink></attribution>
		  <para>
			XSL is a language for expressing stylesheets. It
			consists of three parts: XSL Transformations
			(XSLT): a language for transforming XML
			documents, the XML Path Language (XPath), an
			expression language used by XSLT to access or
			refer to parts of an XML document. (XPath is
			also used by the XML Linking specification). The
			third part is XSL Formatting Objects: an XML
			vocabulary for specifying formatting
			semantics. An XSL stylesheet specifies the
			presentation of a class of XML documents by
			describing how an instance of the class is
			transformed into an XML document that uses the
			formatting vocabulary.
		  </para>
		</blockquote>
	  </para>
    <itemizedlist>
      <listitem>
        <para><ulink url="http://www.renderx.com">RenderX's XEP</ulink></para>
      </listitem>
      <listitem>
        <para><ulink url="http://www.antennahouse.com">Antenna House's XSL Formatter</ulink></para>
      </listitem>
      <listitem>
        <para><ulink url="http://xml.apache.org/fop/">Apache's FOP</ulink></para>
      </listitem>
    </itemizedlist>
    <para>See the <ulink
    url="http://wiki.docbook.org/topic/DocBookPublishingTools">DocBook
    Wiki</ulink> for a complete list.</para>
  </foil>
  <foil>
    <title>How do I change the way the output looks?</title>
    <para>
      For many aspects of a document's appearance, you can
      control the behavior of the stylesheets by changing
      parameters.
    </para>
    <programlisting>&lt;xsl:param name="double.sided" select="1"/>
&lt;xsl:param name="page.margin.inner">
  &lt;xsl:choose>
    &lt;xsl:when test="$double.sided != 0">1.25in&lt;/xsl:when>
    &lt;xsl:otherwise>1in&lt;/xsl:otherwise>
  &lt;/xsl:choose>
&lt;/xsl:param>
&lt;xsl:param name="page.margin.outer">
  &lt;xsl:choose>
    &lt;xsl:when test="$double.sided != 0">0.75in&lt;/xsl:when>
    &lt;xsl:otherwise>1in&lt;/xsl:otherwise>
  &lt;/xsl:choose>
&lt;/xsl:param></programlisting>

    <para>
      The parameters are described in the <ulink
      url="http://docbook.sourceforge.net/release/xsl/current/doc/fo">documentation</ulink>
      that comes with the distribution.
    </para>
  </foil>
    <foil>
      <title>Generated text</title>
      <para>
        In addition to parameters, the stylesheets come with
        translations for strings that are generated. For
        example, one of the parameters lets you control
        how titles are formatted:
        <programlisting>   &lt;l:context name="title-numbered">
      &lt;l:template name="appendix" text="Appendix %n. %t"/>
      &lt;l:template name="article/appendix" text="%n. %t"/>
      &lt;l:template name="chapter" text="Chapter %n. %t"/>
      &lt;l:template name="section" text="%n. %t"/>
   &lt;/l:context></programlisting>
        Separate files exist for each language and the
        stylesheets come with translations for around 40
        languages.
      </para>
    </foil>
  <foil>
    <title>What if there is no parameter for the thing I want to change?</title>
    <para>In that case, you have 2 choices:
      <orderedlist>
        <listitem>
          <para>
            If the thing you want to control would be
            generally useful to other users of the DocBook
            XSLs, submit an RFE to the maintainers.
          </para>
        </listitem>
        <listitem>
          <para>
            Change the behavior of the XSLs by overriding
            the templates. 
          </para>
          <para>
            Overriding the templates requires that you know
            1) Enough XSL to change the right code, and 2)
            what you want the resulting XML to do. So if
            you're changing the fo stylesheets, you have to
            know enough FO to know what you want the
            stylesheets to do.
          </para>
        </listitem>
      </orderedlist>
      Bob Stayton's book, <citetitle><ulink
          url="http://www.sagehill.net/docbookxsl/index.html">DocBook XSL: The Complete Guide</ulink></citetitle>,
      is essential reading for learning how to customize
      the DocBook XSLs. 
    </para>
  </foil>
    <foil>
      <title>Glossary generation</title>
      <para role="screen">
        One handy feature of the DocBook Open XSLs is that
        you can have a master glossary from which a custom
        glossary is built when you generate a document. 
		<note>
		  <para>The inclusion of terms in the glossary is
		  <emphasis>not</emphasis> recursive. If the
		  definitions of terms contain
		  <sgmltag>glossterm</sgmltag>s, these are not
		  pulled into the glossary.</para>
		</note>
      </para>
	  <example>
		<title>Pointing the XSLs to your master glossary</title>
      <programlisting>&lt;xsl:param name="glossary.collection" 
select="'/local/path/to/glossary.xml'"/></programlisting></example>
	  <example>
		<title>A very small master glossary</title>
      <programlisting>&lt;!DOCTYPE glossary PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
&lt;glossary>
  &lt;glossentry>
    &lt;glossterm>0&lt;/glossterm>
     &lt;glossdef>
      &lt;para>Numeric zero, as opposed to the letter 'O'.&lt;/para>
    &lt;/glossdef>
  &lt;/glossentry>
&lt;/glossary></programlisting></example>
	  <example>
		<title>Using glossary term in your document</title>
      <programlisting>&lt;para>There's no Roman numeral for &lt;glossterm 
   baseform="0">zero&lt;/glossterm>.&lt;/para></programlisting></example>
    </foil>
    <foil id="profiling">
      <title>Profiling</title> 
	  <para>
		Another feature of the DocBook Open XSLs is the
		ability to filter out elements. This is like
		conditional text in FrameMaker.
	  </para>
	  <example>
		<title>Some <sgmltag>para</sgmltag>s ready to be profiled</title>
	  <programlisting>&lt;para>A common introductory paragraph.&lt;/para>
&lt;para os="Windows">A paragraph specific to Windows.&lt;/para>
&lt;para os="UNIX;MacOSX;Linux">A paragraph pertains to several UNIXes.
&lt;phrase userlevel="beginner">When in doubt, use &lt;userinput>man -k&lt;/userinput>
&lt;/phrase>
&lt;/para></programlisting></example>
	  <example>
		<title>Running Saxon with profiling</title>
		<para>
		  <programlisting>java com.icl.saxon.StyleSheet -o sample.html sample.xml \
      ../html/profile-docbook.xsl \
      "profile.os=Windows" \
      "userlevel.os="beginner"</programlisting>
		</para>
	  </example>
	  <para>
		This behaves a little differently than
		FrameMaker. In FrameMaker, if you turn on a
		condition, then it appears even if it occurs within
		text that has been conditioned out. 
	  </para>
	  <caution role="screen">
		<para>
		  Profiling, in part <emphasis>because</emphasis> it
		  is more powerful than Frame's conditional text,
		  provides an easy way for you to hang yourself.
		</para>
	  </caution>
   </foil>
    <foil>
      <title>The directory structure of the distribution</title>
      <para>
        The XSL stylesheet distribution comes with several
        sets of stylesheets. The folder names indicate their
        purpose: <filename class="directory">fo</filename>,
        <filename class="directory">html</filename>,
        <filename class="directory">htmlhelp</filename>. See
        <xref linkend="profiling"/> for information about
        profiling.
		<informaltable frame="all" pgwide="1">
		  <tgroup cols="2">
			<colspec colnum="1" colwidth="1in"/>
			<colspec colnum="2"/>
			<tbody>
<!-- html -->
			  <row>
				<entry morerows="3">
				  <filename class="directory">html/</filename>
				</entry>
				<entry>       
				  <para>Use <filename>docbook.xsl</filename> to
					generate a flat html file.</para>
				</entry>
			  </row>
			  <row>
				<entry><para>Use <filename>profile-docbook.xsl</filename> to
					generate a flat html file using profiling.</para></entry>
			  </row>
			  <row>
				<entry><para>Use <filename>chunk.xsl</filename>...</para></entry>
			  </row>
			  <row>
				<entry><para>Use <filename>profile-chunk.xsl</filename>...</para></entry>
			  </row>
<!-- htmlhelp -->
			  <row>
				<entry morerows="1"><filename class="directory">htmlhelp/</filename></entry>
				<entry><para>Use <filename>htmlhelp.xsl</filename> to generate the collection of html pages, .hhc, .hhp, and .hhk files necessary to make a chm.</para></entry>
			  </row>
			  <row>
				<entry>
				  <para>
					Use
					<filename>profile-htmlhelp.xsl</filename>
					to generate the collection of html
					pages, .hhc, .hhp, and .hhk files
					necessary to make a chm using profiling.
				  </para>
				</entry>
			  </row>
<!-- fo -->
			  <row>
				<entry morerows="1"><filename class="directory">fo/</filename></entry>
				<entry>
				  <para>
					Use <filename>docbook.xsl</filename> to
					generate an xsl-fo file.
				  </para>
				</entry>
			  </row>
			  <row>
				<entry>
				  <para>
					Use <filename>profile-docbook.xsl</filename>
					to generate an xsl-fo file using profiling.
				  </para>
				</entry>
			  </row>
			</tbody>
		  </tgroup>
		</informaltable>
      </para>
    </foil>
  </foilgroup>
  <foilgroup>
      <title>References and Resources</title>
	<para>
	  The problem with DocBook is not a lack of
	  documentation. In fact, there are probably too many
	  guides for getting started that well meaning people
	  have posted on the web over the years, but you may
	  have difficulty figuring out which of these guides is
	  current, which addresses your needs, and so on.
	</para>
    <foil>
      <title>DocBook</title>
      <itemizedlist>
        <listitem>
          <para>
            The official <ulink
              url="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=docbook.org/">DocBook</ulink>
              website.
          </para>
        </listitem>
        <listitem>
          <para>
            The <ulink
              url="http://sourceforge.net/projects/docbook/">DocBook
              Open Repository</ulink> at Sourceforge
          </para>
          <para role="screen">
            From here you can download the latest release of
            the stylesheets. The docs page includes a list of
          resources. Start with <ulink url="http://sourceforge.net/docman/display_doc.php?docid=10430&amp;group_id=21935">Five steps for finding answers to DocBook questions</ulink>.
          </para>
        </listitem>
        <listitem>
          <para>
            The <ulink
            url="http://lists.oasis-open.org/archives/docbook/">docbook
            </ulink>and <ulink
            url="http://lists.oasis-open.org/archives/docbook-apps/">docbook-apps</ulink>
            mailing lists
          </para>
        </listitem>
        <listitem>
          <para><ulink url="http://wiki.docbook.org/topic/">The DocBook Wiki</ulink></para>
        </listitem>
        <listitem>
          <para>Bob Stayton's <citetitle><ulink
          url="http://www.sagehill.net/xml/docbookxsl/index.html">Using the DocBook
          XSL stylesheets</ulink></citetitle></para>
        </listitem>
        <listitem>
          <para>
            <citetitle>DocBook, The Definitive
            Guide</citetitle>: <ulink
            url="http://docbook.org/tdg/en/html/docbook.html">The
            online version is more up to date.</ulink>
          </para>
        </listitem>
      </itemizedlist>
      <para>
        Notice that you have to go to two separate places to
        get the DTD and stylesheets. That may seem strange
        (and even inconvenient), but there's a reason behind
        it. <phrase role="screen">The DTD dictates the
        semantics of a DocBook document. There are some
        processing expectations associated with many
        elements, but it is not a requirement and further,
        there is no presupposition about what tool will be
        used to process the document. The stylesheets
        maintained at the DocBook Open Repository are not
        the last word on processing DocBook documents. You
        are free to build or buy a different
        implementation because you own your data.</phrase>
      </para>
    </foil>
    <foil>
      <title>XSLT</title>     
      <itemizedlist>
        <listitem>
          <para>
            Michael Kay's <ulink
            url="http://www.wrox.com/Books/1861003129.htm">XSLT
            Programmer's Reference</ulink>
          </para>
        </listitem>
        <listitem>
          <para>
            Ken Holman's XSL <ulink
            url="http://www.cranesoftwrights.com/">course
            and book</ulink>
          </para>
        </listitem>
        <listitem>
          <para>
            <ulink
            url="http://www.mulberrytech.com/xsl/xsl-list/">xsl-list</ulink>
            mailing list
          </para>
        </listitem>
      </itemizedlist>
    </foil>
    <foil>
      <title>XSLFO</title>
      <itemizedlist>
        <listitem>
          <para>
            XSLFO lists: <ulink
            url="http://groups.yahoo.com/group/XSL-FO/">the yahoogrouops xsl-fo list</ulink>
            and <ulink
            url="http://lists.w3.org/Archives/Public/www-xsl-fo/">the
            w3c xsl-fo list</ulink>.
          </para>
        </listitem>
        <listitem>
          <para>
            <ulink
              url="http://www.zvon.org/xxl/xslfoReference/Output/index.html">Zvon.org's
              XSL FO Reference</ulink>
          </para>
        </listitem>
        <listitem>
          <para>
            Dave Pawson's XSL-FO book (<ulink
            url="http://www.oreilly.com/catalog/xslfo/">buy</ulink>
            or <ulink
            url="http://www.dpawson.co.uk/xsl/sect3/bk/index.html">read
            online</ulink>)
          </para>
        </listitem>
        <listitem>
          <para>
            Ken Holman's XSL-FO <ulink
            url="http://www.cranesoftwrights.com/">course
            and book</ulink>
          </para>
        </listitem>
		<listitem>
		  <para>Eliot Kimber's <ulink
		  url="http://www.isogen.com/papers/production-quality-xsl-fo.pdf">Using
		  XSL Formatting Objects for Production-Quality
		  Document Printing</ulink> presents the state of
		  xsl-fo renderers</para>
		</listitem>
		<listitem>
		  <para>An interesting looking article on xsl-fo
		  that I haven't had a chance to read closely yet:
		  <ulink
		  url="http://www.seyboldreports.com/TSR/free/0217/techwatch.html">What
		  Is XSL-FO and When Should I Use It?</ulink></para>
		</listitem>
      </itemizedlist>
    </foil>
    <foil>
      <title>Questions and Answers</title>
      <para>Is everything clear as mud?</para>
    </foil>
  </foilgroup>
</slides>

