xref: /third_party/ninja/doc/docbook.xsl (revision 695b41ee)
1695b41eeSopenharmony_ci<!-- This custom XSL tweaks the DocBook XML -> HTML settings to produce
2695b41eeSopenharmony_ci     an OK-looking manual.  -->
3695b41eeSopenharmony_ci<!DOCTYPE xsl:stylesheet [
4695b41eeSopenharmony_ci<!ENTITY css SYSTEM "style.css">
5695b41eeSopenharmony_ci]>
6695b41eeSopenharmony_ci<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7695b41eeSopenharmony_ci		version='1.0'>
8695b41eeSopenharmony_ci  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
9695b41eeSopenharmony_ci
10695b41eeSopenharmony_ci  <!-- Embed our stylesheet as the user-provided <head> content. -->
11695b41eeSopenharmony_ci  <xsl:template name="user.head.content"><style>&css;</style></xsl:template>
12695b41eeSopenharmony_ci
13695b41eeSopenharmony_ci  <!-- Remove the body.attributes block, which specifies a bunch of
14695b41eeSopenharmony_ci       useless bgcolor etc. attrs on the <body> tag. -->
15695b41eeSopenharmony_ci  <xsl:template name="body.attributes"></xsl:template>
16695b41eeSopenharmony_ci
17695b41eeSopenharmony_ci  <!-- Specify that in "book" form (which we're using), we only want a
18695b41eeSopenharmony_ci       single table of contents at the beginning of the document. -->
19695b41eeSopenharmony_ci  <xsl:param name="generate.toc">book toc</xsl:param>
20695b41eeSopenharmony_ci
21695b41eeSopenharmony_ci  <!-- Don't put the "Chapter 1." prefix on the "chapters". -->
22695b41eeSopenharmony_ci  <xsl:param name="chapter.autolabel">0</xsl:param>
23695b41eeSopenharmony_ci
24695b41eeSopenharmony_ci  <!-- Make builds reproducible by generating the same IDs from the same inputs -->
25695b41eeSopenharmony_ci  <xsl:param name="generate.consistent.ids">1</xsl:param>
26695b41eeSopenharmony_ci
27695b41eeSopenharmony_ci  <!-- Use <ul> for the table of contents.  By default DocBook uses a
28695b41eeSopenharmony_ci       <dl>, which makes no semantic sense.  I imagine they just did
29695b41eeSopenharmony_ci       it because it looks nice? -->
30695b41eeSopenharmony_ci  <xsl:param name="toc.list.type">ul</xsl:param>
31695b41eeSopenharmony_ci
32695b41eeSopenharmony_ci  <xsl:output method="html" encoding="utf-8" indent="no"
33695b41eeSopenharmony_ci              doctype-public=""/>
34695b41eeSopenharmony_ci</xsl:stylesheet>
35