Attached are some more examples.. taking into account the feedback I got
sofar. If you are into doc's or GUI's, give it some though :-)
The *.xml and apache.xsl have generated the *.html. The dtd is just thrown
in for good measure.
I've been using the java based lotusxsl parser to test. The *.xml files
are generated by a small perl script and touched up manually.
This is by no means a finished product; just an attempt to see how close
we could get to XML based docs; ANd to see how 'easy' it would be to
generate PDF, TEXT and/or HTML from that during a 'release build' in the
various languages if possible. And gauge how usefull this could be for the
apache GUI projects underway.
Dw.
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
xmlns="http://www.w3.org/TR/REC-html40"
default-space="strip">
<!-- root -->
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="MODULE">
<HTML>
<HEAD>
<TITLE>Documentation <xsl:value-of select="HEADER"/></TITLE>
</HEAD>
<BODY BGCOLOR="WHITE">
<H2>Apache Documentation</H2>
<UL>
<xsl:for-each select="DIRECTIVES/DIRECTIVE">
<li><a href="{ @id }"><xsl:value-of select="NAME"/></a></li>
</xsl:for-each>
</UL>
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="HEADER">
<H3>
<xsl:apply-templates/>
</H3>
</xsl:template>
<xsl:template match="SUMMARY">
<BLOCKQUOTE>
<xsl:apply-templates/>
</BLOCKQUOTE>
</xsl:template>
<xsl:template match="DIRECTIVES">
<dl>
<xsl:apply-templates/>
</dl>
</xsl:template>
<xsl:template match="DIRECTIVE">
<dt><xsl:value-of select="NAME"/>(directive)</dt>
<dd>
<xsl:apply-templates/>
</dd>
</xsl:template>
<xsl:template match="TOKEN">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="SYNTAX">
<p>
<em>Syntax:</em> <xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="CONTEXT">
<p>
<em>Context:</em> <xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="OVERRIDE">
<p>
<em>Override:</em> <xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="STATUS">
<p>
<em>Status:</em> <xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="COMPATIBILITY">
<p>
<em>Compatibility:</em> <xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="EXAMPLE">
<p>
<blockquote>
<dl><dt>Example:</dt>
<dd>
<code><xsl:apply-templates/></code>
</dd>
</dl>
</blockquote>
</p>
</xsl:template>
<xsl:template match="RELATED">
<p>
<em>See also:</em>
<xsl:for-each select="A">
<!-- how to get HREF here ? -->
<a href="{ @HREF }"><xsl:apply-templates/></a> -
</xsl:for-each>
</p>
</xsl:template>
<xsl:template match="P">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="apache.xsl"?>
<MODULE id="manual/mod/mod_access">
<HEADER>
Module mod_access
</HEADER>
<SUMMARY>
This module is contained in the <CODE>mod_access.c</CODE> file, and
is compiled in by default. It provides access control based on client
hostname or IP address.
</SUMMARY>
<DIRECTIVES>
<DIRECTIVE id="allow directive">
<NAME>allow directive</NAME>
<SYNTAX>
allow from host host ...
</SYNTAX>
<CONTEXT>
directory, .htaccess
</CONTEXT>
<OVERRIDE>
Limit
</OVERRIDE>
<STATUS>
Base
</STATUS>
<COMPATIBILITY>
Apache 1.2 and above
</COMPATIBILITY>
<TOKEN>
<P>
The allow directive affects which hosts can access a given
directory.
<EM>Host</EM> is one of the following:
</P>
<DL>
<DT><CODE>all</CODE>
</DT>
<DD>All hosts are allowed access
</DD>
<DT>A (partial) domain-name
</DT>
<DD>Hosts whose names match, or end in, this string are
allowed access.
</DD>
<DT>A full IP address
</DT>
<DD>An IP address of a host allowed access
</DD>
<DT>A partial IP address
</DT>
<DD>The first 1 to 3 bytes of an IP address, for subnet
restriction.
</DD>
<DT>A network/netmask pair (<STRONG>Apache 1.3 and
later</STRONG>)
</DT>
<DD>A network a.b.c.d, and a netmask w.x.y.z. For more
fine-grained subnet
restriction. (<EM>i.e.</EM>, 10.1.0.0/255.255.0.0)
</DD>
<DT>A network/nnn CIDR specification (<STRONG>Apache
1.3 and later</STRONG>)
</DT>
<DD>Similar to the previous case, except the netmask
consists of nnn
high-order 1 bits. (<EM>i.e.</EM>, 10.1.0.0/16 is the same
as 10.1.0.0/255.255.0.0)
</DD>
</DL>
<EXAMPLE>
allow from .ncsa.uiuc.edu
</EXAMPLE>
<P>
All hosts in the specified domain are allowed access.
</P>
<P>
Note that this compares whole components; <CODE>bar.edu</CODE>
would not match <CODE>foobar.edu</CODE>.
</P>
<RELATED>
<A HREF="#deny">deny</A>
<A HREF="#order">order</A>
<A
HREF="mod_browser.html#browsermatch">BrowserMatch</A>.
</RELATED>
</TOKEN>
</DIRECTIVE>
<DIRECTIVE id="allowfromenv">
<NAME>allow from env</NAME>
<SYNTAX>
allow from env=<EM>variablename</EM>
</SYNTAX>
<CONTEXT>
directory, .htaccess
</CONTEXT>
<OVERRIDE>
Limit
</OVERRIDE>
<STATUS>
Base
</STATUS>
<COMPATIBILITY>
Apache 1.2 and above
</COMPATIBILITY>
<TOKEN>
<P>
The allow from env directive controls access to a directory by
the
existence (or non-existence) of an environment variable.
</P>
<EXAMPLE>
BrowserMatch ^KnockKnock/2.0 let_me_in
<Directory /docroot>
order deny,allow
deny from all
allow from env=let_me_in
</Directory>
</EXAMPLE>
<P>
In this case browsers with the user-agent string
<TT>KnockKnock/2.0</TT> will
be allowed access, and all others will be denied.
</P>
</TOKEN>
<RELATED>
<A HREF="#denyfromenv">deny from env</A>
</RELATED>
</DIRECTIVE>
<DIRECTIVE id="deny">
<NAME>deny</NAME>
<SYNTAX>
deny from host host ...
</SYNTAX>
<CONTEXT>
directory, .htaccess
</CONTEXT>
<OVERRIDE>
Limit
</OVERRIDE>
<STATUS>
Base
</STATUS>
<COMPATIBILITY>
Apache 1.2 and above
</COMPATIBILITY>
<TOKEN>
<P>
The deny directive affects which hosts can access a given
directory.
<EM>Host</EM> is one of the following:
</P>
<DL>
<DT><CODE>all</CODE>
</DT>
<DD>all hosts are denied access
</DD>
<DT>A (partial) domain-name
</DT>
<DD>host whose name is, or ends in, this string are
denied access.
</DD>
<DT>A full IP address
</DT>
<DD>An IP address of a host denied access
</DD>
<DT>A partial IP address
</DT>
<DD>The first 1 to 3 bytes of an IP address, for subnet
restriction.
</DD>
<DT>A network/netmask pair (<STRONG>Apache 1.3 and
later</STRONG>)
</DT>
<DD>A network a.b.c.d, and a netmask w.x.y.z. For more
fine-grained subnet
restriction. (<EM>i.e.</EM>, 10.1.0.0/255.255.0.0)
</DD>
<DT>A network/nnn CIDR specification (<STRONG>Apache
1.3 and later</STRONG>)
</DT>
<DD>Similar to the previous case, except the netmask
consists of nnn
high-order 1 bits. (<EM>i.e.</EM>, 10.1.0.0/16 is
the same as 10.1.0.0/255.255.0.0)
</DD>
</DL>
<EXAMPLE>
deny from 16
</EXAMPLE>
<P>
All hosts in the specified network are denied access.
</P>
<P>
Note that this compares whole components; <CODE>bar.edu</CODE>
would not match <CODE>foobar.edu</CODE>.
</P>
<RELATED>
<A HREF="#allow">allow</A>
<A HREF="#order">order</A>
</RELATED>
</TOKEN>
</DIRECTIVE>
<DIRECTIVE id="denyfromenv">
<NAME>deny from env</NAME>
<SYNTAX>
deny from env=<EM>variablename</EM>
</SYNTAX>
<CONTEXT>
directory, .htaccess
</CONTEXT>
<OVERRIDE>
Limit
</OVERRIDE>
<STATUS>
Base
</STATUS>
<COMPATIBILITY>
Apache 1.2 and above
</COMPATIBILITY>
<TOKEN>
The deny from env directive controls access to a directory by
the
existence (or non-existence) of an environment variable.
<EXAMPLE>
BrowserMatch ^BadRobot/0.9 go_away
<Directory /docroot>
order allow,deny
allow from all
deny from env=go_away
</Directory>
</EXAMPLE>
In this case browsers with the user-agent string
<TT>BadRobot/0.9</TT> will
be denied access, and all others will be allowed.
<RELATED>
<A HREF="#allowfromenv">allow from env</A>
<A HREF="#order">order</A>.
</RELATED>
</TOKEN>
</DIRECTIVE>
<DIRECTIVE id="order directive">
<NAME>order directive</NAME>
<SYNTAX>
order ordering
</SYNTAX>
<DEFAULT>
order deny,allow
</DEFAULT>
<CONTEXT>
directory, .htaccess
</CONTEXT>
<OVERRIDE>
Limit
</OVERRIDE>
<STATUS>
Base
</STATUS>
<TOKEN>
<P>
The order directive controls the order in which <A
HREF="#allow">allow</A> and
<A HREF="#deny">deny</A> directives are evaluated.
<EM>Ordering</EM> is one
of
</P>
<DL>
<DT>deny,allow
</DT>
<DD>the deny directives are evaluated before the allow
directives. (The
initial state is OK.)
</DD>
<DT>allow,deny
</DT>
<DD>the allow directives are evaluated before the deny
directives. (The
initial state is FORBIDDEN.)
</DD>
<DT>mutual-failure
</DT>
<DD>Only those hosts which appear on the allow list and
do not appear
on the deny list are granted access. (The initial
state is irrelevant.)
</DD>
</DL>
<P>
Keywords may only be separated by a comma; no whitespace is
allowed between
them.
<STRONG>Note that in all cases every <CODE>allow</CODE> and
<CODE>deny</CODE>
statement is evaluated, there is no
"short-circuiting".</STRONG>
</P>
<EXAMPLE>
order deny,allow
deny from all
allow from .ncsa.uiuc.edu
</EXAMPLE>
<P>
Hosts in the ncsa.uiuc.edu domain are allowed access; all other
hosts are
denied access.
</P>
</TOKEN>
</DIRECTIVE>
</DIRECTIVES>
</MODULE>
<HTML xmlns="http://www.w3.org/TR/REC-html40"><HEAD><TITLE>Documentation
Module mod_access
</TITLE></HEAD><BODY BGCOLOR="WHITE"><H2>Apache Documentation</H2><UL><li><a
href="allow directive">allow directive</a></li><li><a href="allowfromenv">allow
from env</a></li><li><a href="deny">deny</a></li><li><a href="denyfromenv">deny
from env</a></li><li><a href="order directive">order directive</a></li></UL><H3>
Module mod_access
</H3><BLOCKQUOTE>
This module is contained in the mod_access.c file, and
is compiled in by default. It provides access control based on client
hostname or IP address.
</BLOCKQUOTE><dl><dt>allow directive(directive)</dt><dd>allow
directive<p><em>Syntax:</em>
allow from host host ...
</p><p><em>Context:</em>
directory, .htaccess
</p><p><em>Override:</em>
Limit
</p><p><em>Status:</em>
Base
</p><p><em>Compatibility:</em>
Apache 1.2 and above
</p><p><p>
The allow directive affects which hosts can access a given
directory.
Host is one of the following:
</p>allAll hosts are allowed access
A (partial) domain-name
Hosts whose names match, or end in, this string are
allowed access.
A full IP address
An IP address of a host allowed access
A partial IP address
The first 1 to 3 bytes of an IP address, for subnet
restriction.
A network/netmask pair (Apache 1.3 and later)
A network a.b.c.d, and a netmask w.x.y.z. For more
fine-grained subnet
restriction. (i.e., 10.1.0.0/255.255.0.0)
A network/nnn CIDR specification (Apache 1.3 and later)
Similar to the previous case, except the netmask
consists of nnn
high-order 1 bits. (i.e., 10.1.0.0/16 is the same as
10.1.0.0/255.255.0.0)
<p><blockquote><dl><dt>Example:</dt><dd><code>
allow from .ncsa.uiuc.edu
</code></dd></dl></blockquote></p><p>
All hosts in the specified domain are allowed access.
</p><p>
Note that this compares whole components; bar.edu
would not match foobar.edu.
</p><p><em>See also:</em><a href="#deny">deny</a> -
<a href="#order">order</a> -
<a href="mod_browser.html#browsermatch">BrowserMatch</a> -
</p></p></dd><dt>allow from env(directive)</dt><dd>allow from
env<p><em>Syntax:</em>
allow from env=variablename</p><p><em>Context:</em>
directory, .htaccess
</p><p><em>Override:</em>
Limit
</p><p><em>Status:</em>
Base
</p><p><em>Compatibility:</em>
Apache 1.2 and above
</p><p><p>
The allow from env directive controls access to a directory by
the
existence (or non-existence) of an environment variable.
</p><p><blockquote><dl><dt>Example:</dt><dd><code>
BrowserMatch ^KnockKnock/2.0 let_me_in
<Directory /docroot>
order deny,allow
deny from all
allow from env=let_me_in
</Directory>
</code></dd></dl></blockquote></p><p>
In this case browsers with the user-agent string KnockKnock/2.0
will
be allowed access, and all others will be denied.
</p></p><p><em>See also:</em><a href="#denyfromenv">deny from
env</a> -
</p></dd><dt>deny(directive)</dt><dd>deny<p><em>Syntax:</em>
deny from host host ...
</p><p><em>Context:</em>
directory, .htaccess
</p><p><em>Override:</em>
Limit
</p><p><em>Status:</em>
Base
</p><p><em>Compatibility:</em>
Apache 1.2 and above
</p><p><p>
The deny directive affects which hosts can access a given
directory.
Host is one of the following:
</p>allall hosts are denied access
A (partial) domain-name
host whose name is, or ends in, this string are denied
access.
A full IP address
An IP address of a host denied access
A partial IP address
The first 1 to 3 bytes of an IP address, for subnet
restriction.
A network/netmask pair (Apache 1.3 and later)
A network a.b.c.d, and a netmask w.x.y.z. For more
fine-grained subnet
restriction. (i.e., 10.1.0.0/255.255.0.0)
A network/nnn CIDR specification (Apache 1.3 and later)
Similar to the previous case, except the netmask
consists of nnn
high-order 1 bits. (i.e., 10.1.0.0/16 is the same
as 10.1.0.0/255.255.0.0)
<p><blockquote><dl><dt>Example:</dt><dd><code>
deny from 16
</code></dd></dl></blockquote></p><p>
All hosts in the specified network are denied access.
</p><p>
Note that this compares whole components; bar.edu
would not match foobar.edu.
</p><p><em>See also:</em><a href="#allow">allow</a> -
<a href="#order">order</a> -
</p></p></dd><dt>deny from env(directive)</dt><dd>deny from
env<p><em>Syntax:</em>
deny from env=variablename</p><p><em>Context:</em>
directory, .htaccess
</p><p><em>Override:</em>
Limit
</p><p><em>Status:</em>
Base
</p><p><em>Compatibility:</em>
Apache 1.2 and above
</p><p>
The deny from env directive controls access to a directory by
the
existence (or non-existence) of an environment variable.
<p><blockquote><dl><dt>Example:</dt><dd><code>
BrowserMatch ^BadRobot/0.9 go_away
<Directory /docroot>
order allow,deny
allow from all
deny from env=go_away
</Directory>
</code></dd></dl></blockquote></p>
In this case browsers with the user-agent string BadRobot/0.9
will
be denied access, and all others will be allowed.
<p><em>See also:</em><a href="#allowfromenv">allow from env</a>
-
<a href="#order">order</a> -
</p></p></dd><dt>order directive(directive)</dt><dd>order
directive<p><em>Syntax:</em>
order ordering
</p>
order deny,allow
<p><em>Context:</em>
directory, .htaccess
</p><p><em>Override:</em>
Limit
</p><p><em>Status:</em>
Base
</p><p><p>
The order directive controls the order in which allow and
deny directives are evaluated. Ordering is one
of
</p>deny,allow
the deny directives are evaluated before the allow
directives. (The
initial state is OK.)
allow,deny
the allow directives are evaluated before the deny
directives. (The
initial state is FORBIDDEN.)
mutual-failure
Only those hosts which appear on the allow list and do
not appear
on the deny list are granted access. (The initial
state is irrelevant.)
<p>
Keywords may only be separated by a comma; no whitespace is
allowed between
them.
Note that in all cases every allow and deny
statement is evaluated, there is no
"short-circuiting".</p><p><blockquote><dl><dt>Example:</dt><dd><code>
order deny,allow
deny from all
allow from .ncsa.uiuc.edu
</code></dd></dl></blockquote></p><p>
Hosts in the ncsa.uiuc.edu domain are allowed access; all other
hosts are
denied access.
</p></p></dd></dl></BODY></HTML>