]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
move style/man/manpage.xsl style/xsl/nroff.xsl
authorAndré Malo <nd@apache.org>
Mon, 3 May 2004 19:41:52 +0000 (19:41 +0000)
committerAndré Malo <nd@apache.org>
Mon, 3 May 2004 19:41:52 +0000 (19:41 +0000)
remove autogenerated man.en.xsl

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103582 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/lang/en.xml
docs/manual/style/man/man.en.xsl [deleted file]
docs/manual/style/man/manpage.xsl [deleted file]
docs/manual/style/xsl/language.xsl

index 7535faaadb1c42bfb18d3496b7f842478f12e333..97a3d948ee9f6983a2dd7ba5dd1538b571866af8 100644 (file)
         <settings>English (USA)</settings>
     </chm>
 
+    <man>
+        <charset>ISO-8859-1</charset>
+    </man>
+
     <!-- Some strings might be used in other contexts, than stated in the -->
     <!-- comments...                                                      -->
     <messages>
diff --git a/docs/manual/style/man/man.en.xsl b/docs/manual/style/man/man.en.xsl
deleted file mode 100644 (file)
index e3aa61b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
- Copyright 2003-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<xsl:stylesheet version="1.0"
-              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:output 
-  method="text"
-  encoding="ISO-8859-1"
-  indent="no"
-/>
-
-<!-- Read the localized messages from the specified language file -->
-<xsl:variable name="message" select="document('../lang/en.xml')/language/messages/message" />
-
-<!-- Now get the real guts of the stylesheet -->
-<xsl:include href="manpage.xsl" />
-
-</xsl:stylesheet>
diff --git a/docs/manual/style/man/manpage.xsl b/docs/manual/style/man/manpage.xsl
deleted file mode 100644 (file)
index 9f9924f..0000000
+++ /dev/null
@@ -1,443 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Copyright 2003-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!--
- * This software is based on initial work of Joe Orton <jorton redhat.com>
- * (contributed to the ASF) which is based on the db2man stylesheets developed
- * by Martijn van Beers. db2man is now part of docbook-xsl, which is
- * licensed under the following terms:
- *
- * Copyright
- * =========
- *
- * Copyright (C) 1999, 2000, 2001, 2002 Norman Walsh
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the ``Software''), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * Except as contained in this notice, the names of individuals
- * credited with contribution to this software shall not be used in
- * advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization
- * from the individuals in question.
- *
- * Any stylesheet derived from this Software that is publically
- * distributed will be identified with a different name and the
- * version strings in any derived Software will be changed so that
- * no possibility of confusion between the derived package and this
- * Software will exist.
- *
- * Warranty
- * ========
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT.  IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
- * CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE. 
- */ -->
-
-<!DOCTYPE xsl:stylesheet [
-    <!ENTITY lf SYSTEM "../xsl/util/lf.xml">
-]>
-<xsl:stylesheet version="1.0"
-              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<!--                                                                      -->
-<!-- params injected from elsewhere                                       -->
-<!--                                                                      -->
-<xsl:param name="section" select="'1'" />
-<xsl:param name="date" />
-
-<!-- Constants used for case translation -->
-<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
-<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
-
-<!-- ==================================================================== -->
-<!-- <manualpage>                                                         -->
-<!-- Process an entire document into an nroff formatted man page          -->
-<!-- ==================================================================== -->
-<xsl:template match="manualpage">
-<!-- start at the beginning ;-) -->
-<xsl:text>.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</xsl:text>&lf;
-<xsl:text>.\" DO NOT EDIT! Generated from XML source.</xsl:text>&lf;
-<xsl:text>.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</xsl:text>&lf;
-<xsl:text>.de Sh \" Subsection</xsl:text>&lf;
-<xsl:text>.br</xsl:text>&lf;
-<xsl:text>.if t .Sp</xsl:text>&lf;
-<xsl:text>.ne 5</xsl:text>&lf;
-<xsl:text>.PP</xsl:text>&lf;
-<xsl:text>\fB\\$1\fR</xsl:text>&lf;
-<xsl:text>.PP</xsl:text>&lf;
-<xsl:text>..</xsl:text>&lf;
-<xsl:text>.de Sp \" Vertical space (when we can't use .PP)</xsl:text>&lf;
-<xsl:text>.if t .sp .5v</xsl:text>&lf;
-<xsl:text>.if n .sp</xsl:text>&lf;
-<xsl:text>..</xsl:text>&lf;
-<xsl:text>.de Ip \" List item</xsl:text>&lf;
-<xsl:text>.br</xsl:text>&lf;
-<xsl:text>.ie \\n(.$>=3 .ne \\$3</xsl:text>&lf;
-<xsl:text>.el .ne 3</xsl:text>&lf;
-<xsl:text>.IP "\\$1" \\$2</xsl:text>&lf;
-<xsl:text>..</xsl:text>&lf;
-
-<!-- reftitle -->
-<xsl:text>.TH "</xsl:text>
-<!-- standard man page width is 64 chars; 6 chars needed for the two
-    (x) volume numbers, and 2 spaces, leaves 56 -->
-<xsl:value-of select="substring(translate(substring-before(
-    normalize-space(title), ' - '), $lowercase, $uppercase), 1, (56 -
-    string-length(substring-before(normalize-space(title), ' - '))) div 2)" />
-<xsl:text>" </xsl:text>
-
-<!-- section -->
-<xsl:value-of select="$section" />
-<xsl:text> "</xsl:text>
-
-<!-- date; perhaps injected via ant later. -->
-<xsl:value-of select="$date" />
-<xsl:text>" "</xsl:text>
-
-<!-- productname -->
-<xsl:value-of select="'Apache HTTP Server'" />
-<xsl:text>" "</xsl:text>
-
-<!-- title -->
-<xsl:value-of select="substring-before(normalize-space(title), ' - ')" />
-<xsl:text>"</xsl:text>&lf;
-
-<!-- reorder the paragraphs a bit -->
-<xsl:apply-templates select="title" />&lf;
-<xsl:apply-templates select="section[@id='synopsis']" />&lf;
-<xsl:apply-templates select="summary" />&lf;
-<xsl:apply-templates select="section[@id!='synopsis']" />&lf;
-</xsl:template>
-<!-- /manualpage -->
-
-
-<!-- ==================================================================== -->
-<!-- <manualpage><title>                                                  -->
-<!-- Process heading                                                      -->
-<!-- ==================================================================== -->
-<xsl:template match="manualpage/title">
-&lf;
-<xsl:text>.SH NAME</xsl:text>&lf;
-<xsl:variable name="text">
-    <xsl:call-template name="filter.escape">
-        <xsl:with-param name="text" select="normalize-space(.)" />
-    </xsl:call-template>
-</xsl:variable>
-<xsl:value-of select="substring-before($text, ' - ')" />
-<xsl:text> \- </xsl:text>
-<xsl:value-of select="substring-after($text, ' - ')" />
-</xsl:template>
-<!-- /manualpage/title -->
-
-
-<!-- ==================================================================== -->
-<!-- <p>                                                                  -->
-<!-- Process paragraph                                                    -->
-<!-- ==================================================================== -->
-<xsl:template match="p">
-&lf;
-<xsl:text>.PP</xsl:text>&lf;
-
-<xsl:for-each select="node()">
-    <xsl:choose>
-    <xsl:when test="self::text()">
-           <xsl:if test="starts-with(translate(., '&#10;', ' '), ' ') and
-                             preceding-sibling::node()[name(.) != '']">
-               <xsl:text> </xsl:text>
-           </xsl:if>
-        <xsl:variable name="content">
-               <xsl:apply-templates select="." />
-           </xsl:variable>
-           <xsl:value-of select="normalize-space($content)"/>
-           <xsl:if test="translate(substring(., string-length(.), 1), '&#10;',
-                      ' ') = ' ' and following-sibling::node()[name(.) != '']">
-               <xsl:text> </xsl:text>
-           </xsl:if>
-    </xsl:when>
-    <xsl:otherwise>
-        <xsl:variable name="content">
-            <xsl:apply-templates select="." />
-        </xsl:variable>
-        <xsl:value-of select="normalize-space($content)"/>
-    </xsl:otherwise>
-    </xsl:choose>
-</xsl:for-each>&lf;
-</xsl:template>
-<!-- /p -->
-
-
-<!-- ==================================================================== -->
-<!-- <section>                                                            -->
-<!-- process main section                                                 -->
-<!-- ==================================================================== -->
-<xsl:template match="section">
-&lf;
-<xsl:text>.SH "</xsl:text>
-    <xsl:call-template name="filter.escape">
-        <xsl:with-param name="text"
-            select="normalize-space(translate(title, $lowercase, $uppercase))"/>
-    </xsl:call-template>
-<xsl:text>"</xsl:text>&lf;
-<xsl:apply-templates />
-</xsl:template>
-<xsl:template match="section/title" />
-<!-- /section -->
-
-
-<!-- ==================================================================== -->
-<!-- <section><section>                                                   -->
-<!-- process subsection                                                   -->
-<!-- ==================================================================== -->
-<xsl:template match="section/section">
-&lf;
-<xsl:text>.SS "</xsl:text>
-    <xsl:call-template name="filter.escape">
-        <xsl:with-param name="text" select="normalize-space(title)"/>
-    </xsl:call-template>
-<xsl:text>"</xsl:text>&lf;
-<xsl:apply-templates />
-</xsl:template>
-<!-- /section/section -->
-
-
-<!-- ==================================================================== -->
-<!-- <summary>                                                            -->
-<!-- process summary section                                              -->
-<!-- ==================================================================== -->
-<xsl:template match="summary">
-&lf;
-<xsl:text>.SH "</xsl:text>
-    <xsl:call-template name="filter.escape">
-        <xsl:with-param name="text" select="normalize-space(translate($message
-                          [@id='summary'], $lowercase, $uppercase))"/>
-    </xsl:call-template>
-<xsl:text>"</xsl:text>&lf;
-<xsl:apply-templates />
-</xsl:template>
-<!-- /summary -->
-
-
-<!-- ==================================================================== -->
-<!-- <var>, <em>                                                          -->
-<!-- show it somewhat special (italic)                                    -->
-<!-- ==================================================================== -->
-<xsl:template match="var|em">
-<xsl:text>\fI</xsl:text>
-    <xsl:apply-templates />
-<xsl:text>\fR</xsl:text>
-</xsl:template>
-
-
-<!-- ==================================================================== -->
-<!-- <strong>                                                             -->
-<!-- show it somewhat special (bold)                                      -->
-<!-- ==================================================================== -->
-<xsl:template match="strong">
-<xsl:text>\fB</xsl:text>
-    <xsl:apply-templates />
-<xsl:text>\fR</xsl:text>
-</xsl:template>
-
-
-<!-- ==================================================================== -->
-<!-- <directive>                                                          -->
-<!-- ==================================================================== -->
-<xsl:template match="directive">
-<xsl:if test="@type = 'section'">&lt;</xsl:if>
-<xsl:apply-templates />
-<xsl:if test="@type = 'section'">&gt;</xsl:if>
-</xsl:template>
-
-
-<!-- ==================================================================== -->
-<!-- <dl>                                                                 -->
-<!-- ==================================================================== -->
-<xsl:template match="dl">
-&lf;
-<xsl:apply-templates />&lf;
-</xsl:template>
-
-
-<!-- ==================================================================== -->
-<!-- <dt>                                                                 -->
-<!-- ==================================================================== -->
-<xsl:template match="dt">
-&lf;
-<xsl:text>.TP</xsl:text>&lf;
-
-<xsl:variable name="dt-content">
-    <xsl:apply-templates />
-</xsl:variable>
-<xsl:value-of select="normalize-space($dt-content)" />&lf;
-
-<xsl:variable name="dd-content">
-    <xsl:apply-templates
-        select="following-sibling::dd[position() = 1]/node()" />
-</xsl:variable>
-<xsl:value-of select="normalize-space($dd-content)" />
-</xsl:template>
-<!-- /dt -->
-
-
-<!-- ==================================================================== -->
-<!-- <example>                                                            -->
-<!-- ==================================================================== -->
-<xsl:template match="example">
-&lf;
-<xsl:text>.nf</xsl:text>&lf;
-<xsl:apply-templates />&lf;
-<xsl:text>.fi</xsl:text>&lf;
-</xsl:template>
-<!-- /example -->
-
-
-<!-- ==================================================================== -->
-<!-- simple table support ... (exactly 2 columns)                         -->
-<!-- ==================================================================== -->
-<xsl:template match="table/tr">
-<xsl:if test="count(./*) &gt; 2">
-    <xsl:message terminate="yes">
-FATAL: only tables with two (2) columns are supported.
-    </xsl:message>
-</xsl:if>
-
-&lf;
-<xsl:text>.Ip "\(bu \s-1</xsl:text>
-<xsl:variable name="first-content">
-   <xsl:apply-templates select="./*[1]/node()" />
-</xsl:variable>
-<xsl:value-of select="normalize-space($first-content)" />
-
-<xsl:text>\s0 \- </xsl:text>
-<xsl:variable name="second-content">
-   <xsl:apply-templates select="./*[2]/node()" />
-</xsl:variable>
-<xsl:value-of select="normalize-space($second-content)" />&lf;
-</xsl:template>
-<!-- /table/tr -->
-
-
-<!-- ==================================================================== -->
-<!-- text filter                                                          -->
-<!-- ==================================================================== -->
-<xsl:template match="text()">
-<xsl:choose>
-<xsl:when test="normalize-space(.) != ''">
-<xsl:call-template name="filter.escape">
-    <xsl:with-param name="text" select="." />
-</xsl:call-template>
-</xsl:when>
-<xsl:otherwise>
-    <xsl:text> </xsl:text>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-
-
-<!-- ==================================================================== -->
-<!-- pass through content                                                 -->
-<!-- ==================================================================== -->
-<xsl:template match="a|code|module|table">
-<xsl:apply-templates />
-</xsl:template>
-
-
-<!-- ==================================================================== -->
-<!-- remove some stuff from the output                                    -->
-<!-- ==================================================================== -->
-<xsl:template match="parentdocument|seealso|dd|td|example/br" />
-
-
-<!-- ==================================================================== -->
-<!-- the rest will be rejected                                            -->
-<!-- ==================================================================== -->
-<xsl:template match="*">
-<xsl:message terminate="yes">
-FATAL: the behaviour of the &lt;<xsl:value-of select="local-name()" />&gt;
-element was not tested. You need to modify
-the XSLT stylesheet in order to get it work.
-</xsl:message>
-</xsl:template>
-
-
-<!-- ==================================================================== -->
-<!-- filter.escape                                                        -->
-<!-- escape special characters                                            -->
-<!-- ==================================================================== -->
-<xsl:template name="filter.escape">
-<xsl:param name="text" />
-
-<xsl:choose>
-<xsl:when test="contains($text, '\')">
-    <xsl:call-template name="filter.escape.period">
-        <xsl:with-param name="text" select="substring-before($text, '\')" />
-    </xsl:call-template>
-    <xsl:text>\\</xsl:text>
-    <xsl:call-template name="filter.escape">
-        <xsl:with-param name="text" select="substring-after($text, '\\')" />
-    </xsl:call-template>
-</xsl:when>
-<xsl:otherwise>
-    <xsl:call-template name="filter.escape.period">
-        <xsl:with-param name="text" select="$text" />
-    </xsl:call-template>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-<!-- /filter.escape -->
-
-
-<!-- ==================================================================== -->
-<!-- filter.period                                                        -->
-<!-- accompanying template to filter.escape                               -->
-<!-- ==================================================================== -->
-<xsl:template name="filter.escape.period">
-<xsl:param name="text" />
-
-<xsl:choose>
-<xsl:when test="contains($text, '.')"><!-- period replaced by \&. -->
-    <xsl:value-of select="substring-before($text, '.')" />
-    <xsl:text>\&amp;.</xsl:text>
-    <xsl:call-template name="filter.escape.period">
-        <xsl:with-param name="text" select="substring-after($text, '.')" />
-    </xsl:call-template>
-</xsl:when>
-<xsl:otherwise>
-    <xsl:value-of select="$text" />
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-<!-- /filter.escape.period -->
-
-</xsl:stylesheet>
index adea3a2886084b6ce119abad03f906d4513c8807..8146d9692aa055c6d78fe9af93aef8a2f3bf0fb2 100644 (file)
                 &lf;
             </xsl:if>
 
