diff options
author | defanor <defanor@uberspace.net> | 2017-12-15 00:05:18 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-12-15 00:05:18 +0300 |
commit | 157e520082510e78808051d3bc2b46ae5a5bb1cc (patch) | |
tree | 6be4c0f9ced74691c342969515bd9f9defac8c93 /.config/pancake/unclutter/hackage-haddock.xsl | |
parent | 0c430f7d5287db519aaca8d0fd4771c3047a8856 (diff) |
Add XSLTs for Hoogle and Hackage
Diffstat (limited to '.config/pancake/unclutter/hackage-haddock.xsl')
-rw-r--r-- | .config/pancake/unclutter/hackage-haddock.xsl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.config/pancake/unclutter/hackage-haddock.xsl b/.config/pancake/unclutter/hackage-haddock.xsl new file mode 100644 index 0000000..e10b66c --- /dev/null +++ b/.config/pancake/unclutter/hackage-haddock.xsl @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="html" indent="yes"/> + <xsl:template match="/"> + <html> + <body> + <!-- Mostly copying, just inserting horizontal rules before + function descriptions. --> + <xsl:copy-of select="//div[@id='package-header']" /> + <xsl:copy-of select="//div[@id='module-header']" /> + <xsl:copy-of select="//div[@id='description']" /> + <xsl:copy-of select="//div[@id='table-of-contents']" /> + <xsl:copy-of select="//div[@id='synopsis']" /> + <div id="interface"> + <xsl:for-each select="//div[@id='interface']/node()"> + <xsl:if test="@class = 'top'"> + <hr /> + </xsl:if> + <xsl:copy-of select="." /> + </xsl:for-each> + </div> + </body> + </html> + </xsl:template> +</xsl:stylesheet> |