File: group2document.xsl

package info (click to toggle)
libxerces2-java 2.12.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 12,604 kB
  • sloc: java: 127,795; xml: 13,849; sh: 39; javascript: 18; makefile: 10
file content (31 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (16)
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
<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

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

  <xsl:template match="group">
    <s1 title="{@title}">
      <xsl:apply-templates/>
    </s1>
  </xsl:template>

  <xsl:template match="entry">
    <s2 title="{@title}">
      <p>
        Read the <link idref="{@id}"><xsl:value-of select="@title"/></link>
        document or jump directly to:
      </p>
      <ul>
        <xsl:apply-templates/>
      </ul>
    </s2>
  </xsl:template>

  <xsl:template match="voice">
    <li><link idref="{ancestor::*/@id}" anchor="faq-{position()}"><xsl:apply-templates/></link></li>
  </xsl:template>

</xsl:stylesheet>