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