Annotation of embedaddon/libxml2/doc/searches.xsl, revision 1.1
1.1 ! misho 1: <?xml version="1.0"?>
! 2: <!-- this stylesheet builds the API*.html , it works based on libxml2-refs.xml
! 3: -->
! 4: <xsl:stylesheet version="1.0"
! 5: xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
! 6: xmlns:exsl="http://exslt.org/common"
! 7: extension-element-prefixes="exsl"
! 8: exclude-result-prefixes="exsl">
! 9:
! 10: <!-- Import the rest of the site stylesheets -->
! 11: <xsl:import href="site.xsl"/>
! 12:
! 13: <!-- Generate XHTML-1.0 transitional -->
! 14: <xsl:output method="xml" encoding="UTF-8" indent="yes"
! 15: doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
! 16: doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
! 17:
! 18: <xsl:variable name="href_base" select="''"/>
! 19:
! 20: <xsl:template name="statistics">
! 21: <h2> weekly statistics: </h2>
! 22: <p><xsl:value-of select="@total"/> total words,
! 23: <xsl:value-of select="@uniq"/> uniq words.</p>
! 24: <p> Top <xsl:value-of select="@nr"/> queries:</p>
! 25: </xsl:template>
! 26:
! 27: <xsl:template match="query">
! 28: <br/><a href="search.php?query={string(.)}"><xsl:value-of
! 29: select="string(.)"/></a>
! 30: <xsl:text> </xsl:text><xsl:value-of select="@count"/> times.
! 31: </xsl:template>
! 32:
! 33: <xsl:template match="queries">
! 34: <xsl:variable name="date" select="@date"/>
! 35: <xsl:variable name="title">Search statistics for <xsl:value-of select="$date"/></xsl:variable>
! 36: <xsl:document href="searches.html" method="xml" encoding="UTF-8"
! 37: doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
! 38: doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
! 39: <html>
! 40: <head>
! 41: <xsl:call-template name="style"/>
! 42: <xsl:element name="title">
! 43: <xsl:value-of select="$title"/>
! 44: </xsl:element>
! 45: </head>
! 46: <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
! 47: <xsl:call-template name="titlebox">
! 48: <xsl:with-param name="title" select="$title"/>
! 49: </xsl:call-template>
! 50: <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
! 51: <tr>
! 52: <td bgcolor="#8b7765">
! 53: <table border="0" cellspacing="0" cellpadding="2" width="100%">
! 54: <tr>
! 55: <td valign="top" width="200" bgcolor="#8b7765">
! 56: <xsl:call-template name="toc"/>
! 57: </td>
! 58: <td valign="top" bgcolor="#8b7765">
! 59: <table border="0" cellspacing="0" cellpadding="1" width="100%">
! 60: <tr>
! 61: <td>
! 62: <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
! 63: <tr>
! 64: <td>
! 65: <table border="0" cellpadding="3" cellspacing="1" width="100%">
! 66: <tr>
! 67: <td bgcolor="#fffacd">
! 68: <xsl:call-template name="statistics"/>
! 69: <p>
! 70: <xsl:apply-templates select="query"/>
! 71: </p>
! 72: <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
! 73: </td>
! 74: </tr>
! 75: </table>
! 76: </td>
! 77: </tr>
! 78: </table>
! 79: </td>
! 80: </tr>
! 81: </table>
! 82: </td>
! 83: </tr>
! 84: </table>
! 85: </td>
! 86: </tr>
! 87: </table>
! 88: </body>
! 89: </html>
! 90: </xsl:document>
! 91: </xsl:template>
! 92:
! 93: <xsl:template match="/">
! 94: <xsl:apply-templates select="queries"/>
! 95: </xsl:template>
! 96:
! 97: </xsl:stylesheet>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>