common.xsl revision 01c674544bd4c211141bcd9fb09b96ffc18c6c3d
beaad6ac31022179c44d88536811e9ccd9425696nd <!-- Please, don't hard-code output strings! Use the language -->
beaad6ac31022179c44d88536811e9ccd9425696nd <!-- files and the translation "stuff"... -->
beaad6ac31022179c44d88536811e9ccd9425696nd <!-- Constants used for case translation -->
beaad6ac31022179c44d88536811e9ccd9425696nd <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
beaad6ac31022179c44d88536811e9ccd9425696nd <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
01c674544bd4c211141bcd9fb09b96ffc18c6c3dnd space separated list of blockelements defined in common.dtd
01c674544bd4c211141bcd9fb09b96ffc18c6c3dnd used for inline content catching in <example>s
3726777f47ac4bba3e21b075905959bbea47e72eerikabele p example note table ul ol dl pre img blockquote
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <!-- relative path to /manual/ -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:variable name="path" select="document(/*/@metafile)/metafile/relpath" />
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- load outsourced page types -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- make sure, we set relative anchors
3726777f47ac4bba3e21b075905959bbea47e72eerikabele only, if we're actually transforming
7e68fce3cbd2246164e045a51ecd77f9f26680ednd a modulefile (see <directive>) -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Utility templates for constructing pages -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- HTML head -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7e68fce3cbd2246164e045a51ecd77f9f26680ednd This file is generated from xml source: DO NOT EDIT
7e68fce3cbd2246164e045a51ecd77f9f26680ednd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="$messages/message[@name='apachetitle']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <link title="Main stylesheet" type="text/css" media="all" rel="stylesheet"
7e68fce3cbd2246164e045a51ecd77f9f26680ednd href="{$path}/style/css/manual.css" />
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <link title="No Sidebar - Default font size" type="text/css" media="all"
e5343521634b71f10f0e88374d88bd5a45f75f68nd rel="alternate stylesheet"
bdbf46e4950b6f633073f803486962e82c2f086and href="{$path}/style/css/manual-loose-100pc.css"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd rel="stylesheet"
fd46b0fed4351924170b4db5859dc35b771ee16dnd href="{$path}/style/css/manual-print.css"/>
fd46b0fed4351924170b4db5859dc35b771ee16dnd <link rel="shortcut icon" href="{$path}/images/favicon.ico" />
fd46b0fed4351924170b4db5859dc35b771ee16dnd <!-- /head -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- page top -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:value-of select="$messages/message[@name='apachehttpserver']"/>
e5343521634b71f10f0e88374d88bd5a45f75f68nd <xsl:attribute name="href"><xsl:value-of select="parentdocument/@href"/></xsl:attribute>
e5343521634b71f10f0e88374d88bd5a45f75f68nd <img src="{$path}/images/left.gif" alt="<-" title="<-" />
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="$messages/message[@name='apache']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="$messages/message[@name='http-server']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="$messages/message[@name='documentation']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="$messages/message[@name='version']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:if test="/modulesynopsis or /directiveindex or /quickreference">
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd <xsl:value-of select="$messages/message[@name='modules']"/>
480bee29abcc415b6b8c18d2ecbf2c5f88f1f05bnd <!-- /top -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- page bottom -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:value-of select="$messages/message[@name='maintainedby']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd >Apache HTTP Server Documentation Project</a>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /bottom -->
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd <!-- Process a documentation section -->
66e48875fca2df6669dab4f2690ee36c6913c0ffnd <!-- Section heading -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Section body -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /section -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- handle subsections (lower level headings) -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <!-- Section heading -->
f4a6ce7d0d0311e4da2d4df6812263c562a05a3end <!-- Section body -->
8cfbcde8e416fd60132dd4324c42a5098da156cfnd <!-- handle subsubsections (h4) -->
21041d71aa640dca78abab65ea293171b668bc20nd <!-- Section heading -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Section body -->
8cfbcde8e416fd60132dd4324c42a5098da156cfnd <!-- section nesting > h4 is not supported for now -->
8cfbcde8e416fd60132dd4324c42a5098da156cfnd <xsl:text>FATAL: exceeding maximum section nesting level.
8cfbcde8e416fd60132dd4324c42a5098da156cfnd Perhaps you should consider to split your document into
8cfbcde8e416fd60132dd4324c42a5098da156cfnd several ones...
8cfbcde8e416fd60132dd4324c42a5098da156cfnd <!-- (sub)section titles -->
8cfbcde8e416fd60132dd4324c42a5098da156cfnd <!-- Don't print the title twice -->
99e4eb246ec234156eb878835d4e1b4e2f48c499nd <!-- generate section index -->
8cfbcde8e416fd60132dd4324c42a5098da156cfnd <!-- nested sections -->
8cfbcde8e416fd60132dd4324c42a5098da156cfnd <!-- NOT FOR NOW -->
8cfbcde8e416fd60132dd4324c42a5098da156cfnd <xsl:if test="section">
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:apply-templates select="section" mode="index"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /section index -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- docs super menu -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:value-of select="$messages/message[@name='modules']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="$messages/message[@name='directives']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="$messages/message[@name='glossary']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="$messages/message[@name='sitemap']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /super-menu -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <example> -->
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd <!-- iterate over *all* nodes; bare text and other -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- inline stuff is wrapped into <p><code>, block -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- level elements (defined in $blockelements) are -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- applied "as is" -->
65241490e40aa0c831988073eed0633dad10c6f2nd select="concat(' ', normalize-space($blockelements), ' ')"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:variable name="is-block-node" select="boolean(contains($blocks, concat(' ',local-name(),' ')))"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:variable name="bb" select="count(preceding-sibling::*[contains($blocks,concat(' ',local-name(),' '))])"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:apply-templates select="preceding-sibling::node()[count(preceding-sibling::*[contains($blocks,concat(' ',local-name(),' '))]) >= $bb]"/>
65241490e40aa0c831988073eed0633dad10c6f2nd <xsl:apply-templates select="self::node()[not($is-block-node)]"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- apply bare text only, if it's not only \s or empty -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:apply-templates select="self::node()[$is-block-node]"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /node() -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /example -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- don't print twice -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- indent -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /indent -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <note> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Notes are placed in a table. Uses different back- -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- ground colors, depending on type of note. -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /note -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <note><title> -->
65241490e40aa0c831988073eed0633dad10c6f2nd <!-- <directive> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Inserts link to another directive, which might be -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <!-- in another module. References are converted into -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- lower case. -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:variable name="lowerdirective" select="translate(., $uppercase, $lowercase)"/>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:when test="$in-modulesynopsis = '1' and @module = /modulesynopsis/name">
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <a href="{$path}/mod/{$obs_}{@module}.html#{$lowerdirective}">
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /directive -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <module> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Inserts a link to refereed module -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /module -->
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd <!-- <related> -->
b09970a14a3280b9e4e449dea6e53968fc206731nd <xsl:value-of select="$messages/message[@name='relatedmodules']"/>
b09970a14a3280b9e4e449dea6e53968fc206731nd <xsl:value-of select="$messages/message[@name='relateddirectives']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /related -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <table> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:when test="position() mod 2 = (count(preceding-sibling::*[count(td) = 0]) mod 2)">
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /table -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <ol type -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /ol type -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <summary> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Passes through content -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /summary -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <description> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Passes through content -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /description -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <hint> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Passes through content -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /description -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <usage> -->
66e48875fca2df6669dab4f2690ee36c6913c0ffnd <!-- Passes through content -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /usage -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <syntax> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Passes through content -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /syntax -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <default> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Passes through content -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /default -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- toplink -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <a href="#page-header"><img src="{$path}/images/up.gif" alt="top" /></a>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- /toplink -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- <transnote> -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="$messages/message[@name='transnote']"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- Filter   in text() nodes. -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- In some environments this character won't be -->
480bee29abcc415b6b8c18d2ecbf2c5f88f1f05bnd <!-- transformed correctly, so we just write it -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <!-- explicitely as " " -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:param name="text"><xsl:value-of select="."/></xsl:param>
fd46b0fed4351924170b4db5859dc35b771ee16dnd <xsl:value-of select="substring-before($text, ' ')"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd select="substring-after($text, ' ')"/>
fd46b0fed4351924170b4db5859dc35b771ee16dnd <!-- Process everything else by just passing it through -->
fd46b0fed4351924170b4db5859dc35b771ee16dnd <!-- create a letter bar -->
fd46b0fed4351924170b4db5859dc35b771ee16dnd <!-- used in several documents -->
fd46b0fed4351924170b4db5859dc35b771ee16dnd <xsl:with-param name="letters" select="substring($letters,2)"/>
fd46b0fed4351924170b4db5859dc35b771ee16dnd <!-- template(s) for collecting all start letters -->
fd46b0fed4351924170b4db5859dc35b771ee16dnd <!-- of directives -->
fd46b0fed4351924170b4db5859dc35b771ee16dnd <!-- used in several documents -->
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:value-of select="translate(substring(normalize-space(name),1,1),$lowercase,$uppercase)"/>
acc36ab93565d2880447d535da6ca6e5feac7a70nd <xsl:variable name="current" select="substring($letters,1,1)"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:with-param name="letters" select="substring($letters,2)"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:variable name="sname" select="translate($name,$lowercase,$uppercase)"/>
7e68fce3cbd2246164e045a51ecd77f9f26680ednd <xsl:when test="starts-with($sname,'MOD_') or starts-with($sname,'MPM_')">
bdbf46e4950b6f633073f803486962e82c2f086and <!-- /module-translatename -->