| 1 |
<?xml version='1.0'?> |
| 2 |
|
| 3 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 4 |
version='1.0'> |
| 5 |
|
| 6 |
<xsl:param name="ignore.image.scaling">1</xsl:param> |
| 7 |
<xsl:param name="generate.consistent.ids" select="1"></xsl:param> |
| 8 |
|
| 9 |
<!-- Add support for <ulink type="block" … /> --> |
| 10 |
<xsl:template match="ulink"> |
| 11 |
<xsl:choose> |
| 12 |
<xsl:when test="@type='block'"> |
| 13 |
<div class="url"> |
| 14 |
<xsl:text>→ </xsl:text> |
| 15 |
<xsl:apply-imports /> |
| 16 |
</div> |
| 17 |
</xsl:when> |
| 18 |
<xsl:otherwise> |
| 19 |
<xsl:apply-imports /> |
| 20 |
</xsl:otherwise> |
| 21 |
</xsl:choose> |
| 22 |
</xsl:template> |
| 23 |
|
| 24 |
<!-- Add <link rel="canonical"> <meta name="flattr:id"> to the headers --> |
| 25 |
<xsl:template name="user.head.content"> |
| 26 |
<xsl:variable name="filename"> |
| 27 |
<xsl:apply-templates mode="chunk-filename" select="."/> |
| 28 |
</xsl:variable> |
| 29 |
<xsl:variable name="lang-scope" |
| 30 |
select="ancestor-or-self::* |
| 31 |
[@lang or @xml:lang][1]"/> |
| 32 |
<xsl:variable name="lang" select="string(($lang-scope/@lang | $lang-scope/@xml:lang)[1])"/> |
| 33 |
<meta name="flattr:id" content="4pz9jq"/> |
| 34 |
<link rel="canonical"> |
| 35 |
<xsl:attribute name="href"> |
| 36 |
<xsl:value-of select="'https://debian-handbook.info/browse/'"/> |
| 37 |
<xsl:choose> |
| 38 |
<xsl:when test="$lang = 'en-US'"> |
| 39 |
<xsl:value-of select="'stable/'"/> |
| 40 |
</xsl:when> |
| 41 |
<xsl:when test="$lang = 'en'"> |
| 42 |
<xsl:value-of select="'stable/'"/> |
| 43 |
</xsl:when> |
| 44 |
<xsl:when test="contains($lang, '-')"> |
| 45 |
<xsl:value-of select="concat($lang, '/stable/')" /> |
| 46 |
</xsl:when> |
| 47 |
<xsl:otherwise> |
| 48 |
<xsl:message terminate="yes"> |
| 49 |
The language code ({$lang}) is not fully qualified as we expect it. |
| 50 |
</xsl:message> |
| 51 |
</xsl:otherwise> |
| 52 |
</xsl:choose> |
| 53 |
<xsl:if test="$filename != 'index.html'"> |
| 54 |
<xsl:value-of select="$filename"/> |
| 55 |
</xsl:if> |
| 56 |
</xsl:attribute> |
| 57 |
</link> |
| 58 |
</xsl:template> |
| 59 |
|
| 60 |
<!-- Misc publican fixups --> |
| 61 |
|
| 62 |
<!-- Reinstate the docbook-xsl implementation of anchor --> |
| 63 |
<xsl:template name="anchor"> |
| 64 |
<xsl:param name="node" select="."/> |
| 65 |
<xsl:param name="conditional" select="1"/> |
| 66 |
<xsl:variable name="id"> |
| 67 |
<xsl:call-template name="object.id"> |
| 68 |
<xsl:with-param name="object" select="$node"/> |
| 69 |
</xsl:call-template> |
| 70 |
</xsl:variable> |
| 71 |
<xsl:if test="not($node[parent::blockquote])"> |
| 72 |
<xsl:if test="$conditional = 0 or $node/@id or $node/@xml:id"> |
| 73 |
<a id="{$id}"/> |
| 74 |
</xsl:if> |
| 75 |
</xsl:if> |
| 76 |
</xsl:template> |
| 77 |
|
| 78 |
<xsl:param name="local.l10n.xml" select="document('')"/> |
| 79 |
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> |
| 80 |
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./l10n-ja-JP.xml"/> |
| 81 |
</l:i18n> |
| 82 |
|
| 83 |
</xsl:stylesheet> |
| 84 |
|