chiark / gitweb /
service: add FailureAction= option
[elogind.git] / man / custom-html.xsl
index df16d0871876747c9287ed9eb4b96eae7069d270..060af2e56a756a7ed1add210d0911a06f2fac530 100644 (file)
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
 
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
 
+<!-- translate man page references to links to html pages -->
+<xsl:template match="citerefentry">
+  <a>
+    <xsl:attribute name="href">
+      <xsl:value-of select="refentrytitle"/><xsl:text>.html</xsl:text>
+    </xsl:attribute>
+    <xsl:call-template name="inline.charseq"/>
+  </a>
+</xsl:template>
+
+<xsl:template match="refsect1/title|refsect1/info/title">
+  <!-- the ID is output in the block.object call for refsect1 -->
+  <h2>
+    <xsl:attribute name="id">
+      <xsl:call-template name="inline.charseq"/>
+    </xsl:attribute>
+    <xsl:apply-templates/>
+    <a>
+      <xsl:attribute name="class">
+        <xsl:text>headerlink</xsl:text>
+      </xsl:attribute>
+      <xsl:attribute name="title">
+        <xsl:text>Permalink to this headline</xsl:text>
+      </xsl:attribute>
+      <xsl:attribute name="href">
+        <xsl:text>#</xsl:text>
+        <xsl:call-template name="inline.charseq"/>
+      </xsl:attribute>
+      <xsl:text>¶</xsl:text>
+    </a>
+  </h2>
+</xsl:template>
+
+<xsl:template match="refsect2/title|refsect2/info/title">
+  <h3>
+    <xsl:attribute name="id">
+      <xsl:call-template name="inline.charseq"/>
+    </xsl:attribute>
+    <xsl:apply-templates/>
+    <a>
+      <xsl:attribute name="class">
+        <xsl:text>headerlink</xsl:text>
+      </xsl:attribute>
+      <xsl:attribute name="title">
+        <xsl:text>Permalink to this headline</xsl:text>
+      </xsl:attribute>
+      <xsl:attribute name="href">
+        <xsl:text>#</xsl:text>
+        <xsl:call-template name="inline.charseq"/>
+      </xsl:attribute>
+      <xsl:text>¶</xsl:text>
+    </a>
+  </h3>
+</xsl:template>
+
+<xsl:template match="varlistentry">
+  <dt>
+    <xsl:attribute name="id">
+      <xsl:call-template name="inline.charseq">
+        <xsl:with-param name="content">
+          <xsl:copy-of select="term[position()=1]" />
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:apply-templates select="term"/>
+    <a>
+      <xsl:attribute name="class">
+        <xsl:text>headerlink</xsl:text>
+      </xsl:attribute>
+      <xsl:attribute name="title">
+        <xsl:text>Permalink to this term</xsl:text>
+      </xsl:attribute>
+      <xsl:attribute name="href">
+        <!--        <xsl:call-template name="href.target.uri" /> -->
+        <xsl:text>#</xsl:text>
+        <xsl:call-template name="inline.charseq">
+          <xsl:with-param name="content">
+            <xsl:copy-of select="term[position()=1]" />
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:text>¶</xsl:text>
+    </a>
+  </dt>
+  <dd>
+    <xsl:apply-templates select="listitem"/>
+  </dd>
+</xsl:template>
+
+
+<!-- add Index link at top of page -->
+<xsl:template name="user.header.content">
+  <style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style>
+
+  <a>
+    <xsl:attribute name="href">
+      <xsl:text>index.html</xsl:text>
+    </xsl:attribute>
+    <xsl:text>Index </xsl:text>
+  </a>·
+  <a>
+    <xsl:attribute name="href">
+      <xsl:text>systemd.directives.html</xsl:text>
+    </xsl:attribute>
+    <xsl:text>Directives </xsl:text>
+  </a>·
+  <a>
+    <xsl:attribute name="href">
+      <xsl:text>../python-systemd/index.html</xsl:text>
+    </xsl:attribute>
+    <xsl:text>Python </xsl:text>
+  </a>·
+  <a>
+    <xsl:attribute name="href">
+      <xsl:text>../libudev/index.html</xsl:text>
+    </xsl:attribute>
+    <xsl:text>libudev </xsl:text>
+  </a>·
+  <a>
+    <xsl:attribute name="href">
+      <xsl:text>../libudev/index.html</xsl:text>
+    </xsl:attribute>
+    <xsl:text>gudev </xsl:text>
+  </a>
+
+  <span style="float:right">
+    <xsl:text>systemd </xsl:text>
+    <xsl:value-of select="$systemd.version"/>
+  </span>
+  <hr/>
+</xsl:template>
+
+<xsl:template match="literal">
+  <xsl:text>"</xsl:text>
+  <xsl:call-template name="inline.monoseq"/>
+  <xsl:text>"</xsl:text>
+</xsl:template>
+
 <!-- Switch things to UTF-8, ISO-8859-1 is soo yesteryear -->
 <xsl:output method="html" encoding="UTF-8" indent="no"/>
 
 <!-- Switch things to UTF-8, ISO-8859-1 is soo yesteryear -->
 <xsl:output method="html" encoding="UTF-8" indent="no"/>