File: xml-usage-to-docbook.xsl

package info (click to toggle)
drbd-utils 9.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,388 kB
  • sloc: ansic: 43,698; xml: 15,968; cpp: 7,783; sh: 3,699; makefile: 1,353; perl: 353
file content (40 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (15)
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
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="/">
    <term>
      <command moreinfo="none">drbdsetup</command>
      <xsl:apply-templates select="command"/>
    </term>
  </xsl:template>

  <xsl:template match="command">
    <arg choice="plain" rep="norepeat">
      <xsl:value-of select="@name"/>
    </arg>
    <xsl:apply-templates select="argument|group"/>
    <xsl:apply-templates select="option"/>
  </xsl:template>

  <xsl:template match="group">
    <group choice="req">
      <xsl:apply-templates/>
    </group>
  </xsl:template>

  <xsl:template match="argument">
    <arg choice="plain" rep="norepeat">
      <replaceable><xsl:value-of select="."/></replaceable>
    </arg>
  </xsl:template>

  <xsl:template match="option">
  </xsl:template>

  <xsl:template match="handler">
    <arg choice="plain" rep="norepeat">
      <xsl:value-of select="."/>
    </arg>
  </xsl:template>

</xsl:stylesheet>