The reference documentation is moving elsewhere.

This commit is contained in:
Ruslan Ermilov 2011-10-09 06:49:54 +00:00
parent 94b5460c70
commit c94b7e3d94
14 changed files with 1 additions and 4772 deletions

View File

@ -24,7 +24,7 @@ define XSLT
endef
all: changes html
all: changes
changes: $(TEMP)/$(NGINX)/CHANGES.ru \
$(TEMP)/$(NGINX)/CHANGES
@ -55,27 +55,3 @@ $(TEMP)/$(NGINX)/CHANGES: docs/xml/nginx/changes.xml \
docs/xslt/changes.xslt: docs/xsls/changes.xsls
$(call XSLScript, docs/xsls/changes.xsls, $@)
html: \
docs/html/ngx_core_module.html \
docs/html/http/ngx_http_core_module.html \
docs/html/http/ngx_http_mp4_module.html
docs/html/%.html: \
docs/xml/%.xml \
docs/xslt/module.xslt \
docs/dtd/module.dtd
$(call XSLT, docs/xslt/module.xslt, $<, $@)
docs/html/http/%.html: \
docs/xml/http/%.xml \
docs/xslt/module.xslt \
docs/dtd/module.dtd
$(call XSLT, docs/xslt/module.xslt, $<, $@)
docs/xslt/module.xslt: \
docs/xslt/directive.xslt \
docs/xslt/content.xslt
docs/xslt/%.xslt: docs/xsls/%.xsls
$(call XSLScript, $<, $@)

View File

