123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615 |
- <?xml version='1.0'?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version='1.0'>
- <!-- ********************************************************************
- $Id: lists.xsl 9684 2012-12-12 17:05:54Z bobstayton $
- ********************************************************************
- This file is part of the XSL DocBook Stylesheet distribution.
- See ../README or http://docbook.sf.net/release/xsl/current/ for
- copyright and other information.
- ******************************************************************** -->
- <xsl:variable name="list-indent">
- <xsl:choose>
- <xsl:when test="not($man.indent.lists = 0)">
- <xsl:value-of select="$man.indent.width"/>
- </xsl:when>
- <xsl:when test="not($man.indent.refsect = 0)">
- <!-- * "zq" is the name of a register we set for -->
- <!-- * preserving the original default indent value -->
- <!-- * when $man.indent.refsect is non-zero; -->
- <!-- * "u" is a roff unit specifier -->
- <xsl:text>\n(zqu</xsl:text>
- </xsl:when>
- <xsl:otherwise/> <!-- * otherwise, just leave it empty -->
- </xsl:choose>
- </xsl:variable>
- <!-- ================================================================== -->
- <xsl:template match="para[ancestor::listitem or ancestor::step or ancestor::glossdef]|
- simpara[ancestor::listitem or ancestor::step or ancestor::glossdef]|
- remark[ancestor::listitem or ancestor::step or ancestor::glossdef]">
- <xsl:call-template name="mixed-block"/>
- <xsl:text> </xsl:text>
- <xsl:if test="following-sibling::*[1][
- self::para or
- self::simpara or
- self::remark
- ]">
- <!-- * Make sure multiple paragraphs within a list item don't -->
- <!-- * merge together. -->
- <xsl:text>.sp </xsl:text>
- </xsl:if>
- </xsl:template>
- <xsl:template match="bibliolist">
- <xsl:apply-templates/>
- <xsl:text> </xsl:text>
- </xsl:template>
- <xsl:template match="variablelist|glosslist">
- <xsl:text> </xsl:text>
- <xsl:if test="title">
- <xsl:text>.PP </xsl:text>
- <xsl:call-template name="bold">
- <xsl:with-param name="node" select="title"/>
- <xsl:with-param name="context" select="."/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="varlistentry|glossentry">
- <xsl:text>.PP </xsl:text>
- <xsl:for-each select="term|glossterm">
- <xsl:variable name="content">
- <xsl:apply-templates/>
- </xsl:variable>
- <xsl:value-of select="normalize-space($content)"/>
- <xsl:choose>
- <xsl:when test="position() = last()"/> <!-- do nothing -->
- <xsl:otherwise>
- <!-- * if we have multiple terms in the same varlistentry, generate -->
- <!-- * a separator (", " by default) and/or an additional line -->
- <!-- * break after each one except the last -->
- <!-- * -->
- <!-- * note that it is not valid to have multiple glossterms -->
- <!-- * within a glossentry, so this logic never gets exercised -->
- <!-- * for glossterms (every glossterm is always the last in -->
- <!-- * its parent glossentry) -->
- <xsl:value-of select="$variablelist.term.separator"/>
- <xsl:if test="not($variablelist.term.break.after = '0')">
- <xsl:text> </xsl:text>
- <xsl:text>.br </xsl:text>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:text> </xsl:text>
- <xsl:text>.RS</xsl:text>
- <xsl:if test="not($list-indent = '')">
- <xsl:text> </xsl:text>
- <xsl:value-of select="$list-indent"/>
- </xsl:if>
- <xsl:text> </xsl:text>
- <xsl:apply-templates/>
- <xsl:text>.RE </xsl:text>
- </xsl:template>
- <xsl:template match="varlistentry/term"/>
- <xsl:template match="glossentry/glossterm"/>
- <xsl:template match="variablelist[ancestor::listitem or ancestor::step or ancestor::glossdef]|
- glosslist[ancestor::listitem or ancestor::step or ancestor::glossdef]">
- <xsl:apply-templates/>
- <xsl:if test="following-sibling::node() or
- parent::para[following-sibling::node()] or
- parent::simpara[following-sibling::node()] or
- parent::remark[following-sibling::node()]">
- <xsl:text>.sp</xsl:text>
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:template>
- <xsl:template match="varlistentry/listitem|glossentry/glossdef">
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="itemizedlist/listitem">
- <!-- * We output a real bullet here (rather than, "\(bu", -->
- <!-- * the roff bullet) because, when we do character-map -->
- <!-- * processing before final output, the character-map will -->
- <!-- * handle conversion of the • to "\(bu" for us -->
- <xsl:text> </xsl:text>
- <xsl:text>.sp</xsl:text>
- <xsl:text> </xsl:text>
- <xsl:text>.RS</xsl:text>
- <xsl:if test="not($list-indent = '')">
- <xsl:text> </xsl:text>
- <xsl:value-of select="$list-indent"/>
- </xsl:if>
- <xsl:text> </xsl:text>
- <!-- * if "n" then we are using "nroff", which means the output is for -->
- <!-- * TTY; so we do some fixed-width-font hackery with \h to make a -->
- <!-- * hanging indent (instead of using .IP, which has some -->
- <!-- * undesirable side effects under certain circumstances) -->
- <xsl:call-template name="roff-if-else-start"/>
- <xsl:text>\h'-</xsl:text>
- <xsl:choose>
- <xsl:when test="not($list-indent = '')">
- <xsl:text>0</xsl:text>
- <xsl:value-of select="$list-indent"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>\n(INu</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>'</xsl:text>
- <xsl:text>•</xsl:text>
- <xsl:text>\h'+</xsl:text>
- <xsl:choose>
- <xsl:when test="not($list-indent = '')">
- <xsl:text>0</xsl:text>
- <xsl:value-of select="$list-indent - 1"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>\n(INu-1</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>'\c </xsl:text>
- <!-- * else, we are not using for "nroff", but instead "troff" - which -->
- <!-- * means not for TTY, but for PS or whatever; so we’re not using a -->
- <!-- * fixed-width font, so use a real .IP instead -->
- <xsl:call-template name="roff-else"/>
- <!-- * .IP generates a blank like of space, so let’s go backwards one -->
- <!-- * line up to compensate for that -->
- <xsl:text>.sp -1 </xsl:text>
- <xsl:text>.IP \(bu 2.3 </xsl:text>
- <!-- * The value 2.3 is the amount of indentation; we use 2.3 instead -->
- <!-- * of 2 because when the font family is New Century Schoolbook it -->
- <!-- * seems to require the extra space. -->
- <xsl:call-template name="roff-if-end"/>
- <xsl:apply-templates/>
- <xsl:text>.RE </xsl:text>
- </xsl:template>
- <xsl:template match="orderedlist/listitem/title|
- procedure/step/title">
- <xsl:call-template name="bold">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="context" select=".."/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:text>.PP </xsl:text>
- </xsl:template>
- <xsl:template match="orderedlist/listitem|procedure/step">
- <xsl:text> </xsl:text>
- <xsl:text>.sp</xsl:text>
- <xsl:text> </xsl:text>
- <xsl:text>.RS</xsl:text>
- <xsl:if test="not($list-indent = '')">
- <xsl:text> </xsl:text>
- <xsl:value-of select="$list-indent"/>
- </xsl:if>
- <xsl:text> </xsl:text>
- <!-- * if "n" then we are using "nroff", which means the output is for -->
- <!-- * TTY; so we do some fixed-width-font hackery with \h to make a -->
- <!-- * hanging indents (instead of using .IP, which has some -->
- <!-- * undesirable side effects under certain circumstances) -->
- <xsl:call-template name="roff-if-else-start"/>
- <xsl:text>\h'-</xsl:text>
- <xsl:choose>
- <xsl:when test="not($list-indent = '')">
- <xsl:text>0</xsl:text>
- <xsl:value-of select="$list-indent"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>\n(INu+3n</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>'</xsl:text>
- <xsl:if test="count(preceding-sibling::listitem) < 9">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:number format="1."/>
- <xsl:text>\h'+</xsl:text>
- <xsl:choose>
- <xsl:when test="not($list-indent = '')">
- <xsl:text>0</xsl:text>
- <xsl:value-of select="$list-indent - 3"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>1n</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>'\c </xsl:text>
- <!-- * else, we are not using for "nroff", but instead "troff" - which -->
- <!-- * means not for TTY, but for PS or whatever; so we’re not using a -->
- <!-- * fixed-width font, so use a real .IP instead -->
- <xsl:call-template name="roff-else"/>
- <!-- * .IP generates a blank line of space, so let’s go backwards one -->
- <!-- * line up to compensate for that -->
- <xsl:text>.sp -1 </xsl:text>
- <xsl:text>.IP "</xsl:text>
- <xsl:if test="count(preceding-sibling::listitem) < 9">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:number format="1."/>
- <xsl:text>" 4.2 </xsl:text>
- <!-- * The value 4.2 is the amount of indentation; we use 4.2 instead -->
- <!-- * of 4 because when the font family is Bookman it seems to require -->
- <!-- * the extra space. -->
- <xsl:call-template name="roff-if-end"/>
- <xsl:apply-templates/>
- <xsl:text>.RE </xsl:text>
- <xsl:text> </xsl:text>
- </xsl:template>
- <xsl:template match="itemizedlist|orderedlist|procedure">
- <xsl:if test="title">
- <xsl:text>.PP </xsl:text>
- <xsl:call-template name="bold">
- <xsl:with-param name="node" select="title"/>
- <xsl:with-param name="context" select="."/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- </xsl:if>
- <!-- * DocBook allows just about any block content to appear in -->
- <!-- * lists before the actual list items, so we need to get that -->
- <!-- * content (if any) before getting the list items -->
- <xsl:apply-templates
- select="*[not(self::listitem) and not(self::title)]"/>
- <xsl:apply-templates select="listitem"/>
- <!-- * If this list is a child of para and has content following -->
- <!-- * it, within the same para, then add a blank line and move -->
- <!-- * the left margin back to where it was -->
- <xsl:if test="parent::para and following-sibling::node()">
- <xsl:text>.sp</xsl:text>
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:template>
- <xsl:template match="itemizedlist[ancestor::listitem or ancestor::step or ancestor::glossdef]|
- orderedlist[ancestor::listitem or ancestor::step or ancestor::glossdef]|
- procedure[ancestor::listitem or ancestor::step or ancestor::glossdef]">
- <xsl:if test="title">
- <xsl:text>.PP </xsl:text>
- <xsl:call-template name="bold">
- <xsl:with-param name="node" select="title"/>
- <xsl:with-param name="context" select="."/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates/>
- <xsl:if test="following-sibling::node() or
- parent::para[following-sibling::node()] or
- parent::simpara[following-sibling::node()] or
- parent::remark[following-sibling::node()]">
- <xsl:text>.sp</xsl:text>
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:template>
- <!-- ================================================================== -->
-
- <!-- * for simplelist type="inline", render it as a comma-separated list -->
- <xsl:template match="simplelist[@type='inline']">
- <!-- * if dbchoice PI exists, use that to determine the choice separator -->
- <!-- * (that is, equivalent of "and" or "or" in current locale), or literal -->
- <!-- * value of "choice" otherwise -->
- <xsl:variable name="localized-choice-separator">
- <xsl:choose>
- <xsl:when test="processing-instruction('dbchoice')">
- <xsl:call-template name="select.choice.separator"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- * empty -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:for-each select="member">
- <xsl:apply-templates/>
- <xsl:choose>
- <xsl:when test="position() = last()"/> <!-- do nothing -->
- <xsl:otherwise>
- <xsl:text>, </xsl:text>
- <xsl:if test="position() = last() - 1">
- <xsl:if test="$localized-choice-separator != ''">
- <xsl:value-of select="$localized-choice-separator"/>
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:text> </xsl:text>
- </xsl:template>
- <!-- * if simplelist type is not inline, render it as a one-column vertical -->
- <!-- * list (ignoring the values of the type and columns attributes) -->
- <xsl:template match="simplelist">
- <xsl:for-each select="member">
- <xsl:text>.RS</xsl:text>
- <xsl:if test="not($list-indent = '')">
- <xsl:text> </xsl:text>
- <xsl:value-of select="$list-indent"/>
- </xsl:if>
- <xsl:text> </xsl:text>
- <xsl:apply-templates/>
- <xsl:text> </xsl:text>
- <xsl:text>.RE </xsl:text>
- </xsl:for-each>
- </xsl:template>
- <!-- ================================================================== -->
- <!-- * We output Segmentedlist as a table, using tbl(1) markup. There -->
- <!-- * is no option for outputting it in manpages in "list" form. -->
- <xsl:template match="segmentedlist">
- <xsl:if test="title">
- <xsl:text>.PP </xsl:text>
- <xsl:call-template name="bold">
- <xsl:with-param name="node" select="title"/>
- <xsl:with-param name="context" select="."/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>.\" line length increase to cope w/ tbl weirdness </xsl:text>
- <xsl:text>.ll +(\n(LLu * 62u / 100u) </xsl:text>
- <!-- * .TS = "Table Start" -->
- <xsl:text>.TS </xsl:text>
- <!-- * first output the table "format" spec, which tells tbl(1) how -->
- <!-- * how to format each row and column. -->
- <xsl:for-each select=".//segtitle">
- <!-- * l = "left", which hard-codes left-alignment for tabular -->
- <!-- * output of all segmentedlist content -->
- <xsl:text>l</xsl:text>
- </xsl:for-each>
- <!-- * last line of table format section must end with a dot -->
- <xsl:text>. </xsl:text>
- <!-- * optionally suppress output of segtitle -->
- <xsl:choose>
- <xsl:when test="$man.segtitle.suppress != 0">
- <!-- * non-zero = "suppress", so do nothing -->
- </xsl:when>
- <xsl:otherwise>
- <!-- * "0" = "do not suppress", so output the segtitle(s) -->
- <xsl:apply-templates select=".//segtitle" mode="table-title"/>
- <xsl:text> </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates/>
- <!-- * .TE = "Table End" -->
- <xsl:text>.TE </xsl:text>
- <xsl:text>.\" line length decrease back to previous value </xsl:text>
- <xsl:text>.ll -(\n(LLu * 62u / 100u) </xsl:text>
- <!-- * put a blank line of space below the table -->
- <xsl:text>.sp </xsl:text>
- </xsl:template>
- <xsl:template match="segmentedlist/segtitle" mode="table-title">
- <xsl:call-template name="italic">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="context" select="."/>
- </xsl:call-template>
- <xsl:choose>
- <xsl:when test="position() = last()"/> <!-- do nothing -->
- <xsl:otherwise>
- <!-- * tbl(1) treats tab characters as delimiters between -->
- <!-- * cells; so we need to output a tab after each -->
- <!-- * segtitle except the last one -->
- <xsl:text>	</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="segmentedlist/seglistitem">
- <xsl:apply-templates/>
- <xsl:text> </xsl:text>
- </xsl:template>
- <xsl:template match="segmentedlist/seglistitem/seg">
- <!-- * the T{ and T} stuff are delimiters to tell tbl(1) that -->
- <!-- * the delimited contents are "text blocks" that groff(1) -->
- <!-- * needs to process -->
- <xsl:text>T{ </xsl:text>
- <xsl:variable name="contents">
- <xsl:apply-templates/>
- </xsl:variable>
- <xsl:value-of select="normalize-space($contents)"/>
- <xsl:text> T}</xsl:text>
- <xsl:choose>
- <xsl:when test="position() = last()"/> <!-- do nothing -->
- <xsl:otherwise>
- <!-- * tbl(1) treats tab characters as delimiters between -->
- <!-- * cells; so we need to output a tab after each -->
- <!-- * segtitle except the last one -->
- <xsl:text>	</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- ==================================================================== -->
- <xsl:template match="calloutlist">
- <xsl:if test="title|info/title">
- <xsl:call-template name="formal.object.heading"/>
- </xsl:if>
- <!-- * This template was originally copied over from the HTML -->
- <!-- * calloutlist template, which precedes the following -->
- <!-- * apply-templates with the comment "Preserve order of PIs and -->
- <!-- * comments"; I'm not certain that it will actually have that -->
- <!-- * effect for all cases, and it seems like there is probably a -->
- <!-- * better way to do it, but anyway, I’m preserving it here for -->
- <!-- * consistency. -->
- <xsl:apply-templates
- select="*[not(self::callout or self::title or self::titleabbrev)]
- |comment()[not(preceding-sibling::callout)]
- |processing-instruction()[not(preceding-sibling::callout)]"/>
- <!-- * put callout list into a table -->
- <xsl:text>.TS </xsl:text>
- <xsl:text>tab(:); </xsl:text>
- <!-- * the following defines the row layout for the table: two columns, -->
- <!-- * with the first cell in each row right-aligned, and the second -->
- <!-- * cell left aligned with a width of 75% of the line length -->
- <xsl:text>r lw(\n(.lu*75u/100u). </xsl:text>
- <xsl:apply-templates select="callout
- |comment()[preceding-sibling::callout]
- |processing-instruction()[preceding-sibling::callout]"/>
- <xsl:text>.TE </xsl:text>
- </xsl:template>
- <xsl:template match="calloutlist/title"/>
- <xsl:template match="callout">
- <!-- * first cell of each row is the set of callout numbers for this -->
- <!-- * particular callout -->
- <xsl:call-template name="callout.arearefs">
- <xsl:with-param name="arearefs" select="@arearefs"/>
- </xsl:call-template>
- <!-- * end of the first cell in the row; the \h hackery is to correct -->
- <!-- * for the excessive horizontal whitespace that tbl(1) adds between -->
- <!-- * cells in the same row -->
- <xsl:text>\h'-2n':</xsl:text>
- <!-- * start the next cell in the row, which has the prose contents -->
- <!-- * (description/explanation) for the callout -->
- <xsl:text>T{ </xsl:text>
- <xsl:apply-templates/>
- <xsl:text>T} </xsl:text>
- <!-- * end of the last cell and end of the row -->
- </xsl:template>
- <xsl:template name="callout.arearefs">
- <xsl:param name="arearefs"></xsl:param>
- <!-- * callout can have multiple values in its arearefs attribute, so -->
- <!-- * we use the position param to track the postion of each value -->
- <xsl:param name="position">1</xsl:param>
- <xsl:if test="$arearefs!=''">
- <xsl:choose>
- <xsl:when test="substring-before($arearefs,' ')=''">
- <xsl:call-template name="callout.arearef">
- <xsl:with-param name="arearef" select="$arearefs"/>
- <xsl:with-param name="position" select="$position"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="callout.arearef">
- <xsl:with-param name="arearef"
- select="substring-before($arearefs,' ')"/>
- <xsl:with-param name="position" select="$position"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="callout.arearefs">
- <xsl:with-param name="arearefs"
- select="substring-after($arearefs,' ')"/>
- <xsl:with-param name="position" select="$position + 1"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template name="callout.arearef">
- <xsl:param name="arearef"></xsl:param>
- <!-- * callout can have multiple values in its arearefs attribute, so -->
- <!-- * we use the position param to track the postion of each value -->
- <xsl:param name="position"></xsl:param>
- <xsl:variable name="targets" select="key('id',$arearef)"/>
- <xsl:variable name="target" select="$targets[1]"/>
- <xsl:call-template name="check.id.unique">
- <xsl:with-param name="linkend" select="$arearef"/>
- </xsl:call-template>
- <xsl:choose>
- <xsl:when test="count($target)=0">
- <xsl:text>???</xsl:text>
- </xsl:when>
- <xsl:when test="local-name($target)='co'">
- <!-- * if this is not the first value in the set of values in the -->
- <!-- * arearef attribute for this callout, then we prepend a groff -->
- <!-- * non-breaking space to it, to prevent groff from injecting -->
- <!-- * linebreaks into the output. For callout instances with -->
- <!-- * multiple values in their arearefs attributes, that results -->
- <!-- * in all of callout numbers beings listed on the same line. -->
- <xsl:if test="not($position = 1)">
- <xsl:text>\ </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$target"
- mode="calloutlist-callout-number"/>
- </xsl:when>
- <!-- * the manpages stylesheet does not really support areaset and -->
- <!-- * area (because we can't/don't actually render the callout bugs -->
- <!-- * at the specified coordinates); however, the following (for -->
- <!-- * what it's worth) might cause the callout numbers in the -->
- <!-- * calloutlist to be render at least (then again, maybe it won't; -->
- <!-- * it's not actually been tested... -->
- <xsl:when test="local-name($target)='areaset'">
- <xsl:call-template name="callout-bug">
- <xsl:with-param name="conum">
- <xsl:apply-templates select="$target" mode="conumber"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($target)='area'">
- <xsl:choose>
- <xsl:when test="$target/parent::areaset">
- <xsl:call-template name="callout-bug">
- <xsl:with-param name="conum">
- <xsl:apply-templates
- select="$target/parent::areaset" mode="conumber"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="callout-bug">
- <xsl:with-param name="conum">
- <xsl:apply-templates select="$target"
- mode="conumber"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>???</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- * we bold the actual callout bugs and put -->
- <!-- * parenthesis around them -->
- <xsl:template name="callout-bug">
- <xsl:param name="conum" select='1'/>
- <xsl:text>\fB(</xsl:text>
- <xsl:value-of select="$conum"/>
- <xsl:text>)\fR</xsl:text>
- </xsl:template>
- <!-- * we bold the callout numbers and follow each -->
- <!-- * with a period -->
- <xsl:template name="calloutlist-callout-number">
- <xsl:param name="conum" select='1'/>
- <xsl:text>\fB</xsl:text>
- <xsl:value-of select="$conum"/>
- <xsl:text>.\fR</xsl:text>
- </xsl:template>
- <xsl:template match="co" mode="calloutlist-callout-number">
- <xsl:call-template name="calloutlist-callout-number">
- <xsl:with-param name="conum">
- <xsl:number count="co"
- level="any"
- from="programlisting|screen|literallayout|synopsis"
- format="1"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:template>
- </xsl:stylesheet>
|