-            <xsl:if test=". = 'en'">
-                <target name="man-en"
-                        description="- builds the English nroff files">&lf;
+            <xsl:if test="$file/man">
+                <target name="man-{.}"
+                        description="- builds the {$file/name} nroff files">&lf;
                     <xsl:text>    </xsl:text>
-                    <nroff.generic lang="en" />&lf;
+                    <nroff.generic lang="{.}" />&lf;
                 </target>
                 &lf;
+            </xsl:if>
+
+            <xsl:if test=". = 'en'">
                 <target name="latex-en"
                         description="- builds the English latex file">&lf;
                     <xsl:text>    </xsl:text>
@@ -342,7 +345,8 @@ Some targets have additional requirements:
                 <xsl:text>xml</xsl:text>
             </xsl:when>
             <xsl:when test="$type = 'hhc' or
-                            $type = 'hhp'">
+                            $type = 'hhp' or
+                            $type = 'man'">
                 <xsl:text>text</xsl:text>
             </xsl:when>
             <xsl:otherwise>
@@ -361,6 +365,9 @@ Some targets have additional requirements:
                             $type = 'hhp'">
                 <xsl:value-of select="chm/charset" />
             </xsl:when>
+            <xsl:when test="$type = 'man'">
+                <xsl:value-of select="man/charset" />
+            </xsl:when>
             <xsl:otherwise>
                 <xsl:value-of select="charset" />
             </xsl:otherwise>
