skeleton for documentation processing
diff --git a/docs/GNUmakefile b/docs/GNUmakefile
index fff7744..2d9d418 100644
--- a/docs/GNUmakefile
+++ b/docs/GNUmakefile
@@ -52,3 +52,19 @@
$(call XSLScript, docs/xsls/changes.xsls, $@)
+html: \
+ docs/html/http/ngx_http_core_module.html
+
+docs/html/http/ngx_http_core_module.html: \
+ docs/xml/http/ngx_http_core_module.xml \
+ docs/xslt/module.xslt \
+ docs/dtd/module.dtd
+ $(call XSLT, docs/xslt/module.xslt, $<, $@)
+
+docs/xslt/module.xslt: docs/xsls/module.xsls \
+ docs/xslt/directive.xslt \
+ docs/xslt/content.xslt
+ $(call XSLScript, $<, $@)
+
+docs/xslt/%.xslt: docs/xsls/%.xsls
+ $(call XSLScript, $<, $@)
diff --git a/docs/dtd/module.dtd b/docs/dtd/module.dtd
new file mode 100644
index 0000000..102ce68
--- /dev/null
+++ b/docs/dtd/module.dtd
@@ -0,0 +1,24 @@
+
+<!ELEMENT module (section+) >
+<!ATTLIST module title CDATA #REQUIRED
+ link CDATA #REQUIRED
+ lang (en) #REQUIRED
+>
+
+<!ELEMENT section (directive+ | para+) >
+<!ATTLIST section title CDATA #REQUIRED
+ name CDATA #IMPLIED
+>
+
+<!ELEMENT directive (syntax, default, context, para+) >
+<!ATTLIST directive name CDATA #REQUIRED >
+
+<!ELEMENT syntax (#PCDATA | value)* >
+<!ELEMENT default (#PCDATA)* >
+<!ELEMENT context (#PCDATA)* >
+
+<!ELEMENT para (#PCDATA | value)* >
+<!ELEMENT value (#PCDATA)* >
+
+<!ENTITY nbsp " " >
+<!ENTITY mdash " - " >
diff --git a/docs/html/http/ngx_http_core_module.html b/docs/html/http/ngx_http_core_module.html
new file mode 100644
index 0000000..e53ef99
--- /dev/null
+++ b/docs/html/http/ngx_http_core_module.html
@@ -0,0 +1,10 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>ngx_http_core_module</title></head><body><center><h4>Directives</h4></center><a name="client_body_buffer_size"></a><center><h4>client_body_buffer_size</h4></center>syntax: client_body_buffer_size <i>size</i><br>default: client_body_buffer_size 8k/16k<br>context: http, server, location<br><p>
+Directive sets client request body buffer size.
+If the request body is larger than the buffer,
+then the whole body or some its part is written to temporary file.
+By default buffer size is equal to 2 memory page sizes.
+This is 8K on x86, other 32-bit platforms, and x86-64.
+It is usually 16K on other 64-bit platforms.
+</p><a name="sendfile"></a><center><h4>sendfile</h4></center>syntax: sendfile <i>[on|off]</i><br>default: sendfile off<br>context: http, server, location<br><p>
+Directive enables or disables sendfile() usage.
+</p></body></html>
diff --git a/docs/xml/http/ngx_http_core_module.xml b/docs/xml/http/ngx_http_core_module.xml
new file mode 100644
index 0000000..54ff0c0
--- /dev/null
+++ b/docs/xml/http/ngx_http_core_module.xml
@@ -0,0 +1,41 @@
+<!DOCTYPE module SYSTEM "../../dtd/module.dtd">
+
+<module title="ngx_http_core_module"
+ link="/en/docs/http/ngx_http_core_module.html"
+ lang="en">
+
+<section title="Directives">
+
+<directive name="client_body_buffer_size">
+
+<syntax>client_body_buffer_size <value>size</value></syntax>
+<default>client_body_buffer_size 8k/16k</default>
+<context>http, server, location</context>
+
+<para>
+Directive sets client request body buffer size.
+If the request body is larger than the buffer,
+then the whole body or some its part is written to temporary file.
+By default buffer size is equal to 2 memory page sizes.
+This is 8K on x86, other 32-bit platforms, and x86-64.
+It is usually 16K on other 64-bit platforms.
+</para>
+
+</directive>
+
+
+<directive name="sendfile">
+
+<syntax>sendfile <value>[on|off]</value></syntax>
+<default>sendfile off</default>
+<context>http, server, location</context>
+
+<para>
+Directive enables or disables sendfile() usage.
+</para>
+
+</directive>
+
+</section>
+
+</module>
diff --git a/docs/xsls/content.xsls b/docs/xsls/content.xsls
new file mode 100644
index 0000000..cf9dcf5
--- /dev/null
+++ b/docs/xsls/content.xsls
@@ -0,0 +1,19 @@
+X:stylesheet {
+
+X:template = "section[@name and @title]" {
+ <a name="{@name}" /> <center><h4> !{@title} </h4></center>
+ !!;
+}
+
+X:template = "section[not(@name) and @title]" {
+ <center><h4> !{@title} </h4></center>
+ !!;
+}
+
+X:template = "section[not(@name) and not(@title)]" { !!; }
+
+X:template = "para" { <p> !!; </p> }
+
+X:template = "value" { <i> !!; </i> }
+
+}
diff --git a/docs/xsls/directive.xsls b/docs/xsls/directive.xsls
new file mode 100644
index 0000000..09bb834
--- /dev/null
+++ b/docs/xsls/directive.xsls
@@ -0,0 +1,15 @@
+X:stylesheet {
+
+X:template = "directive" {
+ <a name="{@name}" /> <center><h4> !{@name} </h4></center>
+ !! "syntax";
+ !! "default";
+ !! "context";
+ !! "para";
+}
+
+X:template = "syntax" { X:text {syntax: } !!; <br/> }
+X:template = "default" { X:text {default: } !!; <br/> }
+X:template = "context" { X:text {context: } !!; <br/> }
+
+}
diff --git a/docs/xsls/module.xsls b/docs/xsls/module.xsls
new file mode 100644
index 0000000..17b28eb
--- /dev/null
+++ b/docs/xsls/module.xsls
@@ -0,0 +1,33 @@
+X:stylesheet {
+
+X:output method="html" indent="no" encoding="utf-8";
+
+X:strip-space elements = "*";
+
+<!--
+ -- a current directory of a XSLT script is where the script is stored,
+ -- but not where XSLT processor has been started to run the script
+ -->
+X:param XML = "'../xml'";
+
+X:var LINK = "/module/@link";
+
+X:include href = "directive.xslt";
+X:include href = "content.xslt";
+
+
+X:template = "/module" {
+ <html><head>
+
+ <title> !{@title} </title>
+
+ </head>
+ <body>
+
+ !!;
+
+ </body>
+ </html>
+}
+
+}
diff --git a/docs/xslt/content.xslt b/docs/xslt/content.xslt
new file mode 100644
index 0000000..d772ecf
--- /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 0000000..bfadfd2
--- /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 0000000..c98ca69
--- /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