/usr/share/yelp/xslt/info2html.xsl is in yelp 3.10.2-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | <?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:yelp="http://www.gnome.org/yelp/ns"
xmlns="http://www.w3.org/1999/xhtml"
extension-element-prefixes="yelp"
version="1.0">
<xsl:import href="/usr/share/yelp-xsl/xslt/common/color.xsl"/>
<xsl:import href="/usr/share/yelp-xsl/xslt/common/icons.xsl"/>
<xsl:import href="/usr/share/yelp-xsl/xslt/common/html.xsl"/>
<xsl:import href="/usr/share/yelp-xsl/xslt/common/l10n.xsl"/>
<xsl:include href="yelp-common.xsl"/>
<xsl:template name="linktrails">
<xsl:param name="up" select="@up"/>
<xsl:variable name="upnode" select="/Info//Section[@id = $up]"/>
<xsl:if test="$upnode/@up">
<xsl:call-template name="linktrails">
<xsl:with-param name="up" select="$upnode/@up"/>
</xsl:call-template>
</xsl:if>
<a href="xref:{$upnode/@id}">
<xsl:value-of select="$upnode/@name"/>
</a>
<xsl:text> ยป </xsl:text>
</xsl:template>
<xsl:template match="/">
<xsl:for-each select="/Info/Section">
<xsl:call-template name="html.output"/>
</xsl:for-each>
</xsl:template>
<xsl:template mode="html.output.after.mode" match="Section">
<xsl:for-each select="Section">
<xsl:call-template name="html.output"/>
</xsl:for-each>
</xsl:template>
<xsl:template mode="html.title.mode" match="Section">
<xsl:value-of select="@name"/>
</xsl:template>
<xsl:template mode="html.css.mode" match="Section">
<xsl:param name="direction"/>
<xsl:param name="left"/>
<xsl:param name="right"/>
<xsl:text>
div.body { font-family: monospace; }
span.fixed { white-space: pre; }
<!-- navbar from mal2html, possibly move to html.xsl -->
div.navbar {
margin: 0 0 1em 0;
text-align: right;
font-family: sans-serif;
}
a.navbar-prev::before {
content: '</xsl:text><xsl:choose>
<xsl:when test="$left = 'left'"><xsl:text>◀  </xsl:text></xsl:when>
<xsl:otherwise><xsl:text>▶  </xsl:text></xsl:otherwise>
</xsl:choose><xsl:text>';
color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
}
a.navbar-next::after {
content: '</xsl:text><xsl:choose>
<xsl:when test="$left = 'left'"><xsl:text>  ▶</xsl:text></xsl:when>
<xsl:otherwise><xsl:text>  ◀</xsl:text></xsl:otherwise>
</xsl:choose><xsl:text>';
color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
}
</xsl:text>
</xsl:template>
<xsl:template mode="html.header.mode" match="Section">
<xsl:if test="@up">
<div class="trails">
<div class="trail">
<xsl:call-template name="linktrails"/>
</div>
</div>
</xsl:if>
</xsl:template>
<xsl:template mode="html.body.mode" match="Section">
<div class="navbar">
<xsl:variable name="preceding" select="(parent::Section[1] | preceding::Section[1])[last()]"/>
<xsl:variable name="following" select="(Section[1] | following::Section[1])[1]"/>
<xsl:if test="$preceding">
<a class="navbar-prev" href="xref:{$preceding/@id}">
<xsl:value-of select="$preceding/@name"/>
</a>
</xsl:if>
<xsl:if test="$preceding and $following">
<xsl:text>  |  </xsl:text>
</xsl:if>
<xsl:if test="$following">
<a class="navbar-next" href="xref:{$following/@id}">
<xsl:value-of select="$following/@name"/>
</a>
</xsl:if>
</div>
<xsl:apply-templates select="node()[not(self::Section)]"/>
</xsl:template>
<!-- = Normal Matches = -->
<xsl:template match="para">
<p>
<span class="fixed">
<!-- Apply templates for <a> tags and copy text straight through. -->
<xsl:apply-templates select="./text()|*"/>
</span>
</p>
</xsl:template>
<xsl:template match="para1">
<span class="fixed">
<xsl:value-of select="node()"/>
</span>
</xsl:template>
<xsl:template match="header">
<xsl:choose>
<xsl:when test='@level = 1'>
<h1><xsl:value-of select="node()"/></h1>
</xsl:when>
<xsl:when test='@level = 2'>
<h2><xsl:value-of select="node()"/></h2>
</xsl:when>
<xsl:when test='@level = 3'>
<h3><xsl:value-of select="node()"/></h3>
</xsl:when>
<xsl:otherwise>
<h1>(Unknown heading level) <xsl:value-of select="node()"/></h1>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="spacing">
<xsl:value-of select="node()"/>
</xsl:template>
<xsl:template match="a">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="@href"/>
</xsl:attribute>
<xsl:value-of select="node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="img">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="@src"/>
</xsl:attribute>
<xsl:element name="img">
<xsl:attribute name="src"> <xsl:value-of select="@src"/></xsl:attribute>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="menu">
<xsl:element name="p">Menu:</xsl:element>
<xsl:element name="ul">
<xsl:apply-templates />
</xsl:element>
</xsl:template>
<xsl:template match="menuholder">
<xsl:element name="li">
<xsl:apply-templates />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
|