⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 language.xsl

📁 Apache_2.0.59-Openssl_0.9 配置tomcat. Apache_2.0.59-Openssl_0.9 配置tomcat.
💻 XSL
📖 第 1 页 / 共 2 页
字号:
</xsl:template>

<!-- ==================================================================== -->
<!-- <language-list>                                                      -->
<!-- generate project description                                         -->
<!-- ==================================================================== -->
<xsl:template match="/language-list" mode="desc">

<xsl:call-template name="copyright" />

<description><xsl:text>
This build file contains all operations that are necessary for building
the Apache httpd documentation. It is called by invoking build.bat (Win32)
or build.sh (/bin/sh systems) with a target argument (full list below).
For example, if you want to build the Japanese HTML files, type:

  ./build.sh ja

Some targets have additional requirements:

* 'metafiles' and 'modulelists' need perl in PATH. (It's checked automatically
  and skipped if perl is not available)

* 'chm-foo' targets need:
  - the HTML Help compiler in PATH (or modify this build file). The
    compiler (hhc.exe) is part of the HTML Help Workshop which is freely
    available and can be downloaded from
    http://msdn.microsoft.com/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp
  - The appropriate locale (e.g. Japanese) before invoking hhc.exe. Otherwise
    the compiler is not able to build the fulltext search index correctly and
    the TOC may be garbled, too. In particular:
</xsl:text>

    <xsl:for-each select="lang">
    <xsl:sort select="." />

        <xsl:variable name="file" select="document(concat('../lang/', .,
                                          '.xml'))/language" />

        <xsl:if test="$file/messages and $file/chm">
            <xsl:text>    + chm-</xsl:text>
            <xsl:value-of select="." />
            <xsl:text>: </xsl:text>
            <xsl:value-of select="normalize-space($file/chm/settings)" />
            &lf;
        </xsl:if>
    </xsl:for-each>
    &lf;
</description>
</xsl:template>


<!-- ==================================================================== -->
<!-- <language>                                                           -->
<!-- generate language specific xslt                                      -->
<!-- ==================================================================== -->
<xsl:template match="/language">

<xsl:call-template name="copyright" />

