[svnbook] r5769 committed - branches/1.8/zh/book/ ch06-server-configuration.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Mon Sep 10 19:39:51 CDT 2018


Revision: 5769
          http://sourceforge.net/p/svnbook/source/5769
Author:   wuzhouhui
Date:     2018-09-11 00:39:49 +0000 (Tue, 11 Sep 2018)
Log Message:
-----------
1.8/zh: translation of chapter 6 in progress

Modified Paths:
--------------
    branches/1.8/zh/book/ch06-server-configuration.xml

Modified: branches/1.8/zh/book/ch06-server-configuration.xml
===================================================================
--- branches/1.8/zh/book/ch06-server-configuration.xml	2018-09-10 05:02:36 UTC (rev 5768)
+++ branches/1.8/zh/book/ch06-server-configuration.xml	2018-09-11 00:39:49 UTC (rev 5769)
@@ -5341,8 +5341,12 @@
         </sect4>
 
         <sect4 id="svn.serverconfig.httpd.extra.browsing.xslt">
+      <!--
           <title>Customizing the look</title>
+      -->
+          <title>定制外观</title>
 
+      <!--
           <para>You generally will get more use out of URLs to
             versioned files—after all, that's where the
             interesting content tends to lie.  But you might have
@@ -5358,6 +5362,16 @@
             instruct <command>mod_dav_svn</command> to generate XML
             output when displaying a directory listing, and to
             reference the XSLT stylesheet of your choice:</para>
+      -->
+          <para>通常来说, 用户更经常使用普通文件的 URL—毕竟文件的内容
+            才是人们感兴趣的东西. 不过, 在少数情况下用户仍然需要浏览 Subversion
+            的目录列表, 此时用户可能会觉得目录列表的外观过于简单, 缺乏美感
+            (或者说无法引起人们的兴趣). 为了允许对目录列表的外观进行修改,
+            Subversion 提供了一个 XML 索引特性. 在仓库的
+            <filename>httpd.conf</filename> 的 <literal>Location</literal>
+            配置块里, 如果增加一个配置指令 <literal>SVNIndexXSLT</literal>,
+            <command>mod_dav_svn</command> 在显示目录列表时, 将生成一个 XML
+            输出, 并引用到用户所选择的 XSLT 样式表:</para>
 
           <informalexample>
             <programlisting>
@@ -5370,6 +5384,7 @@
 </programlisting>
           </informalexample>
 
+      <!--
           <para>Using the <literal>SVNIndexXSLT</literal> directive
             and a creative XSLT stylesheet, you can make your
             directory listings match the color schemes and imagery
@@ -5381,12 +5396,24 @@
             <literal>SVNIndexXSLT</literal> directory is actually a
             URL path—browsers need to be able to read your
             stylesheets to make use of them!</para>
+      -->
+          <para>利用配置指令 <literal>SVNIndexXSLT</literal> 和一个优秀的
+            XSLT 样式表, 就可以让目录列表的显示风格与网站上的其他部分保持
+            一致. 如果用户愿意, 还可以使用 Subversion 提供的样式表示例,
+            样式表示例放在源码包的 <filename>tools/xslt/</filename> 目录内.
+            需要注意的是提供给配置指令 <literal>SVNIndexXSLT</literal> 的路径
+            实际上是一个 URL 路径—浏览器必须能够读取到样式表, 这样才能
+            使用它们!</para>
 
         </sect4>
 
         <sect4 id="svn.serverconfig.httpd.extra.browsing.reposlisting">
+      <!--
           <title>Listing repositories</title>
+      -->
+          <title>罗列仓库</title>
 
+      <!--
           <para>If you're serving a collection of repositories from a
             single URL via the <literal>SVNParentPath</literal>
             directive, then it's also possible to have Apache display
@@ -5393,6 +5420,11 @@
             all available repositories to a web browser.  Just
             activate the <literal>SVNListParentPath</literal>
             directive:</para>
+      -->
+          <para>如果你通过配置指令 <literal>SVNParentPath</literal>, 在一个
+            单独的 URL 上服务多个仓库, 那么 Apache 就有可能在浏览器上列出所有
+            的仓库, 你所需要做的就是激活配置指令
+            <literal>SVNListParentPath</literal>:</para>
 
           <informalexample>
             <programlisting>
@@ -5405,6 +5437,7 @@
 </programlisting>
           </informalexample>
 
+      <!--
           <para>If a user now points her web browser to the
             URL <literal>http://host.example.com/svn/</literal>,
             she'll see a list of all Subversion repositories sitting
@@ -5411,6 +5444,12 @@
             in <filename>/var/svn</filename>.  Obviously, this can be
             a security problem, so this feature is turned off by
             default.</para>
+      -->
+          <para>如果某个用户在浏览器上打开了 URL
+            <literal>http://host.example.com/svn/</literal>, 他将会看所有的
+            位于 <filename>/var/svn</filename> 目录内的 Subversion 仓库. 显然,
+            这样做不太安全, 所以 <literal>SVNListParentPath</literal> 的默认
+            值是 <literal>off</literal>.</para>
 
         </sect4>
       </sect3>




More information about the svnbook-dev mailing list