diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-08-05 09:25:34 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-08-05 09:25:34 +0000 |
commit | a6c91b11bf77264badc714e53e710803cf181a73 (patch) | |
tree | b4576ab20a25dda2044d3ef64ab98af86d23f9bc /docs/xslt | |
parent | f549c03524626bde4ed52c6a009ac769079f5fb4 (diff) | |
download | nginx-a6c91b11bf77264badc714e53e710803cf181a73.tar.gz nginx-a6c91b11bf77264badc714e53e710803cf181a73.zip |
skeleton for documentation processing
Diffstat (limited to 'docs/xslt')
-rw-r--r-- | docs/xslt/content.xslt | 43 | ||||
-rw-r--r-- | docs/xslt/directive.xslt | 36 | ||||
-rw-r--r-- | docs/xslt/module.xslt | 34 |
3 files changed, 113 insertions, 0 deletions
diff --git a/docs/xslt/content.xslt b/docs/xslt/content.xslt new file mode 100644 index 000000000..d772ecfdb --- /dev/null +++ b/docs/xslt/content.xslt @@ -0,0 +1,43 @@ +<?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[@name and @title]"> + + <a name="{@name}"/> + <center> + <h4> + <xsl:value-of select="@title"/> + </h4> + </center> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="section[not(@name) and @title]"> + + <center> + <h4> + <xsl:value-of select="@title"/> + </h4> + </center> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="section[not(@name) and not(@title)]"> + <xsl:apply-templates/> + </xsl:template> + + + <xsl:template match="para"> + <p> + <xsl:apply-templates/> + </p> + </xsl:template> + + + <xsl:template match="value"> + <i> + <xsl:apply-templates/> + </i> + </xsl:template> +</xsl:stylesheet>
\ No newline at end of file diff --git a/docs/xslt/directive.xslt b/docs/xslt/directive.xslt new file mode 100644 index 000000000..bfadfd29b --- /dev/null +++ b/docs/xslt/directive.xslt @@ -0,0 +1,36 @@ +<?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> + <xsl:apply-templates select="syntax"/> + <xsl:apply-templates select="default"/> + <xsl:apply-templates select="context"/> + <xsl:apply-templates select="para"/> + </xsl:template> + + <xsl:template match="syntax"> + <xsl:text>syntax: </xsl:text> + <xsl:apply-templates/> + <br/> + </xsl:template> + + <xsl:template match="default"> + <xsl:text>default: </xsl:text> + <xsl:apply-templates/> + <br/> + </xsl:template> + + <xsl:template match="context"> + <xsl:text>context: </xsl:text> + <xsl:apply-templates/> + <br/> + </xsl:template> +</xsl:stylesheet>
\ No newline at end of file diff --git a/docs/xslt/module.xslt b/docs/xslt/module.xslt new file mode 100644 index 000000000..c98ca697d --- /dev/null +++ b/docs/xslt/module.xslt @@ -0,0 +1,34 @@ +<?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" encoding="utf-8" method="html"/> + + <xsl:strip-space elements="*"/> + + <xsl:param select="'../xml'" name="XML"/> + + <xsl:variable select="/module/@link" name="LINK"/> + + <xsl:include href="directive.xslt"/> + <xsl:include href="content.xslt"/> + + <xsl:template match="/module"> + + <html> + <head> + + <title> + <xsl:value-of select="@title"/> + </title> + + </head> + + <body> + + <xsl:apply-templates/> + + </body> + + </html> + </xsl:template> +</xsl:stylesheet>
\ No newline at end of file |