3
<!DOCTYPE xsl:stylesheet [
4
<!ENTITY % url-entities SYSTEM "../url.entities">
8
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
13
<!-- ********************************************************************
15
Pre-DocBook wrapper (processing)
17
******************************************************************** -->
19
<xsl:output method="xml" />
21
<!-- identity by default -->
23
<xsl:template match="@*|node()">
25
<xsl:apply-templates select="@*|node()"/>
29
<!-- implement element macro -->
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" />
36
<!-- determine where to link to -->
37
<xsl:variable name="gstbase" select="'&url-gst-home;data/doc/gstreamer/head/'" />
39
<xsl:variable name="base">
41
<xsl:when test="@repos = 'core'">
42
<xsl:value-of select="concat($gstbase, 'gstreamer-plugins/html/gstreamer-plugins')" />
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')" />
48
<xsl:when test="@repos = 'ffmpeg' or @repos = 'bad'">
50
<xsl:value-of select="concat($gstbase,
51
'gst-ffmpeg-plugins/html/gst-ffmpeg-plugins')" />
53
<!-- no ffmpeg documentation, don't rely on bad either -->
54
<xsl:value-of select="''" />
56
<xsl:when test="@repos = 'entrans'">
57
<xsl:value-of select="concat('&rel-gst-entrans-plugins;', 'gst-entrans-plugins')" />
59
<xsl:when test="string(@repos) = ''">
60
<xsl:value-of select="''" />
62
<!-- some brute error handling -->
64
<xsl:message terminate="yes">
65
<xsl:value-of select="concat('Unknown repository', @repos)" />
72
<xsl:when test="$base != ''">
73
<!-- don't generate link info in man-page -->
74
<ulink type="http" url="{concat($base, '-', $element, '.html')}">
76
<xsl:apply-templates />
82
<xsl:apply-templates />
88
<!-- ==================================================================== -->