view xsls/directive.xsls @ 102:c76a257f3fd4

The directive name is now automatically printed in <default> and <syntax>. Specifying <default> is made non-optional. Visible changes: - "types" and "proxy_set_header" get proper defaults (not yet displayed nicely); - "fastcgi_hide_header", "fastcgi_ignore_headers", "fastcgi_pass_header", "proxy_hide_header", "proxy_ignore_headers", and "proxy_pass_header" now have their (empty) defaults documented; - mentions of "fastcgi_redirect_errors" and "proxy_redirect_errors" which are long unsupported were removed.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 19 Oct 2011 05:15:24 +0000
parents 1d315ef37215
children 3ae68fe2e938
line wrap: on
line source

X:stylesheet {

    X:template = "directive" {
        <a name="{@name}"/>
        <!-- <center><h4> !{@name} </h4></center> -->
        <div class="directive">
        !! "syntax";
        !! "default";
        !! "context";
        X:if "(@appeared-in)" {
            <strong>appeared in version</strong>: !{@appeared-in}
        }
        </div>
        !! "para";
    }

    X:template = "syntax" {
        X:if "position() = 1" {
            <strong>syntax</strong>:
        } else {
            <code>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</code>
        }
        <code>
        !{../@name}
        X:if "count(node()) != 0" {
            X:text{ } !!;
        }
        </code>
        <br/>
    }

    X:template = "default" {
        X:if "position() = 1" {
            <strong>default</strong>:
        }
        X:if "count(node()) = 0" {
            <strong>
            !{document(concat($XML, '/i18n.xml'))
                       /i18n/text[@lang = $LANG]/item[@id='none']}
            </strong>
        } else {
            <code> !{../@name} X:text{ } !!; </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/>
        }
    }

}