~ubuntu-branches/ubuntu/natty/gst-entrans/natty

« back to all changes in this revision

Viewing changes to docs/manual/ext2doc.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2010-09-13 19:49:29 UTC
  • Revision ID: james.westby@ubuntu.com-20100913194929-qz90a14xyxln9yfz
Tags: upstream-0.10.2
ImportĀ upstreamĀ versionĀ 0.10.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0'?>
 
2
 
 
3
<!DOCTYPE xsl:stylesheet [
 
4
<!ENTITY % url-entities SYSTEM "../url.entities">
 
5
%url-entities;
 
6
]>
 
7
 
 
8
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
9
                version='1.0'
 
10
                xml:lang="en">
 
11
 
 
12
 
 
13
<!-- ********************************************************************
 
14
 
 
15
     Pre-DocBook wrapper (processing)
 
16
 
 
17
     ******************************************************************** -->
 
18
 
 
19
<xsl:output method="xml" />
 
20
 
 
21
<!-- identity by default -->
 
22
 
 
23
<xsl:template match="@*|node()">
 
24
  <xsl:copy>
 
25
    <xsl:apply-templates select="@*|node()"/>
 
26
  </xsl:copy>
 
27
</xsl:template>
 
28
 
 
29
<!-- implement element macro -->
 
30
 
 
31
<xsl:template match="element">
 
32
  <xsl:variable name="element" select="." />
 
33
  <xsl:variable name="link" select="concat('base-', $element, '.html')" />
 
34
  <xsl:variable name="context" select="ancestor::chapter|ancestor::part" />
 
35
 
 
36
  <!-- determine where to link to -->
 
37
  <xsl:variable name="gstbase" select="'&url-gst-home;data/doc/gstreamer/head/'" />
 
38
 
 
39
  <xsl:variable name="base">
 
40
    <xsl:choose>
 
41
      <xsl:when test="@repos = 'core'">
 
42
        <xsl:value-of select="concat($gstbase, 'gstreamer-plugins/html/gstreamer-plugins')" />
 
43
      </xsl:when>
 
44
      <xsl:when test="@repos = 'base' or @repos = 'good' or @repos = 'ugly'">
 
45
        <xsl:value-of select="concat($gstbase, 'gst-plugins-', @repos,
 
46
            '-plugins/html/gst-plugins-', @repos, '-plugins')" />
 
47
      </xsl:when>
 
48
      <xsl:when test="@repos = 'ffmpeg' or @repos = 'bad'">
 
49
        <!--
 
50
        <xsl:value-of select="concat($gstbase,
 
51
            'gst-ffmpeg-plugins/html/gst-ffmpeg-plugins')" />
 
52
            -->
 
53
        <!-- no ffmpeg documentation, don't rely on bad either -->
 
54
        <xsl:value-of select="''" />
 
55
      </xsl:when>
 
56
      <xsl:when test="@repos = 'entrans'">
 
57
        <xsl:value-of select="concat('&rel-gst-entrans-plugins;', 'gst-entrans-plugins')" />
 
58
      </xsl:when>
 
59
      <xsl:when test="string(@repos) = ''">
 
60
        <xsl:value-of select="''" />
 
61
      </xsl:when>
 
62
      <!-- some brute error handling -->
 
63
      <xsl:otherwise>
 
64
        <xsl:message terminate="yes">
 
65
          <xsl:value-of select="concat('Unknown repository', @repos)" />
 
66
        </xsl:message>
 
67
      </xsl:otherwise>
 
68
    </xsl:choose>
 
69
  </xsl:variable>
 
70
 
 
71
  <xsl:choose>
 
72
    <xsl:when test="$base != ''">
 
73
      <!-- don't generate link info in man-page -->
 
74
      <ulink type="http" url="{concat($base, '-', $element, '.html')}">
 
75
        <emphasis>
 
76
          <xsl:apply-templates />
 
77
      </emphasis>
 
78
      </ulink>
 
79
    </xsl:when>
 
80
    <xsl:otherwise>
 
81
      <emphasis>
 
82
        <xsl:apply-templates />
 
83
      </emphasis>
 
84
    </xsl:otherwise>
 
85
  </xsl:choose>
 
86
</xsl:template>
 
87
 
 
88
<!-- ==================================================================== -->
 
89
 
 
90
</xsl:stylesheet>