@ -1,85 +0,0 @@
<!ELEMENT module (section+) >
<!ATTLIST module
name CDATA #REQUIRED
id ID #REQUIRED
>
<!ELEMENT section (directive | para)+ >
<!ATTLIST section
name CDATA #REQUIRED
id ID #IMPLIED
>
<!ELEMENT directive (syntax+, default, context+, para+) >
<!ATTLIST directive
name ID #REQUIRED
appeared-in CDATA #IMPLIED
>
<!ELEMENT syntax (#PCDATA | argument | code | parameter | value)* >
<!ELEMENT default (#PCDATA | code)* >
<!ELEMENT context (#PCDATA)* >
<!ELEMENT para (#PCDATA | argument | c-def | c-func | code | command |
dq | emphasis | example | header | http-status | link |
list | note | parameter | pathname | value | var)* >
<!ELEMENT argument (#PCDATA)* >
<!ELEMENT c-def (#PCDATA)* >
<!ELEMENT c-func (#PCDATA)* >
<!ELEMENT code (#PCDATA | value)* >
<!ELEMENT command (#PCDATA)* >
<!ELEMENT dq ANY >
<!ELEMENT emphasis (#PCDATA)* >
<!ELEMENT example (#PCDATA)* >
<!ELEMENT header (#PCDATA | argument)* >
<!ELEMENT http-status EMPTY >
<!ATTLIST http-status
code CDATA #REQUIRED
text CDATA #IMPLIED
>
<!ELEMENT link (#PCDATA)* >
<!ATTLIST link
doc CDATA #IMPLIED
id CDATA #IMPLIED
url CDATA #IMPLIED
>
<!ELEMENT list (listitem+ | (tag-name | tag-desc)+) >
<!ATTLIST list
type (bullet | enum | tag) #REQUIRED
>
<!ELEMENT listitem ANY >
<!ELEMENT tag-name ANY >
<!ELEMENT tag-desc ANY >
<!ELEMENT note ANY >
<!ELEMENT parameter (#PCDATA)* >
<!ELEMENT pathname (#PCDATA)* >
<!ELEMENT value (#PCDATA)* >
<!ELEMENT var (#PCDATA)* >
<!ENTITY nbsp "&#xA0;" >
<!ENTITY mdash "&nbsp;- " >
<!ENTITY lsquo "&#8216;">
<!ENTITY rsquo "&#8217;">
<!ENTITY ldquo "&#8220;">
<!ENTITY rdquo "&#8221;">

File diff suppressed because it is too large Load Diff

View File

@ -1,90 +0,0 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>HTTP MP4 Module</title></head><body><center><h3>HTTP MP4 Module</h3></center><center><h4>Summary</h4></center><p>
The module <code>ngx_http_mp4_module</code> provides pseudo-streaming
server-side support for H.264/AAC files typically having filename extensions
<code>.mp4</code>, <code>.m4v</code>,
and <code>.m4a</code>.
</p><p>
Pseudo-streaming works in alliance with conformant Flash players.
A player sends an HTTP request to the server with a start time
argument in the request URIs query string (named simply
<code>start</code>
and specified in seconds), and the server responds with a stream
so that its start position corresponds to the requested time,
for example:
<blockquote><pre>
http://example.com/elephants_dream.mp4?start=238.88
</pre></blockquote>
This allows for a random seeking at any time, or starting playback
in the middle of a timeline.
</p><p>
To support seeking, H.264-based formats store the metadata
in the so-called “moov atom.”
It is a part of the file that holds the index information for the
whole file.
</p><p>
To start playback, a player first needs to read metadata.
This is done by sending a special request with the
<code>start=0</code>
argument. Many encoding software will insert the metadata at
the end of the file. This is bad for pseudo-streaming:
the metadata needs to be located at the beginning of the file,
or else the entire file will have to be downloaded before it
starts playing. If a file is well-formed (with metadata at the
beginning of a file), nginx just sends back the contents of a file.
Otherwise, it has to read the file and prepare a new stream so that
metadata comes before media data.
This involves some CPU, memory, and disk I/O overhead,
so it is a good idea to
<a href="http://flowplayer.org/plugins/streaming/pseudostreaming.html#prepare">
prepare an original file for pseudo-streaming</a>,
rather than having nginx do this on every such request.
</p><p>
For a matching request with a non-zero
<code>start</code>
argument, nginx will read metadata from the file, prepare the
stream starting from the requested offset, and send it to a client.
This has the same overhead as described above.
</p><p>
If a matching request does not include the
<code>start</code>
argument, there is no overhead, and the file is just sent as a static resource.
Some players also support byte-range requests, and thus do not require
this module at all.
</p><p>
This module is not built by default, it should be enabled with the
<code>--with-http_mp4_module</code>
configuration parameter.
If you were using the third-party mp4 module, be sure to disable it.
</p><p>
A similar pseudo-streaming support for FLV files is provided by the module
<a href="ngx_http_flv_module.html">ngx_http_flv_module</a>.
</p><a name="example"></a><center><h4>Example Configuration</h4></center><p><blockquote><pre>
location /video/ {
mp4;
mp4_buffer_size 1m;
mp4_max_buffer_size 5m;
}
</pre></blockquote></p><a name="directives"></a><center><h4>Directives</h4></center><hr><a name="mp4"></a><strong>syntax</strong>:
<code>mp4</code><br><strong>default</strong>:
<strong>none</strong><br><strong>context</strong>:
<code>location</code><br><p>
Turns on module processing in a surrounding location.
</p><hr><a name="mp4_buffer_size"></a><strong>syntax</strong>:
<code>mp4_buffer_size <code><i>size</i></code></code><br><strong>default</strong>:
<code>mp4_buffer_size 512K</code><br><strong>context</strong>:
<code>http</code>, <code>server</code>, <code>location</code><br><p>
Sets the initial size of a memory buffer used to process MP4 files.
</p><hr><a name="mp4_max_buffer_size"></a><strong>syntax</strong>:
<code>mp4_max_buffer_size <code><i>size</i></code></code><br><strong>default</strong>:
<code>mp4_max_buffer_size 10M</code><br><strong>context</strong>:
<code>http</code>, <code>server</code>, <code>location</code><br><p>
During metadata processing, a larger buffer may become necessary.
Its size cannot exceed the specified <code><i>size</i></code>,
or else nginx will return the server error
500 (Internal Server Error),
and log the following:
<blockquote><pre>
"/some/movie/file.mp4" mp4 moov atom is too large:
12583268, you may want to increase mp4_max_buffer_size
</pre></blockquote></p></body></html>

View File

@ -1,148 +0,0 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Core Module</title></head><body><center><h3>Core Module</h3></center><a name="example"></a><center><h4>Example Configuration</h4></center><p><blockquote><pre>
user www www;
worker_processes 2;
error_log /var/log/nginx-error.log info;
events {
use kqueue;
worker_connections 2048;
}
...
</pre></blockquote></p><a name="directives"></a><center><h4>Directives</h4></center><hr><a name="daemon"></a><strong>syntax</strong>:
<code>daemon <code>on</code> | <code>off</code></code><br><strong>default</strong>:
<code>daemon on</code><br><strong>context</strong>:
<code>main</code><br><p>
Determines whether nginx should become a daemon.
Mainly used during development.
</p><hr><a name="env"></a><strong>syntax</strong>:
<code>env <code><i>VAR</i></code>[=<code><i>VALUE</i></code>]</code><br><strong>default</strong>:
<code>env TZ</code><br><strong>context</strong>:
<code>main</code><br><p>
Allows to limit a set of environment variables, change their values,
or create new environment variables, for the following cases:
<ul><li>
variable inheritance during a
<a href="control.html#upgrade">live upgrade</a>
of an executable file;
</li><li>
use of variables by the module
<a href="http/ngx_http_perl_module.html">ngx_http_perl_module</a>;
</li><li>
use of variables by worker processes.
Please bear in mind that controlling system libraries in this way
is not always possible as it is not uncommon for libraries to check
variables only during initialization, well before they can be set
using this directive.
An exception from this is an above mentioned
<a href="control.html#upgrade">live upgrade</a>
of an executable file.
</li></ul></p><p>
The TZ variable is always inherited and made available to the module
<a href="http/ngx_http_perl_module.html">ngx_http_perl_module</a>,
unless configured explicitly.
</p><p>
Usage example:
<blockquote><pre>
env MALLOC_OPTIONS;
env PERL5LIB=/data/site/modules;
env OPENSSL_ALLOW_PROXY_CERTS=1;
</pre></blockquote></p><hr><a name="include"></a><strong>syntax</strong>:
<code>include <code><i>file</i></code> | <code><i>mask</i></code></code><br><strong>default</strong>:
<strong>none</strong><br><strong>context</strong>:
<strong>any</strong><br><p>
Includes another <code><i>file</i></code>, or files matching the
specified <code><i>mask</i></code>, into configuration.
Included files should consist of
syntactically correct directives and blocks.
</p><p>
Usage example:
<blockquote><pre>
include mime.types;
include vhosts/*.conf;
</pre></blockquote></p><hr><a name="master_process"></a><strong>syntax</strong>:
<code>master_process <code>on</code> | <code>off</code></code><br><strong>default</strong>:
<code>master_process on</code><br><strong>context</strong>:
<code>main</code><br><p>
Determines whether worker processes are started.
This directive is intended for nginx developers.
</p><hr><a name="pid"></a><strong>syntax</strong>:
<code>pid <code><i>file</i></code></code><br><strong>default</strong>:
<code>pid nginx.pid</code><br><strong>context</strong>:
<code>main</code><br><p>
Defines a <code><i>file</i></code> which will store the process ID of the main process.
</p><hr><a name="ssl_engine"></a><strong>syntax</strong>:
<code>ssl_engine <code><i>device</i></code></code><br><strong>default</strong>:
<strong>none</strong><br><strong>context</strong>:
<code>main</code><br><p>
Defines the name of the hardware SSL accelerator.
</p><hr><a name="user"></a><strong>syntax</strong>:
<code>user <code><i>user</i></code> [<code><i>group</i></code>]</code><br><strong>default</strong>:
<code>user nobody nobody</code><br><strong>context</strong>:
<code>main</code><br><p>
Defines <code><i>user</i></code> and <code><i>group</i></code>
credentials used by worker processes.
If <code><i>group</i></code> is omitted, a group whose name equals
that of <code><i>user</i></code> is used.
</p><hr><a name="timer_resolution"></a><strong>syntax</strong>:
<code>timer_resolution <code><i>interval</i></code></code><br><strong>default</strong>:
<strong>none</strong><br><strong>context</strong>:
<code>main</code><br><p>
Reduces timer resolution in worker processes, thus reducing the
number of <code>gettimeofday()</code> system calls made.
By default, <code>gettimeofday()</code> is called each time
on receiving a kernel event.
With reduced resolution, <code>gettimeofday()</code> is only
called once per specified <code><i>interval</i></code>.
</p><p>
Example:
<blockquote><pre>
timer_resolution 100ms;
</pre></blockquote></p><p>
An internal implementation of interval depends on the method used:
<ul><li>
an <code>EVFILT_TIMER</code> filter if <code>kqueue</code> is used;
</li><li><code>timer_create()</code> if <code>eventport</code> is used;
</li><li><code>setitimer()</code> otherwise.
</li></ul></p><hr><a name="worker_rlimit_core"></a><strong>syntax</strong>:
<code>worker_rlimit_core <code><i>size</i></code></code><br><strong>default</strong>:
<strong>none</strong><br><strong>context</strong>:
<code>main</code><br><p>
Changes the limit on the largest size of a core file
(<code>RLIMIT_CORE</code>) for worker processes.
Used to increase the limit without restarting the main process.
</p><hr><a name="worker_rlimit_nofile"></a><strong>syntax</strong>:
<code>worker_rlimit_nofile <code><i>number</i></code></code><br><strong>default</strong>:
<strong>none</strong><br><strong>context</strong>:
<code>main</code><br><p>
Changes the limit on the maximum number of open files
(<code>RLIMIT_NOFILE</code>) for worker processes.
Used to increase the limit without restarting the main process.
</p><hr><a name="worker_priority"></a><strong>syntax</strong>:
<code>worker_priority <code><i>number</i></code></code><br><strong>default</strong>:
<code>worker_priority 0</code><br><strong>context</strong>:
<code>main</code><br><p>
Defines a scheduling priority for worker processes like is
done by the <code>nice</code>: a negative
<code><i>number</i></code>
means higher priority.
Allowed range normally varies from -20 to 20.
</p><p>
Example:
<blockquote><pre>
worker_priority -10;
</pre></blockquote></p><hr><a name="worker_processes"></a><strong>syntax</strong>:
<code>worker_processes <code><i>number</i></code></code><br><strong>default</strong>:
<code>worker_processes 1</code><br><strong>context</strong>:
<code>main</code><br><p>
Defines the number of worker processes.
</p><hr><a name="working_directory"></a><strong>syntax</strong>:
<code>working_directory <code><i>directory</i></code></code><br><strong>default</strong>:
<strong>none</strong><br><strong>context</strong>:
<code>main</code><br><p>
Defines a current working directory for a worker process.
It is primarily used when writing a core-file, in which case
a working process should have write permission for the
specified directory.
</p></body></html>

File diff suppressed because it is too large Load Diff

View File

@ -1,156 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../dtd/module.dtd">
<module name="HTTP MP4 Module" id="http_mp4_module">
<section name="Summary">
<para>
The module <code>ngx_http_mp4_module</code> provides pseudo-streaming
server-side support for H.264/AAC files typically having filename extensions
<pathname>.mp4</pathname>, <pathname>.m4v</pathname>,
and <pathname>.m4a</pathname>.
</para>
<para>
Pseudo-streaming works in alliance with conformant Flash players.
A player sends an HTTP request to the server with a start time
argument in the request URIs query string (named simply
<parameter>start</parameter>
and specified in seconds), and the server responds with a stream
so that its start position corresponds to the requested time,
for example:
<example>
http://example.com/elephants_dream.mp4?start=238.88
</example>
This allows for a random seeking at any time, or starting playback
in the middle of a timeline.
</para>
<para>
To support seeking, H.264-based formats store the metadata
in the so-called “moov atom.”
It is a part of the file that holds the index information for the
whole file.
</para>
<para>
To start playback, a player first needs to read metadata.
This is done by sending a special request with the
<parameter>start=0</parameter>
argument. Many encoding software will insert the metadata at
the end of the file. This is bad for pseudo-streaming:
the metadata needs to be located at the beginning of the file,
or else the entire file will have to be downloaded before it
starts playing. If a file is well-formed (with metadata at the
beginning of a file), nginx just sends back the contents of a file.
Otherwise, it has to read the file and prepare a new stream so that
metadata comes before media data.
This involves some CPU, memory, and disk I/O overhead,
so it is a good idea to
<link url="http://flowplayer.org/plugins/streaming/pseudostreaming.html#prepare">
prepare an original file for pseudo-streaming</link>,
rather than having nginx do this on every such request.
</para>
<para>
For a matching request with a non-zero
<parameter>start</parameter>
argument, nginx will read metadata from the file, prepare the
stream starting from the requested offset, and send it to a client.
This has the same overhead as described above.
</para>
<para>
If a matching request does not include the
<parameter>start</parameter>
argument, there is no overhead, and the file is just sent as a static resource.
Some players also support byte-range requests, and thus do not require
this module at all.
</para>
<para>
This module is not built by default, it should be enabled with the
<code>--with-http_mp4_module</code>
configuration parameter.
<note>
If you were using the third-party mp4 module, be sure to disable it.
</note>
</para>
<para>
A similar pseudo-streaming support for FLV files is provided by the module
<link doc="ngx_http_flv_module.xml">ngx_http_flv_module</link>.
</para>
</section>
<section id="example" name="Example Configuration">
<para>
<example>
location /video/ {
mp4;
mp4_buffer_size 1m;
mp4_max_buffer_size 5m;
}
</example>
</para>
</section>
<section id="directives" name="Directives">
<directive name="mp4">
<syntax>mp4</syntax>
<default/>
<context>location</context>
<para>
Turns on module processing in a surrounding location.
</para>
</directive>
<directive name="mp4_buffer_size">
<syntax>mp4_buffer_size <argument>size</argument></syntax>
<default>mp4_buffer_size 512K</default>
<context>http</context>
<context>server</context>
<context>location</context>
<para>
Sets the initial size of a memory buffer used to process MP4 files.
</para>
</directive>
<directive name="mp4_max_buffer_size">
<syntax>mp4_max_buffer_size <argument>size</argument></syntax>
<default>mp4_max_buffer_size 10M</default>
<context>http</context>
<context>server</context>
<context>location</context>
<para>
During metadata processing, a larger buffer may become necessary.
Its size cannot exceed the specified <argument>size</argument>,
or else nginx will return the server error
<http-status code="500" text="Internal Server Error"/>,
and log the following:
<example>
"/some/movie/file.mp4" mp4 moov atom is too large:
12583268, you may want to increase mp4_max_buffer_size
</example>
</para>
</directive>
</section>
</module>

View File

@ -1,292 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../dtd/module.dtd">
<module name="Core Module" id="core_module">
<section id="example" name="Example Configuration">
<para>
<example>
user www www;
worker_processes 2;
error_log /var/log/nginx-error.log info;
events {
use kqueue;
worker_connections 2048;
}
...
</example>
</para>
</section>
<section id="directives" name="Directives">
<directive name="daemon">
<syntax>daemon <value>on</value> | <value>off</value></syntax>
<default>daemon on</default>
<context>main</context>
<para>
Determines whether nginx should become a daemon.
Mainly used during development.
</para>
</directive>
<directive name="env">
<syntax>env <argument>VAR</argument>[=<argument>VALUE</argument>]</syntax>
<default>env TZ</default>
<context>main</context>
<para>
Allows to limit a set of environment variables, change their values,
or create new environment variables, for the following cases:
<list type="bullet">
<listitem>
variable inheritance during a
<link doc="control.xml" id="upgrade">live upgrade</link>
of an executable file;
</listitem>
<listitem>
use of variables by the module
<link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>;
</listitem>
<listitem>
use of variables by worker processes.
Please bear in mind that controlling system libraries in this way
is not always possible as it is not uncommon for libraries to check
variables only during initialization, well before they can be set
using this directive.
An exception from this is an above mentioned
<link doc="control.xml" id="upgrade">live upgrade</link>
of an executable file.
</listitem>
</list>
</para>
<para>
The TZ variable is always inherited and made available to the module
<link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>,
unless configured explicitly.
</para>
<para>
Usage example:
<example>
env MALLOC_OPTIONS;
env PERL5LIB=/data/site/modules;
env OPENSSL_ALLOW_PROXY_CERTS=1;
</example>
</para>
</directive>
<directive name="include">
<syntax>include <argument>file</argument> | <argument>mask</argument></syntax>
<default/>
<context/>
<para>
Includes another <argument>file</argument>, or files matching the
specified <argument>mask</argument>, into configuration.
Included files should consist of
syntactically correct directives and blocks.
</para>
<para>
Usage example:
<example>
include mime.types;
include vhosts/*.conf;
</example>
</para>
</directive>
<directive name="master_process">
<syntax>master_process <value>on</value> | <value>off</value></syntax>
<default>master_process on</default>
<context>main</context>
<para>
Determines whether worker processes are started.
This directive is intended for nginx developers.
</para>
</directive>
<directive name="pid">
<syntax>pid <argument>file</argument></syntax>
<default>pid nginx.pid</default>
<context>main</context>
<para>
Defines a <argument>file</argument> which will store the process ID of the main process.
</para>
</directive>
<directive name="ssl_engine">
<syntax>ssl_engine <argument>device</argument></syntax>
<default/>
<context>main</context>
<para>
Defines the name of the hardware SSL accelerator.
</para>
</directive>
<directive name="user">
<syntax>user <argument>user</argument> [<argument>group</argument>]</syntax>
<default>user nobody nobody</default>
<context>main</context>
<para>
Defines <argument>user</argument> and <argument>group</argument>
credentials used by worker processes.
If <argument>group</argument> is omitted, a group whose name equals
that of <argument>user</argument> is used.
</para>
</directive>
<directive name="timer_resolution">
<syntax>timer_resolution <argument>interval</argument></syntax>
<default/>
<context>main</context>
<para>
Reduces timer resolution in worker processes, thus reducing the
number of <c-func>gettimeofday</c-func> system calls made.
By default, <c-func>gettimeofday</c-func> is called each time
on receiving a kernel event.
With reduced resolution, <c-func>gettimeofday</c-func> is only
called once per specified <argument>interval</argument>.
</para>
<para>
Example:
<example>
timer_resolution 100ms;
</example>
</para>
<para>
An internal implementation of interval depends on the method used:
<list type="bullet">
<listitem>
an <c-def>EVFILT_TIMER</c-def> filter if <value>kqueue</value> is used;
</listitem>
<listitem>
<c-func>timer_create</c-func> if <value>eventport</value> is used;
</listitem>
<listitem>
<c-func>setitimer</c-func> otherwise.
</listitem>
</list>
</para>
</directive>
<directive name="worker_rlimit_core">
<syntax>worker_rlimit_core <argument>size</argument></syntax>
<default/>
<context>main</context>
<para>
Changes the limit on the largest size of a core file
(<c-def>RLIMIT_CORE</c-def>) for worker processes.
Used to increase the limit without restarting the main process.
</para>
</directive>
<directive name="worker_rlimit_nofile">
<syntax>worker_rlimit_nofile <argument>number</argument></syntax>
<default/>
<context>main</context>
<para>
Changes the limit on the maximum number of open files
(<c-def>RLIMIT_NOFILE</c-def>) for worker processes.
Used to increase the limit without restarting the main process.
</para>
</directive>
<directive name="worker_priority">
<syntax>worker_priority <argument>number</argument></syntax>
<default>worker_priority 0</default>
<context>main</context>
<para>
Defines a scheduling priority for worker processes like is
done by the <command>nice</command> command: a negative
<argument>number</argument>
means higher priority.
Allowed range normally varies from -20 to 20.
</para>
<para>
Example:
<example>
worker_priority -10;
</example>
</para>
</directive>
<directive name="worker_processes">
<syntax>worker_processes <argument>number</argument></syntax>
<default>worker_processes 1</default>
<context>main</context>
<para>
Defines the number of worker processes.
</para>
</directive>
<directive name="working_directory">
<syntax>working_directory <argument>directory</argument></syntax>
<default/>
<context>main</context>
<para>
Defines a current working directory for a worker process.
It is primarily used when writing a core-file, in which case
a working process should have write permission for the
specified directory.
</para>
</directive>
</section>
</module>

View File

@ -1,67 +0,0 @@
X:stylesheet {
X:template = "section[@id and @name]" {
<a name="{@id}" /> <center><h4> !{@name} </h4></center>
!!;
}
X:template = "section[not(@id) and @name]" {
<center><h4> !{@name} </h4></center>
!!;
}
X:template = "section[not(@id) and not(@name)]" { !!; }
X:template = "para" { <p> !!; </p> }
X:template = "c-def" { <code> !!; </code> }
X:template = "c-func" { <code> !!; X:text{()} </code> }
X:template = "code" { <code> !!; </code> }
X:template = "command" { <code> !!; </code> }
X:template = "dq" {
X:text disable-output-escaping="yes" {&amp;ldquo;}
!!;
X:text disable-output-escaping="yes" {&amp;rdquo;}
}
X:template = "example" { <blockquote><pre> !!; </pre></blockquote> }
X:template = "emphasis" { <strong> !!; </strong> }
X:template = "header" { <code> !!; </code> }
X:template = "http-status" {
!{@code} X:text{ (} !{@text} X:text{)}
}
X:template = "link[@url]" { <a href="{@url}"> !!; </a> }
X:template = "link[@id and not(@doc)]" { <a href="#{@id}"> !!; </a> }
X:template = "link[@doc and not(@id)]" {
<a href="{substring-before(@doc, '.xml')}.html"> !!; </a>
}
X:template = "link[@id and @doc]" {
<a href="{substring-before(@doc, '.xml')}.html#{@id}"> !!; </a>
}
X:template = "link" { <u> !!; </u> }
X:template = "list[@type='bullet']" { <ul> !!; </ul> }
X:template = "list[@type='enum']" { <ol> !!; </ol> }
X:template = "listitem" { <li> !!; </li> }
X:template = "list[@type='tag']" { <dl compact=""> !!; </dl> }
X:template = "tag-name" { <dt> !!; </dt> }
X:template = "tag-desc" { <dd> !!; </dd> }
X:template = "pathname" { <code> !!; </code> }
X:template = "argument" { <code><i> !!; </i></code> }
X:template = "parameter" { <code> !!; </code> }
X:template = "value" { <code> !!; </code> }
X:template = "var" { <code> !!; </code> }
}

View File

@ -1,51 +0,0 @@
X:stylesheet {
X:template = "directive" {
<hr/>
<a name="{@name}"/>
<!-- <center><h4> !{@name} </h4></center> -->
!! "syntax";
!! "default";
!! "context";
X:if "(@appeared-in)" {
<strong>appeared in version</strong>: !{@appeared-in}
}
!! "para";
}
X:template = "syntax" {
X:if "position() = 1" {
<strong>syntax</strong>:
} else {
<code>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</code>
}
<code> !!; </code> <br/>
}
X:template = "default" {
<strong>default</strong>:
X:if "count(text()) = 0" {
<strong>none</strong>
} else {
<code> !!; </code>
}
<br/>
}
X:template = "context" {
X:if "position() = 1" {
<strong>context</strong>:
}
X:if "count(text()) = 0" {
<strong>any</strong>
} else {
<code> !!; </code>
}
X:if "position() != last()" {
X:text{, }
} else {
<br/>
}
}
}

View File

@ -1,34 +0,0 @@
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 ID = "/module/@id";
X:include href = "directive.xslt";
X:include href = "content.xslt";
X:template = "/module" {
<html><head>
<title> !{@name} </title>
</head>
<body>
<center><h3> !{@name} </h3></center>
!!;
</body>
</html>
}
}

View File

@ -1,199 +0,0 @@
<?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[not(@id) and @name]">
<center>
<h4>
<xsl:value-of select="@name"/>
</h4>
</center>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="section[not(@id) and not(@name)]">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="para">
<p>
<xsl:apply-templates/>
</p>
</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="code">
<code>
<xsl:apply-templates/>
</code>
</xsl:template>
<xsl:template match="command">
<code>
<xsl:apply-templates/>
</code>
</xsl:template>
<xsl:template match="dq">
<xsl:text disable-output-escaping="yes">&amp;ldquo;</xsl:text>
<xsl:apply-templates/>
<xsl:text disable-output-escaping="yes">&amp;rdquo;</xsl:text>
</xsl:template>
<xsl:template match="example">
<blockquote>
<pre>
<xsl:apply-templates/>
</pre>
</blockquote>
</xsl:template>
<xsl:template match="emphasis">
<strong>
<xsl:apply-templates/>
</strong>
</xsl:template>
<xsl:template match="header">
<code>
<xsl:apply-templates/>
</code>
</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="link[@url]">
<a href="{@url}">
<xsl:apply-templates/>
</a>
</xsl:template>
<xsl:template match="link[@id and not(@doc)]">
<a href="#{@id}">
<xsl:apply-templates/>
</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:apply-templates/>
</a>
</xsl:template>
<xsl:template match="link">
<u>
<xsl:apply-templates/>
</u>
</xsl:template>
<xsl:template match="list[@type='bullet']">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="list[@type='enum']">
<ol>
<xsl:apply-templates/>
</ol>
</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="tag-name">
<dt>
<xsl:apply-templates/>
</dt>
</xsl:template>
<xsl:template match="tag-desc">
<dd>
<xsl:apply-templates/>
</dd>
</xsl:template>
<xsl:template match="pathname">
<code>
<xsl:apply-templates/>
</code>
</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="value">
<code>
<xsl:apply-templates/>
</code>
</xsl:template>
<xsl:template match="var">
<code>
<xsl:apply-templates/>
</code>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,102 +0,0 @@
<?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">
<hr/>
<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:if test="(@appeared-in)">
<strong>appeared in version</strong>:
<xsl:value-of select="@appeared-in"/>
</xsl:if>
<xsl:apply-templates select="para"/>
</xsl:template>
<xsl:template match="syntax">
<xsl:choose>
<xsl:when test="position() = 1">
<strong>syntax</strong>:
</xsl:when>
<xsl:otherwise>
<code>       </code>
</xsl:otherwise>
</xsl:choose>
<code>
<xsl:apply-templates/>
</code>
<br/>
</xsl:template>
<xsl:template match="default">
<strong>default</strong>:
<xsl:choose>
<xsl:when test="count(text()) = 0">
<strong>none</strong>
</xsl:when>
<xsl:otherwise>
<code>
<xsl:apply-templates/>
</code>
</xsl:otherwise>
</xsl:choose>
<br/>
</xsl:template>
<xsl:template match="context">
<xsl:if test="position() = 1">
<strong>context</strong>:
</xsl:if>
<xsl:choose>
<xsl:when test="count(text()) = 0">
<strong>any</strong>
</xsl:when>
<xsl:otherwise>
<code>
<xsl:apply-templates/>
</code>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<br/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,42 +0,0 @@
<?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/@id" name="ID"/>
<xsl:include href="directive.xslt"/>
<xsl:include href="content.xslt"/>
<xsl:template match="/module">
<html>
<head>
<title>
<xsl:value-of select="@name"/>
</title>
</head>
<body>
<center>
<h3>
<xsl:value-of select="@name"/>
</h3>
</center>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>