~ubuntu-branches/ubuntu/trusty/yelp-xsl/trusty

« back to all changes in this revision

Viewing changes to xslt/docbook/html/db2html-cmdsynopsis.xsl

  • Committer: Package Import Robot
  • Author(s): Simon McVittie
  • Date: 2012-10-22 22:14:09 UTC
  • mfrom: (1.3.3)
  • mto: (11.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: package-import@ubuntu.com-20121022221409-563yhrggjvqtt7yc
Tags: upstream-3.6.1
ImportĀ upstreamĀ versionĀ 3.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
-->
35
35
 
36
36
 
37
 
<xsl:key name="db2html.cmdsynopsis.synopfragment.key"
38
 
         match="synopfragment | db:synopfragment"
39
 
         use="@id | @xml:id"/>
40
 
 
41
 
 
42
37
<!-- == Matched Templates == -->
43
38
 
44
39
<!-- = arg = -->
305
300
 
306
301
<!-- = synopfragmentref = -->
307
302
<xsl:template match="synopfragmentref | db:synopfragmentref">
308
 
  <xsl:for-each select="key('db2html.cmdsynopsis.synopfragment.key', @linkend)[1]">
309
 
    <xsl:variable name="count" select="count(preceding-sibling::synopfragment) +
310
 
                                       count(preceding-sibling::db:synopfragment)"/>
311
 
    <span class="co">
312
 
      <xsl:text> </xsl:text>
313
 
      <xsl:value-of select="$count + 1"/>
314
 
      <xsl:text> </xsl:text>
315
 
    </span>
 
303
  <xsl:for-each select="key('db.id.key', @linkend)[1]">
 
304
    <xsl:if test="self::synopfragment or self::db:synopfragment">
 
305
      <xsl:variable name="count" select="count(preceding-sibling::synopfragment) +
 
306
                                         count(preceding-sibling::db:synopfragment)"/>
 
307
      <span class="co">
 
308
        <xsl:text> </xsl:text>
 
309
        <xsl:value-of select="$count + 1"/>
 
310
        <xsl:text> </xsl:text>
 
311
      </span>
 
312
    </xsl:if>
316
313
  </xsl:for-each>
317
314
</xsl:template>
318
315
 
525
522
<!-- = synopfragmentref % db2html.cmdsynopsis.sbr.padding.mode = -->
526
523
<xsl:template mode="db2html.cmdsynopsis.sbr.padding.mode"
527
524
              match="synopfragmentref | db:synopfragmentref">
528
 
  <xsl:variable name="node" select="key('db2html.cmdsynopsis.synopfragment.key', @linkend)"/>
 
525
  <xsl:variable name="node" select="key('db.id.key', @linkend)"/>
529
526
  <xsl:variable name="count" select="count($node/preceding-sibling::synopfragment) +
530
527
                                     count($node/preceding-sibling::db:synopfragment) + 1"/>
531
528
  <xsl:value-of select="str:padding(string-length($count) + 2, ' ')"/>