1<?xml version='1.0'?> 2<xsl:stylesheet 3 xmlns="http://www.w3.org/1999/xhtml" 4 xmlns:xlink="http://www.w3.org/1999/xlink" 5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 6 version="1.0"> 7 8 <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/xhtml5/onechunk.xsl"/> 9 10 <!-- These two options generate a file named ID.xhtml, where ID is the value 11 of the document xml:id attribute, when processed with the chunking 12 spreadsheet onechunk.xsl. See 13 http://www.sagehill.net/docbookxsl/OneChunk.html --> 14 <xsl:param name="use.id.as.filename">1</xsl:param> 15 <xsl:param name="root.filename"></xsl:param> 16 17 <!-- html.stylesheet adds the specified stylesheet to the page headers. 18 docbook.css.link removes the default docbook.css. 19 --> 20 <xsl:param name="html.stylesheet">khronos-man.css</xsl:param> 21 <xsl:param name="docbook.css.link">0</xsl:param> 22 <xsl:param name="docbook.css.source"></xsl:param> 23 24 <!-- Indent HTML, which requires using onechunk.xsl instead of docbook.xsl --> 25 <xsl:param name="chunker.output.indent">yes</xsl:param> 26 27 <!-- Style parameters --> 28 <xsl:param name="funcsynopsis.style">ansi</xsl:param> 29 <xsl:param name="citerefentry.link" select="'1'"></xsl:param> 30 31 <!-- Generate links in href= attributes for <citerefentry>. Note 32 that in the XSL-NS stylesheets, using the Docbook namespace 33 prefix on the select expressions is *required*. Declaring 34 xmlns:db at xsl:stylesheet scope causes other problems. 35 36 If there is a value specified for the href attribute in 37 citerefentry, then create the link from that attribute instead 38 of the refentrytitle. 39 --> 40 <!-- The @href syntax isn't used by EGL at present --> 41 <xsl:template xmlns:db="http://docbook.org/ns/docbook" 42 name="generate.citerefentry.link"> 43 <xsl:choose> 44 <xsl:when test="@href"> 45 <xsl:value-of select="@href"/> 46 <xsl:text>.xhtml</xsl:text> 47 </xsl:when> 48 <xsl:otherwise> 49 <xsl:value-of select="db:refentrytitle"/> 50 <xsl:text>.xhtml</xsl:text> 51 </xsl:otherwise> 52 </xsl:choose> 53 </xsl:template> 54 55 <!-- Reasonable defaults for tables --> 56 <xsl:param name="default.table.frame">all</xsl:param> 57 <xsl:param name="table.borders.with.css" select="1"></xsl:param> 58 <xsl:param name="table.cell.border.thickness">2px</xsl:param> 59 <xsl:param name="table.frame.border.thickness">2px</xsl:param> 60 61 <!-- Add MathJax <script> tags to document <head> --> 62 <!-- Now that the xmlns:db is declared above, it gets emitted on the 63 <script> elements for unknown reasons 64 --> 65 <!-- Per http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn 66 use their secure URI, instead of the HTTP URI 67 src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> 68 --> 69 <!-- This isn't used by EGL at present --> 70<!-- 71 <xsl:template name="user.head.content"> 72 <script type="text/x-mathjax-config"> 73 MathJax.Hub.Config({ 74 MathML: { 75 extensions: ["content-mathml.js"] 76 }, 77 tex2jax: { 78 inlineMath: [['$','$'], ['\\(','\\)']] 79 } 80 }); 81 </script> 82 <script type="text/javascript" 83 src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> 84 </script> 85 </xsl:template> 86--> 87 88 <!-- Add boilerplate to XHTML page title element describing which 89 set of man pages this is. This should really be an XSL 90 parameter which could be set on the command line --> 91 <xsl:template name="user.head.title"> 92 <xsl:param name="node" select="."/> 93 <xsl:param name="title"/> 94 <title> 95 <xsl:copy-of select="$title"/> 96 <xsl:text> - EGL Reference Pages</xsl:text> 97 </title> 98 </xsl:template> 99 100 <!-- Root template for processing the document --> 101 <xsl:template match="*" mode="process.root"> 102 <xsl:variable name="doc" select="self::*"/> 103 <xsl:call-template name="user.preroot"/> 104 <xsl:call-template name="root.messages"/> 105 <xsl:apply-templates select="."/> 106 </xsl:template> 107 108 <!-- The directives in egl-man.xsl used to be here --> 109 110 <!-- The template refsect3 is inserted here to deal with the 111 copyright. This adds in the text from the include file 112 copyright.inc.xsl --> 113 <!-- 114 <xsl:template match="refsect3"> 115 <div class="{name(.)}"> 116 <xsl:call-template name="language.attribute"/> 117 <xsl:call-template name="anchor"> 118 <xsl:with-param name="conditional" select="0"/> 119 </xsl:call-template> 120 <xsl:apply-templates/> 121 <xsl:value-of select="$copyright"/> 122 </div> 123 </xsl:template> 124 --> 125 126</xsl:stylesheet> 127