Mercurial > hg > nginx-site
changeset 170:cd2698ea00ab
Added generated XSLTs.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 02 Nov 2011 19:31:11 +0000 |
parents | b7b160e4e046 |
children | 6eeaa9e1f3b5 |
files | xslt/article.xslt xslt/body.xslt xslt/books.xslt xslt/content.xslt xslt/directive.xslt xslt/dirname.xslt xslt/donate.xslt xslt/download.xslt xslt/error.xslt xslt/link.xslt xslt/menu.xslt xslt/news.xslt xslt/rss.xslt xslt/security.xslt xslt/style.xslt xslt/versions.xslt |
diffstat | 16 files changed, 1916 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/article.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:output indent="no" version="4.0" encoding="utf-8" method="html"/> + + <xsl:strip-space elements="*"/> + + <xsl:param select="'../xml'" name="XML"/> + + <xsl:param name="YEAR"/> + + <xsl:variable select="/article/@link | /module/@link" name="LINK"/> + + <xsl:variable select="/article/@lang | /module/@lang" name="LANG"/> + + <xsl:include href="dirname.xslt"/> + + <xsl:include href="link.xslt"/> + + <xsl:include href="style.xslt"/> + + <xsl:include href="body.xslt"/> + + <xsl:include href="menu.xslt"/> + + <xsl:include href="donate.xslt"/> + + <xsl:include href="directive.xslt"/> + + <xsl:include href="content.xslt"/> + + <xsl:include href="versions.xslt"/> + + <xsl:template match="/article | /module"> + + <html> + + <head> + + <title> + <xsl:value-of select="@name"/> + </title> + + <xsl:call-template name="style"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </head> + + <xsl:call-template name="body"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </html> + </xsl:template> + + <xsl:template match="/article[@lang='he'] | /module[@lang='he']"> + + <html dir="rtl"> + + <head> + + <title> + <xsl:value-of select="@name"/> + </title> + + <xsl:call-template name="style"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </head> + + <xsl:call-template name="body"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </html> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/body.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template name="body"> + <xsl:param name="lang"/> + + <xsl:variable name="MENU_ALIGN"> + <xsl:choose> + + <xsl:when test="$lang = 'he'"> + <xsl:text>left</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>right</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="INDEX_ALIGN"> + <xsl:choose> + + <xsl:when test="$lang = 'he'"> + <xsl:text>right</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>left</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <body> + + <table width="100%"> + + <tr> + + <td width="70%"> + <center> + <h3> + + <xsl:value-of select="@name"/> + <xsl:if test="$YEAR"> + <xsl:text>: </xsl:text> + <xsl:value-of select="$YEAR"/> + </xsl:if> + + </h3> + </center> + </td> + + <td rowspan="2" align="{$MENU_ALIGN}" valign="top"> + + <a href="http://nginx.org"> + + <img src="/nginx.gif" alt="nginx" border="0"/> + + </a> + <br/> + + <br/> + + <br/> + + <xsl:apply-templates select="document(concat($XML, '/menu.xml')) /menus/menu[@lang = $lang]/item"/> + + </td> + + </tr> + + <tr> + <td valign="top"> + + <xsl:if test="section[@name]"> + + <table width="100%"> + <tr> + <td align="{$INDEX_ALIGN}"> + + <xsl:for-each select="section[@id and @name]"> + + <a href="#{@id}"> + <xsl:value-of select="@name"/> + </a> + <br/> + + <xsl:if test="@id = 'directives'"> + + <xsl:for-each select="directive[@name]"> + + <xsl:text> </xsl:text> + + <a href="#{@name}"> + <xsl:value-of select="@name"/> + </a> + <br/> + </xsl:for-each> + </xsl:if> + </xsl:for-each> + + </td> + </tr> + </table> + </xsl:if> + + <xsl:apply-templates/> + + <xsl:if test="@author"> + + <table width="100%"> + <tr> + <td align="right"> + + <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='author']"/> + + <xsl:text> </xsl:text> + <xsl:value-of select="@author"/> + <br/> + + <xsl:if test="@editor"> + + <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='editor']"/> + + <xsl:text> </xsl:text> + <xsl:value-of select="@editor"/> + <br/> + </xsl:if> + + <xsl:if test="@translator"> + + <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='translator']"/> + + <xsl:text> </xsl:text> + <xsl:value-of select="@translator"/> + <br/> + </xsl:if> + + </td> + </tr> + </table> + </xsl:if> + + </td> + </tr> + + </table> + + </body> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/books.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:output indent="no" version="4.0" encoding="utf-8" method="html"/> + + <xsl:strip-space elements="*"/> + + <xsl:param select="'../xml'" name="XML"/> + + <xsl:param name="YEAR"/> + + <xsl:variable select="/article/@link" name="LINK"/> + + <xsl:include href="dirname.xslt"/> + + <xsl:include href="link.xslt"/> + + <xsl:include href="style.xslt"/> + + <xsl:include href="body.xslt"/> + + <xsl:include href="menu.xslt"/> + + <xsl:include href="content.xslt"/> + + <xsl:template match="/article"> + + <html> + <head> + + <title> + <xsl:value-of select="@name"/> + </title> + + <xsl:call-template name="style"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </head> + + <xsl:call-template name="body"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </html> + </xsl:template> + + <xsl:template match="book"> + + <table> + <tr> + + <td bgcolor="#EEEEEE"> + + <a href="{@link}"> + + <img src="{@cover}" alt="" style="padding: 2pt;" border="0"/> + + </a> + + </td> + + <td> + + <xsl:text>title: </xsl:text> + <a href="{@link}"> + <xsl:value-of select="@title"/> + </a> + <br/> + + <xsl:text>author: </xsl:text> + <xsl:choose> + + <xsl:when test="@site"> + <a href="{@site}"> + <xsl:value-of select="@author"/> + </a> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@author"/> + </xsl:otherwise> + </xsl:choose> + <br/> + + <xsl:if test="@translator"> + <xsl:text>translator: </xsl:text> + <xsl:value-of select="@translator"/> + <br/> + </xsl:if> + + <xsl:if test="@publisher"> + <xsl:text>publisher: </xsl:text> + <xsl:value-of select="@publisher"/> + <br/> + </xsl:if> + + <xsl:text>language: </xsl:text> + <xsl:value-of select="@lang"/> + + </td> + + </tr> + </table> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/content.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,429 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="section[@id and @name]"> + + <a name="{@id}"/> + <center> + <h4> + <xsl:value-of select="@name"/> + </h4> + </center> + + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="section[@id and not(@name)]"> + + <a name="{@id}"/> + + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="section[not(@id) and @name]"> + + <center> + <h4> + <xsl:value-of select="@name"/> + </h4> + </center> + + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="para"> + <p> + <xsl:apply-templates/> + </p> + </xsl:template> + + <xsl:template match="para[@align]"> + <p align="{@align}"> + <xsl:apply-templates/> + </p> + </xsl:template> + + <xsl:template match="initial"> + <span class="initial"> + <b> + <xsl:apply-templates/> + </b> + </span> + </xsl:template> + + <xsl:template match="programlisting"> + <blockquote> + <pre> + <xsl:apply-templates/> + </pre> + </blockquote> + </xsl:template> + + <xsl:template match="para/programlisting"> + + <xsl:text disable-output-escaping="yes"></p> </xsl:text> + + <blockquote> + <pre> + <xsl:apply-templates/> + </pre> + </blockquote> + + <xsl:text disable-output-escaping="yes"><p> </xsl:text> + </xsl:template> + + <xsl:template match="note"> + <blockquote class="note"> + <xsl:apply-templates/> + </blockquote> + </xsl:template> + + <xsl:template match="para/note"> + + <xsl:text disable-output-escaping="yes"></p> </xsl:text> + + <blockquote class="note"> + <xsl:apply-templates/> + </blockquote> + + <xsl:text disable-output-escaping="yes"><p> </xsl:text> + </xsl:template> + + <xsl:template match="list[@type='bullet']"> + <ul> + <xsl:apply-templates/> + </ul> + </xsl:template> + + <xsl:template match="para/list[@type='bullet']"> + + <xsl:text disable-output-escaping="yes"></p> </xsl:text> + + <ul> + <xsl:apply-templates/> + </ul> + + <xsl:text disable-output-escaping="yes"><p> </xsl:text> + </xsl:template> + + <xsl:template match="list[@type='enum']"> + <ol> + <xsl:apply-templates/> + </ol> + </xsl:template> + + <xsl:template match="para/list[@type='enum']"> + + <xsl:text disable-output-escaping="yes"></p> </xsl:text> + + <ol> + <xsl:apply-templates/> + </ol> + + <xsl:text disable-output-escaping="yes"><p> </xsl:text> + </xsl:template> + + <xsl:template match="listitem"> + <li> + <xsl:apply-templates/> + </li> + </xsl:template> + + <xsl:template match="list[@type='tag']"> + <dl compact=""> + <xsl:apply-templates/> + </dl> + </xsl:template> + + <xsl:template match="para/list[@type='tag']"> + + <xsl:text disable-output-escaping="yes"></p> </xsl:text> + + <dl compact=""> + <xsl:apply-templates/> + </dl> + + <xsl:text disable-output-escaping="yes"><p> </xsl:text> + </xsl:template> + + <xsl:template match="tag-name"> + <dt> + <xsl:apply-templates/> + </dt> + </xsl:template> + + <xsl:template match="tag-desc"> + <dd> + <xsl:apply-templates/> + </dd> + </xsl:template> + + <xsl:template match="list[not(@type)]"> + <ul> + <xsl:apply-templates/> + </ul> + </xsl:template> + + <xsl:template match="para/list[not(@type)]"> + + <xsl:text disable-output-escaping="yes"></p> </xsl:text> + + <ul> + <xsl:apply-templates/> + </ul> + + <xsl:text disable-output-escaping="yes"><p> </xsl:text> + </xsl:template> + + <xsl:template match="item"> + <li> + <xsl:apply-templates/> + </li> + </xsl:template> + + <xsl:template match="orderedlist"> + <ol> + <xsl:apply-templates/> + </ol> + </xsl:template> + + <xsl:template match="para/orderedlist"> + + <xsl:text disable-output-escaping="yes"></p> </xsl:text> + + <ol> + <xsl:apply-templates/> + </ol> + + <xsl:text disable-output-escaping="yes"><p> </xsl:text> + </xsl:template> + + <xsl:template match="item"> + <li> + <xsl:apply-templates/> + </li> + </xsl:template> + + <xsl:template match="table[@note and @width]"> + + <blockquote> + <table width="{@width}"> + <xsl:apply-templates/> + </table> + </blockquote> + </xsl:template> + + <xsl:template match="table[@note and not(@width)]"> + + <blockquote> + <table width="100%"> + <xsl:apply-templates/> + </table> + </blockquote> + </xsl:template> + + <xsl:template match="table[not(@note) and @width]"> + + <table width="{@width}"> + <xsl:apply-templates/> + </table> + </xsl:template> + + <xsl:template match="table"> + <table width="100%"> + <xsl:apply-templates/> + </table> + </xsl:template> + + <xsl:template match="tr"> + <tr> + <xsl:apply-templates/> + </tr> + </xsl:template> + + <xsl:template match="td[@width]"> + <td width="{@width}"> + <xsl:apply-templates/> + </td> + </xsl:template> + + <xsl:template match="td"> + <td> + <xsl:apply-templates/> + </td> + </xsl:template> + + <xsl:template match="c-def"> + <code> + <xsl:apply-templates/> + </code> + </xsl:template> + + <xsl:template match="c-func"> + <code> + <xsl:apply-templates/> + <xsl:text>()</xsl:text> + </code> + </xsl:template> + + <xsl:template match="command"> + <code> + <xsl:apply-templates/> + </code> + </xsl:template> + + <xsl:template match="emphasis"> + <strong> + <xsl:apply-templates/> + </strong> + </xsl:template> + + <xsl:template match="example"> + <blockquote> + <pre> + <xsl:apply-templates/> + </pre> + </blockquote> + </xsl:template> + + <xsl:template match="para/example"> + + <xsl:text disable-output-escaping="yes"></p> </xsl:text> + + <blockquote> + <pre> + <xsl:apply-templates/> + </pre> + </blockquote> + + <xsl:text disable-output-escaping="yes"><p> </xsl:text> + </xsl:template> + + <xsl:template match="argument"> + <code> + <i> + <xsl:apply-templates/> + </i> + </code> + </xsl:template> + + <xsl:template match="parameter"> + <code> + <xsl:apply-templates/> + </code> + </xsl:template> + + <xsl:template match="header"> + + <xsl:text>“</xsl:text> + <xsl:apply-templates/> + <xsl:text>”</xsl:text> + </xsl:template> + + <xsl:template match="http-status"> + + <xsl:value-of select="@code"/> + <xsl:text> (</xsl:text> + <xsl:value-of select="@text"/> + <xsl:text>)</xsl:text> + </xsl:template> + + <xsl:template match="dirname[/*[@lang='he']]"> + + <nobr> + <span class="ltr"> + + <xsl:text>“</xsl:text> + <xsl:apply-templates/> + <xsl:text>”</xsl:text> + + </span> + </nobr> + </xsl:template> + + <xsl:template match="dirname"> + + <nobr> + <xsl:text>“</xsl:text> + <xsl:apply-templates/> + <xsl:text>”</xsl:text> + </nobr> + </xsl:template> + + <xsl:template match="url[/*[@lang='he']]"> + + <i> + <span class="ltr"> + <xsl:apply-templates/> + </span> + </i> + </xsl:template> + + <xsl:template match="url"> + <i> + <xsl:apply-templates/> + </i> + </xsl:template> + + <xsl:template match="value"> + <code> + <xsl:apply-templates/> + </code> + </xsl:template> + + <xsl:template match="registered"> + <xsl:apply-templates/> + <sup> + <xsl:text>®</xsl:text> + </sup> + </xsl:template> + + <xsl:template match="var"> + <code> + <xsl:apply-templates/> + </code> + </xsl:template> + + <xsl:template match="path"> + <code> + <xsl:apply-templates/> + </code> + </xsl:template> + + <xsl:template match="code"> + <code> + <xsl:apply-templates/> + </code> + </xsl:template> + + <xsl:template match="i"> + <i> + <xsl:apply-templates/> + </i> + </xsl:template> + + <xsl:template match="b"> + <b> + <xsl:apply-templates/> + </b> + </xsl:template> + + <xsl:template match="nobr"> + <nobr> + <xsl:apply-templates/> + </nobr> + </xsl:template> + + <xsl:template match="mdash"> + <xsl:text> — </xsl:text> + </xsl:template> + + <xsl:template match="space"> + <xsl:text> </xsl:text> + </xsl:template> + + <xsl:template match="br"> + <br/> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/directive.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="directive"> + + <a name="{@name}"/> + <!-- <center><h4><xsl:value-of select="@name"/> </h4></center> --> + + <div class="directive"> + + <table cellspacing="0"> + + <xsl:apply-templates select="syntax"/> + + <xsl:apply-templates select="default"/> + + <xsl:apply-templates select="context"/> + + </table> + + <xsl:if test="(@appeared-in)"> + + <p>This directive appeared in version + <xsl:value-of select="@appeared-in"/>. + </p> + </xsl:if> + + </div> + + <xsl:apply-templates select="para"/> + </xsl:template> + + <xsl:template match="syntax"> + + <xsl:if test="position() = 1"> + + <xsl:text disable-output-escaping="yes"> + <tr> + <td> + </xsl:text> + + <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='syntax']"/> + + <xsl:text>:</xsl:text> + + <xsl:text disable-output-escaping="yes"> + </td> + <td> + </xsl:text> + </xsl:if> + + <code> + + <strong> + + <xsl:value-of select="../@name"/> + + </strong> + + <xsl:if test="count(node()) != 0"> + + <xsl:text> </xsl:text> + <xsl:apply-templates/> + </xsl:if> + <xsl:choose> + + <xsl:when test="@block = 'yes'"> + + <xsl:text> { ... }</xsl:text> + </xsl:when> + + <xsl:otherwise> + + <xsl:text>;</xsl:text> + </xsl:otherwise> + </xsl:choose> + + </code> + + <br/> + + <xsl:if test="position() = last()"> + + <xsl:text disable-output-escaping="yes"> + </td> + </tr> + </xsl:text> + </xsl:if> + </xsl:template> + + <xsl:template match="default"> + + <xsl:if test="position() = 1"> + + <xsl:text disable-output-escaping="yes"> + <tr> + <td> + </xsl:text> + + <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='default']"/> + + <xsl:text>:</xsl:text> + + <xsl:text disable-output-escaping="yes"> + </td> + <td> + </xsl:text> + </xsl:if> + <xsl:choose> + + <xsl:when test="count(node()) = 0"> + —</xsl:when> + + <xsl:otherwise> + + <pre> + + <xsl:value-of select="../@name"/> + <xsl:choose> + + <xsl:when test="count(../syntax[@block='yes'])"> + + <xsl:text> {</xsl:text> + <xsl:apply-templates/> + <xsl:text>}</xsl:text> + </xsl:when> + + <xsl:otherwise> + + <xsl:text> </xsl:text> + <xsl:apply-templates/> + <xsl:text>;</xsl:text> + </xsl:otherwise> + </xsl:choose> + + </pre> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="position() = last()"> + + <xsl:text disable-output-escaping="yes"> + </td> + </tr> + </xsl:text> + </xsl:if> + </xsl:template> + + <xsl:template match="context"> + + <xsl:if test="position() = 1"> + + <xsl:text disable-output-escaping="yes"> + <tr> + <td> + </xsl:text> + + <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='context']"/> + + <xsl:text>:</xsl:text> + + <xsl:text disable-output-escaping="yes"> + </td> + <td> + </xsl:text> + </xsl:if> + + <code> + <xsl:choose> + + <xsl:when test="count(node()) = 0"> + + <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='context.any']"/> + </xsl:when> + + <xsl:otherwise> + + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + + </code> + <xsl:choose> + + <xsl:when test="position() != last()"> + + <xsl:text>, </xsl:text> + </xsl:when> + + <xsl:otherwise> + + <br/> + + <xsl:text disable-output-escaping="yes"> + </td> + </tr> + </xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/dirname.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:variable name="DIRNAME"> + <xsl:call-template name="dirname"> + <xsl:with-param select="$LINK" name="path"/> + </xsl:call-template> + </xsl:variable> + + <xsl:template name="dirname"> + <xsl:param name="path"/> + + <xsl:if test="contains($path, '/')"> + + <xsl:value-of select=" substring-before($path, '/')"/> + + <xsl:text>/</xsl:text> + + <xsl:call-template name="dirname"> + <xsl:with-param select="substring-after($path, '/')" name="path"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + <xsl:variable name="ROOT"> + <xsl:call-template name="root"> + <xsl:with-param name="path"> + <xsl:value-of select=" substring($DIRNAME, 2)"/> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <xsl:template name="root"> + <xsl:param name="path"/> + + <xsl:if test="contains($path, '/')"> + + <xsl:text>..</xsl:text> + + <xsl:if test="substring-after($path, '/')"> + + <xsl:text>/</xsl:text> + + <xsl:call-template name="root"> + <xsl:with-param select="substring-after($path, '/')" name="path"/> + </xsl:call-template> + </xsl:if> + </xsl:if> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/donate.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -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:template match="paypal"> + + <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> + + <input name="cmd" value="_donations" type="hidden"/> + + <input name="business" value="paypal@nginx.net" type="hidden"/> + + <input name="lc" value="US" type="hidden"/> + + <input name="currency_code" value="USD" type="hidden"/> + + <input name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest" type="hidden"/> + + <input name="submit" src="x-click-but04.gif" type="image" border="0" alt="PayPal - The safer, easier way to pay online!"/> + + <img src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" boroder="0" alt=""/> + + </form> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/download.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,158 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:output indent="no" version="4.0" encoding="utf-8" method="html"/> + + <xsl:strip-space elements="*"/> + + <xsl:param select="'../xml'" name="XML"/> + + <xsl:param name="YEAR"/> + + <xsl:variable select="/article/@link" name="LINK"/> + + <xsl:include href="dirname.xslt"/> + + <xsl:include href="link.xslt"/> + + <xsl:include href="style.xslt"/> + + <xsl:include href="body.xslt"/> + + <xsl:include href="menu.xslt"/> + + <xsl:include href="content.xslt"/> + + <xsl:template match="/article"> + + <html> + <head> + + <title> + <xsl:value-of select="@name"/> + </title> + + <xsl:call-template name="style"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </head> + + <xsl:call-template name="body"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </html> + </xsl:template> + + <xsl:template match="download"> + <table width="100%"> + <xsl:apply-templates select="item"/> + </table> + </xsl:template> + + <xsl:template match="download/item[position() <= ../@last]"> + + <tr> + + <td width="20%"> + + <xsl:if test="position() = 1"> + + <a> + + <xsl:attribute name="href"> + <xsl:text>/</xsl:text> + <xsl:value-of select="/article/@lang"/> + <xsl:text>/</xsl:text> + <xsl:value-of select="../@changes"/> + </xsl:attribute> + + <xsl:value-of select="../@changes"/> + + </a> + </xsl:if> + + </td> + + <td width="20%"> + + <a> + + <xsl:attribute name="href"> + + <xsl:text>/download/nginx-</xsl:text> + <xsl:value-of select="@ver"/> + <xsl:text>.tar.gz</xsl:text> + </xsl:attribute> + + <xsl:text>nginx-</xsl:text> + <xsl:value-of select="@ver"/> + + </a> + + <xsl:if test="@pgp = 'yes'"> + + <xsl:text> </xsl:text> + + <a> + + <xsl:attribute name="href"> + + <xsl:text>/download/nginx-</xsl:text> + <xsl:value-of select="@ver"/> + <xsl:text>.tar.gz.asc</xsl:text> + </xsl:attribute> + + <xsl:text>pgp</xsl:text> + + </a> + </xsl:if> + + </td> + + <td> + + <xsl:if test="@win= 'yes'"> + + <a> + + <xsl:attribute name="href"> + + <xsl:text>/download/nginx-</xsl:text> + <xsl:value-of select="@ver"/> + <xsl:text>.zip</xsl:text> + </xsl:attribute> + + <xsl:text>nginx/Windows-</xsl:text> + <xsl:value-of select="@ver"/> + + </a> + + <xsl:if test="@pgp = 'yes'"> + + <xsl:text> </xsl:text> + + <a> + + <xsl:attribute name="href"> + + <xsl:text>/download/nginx-</xsl:text> + <xsl:value-of select="@ver"/> + <xsl:text>.zip.asc</xsl:text> + </xsl:attribute> + + <xsl:text>pgp</xsl:text> + + </a> + </xsl:if> + </xsl:if> + + </td> + + </tr> + </xsl:template> + + <xsl:template match="download/item[position() > ../@last]"/> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/error.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:output indent="no" version="4.0" encoding="utf-8" method="html"/> + + <xsl:strip-space elements="*"/> + + <xsl:param select="'../xml'" name="XML"/> + + <xsl:template match="/error"> + + <html> + <head> + <title> + <xsl:value-of select="@name"/> + </title> + + <style type="text/css"> + <xsl:value-of select=" normalize-space(' body { font-family: Georgia, serif; } ')"/> + + </style> + + </head> + + <body> + + <table width="100%"> + + <tr> + + <td width="70%"> + <center> + <h1> + <xsl:value-of select="@name"/> + </h1> + </center> + </td> + + <td rowspan="2" align="right" valign="top"> + + <img src="/nginx.gif" alt="nginx"/> + <br/> + + <br/> + + <br/> + + <xsl:apply-templates select="document(concat($XML, '/menu.xml')) /menus/menu[@lang = current()/@lang]/item"/> + + </td> + + </tr> + + </table> + + </body> + + </html> + </xsl:template> + + <xsl:template match="menu/item"> + + <a href="{@href}"> + <xsl:value-of select=" normalize-space(text())"/> + </a> + <br/> + </xsl:template> + + <xsl:template match="menu/item[not(@href)]"> + + <xsl:value-of select=" normalize-space(text())"/> + <br/> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/link.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="a[starts-with(@href, '/') and string() = '' and contains(@href, '.xml')]"> + + <a> + + <xsl:attribute name="href"> + <xsl:choose> + + <xsl:when test="starts-with(@href, $DIRNAME)"> + + <xsl:value-of select=" substring-after(document(concat($XML, @href))/article/@link |document(concat($XML, @href))/module/@link, $DIRNAME)"/> + </xsl:when> + + <xsl:otherwise> + + <xsl:value-of select=" concat($ROOT, document(concat($XML, @href))/article/@link |document(concat($XML, @href))/module/@link)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:value-of select=" document(concat($XML, @href))/article/@name |document(concat($XML, @href))/module/@name"/> + + </a> + </xsl:template> + + <xsl:template match="a[starts-with(@href, '/') and string() and contains(@href, '.xml')]"> + + <a> + + <xsl:attribute name="href"> + <xsl:choose> + + <xsl:when test="starts-with(@href, $DIRNAME)"> + + <xsl:value-of select=" substring-after(document(concat($XML, @href))/article/@link |document(concat($XML, @href))/module/@link, $DIRNAME)"/> + </xsl:when> + + <xsl:otherwise> + + <xsl:value-of select=" concat($ROOT, document(concat($XML, @href))/article/@link |document(concat($XML, @href))/module/@link)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:apply-templates/> + + </a> + </xsl:template> + + <xsl:template match="a"> + <a href="{@href}"> + <xsl:apply-templates/> + </a> + </xsl:template> + + <xsl:template match="img"> + <img src="{@href}"> + <xsl:apply-templates/> + </img> + </xsl:template> + + <xsl:template match="link[@url]"> + <a href="{@url}"> + <xsl:apply-templates/> + </a> + </xsl:template> + + <xsl:template match="link[@id and not(@doc)]"> + + <a href="#{@id}"> + <xsl:choose> + + <xsl:when test="count(node()) != 0"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@id"/> + </xsl:otherwise> + </xsl:choose> + + </a> + </xsl:template> + + <xsl:template match="link[@doc and not(@id)]"> + + <a href="{substring-before(@doc, '.xml')}.html"> + <xsl:apply-templates/> + </a> + </xsl:template> + + <xsl:template match="link[@id and @doc]"> + + <a href="{substring-before(@doc, '.xml')}.html#{@id}"> + <xsl:choose> + + <xsl:when test="count(node()) != 0"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@id"/> + </xsl:otherwise> + </xsl:choose> + + </a> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/menu.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="menu/item"> + <xsl:choose> + + <xsl:when test="@href = $LINK"> + <xsl:choose> + + <xsl:when test="$YEAR and @href='/'"> + + <a href="./"> news </a> + <br/> + </xsl:when> + + <xsl:otherwise> + + <xsl:value-of select=" normalize-space(text())"/> + <br/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:otherwise> + + <a> + + <xsl:attribute name="href"> + <xsl:choose> + + <xsl:when test="starts-with(@href, $DIRNAME)"> + <xsl:choose> + + <xsl:when test="substring-after(@href, $DIRNAME) = ''"> + ./</xsl:when> + + <xsl:otherwise> + + <xsl:value-of select=" substring-after(@href, $DIRNAME)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:otherwise> + + <xsl:value-of select=" concat($ROOT, @href)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:value-of select=" normalize-space(text())"/> + + </a> + + <xsl:if test="@lang"> + <xsl:text> [</xsl:text> + <xsl:value-of select="@lang"/> + <xsl:text>]</xsl:text> + </xsl:if> + + <br/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="menu/item[@year]"> + + <xsl:if test="$YEAR or $LINK='/'"> + <xsl:choose> + + <xsl:when test="$YEAR=@year"> + + <xsl:value-of select="@year"/> + <br/> + </xsl:when> + + <xsl:otherwise> + + <a href="{@href}"> + <xsl:value-of select="@year"/> + </a> + + <br/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:template> + + <xsl:template match="menu/item[starts-with(@href, 'http://')]"> + + <a href="{@href}"> + <xsl:value-of select=" normalize-space(text())"/> + </a> + + <xsl:if test="@lang"> + <xsl:text> [</xsl:text> + <xsl:value-of select="@lang"/> + <xsl:text>]</xsl:text> + </xsl:if> + + <br/> + </xsl:template> + + <xsl:template match="menu/item[not(@href)]"> + + <xsl:value-of select=" normalize-space(text())"/> + <br/> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/news.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:output indent="no" version="4.0" encoding="utf-8" method="html"/> + + <xsl:strip-space elements="*"/> + + <xsl:param select="'../xml'" name="XML"/> + + <xsl:param name="YEAR"/> + + <xsl:variable select="'http://nginx.org'" name="SITE"/> + + <xsl:variable select="/news/@link" name="LINK"/> + + <xsl:include href="dirname.xslt"/> + + <xsl:include href="link.xslt"/> + + <xsl:include href="style.xslt"/> + + <xsl:include href="body.xslt"/> + + <xsl:include href="menu.xslt"/> + + <xsl:include href="content.xslt"/> + + <xsl:template match="/news"> + + <html> + <head> + + <link rel="alternate" type="application/rss+xml" title="{@name}" href="{$SITE}/index.rss"/> + + <title> + <xsl:value-of select="@name"/> + <xsl:if test="$YEAR"> + <xsl:text>: </xsl:text> + <xsl:value-of select="$YEAR"/> + </xsl:if> + </title> + + <xsl:call-template name="style"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </head> + + <xsl:call-template name="body"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </html> + </xsl:template> + + <xsl:template match="event"> + + <xsl:variable name="year"> + <xsl:value-of select="substring(../event[position()=1]/@date, 1, 4)"/> + </xsl:variable> + + <xsl:variable name="y"> + <xsl:value-of select="substring(@date, 1, 4)"/> + </xsl:variable> + + <xsl:if test="position() = 1"> + + <xsl:text disable-output-escaping="yes"> + <table class="news"> + </xsl:text> + </xsl:if> + + <xsl:if test="(not($YEAR) and ($year = $y or position() < 11)) or $YEAR=$y"> + + <tr> + + <td class="date"> + + <a name="{@date}"/> + <xsl:value-of select="@date"/> + + </td> + + <td> + <xsl:apply-templates select="para"/> + </td> + + </tr> + </xsl:if> + + <xsl:if test="position() = last()"> + + <xsl:text disable-output-escaping="yes"> + </table> + </xsl:text> + </xsl:if> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/rss.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" version="1.0"> + + <xsl:output indent="no" encoding="utf-8"/> + + <xsl:strip-space elements="*"/> + + <xsl:param select="'../xml'" name="XML"/> + + <xsl:param name="YEAR"/> + + <xsl:variable select="'http://nginx.org'" name="SITE"/> + + <xsl:variable select="/news/@link" name="LINK"/> + + <xsl:include href="dirname.xslt"/> + + <xsl:include href="link.xslt"/> + + <xsl:include href="menu.xslt"/> + + <xsl:include href="content.xslt"/> + + <xsl:template match="/news"> + + <rss version="2.0"> + + <channel> + + <title> + <xsl:value-of select="@name"/> + </title> + + <link> + <xsl:value-of select="$SITE"/> + </link> + + <description/> + + <xsl:apply-templates select="event"/> + + </channel> + + </rss> + </xsl:template> + + <xsl:template match="event[position() <= 10]"> + + <xsl:variable name="year"> + <xsl:value-of select="substring(../event[position()=1]/@date, 1, 4)"/> + </xsl:variable> + + <xsl:variable name="y"> + <xsl:value-of select="substring(@date, 1, 4)"/> + </xsl:variable> + + <xsl:variable name="page"> + + <xsl:if test="$year != $y"> + + <xsl:value-of select="concat($y, '.html')"/> + </xsl:if> + </xsl:variable> + + <item> + + <title> + + <xsl:apply-templates select="para[1]//text()"/> + </title> + + <guid> + <xsl:value-of select="$SITE"/> + <xsl:text>/</xsl:text> + <xsl:value-of select="$page"/> + <xsl:text>#</xsl:text> + <xsl:value-of select="@date"/> + </guid> + + <link> + <xsl:value-of select="$SITE"/> + <xsl:text>/</xsl:text> + <xsl:value-of select="$page"/> + <xsl:text>#</xsl:text> + <xsl:value-of select="@date"/> + </link> + + <pubdate> + + <xsl:value-of select=" concat(date:day-abbreviation(@date), ', ', format-number(date:day-in-month(@date), '00'), ' ', date:month-abbreviation(@date), ' ', date:year(@date), ' 00:00:00 +0300')"/> + + </pubdate> + + <description> + + <xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text> + + <xsl:value-of select="@date"/> + + <xsl:apply-templates select="para"/> + + <xsl:text disable-output-escaping="yes">]]></xsl:text> + + </description> + + </item> + </xsl:template> + + <xsl:template match="event"/> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/security.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:output indent="no" version="4.0" encoding="utf-8" method="html"/> + + <xsl:strip-space elements="*"/> + + <xsl:param select="'../xml'" name="XML"/> + + <xsl:param name="YEAR"/> + + <xsl:variable select="/article/@link" name="LINK"/> + + <xsl:include href="dirname.xslt"/> + + <xsl:include href="link.xslt"/> + + <xsl:include href="style.xslt"/> + + <xsl:include href="body.xslt"/> + + <xsl:include href="menu.xslt"/> + + <xsl:include href="content.xslt"/> + + <xsl:template match="/article"> + + <html> + <head> + + <title> + <xsl:value-of select="@name"/> + </title> + + <xsl:call-template name="style"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </head> + + <xsl:call-template name="body"> + <xsl:with-param select="@lang" name="lang"/> + </xsl:call-template> + + </html> + </xsl:template> + + <xsl:template match="security"> + <ul> + <xsl:apply-templates/> + </ul> + </xsl:template> + + <xsl:template match="security/item"> + + <li> + + <p> + + <xsl:value-of select="@name"/> + <br/> + <xsl:choose> + + <xsl:when test="@severity = 'major'"> + + <xsl:text>Severity: </xsl:text> + <b> + <xsl:value-of select="@severity"/> + </b> + <br/> + </xsl:when> + + <xsl:otherwise> + + <xsl:text>Severity: </xsl:text> + <xsl:value-of select="@severity"/> + <br/> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="@cert"> + + <a> + + <xsl:attribute name="href"> + + <xsl:text>http://www.kb.cert.org/vuls/id/</xsl:text> + <xsl:value-of select="@cert"/> + </xsl:attribute> + + <xsl:text>VU#</xsl:text> + <xsl:value-of select="@cert"/> + + </a> + </xsl:if> + + <xsl:if test="@cve"> + + <xsl:if test="@cert"> + + <xsl:text> </xsl:text> + </xsl:if> + + <a> + + <xsl:attribute name="href"> + + <xsl:text>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-</xsl:text> + <xsl:value-of select="@cve"/> + </xsl:attribute> + + <xsl:text>CVE-</xsl:text> + <xsl:value-of select="@cve"/> + + </a> + </xsl:if> + + <xsl:if test="@core"> + + <xsl:if test="@cert or @cve"> + + <xsl:text> </xsl:text> + </xsl:if> + + <a href="{@href}"> + + <xsl:value-of select="@core"/> + </a> + </xsl:if> + + <xsl:if test="@cert or @cve or @core"> + + <br/> + </xsl:if> + + <xsl:text>Not vulnerable: </xsl:text> + <xsl:value-of select="@good"/> + <br/> + + <xsl:text>Vulnerable: </xsl:text> + <xsl:value-of select="@vulnerable"/> + <br/> + + <xsl:if test="@patch"> + + <a> + + <xsl:attribute name="href"> + + <xsl:text>/download/</xsl:text> + <xsl:value-of select="@patch"/> + </xsl:attribute> + + <xsl:text>The patch</xsl:text> + + </a> + + <xsl:text> </xsl:text> + + <a> + + <xsl:attribute name="href"> + + <xsl:text>/download/</xsl:text> + <xsl:value-of select="@patch"/> + <xsl:text>.asc</xsl:text> + </xsl:attribute> + + <xsl:text>pgp</xsl:text> + + </a> + </xsl:if> + + </p> + + </li> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/style.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template name="style"> + <xsl:param name="lang"/> + + <style type="text/css"> + <xsl:value-of select=" normalize-space(' body { font-family: Georgia, serif; } p { text-align: justify; } table.news p { margin-top: 0; } table.news td { vertical-align: baseline; } table.news .date { text-align: right; padding-right: 0.5em; white-space: nowrap; } div.directive { background: #EEEEEE; padding: 10pt 10pt 10pt 20pt; } div.directive td { vertical-align: baseline; } div.directive pre { padding: 0; margin: 0; } span.initial { font-size: 200%; float: left; padding-right: 10pt;} li { text-align: justify; } td.list { background: #EEEEEE; } blockquote.note { text-align: justify; background: #EEEEEE; border: none; padding: 10pt 10pt 10pt 10pt; } sup { font-size: 50%; } ')"/> + + <xsl:if test="$lang = 'he'"> + + <xsl:value-of select=" normalize-space(' pre { text-align: left; direction: ltr; } code { direction: ltr; unicode-bidi: embed; } .ltr { direction: ltr; unicode-bidi: embed; } ')"/> + </xsl:if> + + </style> + </xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt/versions.xslt Wed Nov 02 19:31:11 2011 +0000 @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="development_version"> + + <xsl:value-of select=" normalize-space(document(concat($XML, '/versions.xml')) /versions/development)"/> + </xsl:template> + + <xsl:template match="stable_version"> + + <xsl:value-of select=" normalize-space(document(concat($XML, '/versions.xml')) /versions/stable)"/> + </xsl:template> + +</xsl:stylesheet>