<xsl:element name="xsl:stylesheet" namespace="&xsl;">
    <xsl:attribute name="version">1.0</xsl:attribute>
    &lf;
    &lf;

    <xsl:element name="xsl:output">
        <xsl:attribute name="method">
            <xsl:choose>
            <xsl:when test="$type = 'manual' or
                            $type = 'chm' or
                            $type = 'zip'">
                <xsl:text>xml</xsl:text>
            </xsl:when>
            <xsl:when test="$type = 'hhc' or
                            $type = 'hhp' or
                            $type = 'man'">
                <xsl:text>text</xsl:text>
            </xsl:when>
            <xsl:otherwise>
                <xsl:message terminate="yes">
                    <xsl:text>Unknown style type '</xsl:text>
                    <xsl:value-of select="$type" />
                    <xsl:text>'!</xsl:text>
                </xsl:message>
            </xsl:otherwise>
            </xsl:choose>
        </xsl:attribute>
        <xsl:attribute name="encoding">
            <xsl:choose>
            <xsl:when test="$type = 'chm' or
                            $type = 'hhc' or
                            $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>
            </xsl:choose>
        </xsl:attribute>
        <xsl:attribute name="indent">no</xsl:attribute>
        <xsl:if test="$type = 'manual' or
                      $type = 'chm' or
                      $type = 'zip'">
            <xsl:attribute name="doctype-public">
                <xsl:text>-//W3C//DTD XHTML 1.0 Strict//EN</xsl:text>
            </xsl:attribute>
        </xsl:if>
        <xsl:if test="$type = 'manual'">
            <xsl:attribute name="doctype-system">
                <xsl:text>http://www.w3.org/TR/xhtml1/DTD/</xsl:text>
                <xsl:text>xhtml1-strict.dtd</xsl:text>
            </xsl:attribute>
        </xsl:if>
        <xsl:if test="$type = 'chm' or
                      $type = 'zip'">
            <xsl:attribute name="omit-xml-declaration">yes</xsl:attribute>
        </xsl:if>
    </xsl:element>
    &lf;&lf;

    <xsl:comment>
        <xsl:text> Read the localized messages from the specified </xsl:text>
        <xsl:text>language file </xsl:text>
    </xsl:comment>
    &lf;

    <xsl:element name="xsl:variable">
        <xsl:attribute name="name">message</xsl:attribute>
        <xsl:attribute name="select">
            <xsl:text>document('</xsl:text>
            <xsl:if test="$type != 'manual'">../</xsl:if>
            <xsl:text>lang/</xsl:text>
            <xsl:value-of select="@id" />
            <xsl:text>.xml')/language/messages/message</xsl:text>
        </xsl:attribute>
    </xsl:element>
    &lf;

    <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:element name="xsl:variable">
            <xsl:attribute name="name">allmodules</xsl:attribute>
            <xsl:attribute name="select">
                <xsl:text>document('</xsl:text>
                <xsl:if test="$type != 'manual'">../</xsl:if>
                <xsl:text>xsl/util/allmodules.xml')</xsl:text>
                <xsl:text>/items/item[@lang=$doclang]</xsl:text>
            </xsl:attribute>
        </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
                  $type = 'hhc'">
        <xsl:element name="xsl:variable">
            <xsl:attribute name="name">output-encoding</xsl:attribute>
            <xsl:choose>
            <xsl:when test="$type = 'chm' or
                             $type = 'hhc'">
                <xsl:value-of select="normalize-space(chm/charset)" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="normalize-space(charset)" />
            </xsl:otherwise>
            </xsl:choose>
        </xsl:element>
        &lf;
    </xsl:if>

    <xsl:if test="$type = 'manual' or
                  $type = 'chm' or
                  $type = 'zip'">
        <xsl:element name="xsl:variable">
            <xsl:attribute name="name">is-chm</xsl:attribute>
            <xsl:attribute name="select">
                <xsl:choose>
                <xsl:when test="$type = 'chm'">
                    <xsl:text>true()</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:text>false()</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
            </xsl:attribute>
        </xsl:element>
        &lf;

        <xsl:element name="xsl:variable">
            <xsl:attribute name="name">is-zip</xsl:attribute>
            <xsl:attribute name="select">
                <xsl:choose>
                <xsl:when test="$type = 'zip'">
                    <xsl:text>true()</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:text>false()</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
            </xsl:attribute>
        </xsl:element>
        &lf;&lf;
    </xsl:if>

    <xsl:if test="$type = 'hhc'">
        <xsl:element name="xsl:variable">
            <xsl:attribute name="name">toc-font</xsl:attribute>
            <xsl:value-of select="normalize-space(chm/toc-font)" />
        </xsl:element>
        &lf;

        <xsl:element name="xsl:variable">
            <xsl:attribute name="name">xml-ext</xsl:attribute>
            <xsl:value-of select="normalize-space(source-ext)" />
        </xsl:element>
        &lf;&lf;
    </xsl:if>

    <xsl:if test="$type = 'hhp'">
        <xsl:element name="xsl:variable">
            <xsl:attribute name="name">hhp-lang</xsl:attribute>
            <xsl:value-of select="normalize-space(chm/lang)" />
        </xsl:element>
        &lf;&lf;
    </xsl:if>

    <xsl:comment> Now get the real guts of the stylesheet </xsl:comment>
    &lf;

    <xsl:element name="xsl:include">
        <xsl:attribute name="href">
            <xsl:choose>
            <xsl:when test="$type = 'chm' or
                            $type = 'zip'">
                <xsl:text>../xsl/common.xsl</xsl:text>
            </xsl:when>
            <xsl:when test="$type = 'hhc'">
                <xsl:text>../xsl/hhc.xsl</xsl:text>
            </xsl:when>
            <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>
            </xsl:choose>
        </xsl:attribute>
    </xsl:element>
    &lf;&lf;
</xsl:element>

</xsl:template>
<!-- /language -->


<xsl:template name="copyright">
&lf;
<xsl:comment><xsl:text>
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You 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:text></xsl:comment>
&lf;&lf;
</xsl:template>


<xsl:template name="sepstring">
<xsl:text>============================================</xsl:text>
<xsl:text>========================</xsl:text>
</xsl:template>


<xsl:template name="sep">
<xsl:comment>
    <xsl:text> </xsl:text>
    <xsl:call-template name="sepstring" />
    <xsl:text> </xsl:text>
</xsl:comment>
&lf;
</xsl:template>

<xsl:template name="head">
<xsl:param name="text" />

<xsl:variable name="s"><xsl:call-template name="sepstring" /></xsl:variable>
<xsl:variable name="empty" select="translate($s, '=', ' ')" />

<xsl:comment>
    <xsl:text> </xsl:text>
    <xsl:value-of select="substring(concat(normalize-space($text), $empty), 1,
                                    string-length($empty))" />
    <xsl:text> </xsl:text>
</xsl:comment>
&lf;
</xsl:template>

</xsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -