~gumara/ubuntu-desktop-course/ubuntu-desktop-course-th-gumara

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:output method="xml" indent="yes" encoding="utf-8"
        doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
        doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />

    <xsl:template match="node()|@*">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()" />
        </xsl:copy>
    </xsl:template>

 <!-- Remove answers -->

    <xsl:template match="answer" />

 <!-- Remove instructor notes -->

  <xsl:template match="note">
    <xsl:if test="@userlevel='instructor'">
    </xsl:if>
    <xsl:if test="not(@userlevel='instructor')">
      <xsl:apply-templates/>
    </xsl:if>
  </xsl:template>

    <xsl:template match="sect1">
	<xsl:if test="@userlevel='instructor'">
	</xsl:if>
	<xsl:if test="not(@userlevel='instructor')">
		<sect1>
		<xsl:apply-templates />
		</sect1>
	</xsl:if>
    </xsl:template>

    <xsl:template match="subtitle">
      <chapter>
        <xsl:apply-templates select="@*|node()" />
      </chapter>
    </xsl:template>

 <!-- Question and Answers -->

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

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

    <xsl:template match="question">
        <formalpara><title>Question:</title>
        <xsl:apply-templates />
        </formalpara>
    </xsl:template>

    <xsl:template match="answer">
	<formalpara><title>Answer:</title></formalpara>
    </xsl:template>

</xsl:stylesheet>