@@ -405,18 +412,23 @@ Some targets have additional requirements:
     </xsl:element>
     &lf;
 
-    <xsl:element name="xsl:variable">
-        <xsl:attribute name="name">doclang</xsl:attribute>
-        <xsl:value-of select="@id" />
-    </xsl:element>
-    &lf;&lf;
-
-    <xsl:comment>
-        <xsl:text> some meta information have to be passed to the </xsl:text>
-        <xsl:text>transformation </xsl:text>
-    </xsl:comment>
+    <xsl:if test="$type != 'man'">
+        <xsl:element name="xsl:variable">
+            <xsl:attribute name="name">doclang</xsl:attribute>
+            <xsl:value-of select="@id" />
+        </xsl:element>
+        &lf;
+    </xsl:if>
     &lf;
 
+    <xsl:if test="$type != 'man'">
+        <xsl:comment>
+            <xsl:text> some meta information have to be passed to </xsl:text>
+            <xsl:text>the transformation </xsl:text>
+        </xsl:comment>
+        &lf;
+    </xsl:if>
+
     <xsl:if test="$type = 'manual' or
                   $type = 'chm' or
                   $type = 'zip' or
@@ -508,6 +520,9 @@ Some targets have additional requirements:
             <xsl:when test="$type = 'hhp'">
                 <xsl:text>../xsl/hhp.xsl</xsl:text>
             </xsl:when>
+            <xsl:when test="$type = 'man'">
+                <xsl:text>../xsl/nroff.xsl</xsl:text>
+            </xsl:when>
             <xsl:otherwise>
                 <xsl:text>xsl/common.xsl</xsl:text>
             </xsl:otherwise>