File: jargon-text.xsl

package info (click to toggle)
jargon-text 4.4.7-4
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 5,988 kB
  • ctags: 3
  • sloc: xml: 143,054; makefile: 73; sh: 6
file content (33 lines) | stat: -rw-r--r-- 1,100 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

<!-- Render XML to text. -->

<xsl:import href="jargon.xsl"/>

<xsl:param name="suppress.glossary.titlepage" select="1"/>
<xsl:param name="suppress.glossdev.contents" select="1"/>

<!-- Surround links with {} as in older versions. -->
<xsl:template match="glossdef//glossterm">
    <xsl:text>{</xsl:text><xsl:call-template name="inline.charseq"/><xsl:text>}</xsl:text>
</xsl:template>

<xsl:template match="para//glossterm">
    <xsl:text>{</xsl:text><xsl:call-template name="inline.charseq"/><xsl:text>}</xsl:text>
</xsl:template>

<!-- Surround entry keywords with :: -->
<xsl:template match="glossentry/glossterm">
    <xsl:text>:</xsl:text><xsl:apply-templates/><xsl:text>: </xsl:text>
    <!-- metadata goes right after glossary term -->
    <xsl:if test="../abbrev">
      <xsl:for-each select="../abbrev/*">
        <xsl:if test="position() &gt; 1">, </xsl:if>
        <xsl:apply-templates select="."/>
      </xsl:for-each>
    </xsl:if>
</xsl:template>

</xsl:stylesheet>