File: jargon-text.xsl

package info (click to toggle)
dict-jargon 4.4.7-3.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 6,008 kB
  • sloc: xml: 143,056; sh: 79; makefile: 6
file content (29 lines) | stat: -rw-r--r-- 953 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
<?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="0"/>
<xsl:param name="suppress.glossdev.contents" select="0"/>

<!-- 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>

<!-- 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>