Index: src/docs/cn/forrest.properties
===================================================================
--- src/docs/cn/forrest.properties	(revision 0)
+++ src/docs/cn/forrest.properties	(revision 0)
@@ -0,0 +1,106 @@
+# Copyright 2002-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.
+
+##############
+# Properties used by forrest.build.xml for building the website
+# These are the defaults, un-comment them if you need to change them.
+##############
+
+# Prints out a summary of Forrest settings for this project
+#forrest.echo=true 
+
+# Project name (used to name .war file)
+#project.name=my-project
+
+# Specifies name of Forrest skin to use
+#project.skin=tigris
+#project.skin=pelt
+
+# comma separated list, file:// is supported
+#forrest.skins.descriptors=http://forrest.apache.org/skins/skins.xml,file:///c:/myskins/skins.xml
+
+##############
+# behavioural properties
+#project.menu-scheme=tab_attributes
+#project.menu-scheme=directories
+
+##############
+# layout properties
+
+# Properties that can be set to override the default locations
+#
+# Parent properties must be set. This usually means uncommenting
+# project.content-dir if any other property using it is uncommented
+
+#project.status=status.xml
+#project.content-dir=src/documentation
+#project.raw-content-dir=${project.content-dir}/content
+#project.conf-dir=${project.content-dir}/conf
+#project.sitemap-dir=${project.content-dir}
+#project.xdocs-dir=${project.content-dir}/content/xdocs
+#project.resources-dir=${project.content-dir}/resources
+#project.stylesheets-dir=${project.resources-dir}/stylesheets
+#project.images-dir=${project.resources-dir}/images
+#project.schema-dir=${project.resources-dir}/schema
+#project.skins-dir=${project.content-dir}/skins
+#project.skinconf=${project.content-dir}/skinconf.xml
+#project.lib-dir=${project.content-dir}/lib
+#project.classes-dir=${project.content-dir}/classes
+#project.translations-dir=${project.content-dir}/translations
+
+##############
+# validation properties
+
+# This set of properties determine if validation is performed
+# Values are inherited unless overridden.
+# e.g. if forrest.validate=false then all others are false unless set to true.
+#forrest.validate=true
+#forrest.validate.xdocs=${forrest.validate}
+#forrest.validate.skinconf=${forrest.validate}
+#forrest.validate.sitemap=${forrest.validate}
+#forrest.validate.stylesheets=${forrest.validate}
+#forrest.validate.skins=${forrest.validate}
+#forrest.validate.skins.stylesheets=${forrest.validate.skins}
+
+# *.failonerror=(true|false) - stop when an XML file is invalid
+#forrest.validate.failonerror=true
+
+# *.excludes=(pattern) - comma-separated list of path patterns to not validate
+# e.g.
+#forrest.validate.xdocs.excludes=samples/subdir/**, samples/faq.xml
+#forrest.validate.xdocs.excludes=
+
+
+##############
+# General Forrest properties
+
+# The URL to start crawling from
+#project.start-uri=linkmap.html
+# Set logging level for messages printed to the console
+# (DEBUG, INFO, WARN, ERROR, FATAL_ERROR)
+#project.debuglevel=ERROR
+# Max memory to allocate to Java
+forrest.maxmemory=512m
+# Any other arguments to pass to the JVM. For example, to run on an X-less
+# server, set to -Djava.awt.headless=true
+#forrest.jvmargs=
+# The bugtracking URL - the issue number will be appended
+#project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
+#project.bugtracking-url=http://issues.apache.org/jira/browse/
+# The issues list as rss
+#project.issues-rss-url=
+#I18n Property only works for the "forrest run" target.
+#project.i18n=true
+project.configfile=${project.home}/src/documentation/conf/cli.xconf
+
Index: src/docs/cn/status.xml
===================================================================
--- src/docs/cn/status.xml	(revision 0)
+++ src/docs/cn/status.xml	(revision 0)
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-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.
+-->
+<status>
+
+  <developers>
+    <person name="Joe Bloggs"      email="joe@joescompany.org"      id="JB" />
+    <!-- Add more people here -->
+  </developers>
+
+  <changes>
+    <!-- Add new releases here -->
+    <release version="0.1" date="unreleased">
+      <!-- Some action types have associated images. By default, images are
+      defined for 'add', 'fix', 'remove', 'update' and 'hack'. If you add
+      src/documentation/resources/images/<foo>.jpg images, these will
+      automatically be used for entries of type <foo>. -->
+
+      <action dev="JB" type="add" context="admin">
+        Initial Import
+      </action>
+      <!-- Sample action:
+      <action dev="JB" type="fix" due-to="Joe Contributor"
+          due-to-email="joec@apache.org" fixes-bug="123">
+          Fixed a bug in the Foo class.
+        </action>
+        -->
+    </release>
+  </changes>
+
+  <todo>
+    <actions priority="high">
+      <action context="docs" dev="JB">
+        Customize this template project with your project's details.  This
+        TODO list is generated from 'status.xml'.
+      </action>
+      <action context="docs" dev="JB">
+        Add lots of content.  XML content goes in
+        <code>src/documentation/content/xdocs</code>, or wherever the
+        <code>${project.xdocs-dir}</code> property (set in
+        <code>forrest.properties</code>) points.
+      </action>
+      <action context="feedback" dev="JB">
+        Mail <link
+          href="mailto:forrest-dev@xml.apache.org">forrest-dev@xml.apache.org</link>
+        with feedback.
+      </action>
+    </actions>
+    <!-- Add todo items. @context is an arbitrary string. Eg:
+    <actions priority="high">
+      <action context="code" dev="SN">
+      </action>
+    </actions>
+    <actions priority="medium">
+      <action context="docs" dev="open">
+      </action>
+    </actions>
+    -->
+  </todo>
+
+</status>
Index: src/docs/cn/uming.conf
===================================================================
--- src/docs/cn/uming.conf	(revision 0)
+++ src/docs/cn/uming.conf	(revision 0)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<configuration>
+  <fonts>
+    <font metrics-file="uming.xml" kerning="yes" embed-file="uming.ttc">
+      <font-triplet name="AR PL UMing" style="normal" weight="normal"/>
+      <font-triplet name="AR PL UMing" style="italic" weight="normal"/>
+      <font-triplet name="AR PL UMing" style="normal" weight="bold"/>
+      <font-triplet name="AR PL UMing" style="italic" weight="bold"/>
+    </font>
+  </fonts>
+</configuration>
Index: src/docs/cn/src/documentation/conf/cli.xconf
===================================================================
--- src/docs/cn/src/documentation/conf/cli.xconf	(revision 0)
+++ src/docs/cn/src/documentation/conf/cli.xconf	(revision 0)
@@ -0,0 +1,326 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--+
+    |  This is the Apache Cocoon command line configuration file.
+    |  Here you give the command line interface details of where
+    |  to find various aspects of your Cocoon installation.
+    |
+    |  If you wish, you can also use this file to specify the URIs
+    |  that you wish to generate.
+    |
+    |  The current configuration information in this file is for
+    |  building the Cocoon documentation. Therefore, all links here
+    |  are relative to the build context dir, which, in the build.xml
+    |  file, is set to ${build.context}
+    |
+    |  Options:
+    |    verbose:            increase amount of information presented
+    |                        to standard output (default: false)
+    |    follow-links:       whether linked pages should also be
+    |                        generated (default: true)
+    |    precompile-only:    precompile sitemaps and XSP pages, but
+    |                        do not generate any pages (default: false)
+    |    confirm-extensions: check the mime type for the generated page
+    |                        and adjust filename and links extensions
+    |                        to match the mime type
+    |                        (e.g. text/html->.html)
+    |
+    |  Note: Whilst using an xconf file to configure the Cocoon
+    |        Command Line gives access to more features, the use of
+    |        command line parameters is more stable, as there are
+    |        currently plans to improve the xconf format to allow
+    |        greater flexibility. If you require a stable and
+    |        consistent method for accessing the CLI, it is recommended
+    |        that you use the command line parameters to configure
+    |        the CLI. See documentation at:
+    |        http://cocoon.apache.org/2.1/userdocs/offline/
+    |        http://wiki.apache.org/cocoon/CommandLine
+    |
+    +-->
+
+<cocoon verbose="true"
+        follow-links="true"
+        precompile-only="false"
+        confirm-extensions="false">
+
+   <!--+
+       |  The context directory is usually the webapp directory
+       |  containing the sitemap.xmap file.
+       |
+       |  The config file is the cocoon.xconf file.
+       |
+       |  The work directory is used by Cocoon to store temporary
+       |  files and cache files.
+       |
+       |  The destination directory is where generated pages will
+       |  be written (assuming the 'simple' mapper is used, see
+       |  below)
+       +-->
+   <context-dir>.</context-dir>
+   <config-file>WEB-INF/cocoon.xconf</config-file>
+   <work-dir>../tmp/cocoon-work</work-dir>
+   <dest-dir>../site</dest-dir>
+
+   <!--+
+       |  A checksum file can be used to store checksums for pages
+       |  as they are generated. When the site is next generated,
+       |  files will not be written if their checksum has not changed.
+       |  This means that it will be easier to detect which files
+       |  need to be uploaded to a server, using the timestamp.
+       |
+       |  The default path is relative to the core webapp directory.
+       |  An asolute path can be used.
+       +-->
+   <!--   <checksums-uri>build/work/checksums</checksums-uri>-->
+
+   <!--+
+       | Broken link reporting options:
+       |   Report into a text file, one link per line:
+       |     <broken-links type="text" report="filename"/>
+       |   Report into an XML file:
+       |     <broken-links type="xml" report="filename"/>
+       |   Ignore broken links (default):
+       |     <broken-links type="none"/>
+       |
+       |   Two attributes to this node specify whether a page should
+       |   be generated when an error has occured. 'generate' specifies
+       |   whether a page should be generated (default: true) and
+       |   extension specifies an extension that should be appended
+       |   to the generated page's filename (default: none)
+       |
+       |   Using this, a quick scan through the destination directory
+       |   will show broken links, by their filename extension.
+       +-->
+   <broken-links type="xml"
+                 file="../brokenlinks.xml"
+                 generate="false"
+                 extension=".error"
+                 show-referrers="true"/>
+
+   <!--+
+       |  Load classes at startup. This is necessary for generating
+       |  from sites that use SQL databases and JDBC.
+       |  The <load-class> element can be repeated if multiple classes
+       |  are needed.
+       +-->
+   <!--
+   <load-class>org.firebirdsql.jdbc.Driver</load-class>
+   -->
+
+   <!--+
+       |  Configures logging.
+       |  The 'log-kit' parameter specifies the location of the log kit
+       |  configuration file (usually called logkit.xconf.
+       |
+       |  Logger specifies the logging category (for all logging prior
+       |  to other Cocoon logging categories taking over)
+       |
+       |  Available log levels are:
+       |    DEBUG:        prints all level of log messages.
+       |    INFO:         prints all level of log messages except DEBUG
+       |                  ones.
+       |    WARN:         prints all level of log messages except DEBUG
+       |                  and INFO ones.
+       |    ERROR:        prints all level of log messages except DEBUG,
+       |                  INFO and WARN ones.
+       |    FATAL_ERROR:  prints only log messages of this level
+       +-->
+   <!-- <logging log-kit="WEB-INF/logkit.xconf" logger="cli" level="ERROR" /> -->
+
+   <!--+
+       |  Specifies the filename to be appended to URIs that
+       |  refer to a directory (i.e. end with a forward slash).
+       +-->
+   <default-filename>index.html</default-filename>
+
+   <!--+
+       |  Specifies a user agent string to the sitemap when
+       |  generating the site.
+       |
+       |  A generic term for a web browser is "user agent". Any
+       |  user agent, when connecting to a web server, will provide
+       |  a string to identify itself (e.g. as Internet Explorer or
+       |  Mozilla). It is possible to have Cocoon serve different
+       |  content depending upon the user agent string provided by
+       |  the browser. If your site does this, then you may want to
+       |  use this <user-agent> entry to provide a 'fake' user agent
+       |  to Cocoon, so that it generates the correct version of your
+       |  site.
+       |
+       |  For most sites, this can be ignored.
+       +-->
+   <!--
+   <user-agent>Cocoon Command Line Environment 2.1</user-agent>
+   -->
+
+   <!--+
+       |  Specifies an accept string to the sitemap when generating
+       |  the site.
+       |  User agents can specify to an HTTP server what types of content
+       |  (by mime-type) they are able to receive. E.g. a browser may be
+       |  able to handle jpegs, but not pngs. The HTTP accept header
+       |  allows the server to take the browser's capabilities into account,
+       |  and only send back content that it can handle.
+       |
+       |  For most sites, this can be ignored.
+       +-->
+
+   <accept>*/*</accept>
+
+   <!--+
+       | Specifies which URIs should be included or excluded, according
+       | to wildcard patterns.
+       |
+       | These includes/excludes are only relevant when you are following
+       | links. A link URI must match an include pattern (if one is given)
+       | and not match an exclude pattern, if it is to be followed by
+       | Cocoon. It can be useful, for example, where there are links in
+       | your site to pages that are not generated by Cocoon, such as
+       | references to api-documentation.
+       |
+       | By default, all URIs are included. If both include and exclude
+       | patterns are specified, a URI is first checked against the
+       | include patterns, and then against the exclude patterns.
+       |
+       | Multiple patterns can be given, using muliple include or exclude
+       | nodes.
+       |
+       | The order of the elements is not significant, as only the first
+       | successful match of each category is used.
+       |
+       | Currently, only the complete source URI can be matched (including
+       | any URI prefix). Future plans include destination URI matching
+       | and regexp matching. If you have requirements for these, contact
+       | dev@cocoon.apache.org.
+       +-->
+
+   <exclude pattern="**/"/>
+   <exclude pattern="api/**"/>
+   <exclude pattern="changes.html"/>
+   <exclude pattern="releasenotes.html"/>
+
+<!--
+  This is a workaround for FOR-284 "link rewriting broken when
+  linking to xml source views which contain site: links".
+  See the explanation there and in declare-broken-site-links.xsl
+-->
+   <exclude pattern="site:**"/>
+   <exclude pattern="ext:**"/>
+   <exclude pattern="lm:**"/>
+   <exclude pattern="**/site:**"/>
+   <exclude pattern="**/ext:**"/>
+   <exclude pattern="**/lm:**"/>
+
+   <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
+   <exclude pattern="[preferred]/**"/>
+   <exclude pattern="[location]"/>
+
+   <!--   <include-links extension=".html"/>-->
+
+   <!--+
+       |  <uri> nodes specify the URIs that should be generated, and
+       |  where required, what should be done with the generated pages.
+       |  They describe the way the URI of the generated file is created
+       |  from the source page's URI. There are three ways that a generated
+       |  file URI can be created: append, replace and insert.
+       |
+       |  The "type" attribute specifies one of (append|replace|insert):
+       |
+       |  append:
+       |  Append the generated page's URI to the end of the source URI:
+       |
+       |   <uri type="append" src-prefix="documents/" src="index.html"
+       |   dest="build/dest/"/>
+       |
+       |  This means that
+       |   (1) the "documents/index.html" page is generated
+       |   (2) the file will be written to "build/dest/documents/index.html"
+       |
+       |  replace:
+       |  Completely ignore the generated page's URI - just
+       |  use the destination URI:
+       |
+       |   <uri type="replace" src-prefix="documents/" src="index.html"
+       |   dest="build/dest/docs.html"/>
+       |
+       |  This means that
+       |   (1) the "documents/index.html" page is generated
+       |   (2) the result is written to "build/dest/docs.html"
+       |   (3) this works only for "single" pages - and not when links
+       |       are followed
+       |
+       |  insert:
+       |  Insert generated page's URI into the destination
+       |  URI at the point marked with a * (example uses fictional
+       |  zip protocol)
+       |
+       |   <uri type="insert" src-prefix="documents/" src="index.html"
+       |   dest="zip://*.zip/page.html"/>
+       |
+       |  This means that
+       |   (1)
+       |
+       |  In any of these scenarios, if the dest attribute is omitted,
+       |  the value provided globally using the <dest-dir> node will
+       |  be used instead.
+       +-->
+   <!--
+   <uri type="replace"
+        src-prefix="samples/"
+        src="hello-world/hello.html"
+        dest="build/dest/hello-world.html"/>
+   -->
+
+   <!--+
+       | <uri> nodes can be grouped together in a <uris> node. This
+       | enables a group of URIs to share properties. The following
+       | properties can be set for a group of URIs:
+       |   * follow-links:       should pages be crawled for links
+       |   * confirm-extensions: should file extensions be checked
+       |                         for the correct mime type
+       |   * src-prefix:         all source URIs should be
+       |                         pre-pended with this prefix before
+       |                         generation. The prefix is not
+       |                         included when calculating the
+       |                         destination URI
+       |   * dest:               the base destination URI to be
+       |                         shared by all pages in this group
+       |   * type:               the method to be used to calculate
+       |                         the destination URI. See above
+       |                         section on <uri> node for details.
+       |
+       | Each <uris> node can have a name attribute. When a name
+       | attribute has been specified, the -n switch on the command
+       | line can be used to tell Cocoon to only process the URIs
+       | within this URI group. When no -n switch is given, all
+       | <uris> nodes are processed. Thus, one xconf file can be
+       | used to manage multiple sites.
+       +-->
+   <!--
+   <uris name="mirrors" follow-links="false">
+     <uri type="append" src="mirrors.html"/>
+   </uris>
+   -->
+
+   <!--+
+       |  File containing URIs (plain text, one per line).
+       +-->
+   <!--
+   <uri-file>uris.txt</uri-file>
+   -->
+</cocoon>
Index: src/docs/cn/src/documentation/sitemap.xmap
===================================================================
--- src/docs/cn/src/documentation/sitemap.xmap	(revision 0)
+++ src/docs/cn/src/documentation/sitemap.xmap	(revision 0)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  <map:components>
+    <map:serializers default="fo2pdf">
+      <map:serializer name="fo2pdf"
+                src="org.apache.cocoon.serialization.FOPSerializer"
+                mime-type="application/pdf">
+        <user-config src="uming.conf"/>
+        </map:serializer>
+    </map:serializers>
+  </map:components>
+  <map:pipelines>
+    <map:pipeline>
+<!-- generate .pdf files from .fo -->
+      <map:match type="regexp" pattern="^(.*?)([^/]*).pdf$">
+        <map:select type="exists">
+          <map:when test="{lm:project.{1}{2}.pdf}">
+            <map:read src="{lm:project.{1}{2}.pdf}"/>
+          </map:when>
+          <map:when test="{lm:project.{1}{2}.fo}">
+            <map:generate src="{lm:project.{1}{2}.fo}"/>
+            <map:serialize type="fo2pdf"/>
+          </map:when>
+          <map:otherwise>
+            <map:generate src="cocoon://{1}{2}.fo"/>
+            <map:serialize type="fo2pdf"/>
+          </map:otherwise>
+        </map:select>
+      </map:match>
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>
+
Index: src/docs/cn/src/documentation/skins/pelt/skinconf.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/skinconf.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/skinconf.xsl	(revision 0)
@@ -0,0 +1,137 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:template match="skinconfig">
+    <xsl:if test="not(colors)">
+      <colors>
+<!-- Lenya -->
+        <color name="header" value="#ffffff"/>
+        <color name="tab-selected" value="#4C6C8F" link="#ffffff" vlink="#ffffff" hlink="#ffffff"/>
+        <color name="tab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
+        <color name="subtab-selected" value="#4C6C8F" link="#ffffff" vlink="#ffffff" hlink="#ffffff"/>
+        <color name="subtab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
+        <color name="heading" value="#E5E4D9"/>
+        <color name="subheading" value="#E5E4D9"/>
+        <color name="published" value="#4C6C8F" font="#FFFFFF"/>
+        <color name="feedback" value="#4C6C8F" font="#FFFFFF" align="center"/>
+        <color name="navstrip" value="#E5E4D9" font="#000000"/>
+        <color name="toolbox" value="#CFDCED" font="#000000"/>
+        <color name="border" value="#999999"/>
+        <color name="menu" value="#4C6C8F" font="#ffffff" link="#ffffff" vlink="#ffffff" hlink="#ffffff"  />
+        <color name="menuheading" value="#cfdced" font="#000000" />
+        <color name="searchbox" value="#E5E4D9" font="#000000"/>
+        <color name="dialog" value="#E5E4D9" font="#000000"/>
+        <color name="body" value="#ffffff" />
+        <color name="table" value="#ccc"/>
+        <color name="table-cell" value="#ffffff"/>
+        <color name="highlight" value="#ffff00"/>
+        <color name="fixme" value="#cc6600"/>
+        <color name="note" value="#006699"/>
+        <color name="warning" value="#990000"/>
+        <color name="code" value="#003366"/>
+        <color name="footer" value="#E5E4D9"/>
+      </colors>
+    </xsl:if>
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:copy-of select="node()[not(name(.)='colors')]"/>
+      <xsl:apply-templates select="colors"/>
+    </xsl:copy>
+  </xsl:template>
+  <xsl:template match="colors">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:copy-of select="node()[name(.)='color']"/>
+      <xsl:if test="not(color[@name='header'])">
+        <color name="header" value="#FFFFFF"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='tab-selected'])">
+        <color name="tab-selected" value="#4C6C8F" link="#ffffff" vlink="#ffffff" hlink="#ffffff"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='tab-unselected'])">
+        <color name="tab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='subtab-selected'])">
+        <color name="subtab-selected" value="#4C6C8F" link="#ffffff" vlink="#ffffff" hlink="#ffffff"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='subtab-unselected'])">
+        <color name="subtab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='heading'])">
+        <color name="heading" value="#E5E4D9"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='subheading'])">
+        <color name="subheading" value="#E5E4D9"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='feedback'])">
+        <color name="feedback" value="#4C6C8F" font="#FFFFFF" align="center"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='published'])">
+        <color name="published" value="#4C6C8F" font="#FFFFFF"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='navstrip'])">
+        <color name="navstrip" value="#E5E4D9" font="#000000"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='toolbox'])">
+        <color name="toolbox" value="#CFDCED" font="#000000"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='border'])">
+        <color name="border" value="#999999"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='menu'])">
+        <color name="menu" value="#4C6C8F" font="#ffffff" link="#ffffff" vlink="#ffffff" hlink="#ffffff"  />
+      </xsl:if>
+      <xsl:if test="not(color[@name='menuheading'])">
+        <color name="menuheading" value="#cfdced" font="#000000" />
+      </xsl:if>
+      <xsl:if test="not(color[@name='searchbox'])">
+        <color name="searchbox" value="#E5E4D9" font="#000000"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='dialog'])">
+        <color name="dialog" value="#E5E4D9" font="#000000" link="#000000" vlink="#000000" hlink="#000000"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='body'])">
+        <color name="body" value="#ffffff" />
+      </xsl:if>
+      <xsl:if test="not(color[@name='table'])">
+        <color name="table" value="#ccc"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='table-cell'])">
+        <color name="table-cell" value="#ffffff"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='highlight'])">
+        <color name="highlight" value="#ffff00"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='fixme'])">
+        <color name="fixme" value="#c60"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='note'])">
+        <color name="note" value="#069"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='warning'])">
+        <color name="warning" value="#900"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='code'])">
+        <color name="code" value="#a5b6c6"/>
+      </xsl:if>
+      <xsl:if test="not(color[@name='footer'])">
+        <color name="footer" value="#E5E4D9"/>
+      </xsl:if>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/pelt/note.txt
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/note.txt	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/note.txt	(revision 0)
@@ -0,0 +1,50 @@
+Notes for developer:
+
+--Legend-------------------
+TODO -> blocker
+DONE -> blocker
+ToDo -> enhancement bug
+done -> enhancement bug
+
+--Issues-------------------
+- the corner images should be rendered through svg with the header color.
+-> DONE 
+-> ToDo: get rid of the images and use only divs!
+
+- the menu points should be displayed "better". 
+-> DONE
+-- Use the krysalis-site menu approach for the overall menu display.
+-> DONE
+-- Use the old lenya innermenu approch to further enhance the menu .
+-> DONE
+
+- the content area needs some attention.
+-> DONE
+-- introduce the heading scheme from krysalis (<headings type="clean|box|underlined"/>)
+-> DONE 
+-> ToDo: make box with round corners
+-> done: make underlined with variable border height
+-> ToDo: make underline with bottom round corner
+-- introduce the toc for each html-page
+-> DONE
+-- introduce the external-link-images.
+-> DONE
+
+- the publish note should be where now only a border is. 
+Like <div id="published"/>
+-> DONE
+, but make it configurable.
+-> DONE
+- footer needs some attention
+-> DONE
+-- the footer do not have the color profile! Enable it!
+-> DONE
+-- the footer should as well contain a feedback link. 
+See http://issues.apache.org/eyebrowse/ReadMsg?listName=forrest-user@xml.apache.org&msgNo=71
+-> DONE
+
+- introduce credits alternativ location
+-> DONE
+
+- border for published / breadtrail / menu /tab divs 
+-> ToDo
\ No newline at end of file
Index: src/docs/cn/src/documentation/skins/pelt/images/page.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/page.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/header_white_line.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/header_white_line.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/label.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/label.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/pdfdoc.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/pdfdoc.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/current.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/current.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/printer.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/printer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/warning.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/warning.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/chapter.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/chapter.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/xmldoc.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/xmldoc.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/chapter_open.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/chapter_open.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/success.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/success.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/error.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/error.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/info.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/info.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/images/instruction_arrow.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/pelt/images/instruction_arrow.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/pelt/css/profile.css.xslt
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/css/profile.css.xslt	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/css/profile.css.xslt	(revision 0)
@@ -0,0 +1,182 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:import href="../../common/css/forrest.css.xslt"/>
+<!-- xsl:output is not used by Forrest but makes it possible to debug the 
+       stylesheet in standalone editors -->
+  <xsl:output method = "text"  omit-xml-declaration="yes"  />
+<!-- ==================== main block colors ============================ -->
+  <xsl:template match="color[@name='header']">
+#top          { background-color: <xsl:value-of select="@value"/>;}  
+</xsl:template>
+  <xsl:template match="color[@name='tab-selected']"> 
+#top .header .current { background-color: <xsl:value-of select="@value"/>;} 
+#top .header .current a:link {  color: <xsl:value-of select="@link"/>;  }
+#top .header .current a:visited { color: <xsl:value-of select="@vlink"/>; }
+#top .header .current a:hover { color: <xsl:value-of select="@hlink"/>; }
+</xsl:template>
+  <xsl:template match="color[@name='tab-unselected']"> 
+#tabs li      { background-color: <xsl:value-of select="@value"/> ;} 
+#tabs li a:link {  color: <xsl:value-of select="@link"/>;  }
+#tabs li a:visited { color: <xsl:value-of select="@vlink"/>; }
+#tabs li a:hover { color: <xsl:value-of select="@hlink"/>; }
+</xsl:template>
+  <xsl:template match="color[@name='subtab-selected']">
+#level2tabs a.selected      { background-color: <xsl:value-of select="@value"/> ;} 
+#level2tabs a:link {  color: <xsl:value-of select="@link"/>;  }
+#level2tabs a:visited { color: <xsl:value-of select="@vlink"/>; }
+#level2tabs a:hover { color: <xsl:value-of select="@hlink"/>; }
+</xsl:template>
+  <xsl:template match="color[@name='subtab-unselected']">
+#level2tabs { background-color: <xsl:value-of select="@value"/>;}
+#level2tabs a.unselected:link {  color: <xsl:value-of select="@link"/>;  }
+#level2tabs a.unselected:visited { color: <xsl:value-of select="@vlink"/>; }
+#level2tabs a.unselected:hover { color: <xsl:value-of select="@hlink"/>; }
+</xsl:template>
+  <xsl:template match="color[@name='heading']">
+.heading { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+  <xsl:template match="color[@name='subheading']">
+.boxed { background-color: <xsl:value-of select="@value"/>;} 
+.underlined_5 	{border-bottom: solid 5px <xsl:value-of select="@value"/>;}
+.underlined_10 	{border-bottom: solid 10px <xsl:value-of select="@value"/>;}
+table caption { 
+background-color: <xsl:value-of select="@value"/>; 
+color: <xsl:value-of select="@font"/>;
+}
+</xsl:template>
+  <xsl:template match="color[@name='feedback']">    
+#feedback {
+color: <xsl:value-of select="@font"/>;
+background: <xsl:value-of select="@value"/>;
+text-align: <xsl:value-of select="@align"/>;
+}
+#feedback #feedbackto {
+color: <xsl:value-of select="@font"/>;
+}   
+</xsl:template>
+  <xsl:template match="color[@name='breadtrail']">
+#main .breadtrail {
+background: <xsl:value-of select="@value"/>; 
+color: <xsl:value-of select="@font"/>;
+}
+#main .breadtrail a:link {  color: <xsl:value-of select="@link"/>;  }
+#main .breadtrail a:visited { color: <xsl:value-of select="@vlink"/>; }
+#main .breadtrail a:hover { color: <xsl:value-of select="@hlink"/>; }
+#top .breadtrail {
+background: <xsl:value-of select="@value"/>; 
+color: <xsl:value-of select="@font"/>;
+}
+#top .breadtrail a:link {  color: <xsl:value-of select="@link"/>;  }
+#top .breadtrail a:visited { color: <xsl:value-of select="@vlink"/>; }
+#top .breadtrail a:hover { color: <xsl:value-of select="@hlink"/>; }    
+</xsl:template>
+<!--Fix for other (old) profiles-->
+  <xsl:template match="color[@name='navstrip']">
+#publishedStrip { 
+color: <xsl:value-of select="@font"/>;
+background: <xsl:value-of select="@value"/>; 
+}
+</xsl:template>
+<!--has to go after the nav-strip (no 'navstrip')-->
+  <xsl:template match="color[@name='published']">
+#publishedStrip { 
+color: <xsl:value-of select="@font"/>;
+background: <xsl:value-of select="@value"/>; 
+}
+</xsl:template>
+  <xsl:template match="color[@name='toolbox']">
+#menu .menupagetitle  { background-color: <xsl:value-of select="@value"/>;
+  color: <xsl:value-of select="@font"/>;}
+</xsl:template>
+  <xsl:template match="color[@name='border']">
+#menu           { border-color: <xsl:value-of select="@value"/>;}
+#menu .menupagetitle  { border-color: <xsl:value-of select="@value"/>;}
+#menu .menupageitemgroup  { border-color: <xsl:value-of select="@value"/>;}
+</xsl:template>
+  <xsl:template match="color[@name='menu']">
+#menu      { background-color: <xsl:value-of select="@value"/>;} 
+#menu  {  color: <xsl:value-of select="@font"/>;} 
+#menu a:link {  color: <xsl:value-of select="@link"/>;} 
+#menu a:visited {  color: <xsl:value-of select="@vlink"/>;} 
+#menu a:hover {  
+background-color: <xsl:value-of select="@value"/>;
+color: <xsl:value-of select="@hlink"/>;} 
+</xsl:template>
+  <xsl:template match="color[@name='dialog']"> 
+#menu .menupageitemgroup     { 
+background-color: <xsl:value-of select="@value"/>;
+}
+#menu .menupageitem {
+color: <xsl:value-of select="@font"/>;
+} 
+#menu .menupageitem a:link {  color: <xsl:value-of select="@link"/>;} 
+#menu .menupageitem a:visited {  color: <xsl:value-of select="@vlink"/>;} 
+#menu .menupageitem a:hover {  
+background-color: <xsl:value-of select="@value"/>;
+color: <xsl:value-of select="@hlink"/>;
+}
+</xsl:template>
+  <xsl:template match="color[@name='menuheading']">
+#menu h1 {
+color: <xsl:value-of select="@font"/>;
+background-color: <xsl:value-of select="@value"/>;
+}   
+</xsl:template>
+  <xsl:template match="color[@name='searchbox']"> 
+#top .searchbox { 
+background-color: <xsl:value-of select="@value"/> ;
+color: <xsl:value-of select="@font"/>; 
+} 
+</xsl:template>
+  <xsl:template match="color[@name='body']">
+body{ 
+background-color: <xsl:value-of select="@value"/>;
+color: <xsl:value-of select="@font"/>;
+} 
+a:link { color:<xsl:value-of select="@link"/>} 
+a:visited { color:<xsl:value-of select="@vlink"/>} 
+a:hover { color:<xsl:value-of select="@hlink"/>} 
+
+</xsl:template>
+  <xsl:template match="color[@name='footer']"> 
+#footer       { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+<!-- ==================== other colors ============================ -->
+  <xsl:template match="color[@name='highlight']"> 
+.highlight        { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+  <xsl:template match="color[@name='fixme']"> 
+.fixme        { border-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+  <xsl:template match="color[@name='note']"> 
+.note         { border-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+  <xsl:template match="color[@name='warning']"> 
+.warning         { border-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+  <xsl:template match="color[@name='code']"> 
+.code         { border-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+  <xsl:template match="color[@name='table']"> 
+.ForrestTable      { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+  <xsl:template match="color[@name='table-cell']"> 
+.ForrestTable td   { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/pelt/css/print.css
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/css/print.css	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/css/print.css	(revision 0)
@@ -0,0 +1,54 @@
+/*
+* 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.
+*/
+body {
+  font-family: Georgia, Palatino, serif;
+  font-size: 12pt;
+  background: white;
+}
+
+#tabs,
+#menu,
+#content .toc {
+  display: none;
+}
+
+#content {
+  width: auto;
+  padding: 0;
+  float: none !important;
+  color: black;
+  background: inherit;
+}
+
+a:link, a:visited {
+  color: #336699;
+  background: inherit;
+  text-decoration: underline;
+}
+
+#top .logo {
+  padding: 0;
+  margin: 0 0 2em 0;
+}
+
+#footer {
+  margin-top: 4em;
+}
+
+acronym {
+  border: 0;
+}
Index: src/docs/cn/src/documentation/skins/pelt/css/screen.css
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/css/screen.css	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/css/screen.css	(revision 0)
@@ -0,0 +1,587 @@
+/*
+* 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.
+*/
+body {  margin: 0px 0px 0px 0px; font-family: Verdana, Helvetica, sans-serif; }
+
+h1     { font-size : 160%; margin: 0px 0px 0px 0px;  padding: 0px; }
+h2     { font-size : 140%; margin: 1em 0px 0.8em 0px; padding: 0px; font-weight : bold;}
+h3     { font-size : 130%; margin: 0.8em 0px 0px 0px; padding: 0px; font-weight : bold; }
+.h3 { margin: 22px 0px 3px 0px; }
+h4     { font-size : 120%; margin: 0.7em 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; }
+.h4 { margin: 18px 0px 0px 0px; }
+h4.faq { font-size : 120%; margin: 18px 0px 0px 0px; padding: 0px; font-weight : bold;   text-align: left; }
+h5     { font-size : 100%; margin: 14px 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; }
+
+/**
+* table
+*/
+table .title { background-color: #000000; }
+.ForrestTable         {
+    color: #ffffff;
+    background-color: #7099C5;
+    width: 100%;
+    font-size : 100%;
+    empty-cells: show;
+}
+table caption {
+    padding-left: 5px;
+    color: white;
+    text-align: left;
+    font-weight: bold;
+    background-color: #000000;
+}
+.ForrestTable td {
+    color: black;
+    background-color: #f0f0ff;
+}
+.ForrestTable th { text-align: center; }
+/**
+ * Page Header
+ */
+
+#top {
+    position: relative;
+    float: left;
+    width: 100%;
+    background: #294563; /* if you want a background in the header, put it here */
+}
+
+#top .breadtrail {
+    background: #CFDCED;
+    color: black;
+    border-bottom: solid 1px white;
+    padding: 3px 10px;
+    font-size: 75%;
+}
+#top .breadtrail a { color: black; }
+
+#top .header {
+    float: left;
+    width: 100%;
+    background: url("images/header_white_line.gif") repeat-x bottom;
+}
+
+#top .grouplogo {
+    padding: 7px 0 10px 10px;
+    float: left;
+    text-align: left;
+}
+#top .projectlogo {
+    padding: 7px 0 10px 10px;
+    float: left;
+    width: 33%;
+    text-align: right;
+}
+#top .projectlogoA1 {
+    padding: 7px 0 10px 10px;
+    float: right;
+}
+html>body #top .searchbox {
+    bottom: 0px;
+}
+#top .searchbox {
+    position: absolute;
+    right: 10px;
+    height: 42px;
+    font-size: 70%;
+    white-space: nowrap;
+    text-align: right;
+    color: white;
+    background-color: #000000;
+    z-index:0;
+    background-image: url(images/rc-t-l-5-1header-2searchbox-3searchbox.png);
+    background-repeat: no-repeat;
+    background-position: top left;
+    bottom: -1px; /* compensate for IE rendering issue */
+}
+
+#top .searchbox form {
+    padding: 5px 10px;
+    margin: 0;
+}
+#top .searchbox p {
+    padding: 0 0 2px 0;
+    margin: 0;
+}
+#top .searchbox input {
+    font-size: 100%;
+}
+
+#tabs {
+    clear: both;
+    padding-left: 10px;
+    margin: 0;
+    list-style: none;
+}
+/*    background: #CFDCED url("images/tab-right.gif") no-repeat right top;*/
+#tabs li {
+    float: left;
+    background-image: url(images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png);
+    background-repeat: no-repeat;
+    background-position: top right;
+    background-color: #000000;
+    margin: 0 3px 0 0;
+    padding: 0;
+}
+
+/*background: url("images/tab-left.gif") no-repeat left top;*/
+#tabs li a {
+    float: left;
+    display: block;
+    font-family: verdana, arial, sans-serif;
+    text-decoration: none;
+    color: black;
+    white-space: nowrap;
+    background-image: url(images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png);
+    background-repeat: no-repeat;
+    background-position: top left;
+    padding: 5px 15px 4px;
+    width: .1em; /* IE/Win fix */
+}
+
+#tabs li a:hover {
+   
+    cursor: pointer;
+    text-decoration:underline;
+}
+
+#tabs > li a { width: auto; } /* Rest of IE/Win fix */
+
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+#tabs a { float: none; }
+/* End IE5-Mac hack */
+
+#top .header .current {
+    background-color: #4C6C8F;
+    background-image: url(images/rc-t-r-5-1header-2tab-selected-3tab-selected.png);
+    background-repeat: no-repeat;
+    background-position: top right;
+}
+#top .header .current a {
+    font-weight: bold;
+    padding-bottom: 5px;
+    color: white;
+    background-image: url(images/rc-t-l-5-1header-2tab-selected-3tab-selected.png);
+    background-repeat: no-repeat;
+    background-position: top left;
+}
+#publishedStrip {
+    padding-right: 10px;
+    padding-left: 20px;
+    padding-top: 3px;
+    padding-bottom:3px;
+    color: #ffffff;
+    font-size : 60%;
+    font-weight: bold;
+    background-color: #4C6C8F;
+    text-align:right;
+}
+
+#level2tabs {
+margin: 0;
+float:left;
+position:relative;
+
+}
+
+
+
+#level2tabs  a:hover {
+   
+    cursor: pointer;
+    text-decoration:underline;
+    
+}
+
+#level2tabs  a{
+   
+    cursor: pointer;
+    text-decoration:none;
+    background-image: url('images/chapter.gif');
+    background-repeat: no-repeat;
+    background-position: center left;
+    padding-left: 6px;
+    margin-left: 6px;
+}
+
+/*
+*    border-top: solid #4C6C8F 15px;
+*/
+#main {
+    position: relative;
+    background: white;
+    clear:both;
+}
+#main .breadtrail {
+    clear:both;
+    position: relative;
+    background: #CFDCED;
+    color: black;
+    border-bottom: solid 1px black;
+    border-top: solid 1px black;
+    padding: 0px 180px;
+    font-size: 75%;
+    z-index:10;
+}
+/**
+* Round corner
+*/
+#roundtop {
+    background-image: url(images/rc-t-r-15-1body-2menu-3menu.png);
+    background-repeat: no-repeat;
+    background-position: top right;
+}
+
+#roundbottom {
+    background-image: url(images/rc-b-r-15-1body-2menu-3menu.png);
+    background-repeat: no-repeat;
+    background-position: top right;
+}
+
+img.corner {
+   width: 15px;
+   height: 15px;
+   border: none;
+   display: block !important;
+}
+
+.roundtopsmall {
+    background-image: url(images/rc-t-r-5-1header-2searchbox-3searchbox.png);
+    background-repeat: no-repeat;
+    background-position: top right;
+}
+
+#roundbottomsmall {
+    background-image: url(images/rc-b-r-5-1header-2tab-selected-3tab-selected.png);
+    background-repeat: no-repeat;
+    background-position: top right;
+}
+
+img.cornersmall {
+   width: 5px;
+   height: 5px;
+   border: none;
+   display: block !important;
+}
+/**
+ * Side menu
+ */
+#menu a {  font-weight: normal; text-decoration: none;}
+#menu a:visited {  font-weight: normal; }
+#menu a:active {  font-weight: normal; }
+#menu a:hover {  font-weight: normal;  text-decoration:underline;}
+
+#menuarea { width:10em;}
+#menu {
+    position: relative;
+    float: left;
+    width: 160px;
+    padding-top: 0px;
+    top:-18px;
+    left:10px;
+    z-index: 20;
+    background-color: #f90;
+    font-size : 70%;
+    
+}
+
+.menutitle {
+        cursor:pointer;
+        padding: 3px 12px;
+        margin-left: 10px;
+        background-image: url('images/chapter.gif');
+        background-repeat: no-repeat;
+        background-position: center left;
+        font-weight : bold;
+
+        
+}
+
+.menutitle:hover{text-decoration:underline;cursor: pointer;}
+
+#menu .menuitemgroup {
+        margin: 0px 0px 6px 8px;
+        padding: 0px;
+        font-weight : bold; }
+
+#menu .selectedmenuitemgroup{
+        margin: 0px 0px 0px 8px;
+        padding: 0px;
+        font-weight : normal; 
+       
+        }
+
+#menu .menuitem {
+        padding: 2px 0px 1px 13px;
+        background-image: url('images/page.gif');
+        background-repeat: no-repeat;
+        background-position: center left;
+        font-weight : normal;
+        margin-left: 10px;
+}
+
+#menu .menupage {
+        margin: 2px 0px 1px 10px;
+        padding: 0px 3px 0px 12px;
+        background-image: url('images/page.gif');
+        background-repeat: no-repeat;
+        background-position: center left;
+        font-style : normal;
+}
+#menu .menupagetitle {
+        padding: 0px 0px 0px 1px;
+        font-style : normal;
+        border-style: solid;
+        border-width: 1px;
+        margin-right: 10px;
+         
+}
+#menu .menupageitemgroup {
+        padding: 3px 0px 4px 6px;
+        font-style : normal;
+        border-bottom: 1px solid ;
+        border-left: 1px solid ;
+        border-right: 1px solid ;
+        margin-right: 10px;
+}
+#menu .menupageitem {
+        font-style : normal;
+        font-weight : normal;
+        border-width: 0px;
+        font-size : 90%;
+}
+#menu #credit {
+    text-align: center;
+}
+#menu #credit2 {
+    text-align: center;
+    padding: 3px 3px 3px 3px;
+    background-color: #ffffff;
+}
+#menu .searchbox {
+    text-align: center;
+}
+#menu .searchbox form {
+    padding: 3px 3px;
+    margin: 0;
+}
+#menu .searchbox input {
+    font-size: 100%;
+}
+
+#content {
+    padding: 20px 20px 20px 180px;
+    margin: 0;
+    font : small Verdana, Helvetica, sans-serif;
+    font-size : 80%;
+}
+
+#content ul {
+    margin: 0;
+    padding: 0 25px;
+}
+#content li {
+    padding: 0 5px;
+}
+#feedback {
+    color: black;
+    background: #CFDCED;
+    text-align:center;
+    margin-top: 5px;
+}
+#feedback #feedbackto {
+    font-size: 90%;
+    color: black;
+}
+#footer {
+    clear: both;
+    position: relative; /* IE bugfix (http://www.dracos.co.uk/web/css/ie6floatbug/) */
+    width: 100%;
+    background: #CFDCED;
+    border-top: solid 1px #4C6C8F;
+    color: black;
+}
+#footer .copyright {
+    position: relative; /* IE bugfix cont'd */
+    padding: 5px;
+    margin: 0;
+    width: 45%;
+}
+#footer .lastmodified {
+    position: relative; /* IE bugfix cont'd */
+    float: right;
+    width: 45%;
+    padding: 5px;
+    margin: 0;
+    text-align: right;
+}
+#footer a { color: white; }
+
+#footer #logos {
+    text-align: left;
+}
+
+
+/**
+ * Misc Styles
+ */
+
+acronym { cursor: help; }
+.boxed      { background-color: #a5b6c6;}
+.underlined_5     {border-bottom: solid 5px #4C6C8F;}
+.underlined_10     {border-bottom: solid 10px #4C6C8F;}
+/* ==================== snail trail ============================ */
+
+.trail {
+  position: relative; /* IE bugfix cont'd */
+  font-size: 70%;
+  text-align: right;
+  float: right;
+  margin: -10px 5px 0px 5px;
+  padding: 0;
+}
+
+#motd-area {
+    position: relative; /* IE bugfix cont'd */
+    float: right;
+    width: 35%;
+    background-color: #f0f0ff;
+    border-top: solid 1px #4C6C8F;
+    border-bottom: solid 1px #4C6C8F;
+    margin-bottom: 15px;
+    margin-left: 15px;
+    margin-right: 10%;
+    padding-bottom: 5px;
+    padding-top: 5px;
+}
+
+#minitoc-area {
+    border-top: solid 1px #4C6C8F;
+    border-bottom: solid 1px #4C6C8F;
+    margin: 15px 10% 5px 15px;
+   /* margin-bottom: 15px;
+    margin-left: 15px;
+    margin-right: 10%;*/
+    padding-bottom: 7px;
+    padding-top: 5px;
+}
+.minitoc {
+    list-style-image: url('images/current.gif');
+    font-weight: normal;
+}
+
+li p {
+    margin: 0;
+    padding: 0;
+}
+
+.pdflink {
+    position: relative; /* IE bugfix cont'd */
+    float: right;
+    margin: 0px 5px;
+    padding: 0;
+}
+.pdflink br {
+    margin-top: -10px;
+    padding-left: 1px;
+}
+.pdflink a {
+    display: block;
+    font-size: 70%;
+    text-align: center;
+    margin: 0;
+    padding: 0;
+}
+
+.pdflink img {
+    display: block;
+    height: 16px;
+    width: 16px;
+}
+.xmllink {
+    position: relative; /* IE bugfix cont'd */
+    float: right;
+    margin: 0px 5px;
+    padding: 0;
+}
+.xmllink br {
+    margin-top: -10px;
+    padding-left: 1px;
+}
+.xmllink a {
+    display: block;
+    font-size: 70%;
+    text-align: center;
+    margin: 0;
+    padding: 0;
+}
+
+.xmllink img {
+    display: block;
+    height: 16px;
+    width: 16px;
+}
+.podlink {
+    position: relative; /* IE bugfix cont'd */
+    float: right;
+    margin: 0px 5px;
+    padding: 0;
+}
+.podlink br {
+    margin-top: -10px;
+    padding-left: 1px;
+}
+.podlink a {
+    display: block;
+    font-size: 70%;
+    text-align: center;
+    margin: 0;
+    padding: 0;
+}
+
+.podlink img {
+    display: block;
+    height: 16px;
+    width: 16px;
+}
+
+.printlink {
+    position: relative; /* IE bugfix cont'd */
+    float: right;
+}
+.printlink br {
+    margin-top: -10px;
+    padding-left: 1px;
+}
+.printlink a {
+    display: block;
+    font-size: 70%;
+    text-align: center;
+    margin: 0;
+    padding: 0;
+}
+.printlink img {
+    display: block;
+    height: 16px;
+    width: 16px;
+}
+
+p.instruction {
+  display: list-item;
+  list-style-image: url('../images/instruction_arrow.png');
+  list-style-position: outside;
+  margin-left: 2em;
+} 
Index: src/docs/cn/src/documentation/skins/pelt/css/basic.css
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/css/basic.css	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/css/basic.css	(revision 0)
@@ -0,0 +1,166 @@
+/*
+* 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.
+*/
+/**
+ * General
+ */
+
+img { border: 0; }
+
+#content table {
+  border: 0;
+  width: 100%;
+}
+/*Hack to get IE to render the table at 100%*/
+* html #content table { margin-left: -3px; }
+
+#content th,
+#content td {
+  margin: 0;
+  padding: 0;
+  vertical-align: top;
+}
+
+.clearboth {
+  clear: both;
+}
+
+.note, .warning, .fixme {
+  border: solid black 1px;
+  margin: 1em 3em;
+}
+
+.note .label {
+  background: #369;
+  color: white;
+  font-weight: bold;
+  padding: 5px 10px;
+}
+.note .content {
+  background: #F0F0FF;
+  color: black;
+  line-height: 120%;
+  font-size: 90%;
+  padding: 5px 10px;
+}
+.warning .label {
+  background: #C00;
+  color: white;
+  font-weight: bold;
+  padding: 5px 10px;
+}
+.warning .content {
+  background: #FFF0F0;
+  color: black;
+  line-height: 120%;
+  font-size: 90%;
+  padding: 5px 10px;
+}
+.fixme .label {
+  background: #C6C600;
+  color: black;
+  font-weight: bold;
+  padding: 5px 10px;
+}
+.fixme .content {
+  padding: 5px 10px;
+}
+
+/**
+ * Typography
+ */
+
+body {
+  font-family: verdana, "Trebuchet MS", arial, helvetica, sans-serif;
+  font-size: 100%;
+}
+
+#content {
+  font-family: Georgia, Palatino, Times, serif;
+  font-size: 95%;
+}
+#tabs {
+  font-size: 70%;
+}
+#menu {
+  font-size: 80%;
+}
+#footer {
+  font-size: 70%;
+}
+
+h1, h2, h3, h4, h5, h6 {
+  font-family: "Trebuchet MS", verdana, arial, helvetica, sans-serif;
+  font-weight: bold;
+  margin-top: 1em;
+  margin-bottom: .5em;
+}
+
+h1 {
+    margin-top: 0;
+    margin-bottom: 1em;
+  font-size: 1.4em;
+}
+#content h1 {
+  font-size: 160%;
+  margin-bottom: .5em;
+}
+#menu h1 {
+  margin: 0;
+  padding: 10px;
+  background: #336699;
+  color: white;
+}
+h2 { font-size: 120%; }
+h3 { font-size: 100%; }
+h4 { font-size: 90%; }
+h5 { font-size: 80%; }
+h6 { font-size: 75%; }
+
+p {
+  line-height: 120%;
+  text-align: left;
+  margin-top: .5em;
+  margin-bottom: 1em;
+}
+
+#content li,
+#content th,
+#content td,
+#content li ul,
+#content li ol{
+  margin-top: .5em;
+  margin-bottom: .5em;
+}
+
+
+#content li li,
+#minitoc-area li{
+  margin-top: 0em;
+  margin-bottom: 0em;
+}
+
+#content .attribution {
+  text-align: right;
+  font-style: italic;
+  font-size: 85%;
+  margin-top: 1em;
+}
+
+.codefrag {
+  font-family: "Courier New", Courier, monospace;
+  font-size: 110%;
+}
Index: src/docs/cn/src/documentation/skins/pelt/xslt/fo/document-to-fo.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/xslt/fo/document-to-fo.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/xslt/fo/document-to-fo.xsl	(revision 0)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+  <xsl:import href="../../../common/xslt/fo/document-to-fo.xsl"/>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/pelt/xslt/html/book-to-menu.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/xslt/html/book-to-menu.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/xslt/html/book-to-menu.xsl	(revision 0)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--
+book-to-menu.xsl generates the HTML menu.  See the imported book-to-menu.xsl for
+details.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:import href="../../../common/xslt/html/book-to-menu.xsl"/>
+  <xsl:template match="book">
+    <div id="menu">
+      <ul>
+        <xsl:apply-templates select="menu"/>
+      </ul>
+    </div>
+  </xsl:template>
+  <xsl:template match="menu">
+    <li><h1>
+        <xsl:value-of select="@label"/>
+      </h1>
+      <ul>
+        <xsl:apply-templates/>
+      </ul></li>
+  </xsl:template>
+  <xsl:template match="menu-item[@type='hidden']"/>
+  <xsl:template match="menu-item">
+    <li><xsl:apply-imports/></li>
+  </xsl:template>
+  <xsl:template name="selected">
+    <div class="current">
+      <xsl:value-of select="@label"/>
+    </div>
+  </xsl:template>
+  <xsl:template name="print-external">
+    <font color="#ffcc00">
+      <xsl:apply-imports/>
+    </font>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/pelt/xslt/html/site-to-xhtml.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/xslt/html/site-to-xhtml.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/xslt/html/site-to-xhtml.xsl	(revision 0)
@@ -0,0 +1,809 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--
+site-to-xhtml.xsl is the final stage in HTML page production.  It merges HTML from
+document-to-html.xsl, tab-to-menu.xsl and book-to-menu.xsl, and adds the site header,
+footer, searchbar, css etc.  As input, it takes XML of the form:
+
+<site>
+  <div class="menu">
+    ...
+  </div>
+  <div class="tab">
+    ...
+  </div>
+  <div class="content">
+    ...
+  </div>
+</site>
+
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1" exclude-result-prefixes="i18n">
+  <xsl:import href="../../../common/xslt/html/site-to-xhtml.xsl"/>
+<!--+
+  |Overall site template
+  +-->
+  <xsl:template match="site">
+<!--html lang="en" xml:lang="en"-->
+    <html>
+<!--+
+  |HTML-head
+  +-->
+      <head>
+<!--+
+  |generator meta
+  +-->
+<!-- Add some Forrest-specific metadata -->
+        <xsl:call-template name="html-meta"/>
+<!-- Add any metadata from the documents -->
+        <xsl:call-template name="meta-data"/>
+<!--+
+  |title
+  +-->
+        <title><xsl:value-of select="div[@id='content']/h1"/>
+          <xsl:if test="$config/motd">
+            <xsl:for-each select="$config/motd/motd-option">
+              <xsl:choose>
+                <xsl:when test="@starts-with='true'">
+                  <xsl:if test="starts-with($path, @pattern)">
+                    <xsl:if test="normalize-space(motd-title) != ''">
+<xsl:text> (</xsl:text>
+                      <xsl:value-of select="motd-title"/>
+<xsl:text>)</xsl:text>
+                    </xsl:if>
+                  </xsl:if>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:if test="contains($path, @pattern)">
+                    <xsl:if test="normalize-space(motd-title) != ''">
+<xsl:text> (</xsl:text>
+                      <xsl:value-of select="motd-title"/>
+<xsl:text>)</xsl:text>
+                    </xsl:if>
+                  </xsl:if>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:for-each>
+          </xsl:if></title>
+<!--+
+  |stylesheets
+  +--><link rel="stylesheet" href="{$root}skin/basic.css" type="text/css" 
+                /><link rel="stylesheet" href="{$root}skin/screen.css" 
+                type="text/css" media="screen" /><link rel="stylesheet" href="{$root}skin/print.css" type="text/css" 
+                media="print" /><link rel="stylesheet" href="{$root}skin/profile.css" 
+                type="text/css" />
+<!--+
+  |Javascripts
+  +-->
+<script type="text/javascript" language="javascript" 
+                src="{$root}skin/getBlank.js"></script>
+<script type="text/javascript" language="javascript" 
+				src="{$root}skin/getMenu.js"></script>
+<script type="text/javascript" language="javascript" 
+				src="{$root}skin/fontsize.js"></script>
+<!--+
+  |favicon
+  +-->
+        <xsl:if test="//skinconfig/favicon-url"><link rel="shortcut icon">
+          <xsl:attribute name="href">
+            <xsl:value-of 
+                            select="concat($root,//skinconfig/favicon-url)"/>
+          </xsl:attribute></link>
+        </xsl:if>
+      </head>
+<!--+
+  |HTML-body
+  +-->
+      <body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<!--+Site structure
+  +++++++++++++++++++++++++++
+     +=========================+
+     |       topstrip          |
+     +=========================+
+     |                         |
+     |       centerstrip       |
+     |                         |
+     |                         |
+     +=========================+
+     |       bottomstrip       |
+     +=========================+
+     +++++++++++++++++++++++++++
+     +-->
+<!--+
+  |topstrip with logos and search box 
+  +-->
+        <div id="top">
+<!--breadcrumbs org location-->
+          <xsl:if test="not ($config/trail/@location)">
+            <xsl:comment>+
+    |breadtrail
+    +</xsl:comment>
+            <div class="breadtrail">
+              <xsl:call-template name="breadcrumbs"/>
+            </div>
+          </xsl:if>
+          <xsl:comment>+
+    |header
+    +</xsl:comment>
+          <div class="header">
+            <xsl:comment>+
+    |start group logo
+    +</xsl:comment>
+            <xsl:if test="$config/group-url">
+              <div class="grouplogo">
+                <xsl:call-template name="renderlogo">
+                  <xsl:with-param name="name" select="$config/group-name"/>
+                  <xsl:with-param name="url" select="$config/group-url"/>
+                  <xsl:with-param name="logo" select="$config/group-logo"/>
+                  <xsl:with-param name="root" select="$root"/>
+                  <xsl:with-param name="description" select="$config/group-description"/>
+                </xsl:call-template>
+              </div>
+            </xsl:if>
+            <xsl:comment>+
+    |end group logo
+    +</xsl:comment>
+            <xsl:comment>+
+    |start Project Logo
+    +</xsl:comment>
+            <xsl:variable name="xtest">
+              <xsl:choose>
+                <xsl:when 
+                    test="$config/group-url and $config/search and not($config/search/@box-location = 'alt')">
+<xsl:text>true</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+<xsl:text>false</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <div class="projectlogo">
+              <xsl:if test="$xtest='false'" >
+                <xsl:attribute name="class">
+<xsl:text>projectlogoA1</xsl:text>
+                </xsl:attribute>
+              </xsl:if>
+              <xsl:call-template name="renderlogo">
+                <xsl:with-param name="name" select="$config/project-name"/>
+                <xsl:with-param name="url" select="$config/project-url"/>
+                <xsl:with-param name="logo" select="$config/project-logo"/>
+                <xsl:with-param name="root" select="$root"/>
+                <xsl:with-param name="description" select="$config/project-description"/>
+              </xsl:call-template>
+            </div>
+            <xsl:comment>+
+    |end Project Logo
+    +</xsl:comment>
+            <xsl:if 
+            test="$config/search and not($config/search/@box-location = 'alt')">
+              <xsl:comment>+
+    |start Search
+    +</xsl:comment>
+              <div class="searchbox">
+                <xsl:variable name="search-prompt">
+                  <i18n:text>Search the site with</i18n:text>
+<xsl:text> </xsl:text>
+                  <xsl:value-of select="$config/search/@provider"/>
+                </xsl:variable>
+                <xsl:choose>
+                  <xsl:when test="$config/search/@provider = 'lucene'">
+<!-- Lucene search -->
+                    <form method="get" action="{$root}{$lucene-search}">
+                      <input type="text" id="query" name="queryString" size="25" onFocus="getBlank (this, '{$search-prompt}');">
+                        <xsl:attribute name="value">
+                          <xsl:value-of select="$search-prompt"/>
+                        </xsl:attribute>
+                      </input>&#160;
+		  <input type="submit" value="Search" name="Search" i18n:attr="value"/>
+                    </form>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <form class="roundtopsmall" method="get" action="http://www.google.com/search">
+                      <input type="hidden" name="sitesearch" value="{$config/search/@domain}"/>
+                      <input type="text" id="query" name="q" size="25" onFocus="getBlank (this, '{$search-prompt}');">
+                        <xsl:attribute name="value">
+                          <xsl:value-of select="$search-prompt"/>
+                        </xsl:attribute>
+                      </input>&#160; 
+                    <input type="submit" value="Search" name="Search" i18n:attr="value"/>
+                    </form>
+                  </xsl:otherwise>
+                </xsl:choose>
+<!--div id="roundbottomsmall">
+            <img 
+                src="{$skin-img-dir}/rc-b-l-5-1body-2menu-3menu.png" 
+                alt="" width="5" height="5" class="cornersmall" 
+                style="display: none" />
+        </div-->
+              </div>
+              <xsl:comment>+
+    |end search
+    +</xsl:comment>
+            </xsl:if>
+            <xsl:comment>+
+    |start Tabs
+    +</xsl:comment>
+            <xsl:apply-templates select="ul[@id='tabs']"/>
+            <xsl:comment>+
+    |end Tabs
+    +</xsl:comment>
+          </div>
+        </div>
+<!--+
+  |centerstrip with menu and mainarea
+  +-->
+        <div id="main">
+          <div id="publishedStrip">
+            <xsl:comment>+
+    |start Subtabs
+    +</xsl:comment>
+            <div id="level2tabs">
+              <xsl:apply-templates select="span[@id='level2tabs']/node()"/>
+            </div>
+            <xsl:comment>+
+    |end Endtabs
+    +</xsl:comment>
+            <xsl:call-template name="last-published"/>
+          </div>
+          <xsl:comment>+
+    |breadtrail
+    +</xsl:comment>
+          <div class="breadtrail">
+            <xsl:choose>
+              <xsl:when test="$config/trail/@location='alt'">
+<!--breadtrail location='alt'-->
+                <xsl:call-template name="breadcrumbs"/>
+              </xsl:when>
+              <xsl:otherwise>
+<!--*NO* breadtrail-->
+             &#160;
+           </xsl:otherwise>
+            </xsl:choose>
+          </div>
+          <xsl:comment>+
+    |start Menu, mainarea
+    +</xsl:comment>
+          <xsl:if test="div[@id='menu']/ul/li">
+            <xsl:call-template name="menu"/>
+          </xsl:if>
+          <xsl:comment>+
+    |start content
+    +</xsl:comment>
+          <xsl:apply-templates select="div[@id='content']"/>
+          <xsl:comment>+
+    |end content
+    +</xsl:comment>
+          <div class="clearboth">&#160;</div>
+        </div>
+<!--+
+  |bottomstrip with footer
+  +-->
+        <div id="footer">
+          <xsl:comment>+
+    |start bottomstrip
+    +</xsl:comment>
+          <div class="lastmodified">
+            <xsl:call-template name="last-published"/>
+          </div>
+          <xsl:if test="not($config/disable-copyright-footer = 'true')">
+            <div class="copyright">
+        Copyright &#169;
+        <xsl:text> </xsl:text>
+              <xsl:value-of select="$config/year"/>
+              <xsl:call-template name="current-year">
+                <xsl:with-param name="copyrightyear" select="$config/year"/>
+              </xsl:call-template>
+<xsl:text> </xsl:text>
+              <xsl:choose>
+                <xsl:when test="$config/copyright-link"><a>
+                  <xsl:attribute name="href">
+                    <xsl:value-of select="$config/copyright-link"/>
+                  </xsl:attribute>
+                  <xsl:value-of select="$config/vendor"/></a>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="$config/vendor"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </div>
+          </xsl:if>
+          <xsl:if test="$filename = 'index.html'">
+            <div id="logos" >
+              <xsl:if test="$config/disable-compliance-links/@align">
+                <xsl:attribute name="style">text-align: <xsl:value-of select="$config/disable-compliance-links/@align"/>
+                </xsl:attribute>
+              </xsl:if>
+<!-- W3C logos style="text-align: center;"-->
+              <xsl:call-template name="compliancy-logos"/>
+              <xsl:if test="$filename = 'index.html' and $config/credits">
+                <xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
+                  <xsl:if test="not(@box-location = 'alt') and not(@box-location = 'alt2')">
+                    <xsl:variable name="name" select="name"/>
+                    <xsl:variable name="url" select="url"/>
+                    <xsl:variable name="image" select="image"/>
+                    <xsl:variable name="width" select="width"/>
+                    <xsl:variable name="height" select="height"/><a href="{$url}">
+                    <img alt="{$name} - logo" title="{$name}" border="0">
+                      <xsl:attribute name="src">
+                        <xsl:if test="not(starts-with($image, 'http://'))">
+                          <xsl:value-of select="$root"/>
+                        </xsl:if>
+                        <xsl:value-of select="$image"/>
+                      </xsl:attribute>
+                      <xsl:attribute name="style">
+                        <xsl:if test="$width">width: <xsl:value-of select="$width"/>px;</xsl:if>
+                        <xsl:if test="$height">height: <xsl:value-of select="$height"/>px;</xsl:if>
+                      </xsl:attribute>
+                    </img></a>
+                  </xsl:if>
+                </xsl:for-each>
+              </xsl:if>
+            </div>
+          </xsl:if>
+          <xsl:if test="$config/host-logo and not($config/host-logo = '')">
+            <div class="host">
+              <xsl:call-template name="renderlogo">
+                <xsl:with-param name="name" select="$config/host-name"/>
+                <xsl:with-param name="url" select="$config/host-url"/>
+                <xsl:with-param name="logo" select="$config/host-logo"/>
+                <xsl:with-param name="root" select="$root"/>
+              </xsl:call-template>
+            </div>
+          </xsl:if>
+          <xsl:if test="$config/feedback">
+            <xsl:call-template name="feedback"/>
+          </xsl:if>
+          <xsl:comment>+
+    |end bottomstrip
+    +</xsl:comment>
+        </div>
+      </body>
+    </html>
+  </xsl:template>
+  <xsl:template name="last-published">
+<script type="text/javascript"><![CDATA[<!--
+document.write("]]><i18n:text >Last Published:</i18n:text><![CDATA[ " + document.lastModified);
+//  -->]]></script>
+  </xsl:template>
+<!--headings-->
+  <xsl:template match="div[@class = 'skinconf-heading-1']">
+    <xsl:choose>
+      <xsl:when test="//skinconfig/headings/@type='underlined'">
+        <h2 class="underlined_10">
+          <xsl:value-of select="h1"/>
+        </h2>
+      </xsl:when>
+      <xsl:when test="//skinconfig/headings/@type='boxed'">
+        <h2 class="boxed">
+          <xsl:value-of select="h1"/>
+        </h2>
+      </xsl:when>
+      <xsl:otherwise>
+        <h2 class="h3">
+          <xsl:value-of select="h1"/>
+        </h2>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="div[@class = 'skinconf-heading-2']">
+    <xsl:choose>
+      <xsl:when test="//skinconfig/headings/@type='underlined'">
+        <h3 class="underlined_5">
+          <xsl:value-of select="h2"/>
+        </h3>
+      </xsl:when>
+      <xsl:when test="//skinconfig/headings/@type='boxed'">
+        <h3 class="boxed">
+          <xsl:value-of select="h2"/>
+        </h3>
+      </xsl:when>
+      <xsl:otherwise>
+        <h3 class="h4">
+          <xsl:value-of select="h2"/>
+        </h3>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!-- Add links to any standards-compliance logos -->
+  <xsl:template name="compliancy-logos">
+    <xsl:if test="$filename = 'index.html' and $config/disable-compliance-links = 'false'"><a href="http://validator.w3.org/check/referer">
+      <img class="logoImage" 
+          src="{$skin-img-dir}/valid-html401.png"
+          alt="Valid HTML 4.01!" title="Valid HTML 4.01!" style="height: 31px; width: 88px;" /></a><a href="http://jigsaw.w3.org/css-validator/check/referer">
+      <img class="logoImage" 
+          src="{$skin-img-dir}/vcss.png" 
+          alt="Valid CSS!" title="Valid CSS!" style="height: 31px; width: 88px;"/></a>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template name="menu">
+    <xsl:comment>+
+    |start Menu
+    +</xsl:comment>
+    <div id="menu">
+<!--menu - inner-->
+      <xsl:for-each select = "div[@id='menu']/ul/li">
+        <xsl:call-template name = "innermenuli" >
+          <xsl:with-param name="id" select="concat('1.', position())"/>
+        </xsl:call-template>
+      </xsl:for-each>
+<!--
+			<xsl:apply-templates select="div[@id='menu']/*" />
+		-->
+<!-- Search box: alternative location -->
+      <xsl:if 
+            test="$config/search and $config/search/@box-location='alt'">
+        <xsl:comment>+
+    |start Search
+    +</xsl:comment>
+        <div class="searchbox">
+          <hr />
+          <xsl:variable name="search-prompt">
+            <i18n:text>Search the site with</i18n:text>
+<xsl:text> </xsl:text>
+            <xsl:value-of select="$config/search/@provider"/>
+          </xsl:variable>
+          <xsl:choose>
+            <xsl:when test="$config/search/@provider = 'lucene'">
+<!-- Lucene search -->
+              <form method="get" action="{$root}{$lucene-search}">
+                <input type="text" id="query" name="queryString" size="18" onFocus="getBlank (this, '{$search-prompt}');">
+                  <xsl:attribute name="value">
+                    <xsl:value-of select="$search-prompt"/>
+                  </xsl:attribute>
+                </input>&#160;
+		  <input type="submit" value="Search" name="Search" i18n:attr="value"/>
+              </form>
+            </xsl:when>
+            <xsl:otherwise>
+              <form method="get" action="http://www.google.com/search">
+                <input type="hidden" name="sitesearch" value="{$config/search/@domain}"/>
+                <input type="text" id="query" name="q" size="18" onFocus="getBlank (this, '{$search-prompt}');">
+                  <xsl:attribute name="value">
+                    <xsl:value-of select="$search-prompt"/>
+                  </xsl:attribute>
+                </input>&#160; 
+                  <input type="submit" value="Search" name="Search" i18n:attr="value"/>
+              </form>
+            </xsl:otherwise>
+          </xsl:choose>
+        </div>
+        <xsl:comment>+
+    |end search
+    +</xsl:comment>
+      </xsl:if>
+<!--credits in alternative location-->
+      <div id="credit">
+        <xsl:if test="$filename = 'index.html' and $config/credits and ($config/credits/credit/@box-location = 'alt')">
+          <hr />
+          <xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
+            <xsl:if test="@box-location = 'alt'">
+              <xsl:variable name="name" select="name"/>
+              <xsl:variable name="url" select="url"/>
+              <xsl:variable name="image" select="image"/>
+              <xsl:variable name="width" select="width"/>
+              <xsl:variable name="height" select="height"/><a href="{$url}">
+              <img alt="{$name} - logo" title="{$name}" border="0">
+                <xsl:attribute name="src">
+                  <xsl:if test="not(starts-with($image, 'http://'))">
+                    <xsl:value-of select="$root"/>
+                  </xsl:if>
+                  <xsl:value-of select="$image"/>
+                </xsl:attribute>
+                <xsl:attribute name="style">
+                  <xsl:if test="$width">width: <xsl:value-of select="$width"/>px;</xsl:if>
+                  <xsl:if test="$height">height: <xsl:value-of select="$height"/>px;</xsl:if>
+                </xsl:attribute>
+              </img></a>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:if>
+<!-- Message of the day -->
+        <xsl:if test="$config/motd">
+          <xsl:for-each select="$config/motd/motd-option">
+            <xsl:choose>
+              <xsl:when test="@starts-with='true'">
+                <xsl:if test="starts-with($path, @pattern)">
+                  <xsl:if test="motd-page/@location='alt' or motd-page/@location='both'">
+                    <hr />
+                    <xsl:value-of select="motd-page"/>
+                    <xsl:if test="motd-page-url">
+<xsl:text> (</xsl:text><a>
+                      <xsl:attribute name="href">
+                        <xsl:value-of select="motd-page-url"/>
+                      </xsl:attribute>
+<xsl:text>More</xsl:text></a>
+<xsl:text>)</xsl:text>
+                    </xsl:if>
+                  </xsl:if>
+                </xsl:if>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:if test="contains($path, @pattern)">
+                  <xsl:if test="motd-page/@location='alt' or motd-page/@location='both'">
+                    <hr />
+                    <xsl:value-of select="motd-page"/>
+                    <xsl:if test="motd-page-url">
+<xsl:text> (</xsl:text><a>
+                      <xsl:attribute name="href">
+                        <xsl:value-of select="motd-page-url"/>
+                      </xsl:attribute>
+<xsl:text>More</xsl:text></a>
+<xsl:text>)</xsl:text>
+                    </xsl:if>
+                  </xsl:if>
+                </xsl:if>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:for-each>
+        </xsl:if>
+      </div>
+      <div id="roundbottom">
+        <img 
+                src="{$skin-img-dir}/rc-b-l-15-1body-2menu-3menu.png" 
+                alt="" width="15" height="15" class="corner" 
+                style="display: none" />
+      </div>
+<!--credits in alternative location #2-->
+      <xsl:comment>+
+  |alternative credits
+  +</xsl:comment>
+      <div id="credit2">
+        <xsl:if test="$config/credits and ($config/credits/credit/@box-location = 'alt2')">
+          <xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
+            <xsl:if test="@box-location = 'alt2'">
+              <xsl:variable name="name" select="name"/>
+              <xsl:variable name="url" select="url"/>
+              <xsl:variable name="image" select="image"/>
+              <xsl:variable name="width" select="width"/>
+              <xsl:variable name="height" select="height"/><a href="{$url}">
+              <img alt="{$name} - logo" title="{$name}" border="0">
+                <xsl:attribute name="src">
+                  <xsl:if test="not(starts-with($image, 'http://'))">
+                    <xsl:value-of select="$root"/>
+                  </xsl:if>
+                  <xsl:value-of select="$image"/>
+                </xsl:attribute>
+                <xsl:attribute name="style">
+                  <xsl:if test="$width">width: <xsl:value-of select="$width"/>px;</xsl:if>
+                  <xsl:if test="$height">height: <xsl:value-of select="$height"/>px;</xsl:if>
+                </xsl:attribute>
+              </img></a>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:if>
+      </div>
+    </div>
+    <xsl:comment>+
+    |end Menu
+    +</xsl:comment>
+  </xsl:template>
+  <xsl:template name="innermenuli">
+    <xsl:param name="id"/>
+    <xsl:variable name="tagid">
+      <xsl:choose>
+        <xsl:when test="descendant-or-self::node()/li/div/@class='current'">
+          <xsl:value-of select="concat('menu_selected_',$id)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="concat('menu_',concat(font,$id))"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="whichGroup">
+      <xsl:choose>
+        <xsl:when test="descendant-or-self::node()/li/div/@class='current'">selectedmenuitemgroup</xsl:when>
+        <xsl:otherwise>menuitemgroup</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <div class="menutitle" id="{$tagid}Title" 
+        onclick="SwitchMenu('{$tagid}', '{$root}skin/')">
+      <xsl:if test="contains($tagid, '_selected_')" >
+        <xsl:attribute name="style">
+<xsl:text>background-image: url('</xsl:text>
+          <xsl:value-of select="$root"/>
+<xsl:text>skin/images/chapter_open.gif');</xsl:text>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:value-of select="h1"/>
+    </div>
+    <div class="{$whichGroup}" id="{$tagid}">
+      <xsl:if test="contains($tagid, '_selected_')" >
+        <xsl:attribute name="style">
+<xsl:text>display: block;</xsl:text>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:for-each select= "ul/li">
+        <xsl:choose>
+          <xsl:when test="a">
+            <div class="menuitem"><a>
+              <xsl:attribute name="href">
+                <xsl:value-of select="a/@href"/>
+              </xsl:attribute>
+              <xsl:if test="a/@title!=''">
+                <xsl:attribute name="title">
+                  <xsl:value-of select="a/@title"/>
+                </xsl:attribute>
+              </xsl:if>
+              <xsl:value-of select="a"/></a>
+            </div>
+          </xsl:when>
+          <xsl:when test="div/@class='current'">
+            <div class="menupage">
+              <div class="menupagetitle">
+                <xsl:value-of select="div" />
+              </div>
+              <xsl:if test="$config/toc/@max-depth > 0
+                    and contains($minitoc-location,'menu')
+                    and count(//tocitems/tocitem) >= $config/toc/@min-sections">
+                <div class="menupageitemgroup">
+                  <xsl:for-each select = "//tocitems/tocitem">
+                    <div class="menupageitem">
+                      <xsl:choose>
+                        <xsl:when test="string-length(@title)>15"><a href="{@href}" title="{@title}">
+                          <xsl:value-of select="substring(@title,0,20)" />...</a>
+                        </xsl:when>
+                        <xsl:otherwise><a href="{@href}">
+                          <xsl:value-of select="@title" /></a>
+                        </xsl:otherwise>
+                      </xsl:choose>
+                    </div>
+                  </xsl:for-each>
+                </div>
+              </xsl:if>
+            </div>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name = "innermenuli">
+              <xsl:with-param name="id" select="concat($id, '.', position())"/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+    </div>
+  </xsl:template>
+<!--+
+    |Generates the PDF link 
+    +-->
+  <xsl:template match="div[@id='skinconf-pdflink']">
+    <xsl:if test="not($config/disable-pdf-link) or $disable-pdf-link = 'false'">
+      <div class="pdflink" title="Portable Document Format"><a href="{$filename-noext}.pdf" class="dida">
+        <img class="skin" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF -icon" />
+        <br/>
+        PDF</a>
+      </div>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="div[@id='skinconf-xmllink']">
+    <xsl:if test="not($config/disable-xml-link) or $disable-xml-link = 'false'">
+      <div class="xmllink" title="raw XML"><a href="{$filename-noext}.xml" class="dida">
+        <img class="skin" src="{$skin-img-dir}/xmldoc.gif" alt="XML - icon" />
+        <br/>
+        XML</a>
+      </div>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="div[@id='skinconf-txtlink']">
+    <xsl:if test="not($config/disable-txt-link) or $disable-txt-link = 'false'">
+      <div class="podlink" title="Plain Text Documentation"><a href="{$filename-noext}.txt" class="dida">
+        <img class="skin" src="{$skin-img-dir}/txtdoc.png" alt="TXT - icon" />
+        <br/>
+        TXT</a>
+      </div>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="div[@id='skinconf-podlink']">
+    <xsl:if test="not($config/disable-pod-link) or $disable-pod-link = 'false'">
+      <div class="podlink" title="Plain Old Documentation"><a href="{$filename-noext}.pod" class="dida">
+        <img class="skin" src="{$skin-img-dir}/poddoc.png" alt="POD - icon" />
+        <br/>
+        POD</a>
+      </div>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="div[@id='skinconf-printlink']">
+    <xsl:if test="not($config/disable-print-link) or $disable-print-link = 'false'">
+<script type="text/javascript" language="Javascript">
+function printit() {
+  if (window.print) {
+    window.focus();
+    window.print();
+  }
+}
+        </script>
+<script type="text/javascript" language="Javascript">
+var NS = (navigator.appName == "Netscape");
+var VERSION = parseInt(navigator.appVersion);
+if (VERSION > 3) {
+  document.write('<div class="printlink" title="Print this Page">');
+  document.write('  <a href="javascript:printit()" class="dida">');
+  document.write('    <img class="skin" src="{$skin-img-dir}/printer.gif" alt="print - icon" />');
+  document.write('    <br />');
+  document.write('  PRINT</a>');
+  document.write('</div>');
+}
+        </script>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="div[@id='disable-font-script']">
+    <xsl:if test="$disable-font-script = 'false'">
+      <div class="trail">
+        <i18n:text >Font size:</i18n:text> 
+	          &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset"/>      
+	          &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a"/>
+	          &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a"/>
+      </div>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="div[@id='skinconf-toc-page']">
+<!-- Message of the day -->
+    <xsl:if test="$config/motd">
+      <xsl:for-each select="$config/motd/motd-option">
+        <xsl:choose>
+          <xsl:when test="@starts-with='true'">
+            <xsl:if test="starts-with($path, @pattern)">
+              <xsl:if test="motd-page/@location='page' or motd-page/@location='both'">
+                <div id="motd-area">
+                  <xsl:value-of select="motd-page"/>
+                  <xsl:if test="motd-page-url">
+<xsl:text> (</xsl:text><a>
+                    <xsl:attribute name="href">
+                      <xsl:value-of select="motd-page-url"/>
+                    </xsl:attribute>
+<xsl:text>More</xsl:text></a>
+<xsl:text>)</xsl:text>
+                  </xsl:if>
+                </div>
+              </xsl:if>
+            </xsl:if>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:if test="contains($path, @pattern)">
+              <xsl:if test="motd-page/@location='page' or motd-page/@location='both'">
+                <div id="motd-area">
+                  <xsl:value-of select="motd-page"/>
+                  <xsl:if test="motd-page-url">
+<xsl:text> (</xsl:text><a>
+                    <xsl:attribute name="href">
+                      <xsl:value-of select="motd-page-url"/>
+                    </xsl:attribute>
+<xsl:text>More</xsl:text></a>
+<xsl:text>)</xsl:text>
+                  </xsl:if>
+                </div>
+              </xsl:if>
+            </xsl:if>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+    </xsl:if>
+<!-- Table of Contents ToC -->
+    <xsl:if test="$config/toc">
+      <xsl:if test="contains($minitoc-location,'page')">
+        <xsl:if test="(count(//tocitems/tocitem) >= $config/toc/@min-sections) or (//tocitems/@force = 'true')">
+          <div id="minitoc-area">
+            <xsl:call-template name="minitoc">
+              <xsl:with-param name="tocroot" select="//tocitems"/>
+            </xsl:call-template>
+          </div>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/pelt/xslt/html/document-to-html.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/xslt/html/document-to-html.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/xslt/html/document-to-html.xsl	(revision 0)
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--
+This stylesheet contains templates for converting documentv11 to HTML.  See the
+imported document-to-html.xsl for details.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:import href="../../../common/xslt/html/document-to-html.xsl"/>
+  <xsl:template match="document">
+    <meta-data>
+      <xsl:apply-templates select="header/meta"/>
+    </meta-data>
+    <div id="content">
+      <div id="skinconf-printlink"/>
+      <div id="skinconf-xmllink"/>
+      <div id="skinconf-podlink"/>
+      <div id="skinconf-txtlink"/>
+      <div id="skinconf-pdflink"/>
+      <div id="disable-font-script"/>
+      <xsl:if test="normalize-space(header/title)!=''">
+        <h1>
+          <xsl:value-of select="header/title"/>
+        </h1>
+      </xsl:if>
+      <xsl:if test="normalize-space(header/subtitle)!=''">
+        <h3>
+          <xsl:value-of select="header/subtitle"/>
+        </h3>
+      </xsl:if>
+<!--
+      <xsl:apply-templates select="header/type"/>
+      <xsl:apply-templates select="header/notice"/>
+      <xsl:apply-templates select="header/abstract"/>
+      <xsl:apply-templates select="body"/>
+
+      <div class="attribution">
+        <xsl:apply-templates select="header/authors"/>
+        <xsl:if test="header/authors and header/version">
+          <xsl:text>; </xsl:text>
+        </xsl:if>
+        <xsl:apply-templates select="header/version"/>
+      </div>
+    -->
+      <xsl:if test="header/abstract">
+        <div class="abstract">
+          <xsl:value-of select="header/abstract"/>
+        </div>
+      </xsl:if>
+      <xsl:apply-templates select="body"/>
+      <xsl:if test="header/authors">
+        <p align="right">
+          <font size="-2">
+            <xsl:for-each select="header/authors/person">
+              <xsl:choose>
+                <xsl:when test="position()=1">by&#160;</xsl:when>
+                <xsl:otherwise>,&#160;</xsl:otherwise>
+              </xsl:choose>
+              <xsl:value-of select="@name"/>
+            </xsl:for-each>
+          </font>
+        </p>
+      </xsl:if>
+      <xsl:if test="header/version">
+        <xsl:apply-templates select="header/version"/>
+      </xsl:if>
+    </div>
+  </xsl:template>
+  <xsl:template match="body">
+    <div id="skinconf-toc-page"/>
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template match="@id">
+    <xsl:apply-imports/>
+  </xsl:template>
+  <xsl:template match="section"><a name="{generate-id()}"/>
+    <xsl:apply-templates select="@id"/>
+    <xsl:variable name = "level" select = "count(ancestor::section)+1" />
+    <xsl:choose>
+      <xsl:when test="$level=1">
+        <div class="skinconf-heading-{$level}">
+          <h1>
+            <xsl:value-of select="title"/>
+          </h1>
+        </div>
+        <div class="section">
+          <xsl:apply-templates select="*[not(self::title)]"/>
+        </div>
+      </xsl:when>
+      <xsl:when test="$level=2">
+        <div class="skinconf-heading-{$level}">
+          <h2>
+            <xsl:value-of select="title"/>
+          </h2>
+        </div>
+        <xsl:apply-templates select="*[not(self::title)]"/>
+      </xsl:when>
+<!-- If a faq, answer sections will be level 3 (1=Q/A, 2=part) -->
+      <xsl:when test="$level=3 and $notoc='true'">
+        <h4 class="faq">
+          <xsl:value-of select="title"/>
+        </h4>
+        <div align="right"><a href="#{@id}-menu">^</a>
+        </div>
+        <div style="margin-left: 15px">
+          <xsl:apply-templates select="*[not(self::title)]"/>
+        </div>
+      </xsl:when>
+      <xsl:when test="$level=3">
+        <h4>
+          <xsl:value-of select="title"/>
+        </h4>
+        <xsl:apply-templates select="*[not(self::title)]"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <h5>
+          <xsl:value-of select="title"/>
+        </h5>
+        <xsl:apply-templates select="*[not(self::title)]"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="figure">
+    <xsl:apply-templates select="@id"/>
+    <div style="text-align: center;" id="{@id}">
+      <img src="{@src}" alt="{@alt}" class="figure"  id="{@id}">
+        <xsl:if test="@height">
+          <xsl:attribute name="height">
+            <xsl:value-of select="@height"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:if test="@width">
+          <xsl:attribute name="width">
+            <xsl:value-of select="@width"/>
+          </xsl:attribute>
+        </xsl:if>
+      </img>
+    </div>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/pelt/xslt/html/tab-to-menu.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/pelt/xslt/html/tab-to-menu.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/pelt/xslt/html/tab-to-menu.xsl	(revision 0)
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--
+This stylesheet generates 'tabs' at the top left of the screen.  Tabs are
+visual indicators that a certain subsection of the URI space is being browsed.
+For example, if we had tabs with paths:
+
+Tab1:  ''
+Tab2:  'community'
+Tab3:  'community/howto'
+Tab4:  'community/howto/form/index.html'
+
+Then if the current path was 'community/howto/foo', Tab3 would be highlighted.
+The rule is: the tab with the longest path that forms a prefix of the current
+path is enabled.
+
+The output of this stylesheet is HTML of the form:
+    <div class="tab">
+      ...
+    </div>
+
+which is then merged by site-to-xhtml.xsl
+
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:import href="../../../common/xslt/html/tab-to-menu.xsl"/>
+  <xsl:template match="tabs">
+    <ul id="tabs">
+      <xsl:call-template name="base-tabs"/>
+    </ul>
+    <span id="level2tabs">
+      <xsl:call-template name="level2tabs"/>
+    </span>
+  </xsl:template>
+  <xsl:template name="pre-separator"></xsl:template>
+  <xsl:template name="post-separator"></xsl:template>
+  <xsl:template name="separator"></xsl:template>
+  <xsl:template name="level2-separator"></xsl:template>
+  <xsl:template name="selected">
+    <li class="current"><xsl:call-template name="base-selected"/></li>
+  </xsl:template>
+  <xsl:template name="not-selected">
+    <li><xsl:call-template name="base-not-selected"/></li>
+  </xsl:template>
+  <xsl:template name="level2-not-selected">
+    <xsl:call-template name="base-not-selected"/>
+  </xsl:template>
+  <xsl:template name="level2-selected">
+    <xsl:call-template name="base-selected"/>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/skinconf.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/skinconf.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/skinconf.xsl	(revision 0)
@@ -0,0 +1,238 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:template match="skinconfig">
+    <xsl:copy>
+      <xsl:if test="not(disable-print-link)">
+        <disable-print-link>true</disable-print-link>
+      </xsl:if>
+      <xsl:if test="not(disable-pdf-link)">
+        <disable-pdf-link>true</disable-pdf-link>
+      </xsl:if>
+      <xsl:if test="not(disable-txt-link)">
+        <disable-txt-link>true</disable-txt-link>
+      </xsl:if>
+      <xsl:if test="not(disable-pod-link)">
+        <disable-pod-link>true</disable-pod-link>
+      </xsl:if>
+      <xsl:if test="not(disable-xml-link)">
+        <disable-xml-link>true</disable-xml-link>
+      </xsl:if>
+      <xsl:if test="not(disable-external-link-image)">
+        <disable-external-link-image>false</disable-external-link-image>
+      </xsl:if>
+      <xsl:if test="not(disable-compliance-links)">
+        <disable-compliance-links>false</disable-compliance-links>
+      </xsl:if>
+      <xsl:if test="not(obfuscate-mail-links)">
+        <obfuscate-mail-links>true</obfuscate-mail-links>
+      </xsl:if>
+      <xsl:if test="not(obfuscate-mail-value)">
+        <obfuscate-mail-value>.at.</obfuscate-mail-value>
+      </xsl:if>
+      <xsl:if test="not(disable-font-script)">
+        <disable-font-script>true</disable-font-script>
+      </xsl:if>
+<!--
+     <xsl:if test="not(project-name)">
+       <project-name>MyProject</project-name>
+     </xsl:if>
+     <xsl:if test="not(project-description)">
+       <project-description>MyProject Description</project-description>
+     </xsl:if>
+     <xsl:if test="not(project-url)">
+       <project-url>http://myproj.mygroup.org/</project-url>
+     </xsl:if>
+     <xsl:if test="not(project-logo)">
+       <project-logo>images/project.png</project-logo>
+     </xsl:if>
+     <xsl:if test="not(group-name)">
+       <group-name>MyGroup</group-name>
+     </xsl:if>
+     <xsl:if test="not(group-description)">
+       <group-description>MyGroup Description</group-description>
+     </xsl:if>
+     <xsl:if test="not(group-url)">
+       <group-url>http://mygroup.org</group-url>
+     </xsl:if>
+     <xsl:if test="not(group-logo)">
+       <group-logo>images/group.png</group-logo>
+     </xsl:if>
+     <xsl:if test="not(host-url)">
+       <host-url/>
+     </xsl:if>
+     <xsl:if test="not(host-logo)">
+       <host-logo/>
+     </xsl:if>
+     <xsl:if test="not(year)">
+       <year>2006</year>
+     </xsl:if>
+     <xsl:if test="not(vendor)">
+       <vendor>The Acme Software Foundation.</vendor>
+     </xsl:if>
+     -->
+      <xsl:if test="not(trail)">
+        <trail>
+          <link1 name="" href=""/>
+          <link2 name="" href=""/>
+          <link3 name="" href=""/>
+        </trail>
+      </xsl:if>
+      <xsl:if test="not(toc)">
+        <toc level="2" location="page"/>
+      </xsl:if>
+      <xsl:if test="not(pdf/page-numbering-format)">
+        <pdf>
+          <page-numbering-format>Page 1</page-numbering-format>
+        </pdf>
+      </xsl:if>
+      <xsl:if test="not(pdf/show-external-urls)">
+        <pdf>
+          <show-external-urls>true</show-external-urls>
+        </pdf>
+      </xsl:if>
+<!--
+  <xsl:if test="not(colors)">
+  <colors>
+    <color name="header" value="#294563"/>
+
+    <color name="tab-selected" value="#4a6d8c"/>
+    <color name="tab-unselected" value="#b5c7e7"/>
+    <color name="subtab-selected" value="#4a6d8c"/>
+    <color name="subtab-unselected" value="#4a6d8c"/>
+
+    <color name="heading" value="#294563"/>
+    <color name="subheading" value="#4a6d8c"/>
+
+    <color name="navstrip" value="#cedfef"/>
+    <color name="toolbox" value="#294563"/>
+
+    <color name="menu" value="#4a6d8c"/>
+    <color name="dialog" value="#4a6d8c"/>
+
+    <color name="body" value="#ffffff"/>
+
+    <color name="table" value="#7099C5"/>
+    <color name="table-cell" value="#f0f0ff"/>
+    <color name="highlight" value="#ffff00"/>
+    <color name="fixme" value="#c60"/>
+    <color name="note" value="#069"/>
+
+    <color name="warning" value="#900"/>
+    <color name="code" value="#CFDCED"/>
+
+    <color name="footer" value="#cedfef"/>
+  </colors>
+  </xsl:if>
+-->
+      <xsl:if test="not(extra-css)">
+        <extra-css/>
+      </xsl:if>
+      <xsl:if test="not(credits)">
+        <credits>
+          <credit>
+            <name>Built with Apache Forrest</name>
+            <url>http://forrest.apache.org/</url>
+            <image>images/built-with-forrest-button.png</image>
+            <width>88</width>
+            <height>31</height>
+          </credit>
+<!-- A credit with @role='pdf' will have its name and url displayed in the
+    PDF page's footer. -->
+        </credits>
+      </xsl:if>
+      <xsl:copy-of select="@*"/>
+      <xsl:copy-of select="node()"/>
+<!--
+      <xsl:copy-of select="node()[not(name(.)='colors')]"/>
+      <xsl:apply-templates select="colors"/>-->
+    </xsl:copy>
+  </xsl:template>
+<!--
+    <xsl:template match="colors">
+    <colors>
+     <xsl:if test="not(color[@name='header'])">
+       <color name="header" value="#294563"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='tab-selected'])">
+      <color name="tab-selected" value="#4a6d8c"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='tab-unselected'])">
+      <color name="tab-unselected" value="#b5c7e7"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='subtab-selected'])">
+      <color name="subtab-selected" value="#4a6d8c"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='subtab-unselected'])">
+      <color name="subtab-unselected" value="#4a6d8c"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='heading'])">
+      <color name="heading" value="#294563"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='subheading'])">
+      <color name="subheading" value="#4a6d8c"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='navstrip'])">
+      <color name="navstrip" value="#cedfef"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='toolbox'])">
+       <color name="toolbox" value="#294563"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='menu'])">
+       <color name="menu" value="#4a6d8c"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='dialog'])">
+      <color name="dialog" value="#4a6d8c"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='body'])">
+      <color name="body" value="#ffffff"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='table'])">
+      <color name="table" value="#7099C5"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='table-cell'])">
+      <color name="table-cell" value="#f0f0ff"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='highlight'])">
+       <color name="highlight" value="#yellow"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='fixme'])">
+       <color name="fixme" value="#c60"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='note'])">
+       <color name="note" value="#069"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='warning'])">
+       <color name="warning" value="#900"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='code'])">
+       <color name="code" value="#CFDCED"/>
+     </xsl:if>
+     <xsl:if test="not(color[@name='footer'])">
+       <color name="footer" value="#cedfef"/>
+     </xsl:if>
+
+     <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:copy-of select="node()[name(.)='color']"/>
+     </xsl:copy>
+
+      </colors>
+    </xsl:template>
+-->
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/translations/CommonMessages_fr.xml
===================================================================
--- src/docs/cn/src/documentation/skins/common/translations/CommonMessages_fr.xml	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/translations/CommonMessages_fr.xml	(revision 0)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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.
+-->
+<catalogue>
+  <message key="Font size:">Taille :</message>
+  <message key="Last Published:">Dernire publication :</message>
+  <message key="Search">Rechercher</message>
+  <message key="Search the site with">Rechercher sur le site avec</message>
+</catalogue>
Index: src/docs/cn/src/documentation/skins/common/translations/CommonMessages_es.xml
===================================================================
--- src/docs/cn/src/documentation/skins/common/translations/CommonMessages_es.xml	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/translations/CommonMessages_es.xml	(revision 0)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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.
+-->
+<catalogue>
+  <message key="Font size:">Tamao del texto:</message>
+  <message key="Last Published:">Fecha de publicacin:</message>
+  <message key="Search">Buscar</message>
+  <message key="Search the site with">Buscar en</message>
+</catalogue>
Index: src/docs/cn/src/documentation/skins/common/translations/CommonMessages_de.xml
===================================================================
--- src/docs/cn/src/documentation/skins/common/translations/CommonMessages_de.xml	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/translations/CommonMessages_de.xml	(revision 0)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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.
+-->
+<catalogue>
+  <message key="Font size:">Schriftgrsse:</message>
+  <message key="Last Published:">Zuletzt verffentlicht:</message>
+  <message key="Search">Suche:</message>
+  <message key="Search the site with">Suche auf der Seite mit</message>
+</catalogue>
Index: src/docs/cn/src/documentation/skins/common/translations/CommonMessages_en_US.xml
===================================================================
--- src/docs/cn/src/documentation/skins/common/translations/CommonMessages_en_US.xml	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/translations/CommonMessages_en_US.xml	(revision 0)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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.
+-->
+<catalogue>
+  <message  key="Font size:">Font size:</message>
+  <message key="Last Published:">Last Published:</message>
+  <message key="Search">Search</message>
+  <message key="Search the site with">Search site with</message>
+</catalogue>
Index: src/docs/cn/src/documentation/skins/common/images/spacer.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/external-link.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/external-link.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/hack.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/hack.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/printer.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/printer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/txtdoc.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/txtdoc.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/xmldoc.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/xmldoc.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/rss.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/rss.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/rc.svg.xslt
===================================================================
--- src/docs/cn/src/documentation/skins/common/images/rc.svg.xslt	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/images/rc.svg.xslt	(revision 0)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:import href="corner-imports.svg.xslt" />
+<!-- Rounded corner -->
+  <xsl:template name="figure">
+    <g transform="translate(0.5 0.5)">
+      <ellipse cx="{$smallersize}" cy="{$smallersize}" rx="{$smallersize}" ry="{$smallersize}"
+				 style="{$fill}{$stroke}stroke-width:1"/>
+    </g>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/images/poddoc.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/poddoc.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/txtdoc.svg.xslt
===================================================================
--- src/docs/cn/src/documentation/skins/common/images/txtdoc.svg.xslt	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/images/txtdoc.svg.xslt	(revision 0)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  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.
+-->
+<svg width="20pt" height="20pt"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink">
+  <defs
+     id="defs550">
+    <linearGradient id="gray2white">
+      <stop style="stop-color:#7f7f7f;stop-opacity:1;" offset="0.000000"/>
+      <stop style="stop-color:#ffffff;stop-opacity:1;" offset="1.000000"/>
+    </linearGradient>
+    <linearGradient id="pageshade" xlink:href="#gray2white"
+       x1="0.95" y1="0.95"
+       x2="0.40" y2="0.20"
+       gradientUnits="objectBoundingBox" spreadMethod="pad" />
+    <path d="M 0 0 L 200 0" style="stroke:#000000;stroke-width:1pt;" id="hr"/>
+  </defs>
+  <g transform="scale(0.08)">
+    <g transform="translate(40, 0)">
+      <rect width="230" height="300" x="0" y="0"
+            style="fill:url(#pageshade);fill-rule:evenodd;
+            stroke:#000000;stroke-width:1.25;"/>
+      <g transform="translate(15, 60)">
+        <use xlink:href="#hr" x="0" y="0"/>
+        <use xlink:href="#hr" x="0" y="60"/>
+        <use xlink:href="#hr" x="0" y="120"/>
+        <use xlink:href="#hr" x="0" y="180"/>
+      </g>
+    </g>
+    <g transform="translate(0,70),scale(1.1,1.6)">
+      <rect width="200" height="100" x="0" y="0"
+         style="fill:#ff0000;fill-rule:evenodd;
+                stroke:#000000;stroke-width:2.33903;"/>
+      <text x="20" y="75"
+            style="stroke:#ffffff;stroke-width:1.0;
+                   font-size:72;font-weight:normal;fill:#ffffff;
+                   font-family:Arial;text-anchor:start;">TXT</text>
+    </g>
+  </g>
+</svg>
Index: src/docs/cn/src/documentation/skins/common/images/poddoc.svg.xslt
===================================================================
--- src/docs/cn/src/documentation/skins/common/images/poddoc.svg.xslt	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/images/poddoc.svg.xslt	(revision 0)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  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.
+-->
+<svg width="20pt" height="20pt"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink">
+  <defs
+     id="defs550">
+    <linearGradient id="gray2white">
+      <stop style="stop-color:#7f7f7f;stop-opacity:1;" offset="0.000000"/>
+      <stop style="stop-color:#ffffff;stop-opacity:1;" offset="1.000000"/>
+    </linearGradient>
+    <linearGradient id="pageshade" xlink:href="#gray2white"
+       x1="0.95" y1="0.95"
+       x2="0.40" y2="0.20"
+       gradientUnits="objectBoundingBox" spreadMethod="pad" />
+    <path d="M 0 0 L 200 0" style="stroke:#000000;stroke-width:1pt;" id="hr"/>
+  </defs>
+  <g transform="scale(0.08)">
+    <g transform="translate(40, 0)">
+      <rect width="230" height="300" x="0" y="0"
+            style="fill:url(#pageshade);fill-rule:evenodd;
+            stroke:#000000;stroke-width:1.25;"/>
+      <g transform="translate(15, 60)">
+        <use xlink:href="#hr" x="0" y="0"/>
+        <use xlink:href="#hr" x="0" y="60"/>
+        <use xlink:href="#hr" x="0" y="120"/>
+        <use xlink:href="#hr" x="0" y="180"/>
+      </g>
+    </g>
+    <g transform="translate(0,70),scale(1.1,1.6)">
+      <rect width="200" height="100" x="0" y="0"
+         style="fill:#ff0000;fill-rule:evenodd;
+                stroke:#000000;stroke-width:2.33903;"/>
+      <text x="20" y="75"
+            style="stroke:#ffffff;stroke-width:1.0;
+                   font-size:72;font-weight:normal;fill:#ffffff;
+                   font-family:Arial;text-anchor:start;">POD</text>
+    </g>
+  </g>
+</svg>
Index: src/docs/cn/src/documentation/skins/common/images/vcss.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/vcss.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/update.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/update.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/pdfdoc.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/pdfdoc.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/fix.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/fix.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/built-with-forrest-button.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/built-with-forrest-button.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/add.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/add.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/valid-html401.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/valid-html401.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/corner-imports.svg.xslt
===================================================================
--- src/docs/cn/src/documentation/skins/common/images/corner-imports.svg.xslt	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/images/corner-imports.svg.xslt	(revision 0)
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:param name="orientation-tb"/>
+  <xsl:param name="orientation-lr"/>
+  <xsl:param name="size"/>
+  <xsl:param name="bg-color-name"/>
+  <xsl:param name="stroke-color-name"/>
+  <xsl:param name="fg-color-name"/>
+<!-- if not all colors are present, don't even try to render the corners -->
+  <xsl:variable name="isize">
+    <xsl:choose>
+      <xsl:when test="$bg-color-name and $stroke-color-name and $fg-color-name">
+        <xsl:value-of select="$size"/>
+      </xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:variable name="smallersize" select="number($isize)-1"/>
+  <xsl:variable name="biggersize" select="number($isize)+1"/>
+  <xsl:variable name="bg">
+    <xsl:if test="skinconfig/colors/color[@name=$bg-color-name]">fill:<xsl:value-of select="skinconfig/colors/color[@name=$bg-color-name]/@value"/>;</xsl:if>
+  </xsl:variable>
+  <xsl:variable name="fill">
+    <xsl:if test="skinconfig/colors/color[@name=$stroke-color-name]">fill:<xsl:value-of select="skinconfig/colors/color[@name=$stroke-color-name]/@value"/>;</xsl:if>
+  </xsl:variable>
+  <xsl:variable name="stroke">
+    <xsl:if test="skinconfig/colors/color[@name=$fg-color-name]">stroke:<xsl:value-of select="skinconfig/colors/color[@name=$fg-color-name]/@value"/>;</xsl:if>
+  </xsl:variable>
+  <xsl:template match="skinconfig">
+    <svg width="{$isize}" height="{$isize}">
+<!-- background-->
+      <rect x="-1" y="-1" width="{$biggersize}" height="{$biggersize}" style="{$bg}stroke-width:0"/>
+<!-- 0,0 0,-4 4,0 4,-4-->
+      <xsl:variable name="flip-tb-scale">
+        <xsl:choose>
+          <xsl:when test="$orientation-tb='t'">1</xsl:when>
+          <xsl:otherwise>-1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="flip-lr-scale">
+        <xsl:choose>
+          <xsl:when test="$orientation-lr='l'">1</xsl:when>
+          <xsl:otherwise>-1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="flip-tb-translate">
+        <xsl:choose>
+          <xsl:when test="$orientation-tb='t'">0</xsl:when>
+          <xsl:otherwise>-<xsl:value-of select="$isize" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="flip-lr-translate">
+        <xsl:choose>
+          <xsl:when test="$orientation-lr='l'">0</xsl:when>
+          <xsl:otherwise>-<xsl:value-of select="$isize" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+<!-- flip transform -->
+      <g transform="scale({$flip-lr-scale},{$flip-tb-scale}) translate({$flip-lr-translate}, {$flip-tb-translate})">
+        <xsl:call-template name="figure" />
+      </g>
+    </svg>
+  </xsl:template>
+  <xsl:template name="figure">
+<!-- Just change shape here -->
+    <g transform="translate(0.5 0.5)">
+      <ellipse cx="{$smallersize}" cy="{$smallersize}" rx="{$smallersize}" ry="{$smallersize}"
+				 style="{$fill}{$stroke}stroke-width:1"/>
+    </g>
+<!-- end -->
+  </xsl:template>
+  <xsl:template match="*"></xsl:template>
+  <xsl:template match="text()"></xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/images/README.txt
===================================================================
--- src/docs/cn/src/documentation/skins/common/images/README.txt	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/images/README.txt	(revision 0)
@@ -0,0 +1 @@
+The images in this directory are used if the current skin lacks them.
Index: src/docs/cn/src/documentation/skins/common/images/remove.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/remove.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/images/dc.svg.xslt
===================================================================
--- src/docs/cn/src/documentation/skins/common/images/dc.svg.xslt	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/images/dc.svg.xslt	(revision 0)
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:import href="corner-imports.svg.xslt" />
+<!-- Diagonal 45 degrees corner -->
+  <xsl:template name="figure">
+    <xsl:variable name="biggersize" select="number($size)+number($size)"/>
+    <g transform="translate(0 0.5)">
+      <polygon points="0,{$size} {$size},0 {$biggersize},0 {$biggersize},{$biggersize} 0,{$biggersize}"
+                    style="{$fill}{$stroke}stroke-width:1"/>
+    </g>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/images/forrest-credit-logo.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/skins/common/images/forrest-credit-logo.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/skins/common/scripts/menu.js
===================================================================
--- src/docs/cn/src/documentation/skins/common/scripts/menu.js	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/scripts/menu.js	(revision 0)
@@ -0,0 +1,48 @@
+/*
+* 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.
+*/
+/**
+ * This script, when included in a html file, can be used to make collapsible menus
+ *
+ * Typical usage:
+ * <script type="text/javascript" language="JavaScript" src="menu.js"></script>
+ */
+
+if (document.getElementById){ 
+  document.write('<style type="text/css">.menuitemgroup{display: none;}</style>')
+}
+
+function SwitchMenu(obj)
+{
+  if(document.getElementById)  {
+    var el = document.getElementById(obj);
+    var title = document.getElementById(obj+'Title');
+
+    if(obj.indexOf("_selected_")==0&&el.style.display == ""){
+      el.style.display = "block";
+      title.className = "pagegroupselected";
+    }
+
+    if(el.style.display != "block"){
+      el.style.display = "block";
+      title.className = "pagegroupopen";
+    }
+    else{
+      el.style.display = "none";
+      title.className = "pagegroup";
+    }
+  }// end -  if(document.getElementById) 
+}//end - function SwitchMenu(obj)
Index: src/docs/cn/src/documentation/skins/common/scripts/getMenu.js
===================================================================
--- src/docs/cn/src/documentation/skins/common/scripts/getMenu.js	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/scripts/getMenu.js	(revision 0)
@@ -0,0 +1,45 @@
+/*
+* 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.
+*/
+/**
+ * This script, when included in a html file, can be used to make collapsible menus
+ *
+ * Typical usage:
+ * <script type="text/javascript" language="JavaScript" src="menu.js"></script>
+ */
+
+if (document.getElementById){ 
+  document.write('<style type="text/css">.menuitemgroup{display: none;}</style>')
+}
+
+
+function SwitchMenu(obj, thePath)
+{
+var open = 'url("'+thePath + 'images/chapter_open.gif")';
+var close = 'url("'+thePath + 'images/chapter.gif")';
+  if(document.getElementById)  {
+    var el = document.getElementById(obj);
+    var title = document.getElementById(obj+'Title');
+
+    if(el.style.display != "block"){ 
+      title.style.backgroundImage = open;
+      el.style.display = "block";
+    }else{
+      title.style.backgroundImage = close;
+      el.style.display = "none";
+    }
+  }// end -  if(document.getElementById) 
+}//end - function SwitchMenu(obj)
Index: src/docs/cn/src/documentation/skins/common/scripts/prototype.js
===================================================================
--- src/docs/cn/src/documentation/skins/common/scripts/prototype.js	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/scripts/prototype.js	(revision 0)
@@ -0,0 +1,1257 @@
+/*  Prototype JavaScript framework, version 1.4.0_pre4
+ *  (c) 2005 Sam Stephenson <sam@conio.net>
+ *
+ *  THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff
+ *  against the source tree, available from the Prototype darcs repository. 
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *
+ *  For details, see the Prototype web site: http://prototype.conio.net/
+ *
+/*--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.4.0_pre4',
+  
+  emptyFunction: function() {},
+  K: function(x) {return x}
+}
+
+var Class = {
+  create: function() {
+    return function() { 
+      this.initialize.apply(this, arguments);
+    }
+  }
+}
+
+var Abstract = new Object();
+
+Object.extend = function(destination, source) {
+  for (property in source) {
+    destination[property] = source[property];
+  }
+  return destination;
+}
+
+Function.prototype.bind = function(object) {
+  var __method = this;
+  return function() {
+    return __method.apply(object, arguments);
+  }
+}
+
+Function.prototype.bindAsEventListener = function(object) {
+  var __method = this;
+  return function(event) {
+    return __method.call(object, event || window.event);
+  }
+}
+
+Number.prototype.toColorPart = function() {
+  var digits = this.toString(16);
+  if (this < 16) return '0' + digits;
+  return digits;
+}
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0; i < arguments.length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) {}
+    }
+
+    return returnValue;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create();
+PeriodicalExecuter.prototype = {
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try { 
+        this.currentlyExecuting = true;
+        this.callback(); 
+      } finally { 
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+function $() {
+  var elements = new Array();
+
+  for (var i = 0; i < arguments.length; i++) {
+    var element = arguments[i];
+    if (typeof element == 'string')
+      element = document.getElementById(element);
+
+    if (arguments.length == 1) 
+      return element;
+
+    elements.push(element);
+  }
+
+  return elements;
+}
+
+if (!Array.prototype.push) {
+  Array.prototype.push = function() {
+		var startLength = this.length;
+		for (var i = 0; i < arguments.length; i++)
+      this[startLength + i] = arguments[i];
+	  return this.length;
+  }
+}
+
+if (!Function.prototype.apply) {
+  // Based on code from http://www.youngpup.net/
+  Function.prototype.apply = function(object, parameters) {
+    var parameterStrings = new Array();
+    if (!object)     object = window;
+    if (!parameters) parameters = new Array();
+    
+    for (var i = 0; i < parameters.length; i++)
+      parameterStrings[i] = 'parameters[' + i + ']';
+    
+    object.__apply__ = this;
+    var result = eval('object.__apply__(' + 
+      parameterStrings.join(', ') + ')');
+    object.__apply__ = null;
+    
+    return result;
+  }
+}
+
+Object.extend(String.prototype, {
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  escapeHTML: function() {
+    var div = document.createElement('div');
+    var text = document.createTextNode(this);
+    div.appendChild(text);
+    return div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = document.createElement('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0].nodeValue;
+  },
+  
+  parseQuery: function() {
+    var str = this;
+    if (str.substring(0,1) == '?') {
+      str = this.substring(1);
+    }
+    var result = {};
+    var pairs = str.split('&');
+    for (var i = 0; i < pairs.length; i++) {
+      var pair = pairs[i].split('=');
+      result[pair[0]] = pair[1];
+    }
+    return result;
+  }
+});
+
+
+var _break    = new Object();
+var _continue = new Object();
+
+var Enumerable = {
+  each: function(iterator) {
+    var index = 0;
+    try {
+      this._each(function(value) {
+        try {
+          iterator(value, index++);
+        } catch (e) {
+          if (e != _continue) throw e;
+        }
+      });
+    } catch (e) {
+      if (e != _break) throw e;
+    }
+  },
+  
+  all: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      if (!(result &= (iterator || Prototype.K)(value, index))) 
+        throw _break;
+    });
+    return result;
+  },
+  
+  any: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      if (result &= (iterator || Prototype.K)(value, index)) 
+        throw _break;
+    });
+    return result;
+  },
+  
+  collect: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(iterator(value, index));
+    });
+    return results;
+  },
+  
+  detect: function (iterator) {
+    var result;
+    this.each(function(value, index) {
+      if (iterator(value, index)) {
+        result = value;
+        throw _break;
+      }
+    });
+    return result;
+  },
+  
+  findAll: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+  
+  grep: function(pattern, iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      var stringValue = value.toString();
+      if (stringValue.match(pattern))
+        results.push((iterator || Prototype.K)(value, index));
+    })
+    return results;
+  },
+  
+  include: function(object) {
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw _break;
+      }
+    });
+    return found;
+  },
+  
+  inject: function(memo, iterator) {
+    this.each(function(value, index) {
+      memo = iterator(memo, value, index);
+    });
+    return memo;
+  },
+  
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.collect(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+  
+  max: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (value >= (result || value))
+        result = value;
+    });
+    return result;
+  },
+  
+  min: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (value <= (result || value))
+        result = value;
+    });
+    return result;
+  },
+  
+  partition: function(iterator) {
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      ((iterator || Prototype.K)(value, index) ? 
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+  
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+  
+  reject: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+  
+  sortBy: function(iterator) {
+    return this.collect(function(value, index) {
+      return {value: value, criteria: iterator(value, index)};
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+  
+  toArray: function() {
+    return this.collect(Prototype.K);
+  },
+  
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (typeof args.last() == 'function')
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      iterator(value = collections.pluck(index));
+      return value;
+    });
+  }
+}
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray
+});
+
+$A = Array.from = function(iterable) {
+  var results = [];
+  for (var i = 0; i < iterable.length; i++)
+    results.push(iterable[i]);
+  return results;
+}
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0; i < this.length; i++)
+      iterator(this[i]);
+  },
+  
+  first: function() {
+    return this[0];
+  },
+  
+  last: function() {
+    return this[this.length - 1];
+  }
+});
+
+Object.extend(Array.prototype, Enumerable);
+
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')},
+      function() {return new XMLHttpRequest()}
+    ) || false;
+  }
+}
+
+Ajax.Base = function() {};
+Ajax.Base.prototype = {
+  setOptions: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      parameters:   ''
+    }
+    Object.extend(this.options, options || {});
+  },
+
+  responseIsSuccess: function() {
+    return this.transport.status == undefined
+        || this.transport.status == 0 
+        || (this.transport.status >= 200 && this.transport.status < 300);
+  },
+
+  responseIsFailure: function() {
+    return !this.responseIsSuccess();
+  }
+}
+
+Ajax.Request = Class.create();
+Ajax.Request.Events = 
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(url, options) {
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+    this.request(url);
+  },
+
+  request: function(url) {
+    var parameters = this.options.parameters || '';
+    if (parameters.length > 0) parameters += '&_=';
+
+    try {
+      if (this.options.method == 'get')
+        url += '?' + parameters;
+
+      this.transport.open(this.options.method, url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous) {
+        this.transport.onreadystatechange = this.onStateChange.bind(this);
+        setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10);
+      }
+
+      this.setRequestHeaders();
+
+      var body = this.options.postBody ? this.options.postBody : parameters;
+      this.transport.send(this.options.method == 'post' ? body : null);
+
+    } catch (e) {
+    }
+  },
+
+  setRequestHeaders: function() {
+    var requestHeaders = 
+      ['X-Requested-With', 'XMLHttpRequest',
+       'X-Prototype-Version', Prototype.Version];
+
+    if (this.options.method == 'post') {
+      requestHeaders.push('Content-type', 
+        'application/x-www-form-urlencoded');
+
+      /* Force "Connection: close" for Mozilla browsers to work around
+       * a bug where XMLHttpReqeuest sends an incorrect Content-length
+       * header. See Mozilla Bugzilla #246651. 
+       */
+      if (this.transport.overrideMimeType)
+        requestHeaders.push('Connection', 'close');
+    }
+
+    if (this.options.requestHeaders)
+      requestHeaders.push.apply(requestHeaders, this.options.requestHeaders);
+
+    for (var i = 0; i < requestHeaders.length; i += 2)
+      this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]);
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState != 1)
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  respondToReadyState: function(readyState) {
+    var event = Ajax.Request.Events[readyState];
+
+    if (event == 'Complete')
+      (this.options['on' + this.transport.status]
+       || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')]
+       || Prototype.emptyFunction)(this.transport);
+
+    (this.options['on' + event] || Prototype.emptyFunction)(this.transport);
+
+    /* Avoid memory leak in MSIE: clean up the oncomplete event handler */
+    if (event == 'Complete')
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+  }
+});
+
+Ajax.Updater = Class.create();
+Ajax.Updater.ScriptFragment = '(?:<script.*?>)((\n|.)*?)(?:<\/script>)';
+
+Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
+  initialize: function(container, url, options) {
+    this.containers = {
+      success: container.success ? $(container.success) : $(container),
+      failure: container.failure ? $(container.failure) :
+        (container.success ? null : $(container))
+    }
+
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+
+    var onComplete = this.options.onComplete || Prototype.emptyFunction;
+    this.options.onComplete = (function() {
+      this.updateContent();
+      onComplete(this.transport);
+    }).bind(this);
+
+    this.request(url);
+  },
+
+  updateContent: function() {
+    var receiver = this.responseIsSuccess() ?
+      this.containers.success : this.containers.failure;
+
+    var match    = new RegExp(Ajax.Updater.ScriptFragment, 'img');
+    var response = this.transport.responseText.replace(match, '');
+    var scripts  = this.transport.responseText.match(match);
+
+    if (receiver) {
+      if (this.options.insertion) {
+        new this.options.insertion(receiver, response);
+      } else {
+        receiver.innerHTML = response;
+      }
+    }
+
+    if (this.responseIsSuccess()) {
+      if (this.onComplete)
+        setTimeout((function() {this.onComplete(
+          this.transport)}).bind(this), 10);
+    }
+
+    if (this.options.evalScripts && scripts) {
+      match = new RegExp(Ajax.Updater.ScriptFragment, 'im');
+      setTimeout((function() {
+        for (var i = 0; i < scripts.length; i++)
+          eval(scripts[i].match(match)[1]);
+      }).bind(this), 10);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create();
+Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(container, url, options) {
+    this.setOptions(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = 1;
+
+    this.updater = {};
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Ajax.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(request) {
+    if (this.options.decay) {
+      this.decay = (request.responseText == this.lastText ? 
+        this.decay * this.options.decay : 1);
+
+      this.lastText = request.responseText;
+    }
+    this.timer = setTimeout(this.onTimerEvent.bind(this), 
+      this.decay * this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+
+document.getElementsByClassName = function(className) {
+  var children = document.getElementsByTagName('*') || document.all;
+  var elements = new Array();
+  
+  for (var i = 0; i < children.length; i++) {
+    var child = children[i];
+    var classNames = child.className.split(' ');
+    for (var j = 0; j < classNames.length; j++) {
+      if (classNames[j] == className) {
+        elements.push(child);
+        break;
+      }
+    }
+  }
+  
+  return elements;
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Element) {
+  var Element = new Object();
+}
+
+Object.extend(Element, {
+  toggle: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = $(arguments[i]);
+      element.style.display = 
+        (element.style.display == 'none' ? '' : 'none');
+    }
+  },
+
+  hide: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = $(arguments[i]);
+      element.style.display = 'none';
+    }
+  },
+
+  show: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = $(arguments[i]);
+      element.style.display = '';
+    }
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+  },
+   
+  getHeight: function(element) {
+    element = $(element);
+    return element.offsetHeight; 
+  },
+
+  hasClassName: function(element, className) {
+    element = $(element);
+    if (!element)
+      return;
+    var a = element.className.split(' ');
+    for (var i = 0; i < a.length; i++) {
+      if (a[i] == className)
+        return true;
+    }
+    return false;
+  },
+
+  addClassName: function(element, className) {
+    element = $(element);
+    Element.removeClassName(element, className);
+    element.className += ' ' + className;
+  },
+
+  removeClassName: function(element, className) {
+    element = $(element);
+    if (!element)
+      return;
+    var newClassName = '';
+    var a = element.className.split(' ');
+    for (var i = 0; i < a.length; i++) {
+      if (a[i] != className) {
+        if (i > 0)
+          newClassName += ' ';
+        newClassName += a[i];
+      }
+    }
+    element.className = newClassName;
+  },
+  
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    var element = $(element);
+    for (var i = 0; i < element.childNodes.length; i++) {
+      var node = element.childNodes[i];
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) 
+        Element.remove(node);
+    }
+  }
+});
+
+var Toggle = new Object();
+Toggle.display = Element.toggle;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.Insertion = function(adjacency) {
+  this.adjacency = adjacency;
+}
+
+Abstract.Insertion.prototype = {
+  initialize: function(element, content) {
+    this.element = $(element);
+    this.content = content;
+    
+    if (this.adjacency && this.element.insertAdjacentHTML) {
+      this.element.insertAdjacentHTML(this.adjacency, this.content);
+    } else {
+      this.range = this.element.ownerDocument.createRange();
+      if (this.initializeRange) this.initializeRange();
+      this.fragment = this.range.createContextualFragment(this.content);
+      this.insertContent();
+    }
+  }
+}
+
+var Insertion = new Object();
+
+Insertion.Before = Class.create();
+Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
+  initializeRange: function() {
+    this.range.setStartBefore(this.element);
+  },
+  
+  insertContent: function() {
+    this.element.parentNode.insertBefore(this.fragment, this.element);
+  }
+});
+
+Insertion.Top = Class.create();
+Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(true);
+  },
+  
+  insertContent: function() {  
+    this.element.insertBefore(this.fragment, this.element.firstChild);
+  }
+});
+
+Insertion.Bottom = Class.create();
+Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(this.element);
+  },
+  
+  insertContent: function() {
+    this.element.appendChild(this.fragment);
+  }
+});
+
+Insertion.After = Class.create();
+Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
+  initializeRange: function() {
+    this.range.setStartAfter(this.element);
+  },
+  
+  insertContent: function() {
+    this.element.parentNode.insertBefore(this.fragment, 
+      this.element.nextSibling);
+  }
+});
+
+var Field = {
+  clear: function() {
+    for (var i = 0; i < arguments.length; i++)
+      $(arguments[i]).value = '';
+  },
+
+  focus: function(element) {
+    $(element).focus();
+  },
+  
+  present: function() {
+    for (var i = 0; i < arguments.length; i++)
+      if ($(arguments[i]).value == '') return false;
+    return true;
+  },
+  
+  select: function(element) {
+    $(element).select();
+  },
+   
+  activate: function(element) {
+    $(element).focus();
+    $(element).select();
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Form = {
+  serialize: function(form) {
+    var elements = Form.getElements($(form));
+    var queryComponents = new Array();
+    
+    for (var i = 0; i < elements.length; i++) {
+      var queryComponent = Form.Element.serialize(elements[i]);
+      if (queryComponent)
+        queryComponents.push(queryComponent);
+    }
+    
+    return queryComponents.join('&');
+  },
+  
+  getElements: function(form) {
+    var form = $(form);
+    var elements = new Array();
+
+    for (tagName in Form.Element.Serializers) {
+      var tagElements = form.getElementsByTagName(tagName);
+      for (var j = 0; j < tagElements.length; j++)
+        elements.push(tagElements[j]);
+    }
+    return elements;
+  },
+  
+  getInputs: function(form, typeName, name) {
+    var form = $(form);
+    var inputs = form.getElementsByTagName('input');
+    
+    if (!typeName && !name)
+      return inputs;
+      
+    var matchingInputs = new Array();
+    for (var i = 0; i < inputs.length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) ||
+          (name && input.name != name)) 
+        continue;
+      matchingInputs.push(input);
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    var elements = Form.getElements(form);
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      element.blur();
+      element.disabled = 'true';
+    }
+  },
+
+  enable: function(form) {
+    var elements = Form.getElements(form);
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      element.disabled = '';
+    }
+  },
+
+  focusFirstElement: function(form) {
+    var form = $(form);
+    var elements = Form.getElements(form);
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      if (element.type != 'hidden' && !element.disabled) {
+        Field.activate(element);
+        break;
+      }
+    }
+  },
+
+  reset: function(form) {
+    $(form).reset();
+  }
+}
+
+Form.Element = {
+  serialize: function(element) {
+    var element = $(element);
+    var method = element.tagName.toLowerCase();
+    var parameter = Form.Element.Serializers[method](element);
+    
+    if (parameter)
+      return encodeURIComponent(parameter[0]) + '=' + 
+        encodeURIComponent(parameter[1]);                   
+  },
+  
+  getValue: function(element) {
+    var element = $(element);
+    var method = element.tagName.toLowerCase();
+    var parameter = Form.Element.Serializers[method](element);
+    
+    if (parameter) 
+      return parameter[1];
+  }
+}
+
+Form.Element.Serializers = {
+  input: function(element) {
+    switch (element.type.toLowerCase()) {
+      case 'submit':
+      case 'hidden':
+      case 'password':
+      case 'text':
+        return Form.Element.Serializers.textarea(element);
+      case 'checkbox':  
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element);
+    }
+    return false;
+  },
+
+  inputSelector: function(element) {
+    if (element.checked)
+      return [element.name, element.value];
+  },
+
+  textarea: function(element) {
+    return [element.name, element.value];
+  },
+
+  select: function(element) {
+    var value = '';
+    if (element.type == 'select-one') {
+      var index = element.selectedIndex;
+      if (index >= 0)
+        value = element.options[index].value || element.options[index].text;
+    } else {
+      value = new Array();
+      for (var i = 0; i < element.length; i++) {
+        var opt = element.options[i];
+        if (opt.selected)
+          value.push(opt.value || opt.text);
+      }
+    }
+    return [element.name, value];
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var $F = Form.Element.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = function() {}
+Abstract.TimedObserver.prototype = {
+  initialize: function(element, frequency, callback) {
+    this.frequency = frequency;
+    this.element   = $(element);
+    this.callback  = callback;
+    
+    this.lastValue = this.getValue();
+    this.registerCallback();
+  },
+  
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+  
+  onTimerEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+}
+
+Form.Element.Observer = Class.create();
+Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create();
+Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = function() {}
+Abstract.EventObserver.prototype = {
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+    
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+  
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+  
+  registerFormCallbacks: function() {
+    var elements = Form.getElements(this.element);
+    for (var i = 0; i < elements.length; i++)
+      this.registerCallback(elements[i]);
+  },
+  
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':  
+        case 'radio':
+          element.target = this;
+          element.prev_onclick = element.onclick || Prototype.emptyFunction;
+          element.onclick = function() {
+            this.prev_onclick(); 
+            this.target.onElementEvent();
+          }
+          break;
+        case 'password':
+        case 'text':
+        case 'textarea':
+        case 'select-one':
+        case 'select-multiple':
+          element.target = this;
+          element.prev_onchange = element.onchange || Prototype.emptyFunction;
+          element.onchange = function() {
+            this.prev_onchange(); 
+            this.target.onElementEvent();
+          }
+          break;
+      }
+    }    
+  }
+}
+
+Form.Element.EventObserver = Class.create();
+Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create();
+Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+
+if (!window.Event) {
+  var Event = new Object();
+}
+
+Object.extend(Event, {
+  KEY_BACKSPACE: 8,
+  KEY_TAB:       9,
+  KEY_RETURN:   13,
+  KEY_ESC:      27,
+  KEY_LEFT:     37,
+  KEY_UP:       38,
+  KEY_RIGHT:    39,
+  KEY_DOWN:     40,
+  KEY_DELETE:   46,
+
+  element: function(event) {
+    return event.target || event.srcElement;
+  },
+
+  isLeftClick: function(event) {
+    return (((event.which) && (event.which == 1)) ||
+            ((event.button) && (event.button == 1)));
+  },
+
+  pointerX: function(event) {
+    return event.pageX || (event.clientX + 
+      (document.documentElement.scrollLeft || document.body.scrollLeft));
+  },
+
+  pointerY: function(event) {
+    return event.pageY || (event.clientY + 
+      (document.documentElement.scrollTop || document.body.scrollTop));
+  },
+
+  stop: function(event) {
+    if (event.preventDefault) { 
+      event.preventDefault(); 
+      event.stopPropagation(); 
+    } else {
+      event.returnValue = false;
+    }
+  },
+
+  // find the first node with the given tagName, starting from the
+  // node the event was triggered on; traverses the DOM upwards
+  findElement: function(event, tagName) {
+    var element = Event.element(event);
+    while (element.parentNode && (!element.tagName ||
+        (element.tagName.toUpperCase() != tagName.toUpperCase())))
+      element = element.parentNode;
+    return element;
+  },
+
+  observers: false,
+  
+  _observeAndCache: function(element, name, observer, useCapture) {
+    if (!this.observers) this.observers = [];
+    if (element.addEventListener) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.addEventListener(name, observer, useCapture);
+    } else if (element.attachEvent) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.attachEvent('on' + name, observer);
+    }
+  },
+  
+  unloadCache: function() {
+    if (!Event.observers) return;
+    for (var i = 0; i < Event.observers.length; i++) {
+      Event.stopObserving.apply(this, Event.observers[i]);
+      Event.observers[i][0] = null;
+    }
+    Event.observers = false;
+  },
+
+  observe: function(element, name, observer, useCapture) {
+    var element = $(element);
+    useCapture = useCapture || false;
+    
+    if (name == 'keypress' &&
+        ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) 
+        || element.attachEvent))
+      name = 'keydown';
+    
+    this._observeAndCache(element, name, observer, useCapture);
+  },
+
+  stopObserving: function(element, name, observer, useCapture) {
+    var element = $(element);
+    useCapture = useCapture || false;
+    
+    if (name == 'keypress' &&
+        ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) 
+        || element.detachEvent))
+      name = 'keydown';
+    
+    if (element.removeEventListener) {
+      element.removeEventListener(name, observer, useCapture);
+    } else if (element.detachEvent) {
+      element.detachEvent('on' + name, observer);
+    }
+  }
+});
+
+/* prevent memory leaks in IE */
+Event.observe(window, 'unload', Event.unloadCache, false);
+
+var Position = {
+
+  // set to true if needed, warning: firefox performance problems
+  // NOT neeeded for page scrolling, only if draggable contained in
+  // scrollable elements
+  includeScrollOffsets: false, 
+
+  // must be called before calling withinIncludingScrolloffset, every time the
+  // page is scrolled
+  prepare: function() {
+    this.deltaX =  window.pageXOffset 
+                || document.documentElement.scrollLeft 
+                || document.body.scrollLeft 
+                || 0;
+    this.deltaY =  window.pageYOffset 
+                || document.documentElement.scrollTop 
+                || document.body.scrollTop 
+                || 0;
+  },
+
+  realOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0; 
+      element = element.parentNode;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  // caches x/y coordinate pair to use with overlap
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = this.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] && 
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var offsetcache = this.realOffset(element);
+
+    this.xcomp = x + offsetcache[0] - this.deltaX;
+    this.ycomp = y + offsetcache[1] - this.deltaY;
+    this.offset = this.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] && 
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  // within must be called directly before
+  overlap: function(mode, element) {  
+    if (!mode) return 0;  
+    if (mode == 'vertical') 
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) / 
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) / 
+        element.offsetWidth;
+  },
+
+  clone: function(source, target) {
+    source = $(source);
+    target = $(target);
+    target.style.position = 'absolute';
+    var offsets = this.cumulativeOffset(source);
+    target.style.top    = offsets[1] + 'px';
+    target.style.left   = offsets[0] + 'px';
+    target.style.width  = source.offsetWidth + 'px';
+    target.style.height = source.offsetHeight + 'px';
+  }
+}
Index: src/docs/cn/src/documentation/skins/common/scripts/getBlank.js
===================================================================
--- src/docs/cn/src/documentation/skins/common/scripts/getBlank.js	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/scripts/getBlank.js	(revision 0)
@@ -0,0 +1,40 @@
+/*
+* 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.
+*/
+/**
+ * getBlank script - when included in a html file and called from a form text field, will set the value of this field to ""
+ * if the text value is still the standard value.
+ * getPrompt script - when included in a html file and called from a form text field, will set the value of this field to the prompt
+ * if the text value is empty.
+ *
+ * Typical usage:
+ * <script type="text/javascript" language="JavaScript" src="getBlank.js"></script>
+ * <input type="text" id="query" value="Search the site:" onFocus="getBlank (this, 'Search the site:');" onBlur="getBlank (this, 'Search the site:');"/>
+ */
+<!--
+function getBlank (form, stdValue){
+if (form.value == stdValue){
+	form.value = '';
+	}
+return true;
+}
+function getPrompt (form, stdValue){
+if (form.value == ''){
+	form.value = stdValue;
+	}
+return true;
+}
+//-->
Index: src/docs/cn/src/documentation/skins/common/scripts/breadcrumbs.js
===================================================================
--- src/docs/cn/src/documentation/skins/common/scripts/breadcrumbs.js	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/scripts/breadcrumbs.js	(revision 0)
@@ -0,0 +1,237 @@
+/*
+* 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.
+*/
+/**
+ * This script, when included in a html file, builds a neat breadcrumb trail
+ * based on its url. That is, if it doesn't contains bugs (I'm relatively
+ * sure it does).
+ *
+ * Typical usage:
+ * <script type="text/javascript" language="JavaScript" src="breadcrumbs.js"></script>
+ */
+
+/**
+ * IE 5 on Mac doesn't know Array.push.
+ *
+ * Implement it - courtesy to fritz.
+ */
+var abc	= new Array();
+if (!abc.push) {
+  Array.prototype.push	= function(what){this[this.length]=what}
+}
+
+/* ========================================================================
+	CONSTANTS
+   ======================================================================== */
+
+/**
+ * Two-dimensional array containing extra crumbs to place at the front of
+ * the trail. Specify first the name of the crumb, then the URI that belongs
+ * to it. You'll need to modify this for every domain or subdomain where
+ * you use this script (you can leave it as an empty array if you wish)
+ */
+var PREPREND_CRUMBS = new Array();
+
+var link1 = "@skinconfig.trail.link1.name@";
+var link2 = "@skinconfig.trail.link2.name@";
+var link3 = "@skinconfig.trail.link3.name@";
+
+var href1 = "@skinconfig.trail.link1.href@";
+var href2 = "@skinconfig.trail.link2.href@";
+var href3 = "@skinconfig.trail.link3.href@";
+
+   if(!(link1=="")&&!link1.indexOf( "@" ) == 0){
+     PREPREND_CRUMBS.push( new Array( link1, href1 ) );
+   }
+   if(!(link2=="")&&!link2.indexOf( "@" ) == 0){
+     PREPREND_CRUMBS.push( new Array( link2, href2 ) );
+   }
+   if(!(link3=="")&&!link3.indexOf( "@" ) == 0){
+     PREPREND_CRUMBS.push( new Array( link3, href3 ) );
+   }
+
+/**
+ * String to include between crumbs:
+ */
+var DISPLAY_SEPARATOR = " &gt; ";
+/**
+ * String to include at the beginning of the trail
+ */
+var DISPLAY_PREPREND = " &gt; ";
+/**
+ * String to include at the end of the trail
+ */
+var DISPLAY_POSTPREND = "";
+
+/**
+ * CSS Class to use for a single crumb:
+ */
+var CSS_CLASS_CRUMB = "breadcrumb";
+
+/**
+ * CSS Class to use for the complete trail:
+ */
+var CSS_CLASS_TRAIL = "breadcrumbTrail";
+
+/**
+ * CSS Class to use for crumb separator:
+ */
+var CSS_CLASS_SEPARATOR = "crumbSeparator";
+
+/**
+ * Array of strings containing common file extensions. We use this to
+ * determine what part of the url to ignore (if it contains one of the
+ * string specified here, we ignore it).
+ */
+var FILE_EXTENSIONS = new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" );
+
+/**
+ * String that separates parts of the breadcrumb trail from each other.
+ * When this is no longer a slash, I'm sure I'll be old and grey.
+ */
+var PATH_SEPARATOR = "/";
+
+/* ========================================================================
+	UTILITY FUNCTIONS
+   ======================================================================== */
+/**
+ * Capitalize first letter of the provided string and return the modified
+ * string.
+ */
+function sentenceCase( string )
+{        return string;
+	//var lower = string.toLowerCase();
+	//return lower.substr(0,1).toUpperCase() + lower.substr(1);
+}
+
+/**
+ * Returns an array containing the names of all the directories in the
+ * current document URL
+ */
+function getDirectoriesInURL()
+{
+	var trail = document.location.pathname.split( PATH_SEPARATOR );
+
+	// check whether last section is a file or a directory
+	var lastcrumb = trail[trail.length-1];
+	for( var i = 0; i < FILE_EXTENSIONS.length; i++ )
+	{
+		if( lastcrumb.indexOf( FILE_EXTENSIONS[i] ) )
+		{
+			// it is, remove it and send results
+			return trail.slice( 1, trail.length-1 );
+		}
+	}
+
+	// it's not; send the trail unmodified
+	return trail.slice( 1, trail.length );
+}
+
+/* ========================================================================
+	BREADCRUMB FUNCTIONALITY
+   ======================================================================== */
+/**
+ * Return a two-dimensional array describing the breadcrumbs based on the
+ * array of directories passed in.
+ */
+function getBreadcrumbs( dirs )
+{
+	var prefix = "/";
+	var postfix = "/";
+
+	// the array we will return
+	var crumbs = new Array();
+
+	if( dirs != null )
+	{
+		for( var i = 0; i < dirs.length; i++ )
+		{
+			prefix += dirs[i] + postfix;
+			crumbs.push( new Array( dirs[i], prefix ) );
+		}
+	}
+
+	// preprend the PREPREND_CRUMBS
+	if(PREPREND_CRUMBS.length > 0 )
+	{
+		return PREPREND_CRUMBS.concat( crumbs );
+	}
+
+	return crumbs;
+}
+
+/**
+ * Return a string containing a simple text breadcrumb trail based on the
+ * two-dimensional array passed in.
+ */
+function getCrumbTrail( crumbs )
+{
+	var xhtml = DISPLAY_PREPREND;
+
+	for( var i = 0; i < crumbs.length; i++ )
+	{
+		xhtml += '<a href="' + crumbs[i][1] + '" >';
+		xhtml += unescape( crumbs[i][0] ) + '</a>';
+		if( i != (crumbs.length-1) )
+		{
+			xhtml += DISPLAY_SEPARATOR;
+		}
+	}
+
+	xhtml += DISPLAY_POSTPREND;
+
+	return xhtml;
+}
+
+/**
+ * Return a string containing an XHTML breadcrumb trail based on the
+ * two-dimensional array passed in.
+ */
+function getCrumbTrailXHTML( crumbs )
+{
+	var xhtml = '<span class="' + CSS_CLASS_TRAIL  + '">';
+	xhtml += DISPLAY_PREPREND;
+
+	for( var i = 0; i < crumbs.length; i++ )
+	{
+		xhtml += '<a href="' + crumbs[i][1] + '" class="' + CSS_CLASS_CRUMB + '">';
+		xhtml += unescape( crumbs[i][0] ) + '</a>';
+		if( i != (crumbs.length-1) )
+		{
+			xhtml += '<span class="' + CSS_CLASS_SEPARATOR + '">' + DISPLAY_SEPARATOR + '</span>';
+		}
+	}
+
+	xhtml += DISPLAY_POSTPREND;
+	xhtml += '</span>';
+
+	return xhtml;
+}
+
+/* ========================================================================
+	PRINT BREADCRUMB TRAIL
+   ======================================================================== */
+
+// check if we're local; if so, only print the PREPREND_CRUMBS
+if( document.location.href.toLowerCase().indexOf( "http://" ) == -1 )
+{
+	document.write( getCrumbTrail( getBreadcrumbs() ) );
+}
+else
+{
+	document.write( getCrumbTrail( getBreadcrumbs( getDirectoriesInURL() ) ) );
+}
+
Index: src/docs/cn/src/documentation/skins/common/scripts/breadcrumbs-optimized.js
===================================================================
--- src/docs/cn/src/documentation/skins/common/scripts/breadcrumbs-optimized.js	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/scripts/breadcrumbs-optimized.js	(revision 0)
@@ -0,0 +1,90 @@
+/*
+* 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.
+*/
+var PREPREND_CRUMBS=new Array();
+var link1="@skinconfig.trail.link1.name@";
+var link2="@skinconfig.trail.link2.name@";
+var link3="@skinconfig.trail.link3.name@";
+if(!(link1=="")&&!link1.indexOf( "@" ) == 0){
+  PREPREND_CRUMBS.push( new Array( link1, @skinconfig.trail.link1.href@ ) ); }
+if(!(link2=="")&&!link2.indexOf( "@" ) == 0){
+  PREPREND_CRUMBS.push( new Array( link2, @skinconfig.trail.link2.href@ ) ); }
+if(!(link3=="")&&!link3.indexOf( "@" ) == 0){
+  PREPREND_CRUMBS.push( new Array( link3, @skinconfig.trail.link3.href@ ) ); }
+var DISPLAY_SEPARATOR=" &gt; ";
+var DISPLAY_PREPREND=" &gt; ";
+var DISPLAY_POSTPREND=":";
+var CSS_CLASS_CRUMB="breadcrumb";
+var CSS_CLASS_TRAIL="breadcrumbTrail";
+var CSS_CLASS_SEPARATOR="crumbSeparator";
+var FILE_EXTENSIONS=new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" );
+var PATH_SEPARATOR="/";
+
+function sc(s) {
+	var l=s.toLowerCase();
+	return l.substr(0,1).toUpperCase()+l.substr(1);
+}
+function getdirs() {
+	var t=document.location.pathname.split(PATH_SEPARATOR);
+	var lc=t[t.length-1];
+	for(var i=0;i < FILE_EXTENSIONS.length;i++)
+	{
+		if(lc.indexOf(FILE_EXTENSIONS[i]))
+			return t.slice(1,t.length-1); }
+	return t.slice(1,t.length);
+}
+function getcrumbs( d )
+{
+	var pre = "/";
+	var post = "/";
+	var c = new Array();
+	if( d != null )
+	{
+		for(var i=0;i < d.length;i++) {
+			pre+=d[i]+postfix;
+			c.push(new Array(d[i],pre)); }
+	}
+	if(PREPREND_CRUMBS.length > 0 )
+		return PREPREND_CRUMBS.concat( c );
+	return c;
+}
+function gettrail( c )
+{
+	var h=DISPLAY_PREPREND;
+	for(var i=0;i < c.length;i++)
+	{
+		h+='<a href="'+c[i][1]+'" >'+sc(c[i][0])+'</a>';
+		if(i!=(c.length-1))
+			h+=DISPLAY_SEPARATOR; }
+	return h+DISPLAY_POSTPREND;
+}
+
+function gettrailXHTML( c )
+{
+	var h='<span class="'+CSS_CLASS_TRAIL+'">'+DISPLAY_PREPREND;
+	for(var i=0;i < c.length;i++)
+	{
+		h+='<a href="'+c[i][1]+'" class="'+CSS_CLASS_CRUMB+'">'+sc(c[i][0])+'</a>';
+		if(i!=(c.length-1))
+			h+='<span class="'+CSS_CLASS_SEPARATOR+'">'+DISPLAY_SEPARATOR+'</span>'; }
+	return h+DISPLAY_POSTPREND+'</span>';
+}
+
+if(document.location.href.toLowerCase().indexOf("http://")==-1)
+	document.write(gettrail(getcrumbs()));
+else
+	document.write(gettrail(getcrumbs(getdirs())));
+
Index: src/docs/cn/src/documentation/skins/common/scripts/fontsize.js
===================================================================
--- src/docs/cn/src/documentation/skins/common/scripts/fontsize.js	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/scripts/fontsize.js	(revision 0)
@@ -0,0 +1,166 @@
+/*
+* 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.
+*/
+function init() 
+{ //embedded in the doc
+  //ndeSetTextSize();
+}
+
+function checkBrowser(){
+  if (!document.getElementsByTagName){
+    return true;
+  }
+  else{
+    return false;
+  }
+}
+
+
+function ndeSetTextSize(chgsize,rs) 
+{
+  var startSize;
+  var newSize;
+
+  if (!checkBrowser)
+  {
+    return;
+  }
+
+  startSize = parseInt(ndeGetDocTextSize());
+
+  if (!startSize)
+  {
+    startSize = 16;
+  }
+
+  switch (chgsize)
+  {
+  case 'incr':
+    newSize = startSize + 2;
+    break;
+
+  case 'decr':
+    newSize = startSize - 2;
+    break;
+
+  case 'reset':
+    if (rs) {newSize = rs;} else {newSize = 16;}
+    break;
+
+  default:
+    try{
+      newSize = parseInt(ndeReadCookie("nde-textsize"));
+    }
+    catch(e){
+      alert(e);
+    }
+    
+    if (!newSize || newSize == 'NaN')
+    {
+      newSize = startSize;
+    }
+    break;
+
+  }
+
+  if (newSize < 10) 
+  {
+    newSize = 10;
+  }
+
+  newSize += 'px';
+
+  document.getElementsByTagName('html')[0].style.fontSize = newSize;
+  document.getElementsByTagName('body')[0].style.fontSize = newSize;
+
+  ndeCreateCookie("nde-textsize", newSize, 365);
+}
+
+function ndeGetDocTextSize() 
+{
+  if (!checkBrowser)
+  {
+    return 0;
+  }
+
+  var size = 0;
+  var body = document.getElementsByTagName('body')[0];
+
+  if (body.style && body.style.fontSize)
+  {
+    size = body.style.fontSize;
+  }
+  else if (typeof(getComputedStyle) != 'undefined')
+  {
+    size = getComputedStyle(body,'').getPropertyValue('font-size');
+  }
+  else if (body.currentStyle)
+  {
+   size = body.currentStyle.fontSize;
+  }
+
+  //fix IE bug
+  if( isNaN(size)){
+    if(size.substring(size.length-1)=="%"){
+      return
+    }
+
+  }
+
+  return size;
+
+}
+
+
+
+function ndeCreateCookie(name,value,days) 
+{
+  var cookie = name + "=" + value + ";";
+
+  if (days) 
+  {
+    var date = new Date();
+    date.setTime(date.getTime()+(days*24*60*60*1000));
+    cookie += " expires=" + date.toGMTString() + ";";
+  }
+  cookie += " path=/";
+
+  document.cookie = cookie;
+
+}
+
+function ndeReadCookie(name) 
+{
+  var nameEQ = name + "=";
+  var ca = document.cookie.split(';');
+
+ 
+  for(var i = 0; i < ca.length; i++) 
+  {
+    var c = ca[i];
+    while (c.charAt(0) == ' ') 
+    {
+      c = c.substring(1, c.length);
+    }
+
+    ctest = c.substring(0,name.length);
+ 
+    if(ctest == name){
+      return c.substring(nameEQ.length,c.length);
+    }
+  }
+  return null;
+}
Index: src/docs/cn/src/documentation/skins/common/css/forrest.css.xslt
===================================================================
--- src/docs/cn/src/documentation/skins/common/css/forrest.css.xslt	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/css/forrest.css.xslt	(revision 0)
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!-- This is not used by Forrest but makes it possible to debug the 
+       stylesheet in standalone editors -->
+  <xsl:output method = "text"  omit-xml-declaration="yes"  />
+<!--
+  If the skin doesn't override this, at least aural styles 
+  and extra-css are present 
+-->
+  <xsl:template match="skinconfig">
+    <xsl:call-template name="aural"/>
+    <xsl:call-template name="a-external"/>
+    <xsl:apply-templates/>
+    <xsl:call-template name="add-extra-css"/>
+  </xsl:template>
+  <xsl:template match="colors">
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template name="aural">
+
+/* ==================== aural ============================ */
+
+@media aural {
+  h1, h2, h3, h4, h5, h6 { voice-family: paul, male; stress: 20; richness: 90 }
+  h1 { pitch: x-low; pitch-range: 90 }
+  h2 { pitch: x-low; pitch-range: 80 }
+  h3 { pitch: low; pitch-range: 70 }
+  h4 { pitch: medium; pitch-range: 60 }
+  h5 { pitch: medium; pitch-range: 50 }
+  h6 { pitch: medium; pitch-range: 40 }
+  li, dt, dd { pitch: medium; richness: 60 }
+  dt { stress: 80 }
+  pre, code, tt { pitch: medium; pitch-range: 0; stress: 0; richness: 80 }
+  em { pitch: medium; pitch-range: 60; stress: 60; richness: 50 }
+  strong { pitch: medium; pitch-range: 60; stress: 90; richness: 90 }
+  dfn { pitch: high; pitch-range: 60; stress: 60 }
+  s, strike { richness: 0 }
+  i { pitch: medium; pitch-range: 60; stress: 60; richness: 50 }
+  b { pitch: medium; pitch-range: 60; stress: 90; richness: 90 }
+  u { richness: 0 }
+  
+  :link { voice-family: harry, male }
+  :visited { voice-family: betty, female }
+  :active { voice-family: betty, female; pitch-range: 80; pitch: x-high }
+}
+  </xsl:template>
+  <xsl:template name="a-external">
+a.external  {
+  padding: 0 20px 0px 0px;
+	display:inline;
+  background-repeat: no-repeat;
+	background-position: center right;
+	background-image: url(images/external-link.gif);
+}
+  </xsl:template>
+  <xsl:template name="add-extra-css">
+<xsl:text>/* extra-css */</xsl:text>
+    <xsl:value-of select="extra-css"/>
+  </xsl:template>
+  <xsl:template match="*"></xsl:template>
+  <xsl:template match="text()"></xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/svg/document-to-svg.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/svg/document-to-svg.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/svg/document-to-svg.xsl	(revision 0)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
+  <xsl:output method="xml" media-type="image/svg" omit-xml-declaration="yes" indent="yes"/>
+<!-- the skinconf file -->
+  <xsl:param name="config-file"/>
+  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
+<!-- Get the section depth to use when generating the minitoc (default is 2) -->
+  <xsl:variable name="toc-max-depth" select="number($config/toc/@max-depth)"/>
+  <xsl:param name="numbersections" select="'true'"/>
+<!-- Section depth at which we stop numbering and just indent -->
+  <xsl:param name="numbering-max-depth" select="'3'"/>
+  <xsl:param name="ctxbasedir" select="."/>
+  <xsl:param name="xmlbasedir"/>
+  <xsl:template match="/">
+    <svg width="1305" height="1468" xmlns="http://www.w3.org/2000/svg">
+      <g transform="translate(0 0)">
+        <xsl:apply-templates/>
+      </g>
+    </svg>
+  </xsl:template>
+  <xsl:template match="document">
+    <text x="00px" y="30px" style="font-size:20;">
+      <xsl:value-of select="header/title"/>
+    </text>
+    <text x="0px" y="50px" style="font-size:12;">
+      <xsl:apply-templates/>
+    </text>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/fo/footerinfo.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/fo/footerinfo.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/fo/footerinfo.xsl	(revision 0)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+<!--
+Named template to generate a short message in the PDF footer, from text in
+skinconf.xml.  By default, the message is a copyright statement.  If a credit
+with @role='pdf' is present, that is used instead.  Eg:
+
+<credit role="pdf">
+  <name>Generated by Apache FOP 1.0-dev</name>
+  <url>http://xml.apache.org/fop/dev/</url>
+</credit>
+-->
+  <xsl:template name="info">
+    <xsl:variable name="disable-copyright-footer" select="//skinconfig/pdf/disable-copyright-footer"/>
+    <xsl:variable name="pdfcredit" select="//skinconfig/credits/credit[@role = 'pdf']"/>
+    <xsl:variable name="text">
+      <xsl:if test="$pdfcredit">
+        <xsl:value-of select="$pdfcredit/name"/>
+      </xsl:if>
+      <xsl:if test="not($pdfcredit) and not($disable-copyright-footer = 'true')">
+<xsl:text>Copyright &#169; </xsl:text>
+        <xsl:value-of select="//skinconfig/year"/>&#160;<xsl:value-of
+          select="//skinconfig/vendor"/>
+<xsl:text> All rights reserved.</xsl:text>
+      </xsl:if>
+    </xsl:variable>
+    <xsl:variable name="url" select="$pdfcredit/url"/>
+    <fo:block-container font-style="italic" absolute-position="absolute"
+      left="0pt" top="0pt" right="6.25in" bottom="150pt"
+      font-size="10pt">
+      <xsl:if test="not($url)">
+        <fo:block text-align="center" color="lightgrey">
+          <xsl:value-of select="$text"/>
+        </fo:block>
+      </xsl:if>
+      <xsl:if test="$url">
+        <fo:block text-align="center">
+          <fo:basic-link color="lightgrey"
+            external-destination="{$url}">
+            <xsl:value-of select="$text"/>
+          </fo:basic-link>
+        </fo:block>
+        <fo:block text-align="center">
+          <fo:basic-link color="lightgrey"
+            external-destination="{$url}">
+            <xsl:value-of select="$url"/>
+          </fo:basic-link>
+        </fo:block>
+      </xsl:if>
+    </fo:block-container>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/fo/document-to-fo.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/fo/document-to-fo.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/fo/document-to-fo.xsl	(revision 0)
@@ -0,0 +1,1025 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+<xsl:param name="l10n.gentext.language" select="'zh_cn'"/>
+<!-- left, justify, right -->
+  <xsl:variable name="text-align" select="string(//skinconfig/pdf/page/@text-align)"/>
+<!-- print URL of external links -->
+  <xsl:variable name="show-external-urls" select="//skinconfig/pdf/show-external-urls"/>
+<!-- Get the section depth to use when generating the minitoc (default is 2) -->
+  <xsl:variable name="toc-max-depth" select="number(//skinconfig/toc/@max-depth)"/>
+<!-- The page size to be used -->
+  <xsl:variable name="pagesize"
+                select="string(//skinconfig/pdf/page/@size)"/>
+<!-- The page orientation ("portrait" or "landscape") -->
+  <xsl:variable name="pageorientation"
+                select="string(//skinconfig/pdf/page/@orientation)"/>
+<!-- Double-sided printing toggle -->
+  <xsl:variable name="doublesided"
+                select="string(//skinconfig/pdf/margins/@double-sided)"/>
+<!-- The top page margin -->
+  <xsl:variable name="topmargin"
+                select="string(//skinconfig/pdf/margins/top)"/>
+<!-- The bottom page margin -->
+  <xsl:variable name="bottommargin"
+                select="string(//skinconfig/pdf/margins/bottom)"/>
+<!-- The inner page margin (always the left margin if
+  double-sided printing is off, alternating between left and right if
+  it's on) -->
+  <xsl:variable name="innermargin"
+                select="string(//skinconfig/pdf/margins/inner)"/>
+<!-- The outer page margin (always the right margin if
+  double-sided printing is off, alternating between right and left if
+  it's on)-->
+  <xsl:variable name="outermargin"
+                select="string(//skinconfig/pdf/margins/outer)"/>
+  <xsl:param name="numbersections" select="'true'"/>
+<!-- page breaks after TOC and each page if an aggregate document -->
+  <xsl:variable name="page-break-top-sections" select="'true'"/>
+<!-- page numbering format -->
+  <xsl:variable name="page-numbering-format" select="string(//skinconfig/pdf/page-numbering-format)"/>
+<!-- Section depth at which we stop numbering and just indent -->
+  <xsl:param name="numbering-max-depth" select="'3'"/>
+  <xsl:param name="imagesdir" select="."/>
+  <xsl:param name="xmlbasedir"/>
+  <xsl:include href="pdfoutline.xsl"/>
+  <xsl:include href="footerinfo.xsl"/>
+<!-- Determine page height for various page sizes (US Letter portrait
+  is the default) -->
+<!-- FIXME: JJP:would this be better of a file? -->
+  <xsl:variable name="pageheight">
+    <xsl:choose>
+      <xsl:when test="$pageorientation = 'landscape'">
+        <xsl:choose>
+          <xsl:when test="$pagesize = 'a0'">841mm</xsl:when>
+          <xsl:when test="$pagesize = 'a1'">594mm</xsl:when>
+          <xsl:when test="$pagesize = 'a2'">420mm</xsl:when>
+          <xsl:when test="$pagesize = 'a3'">297mm</xsl:when>
+          <xsl:when test="$pagesize = 'a4'">210mm</xsl:when>
+          <xsl:when test="$pagesize = 'a5'">148mm</xsl:when>
+          <xsl:when test="$pagesize = 'executive'">7.25in</xsl:when>
+          <xsl:when test="$pagesize = 'folio'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'ledger'">11in</xsl:when>
+          <xsl:when test="$pagesize = 'legal'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'letter'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'quarto'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'tabloid'">11in</xsl:when>
+          <xsl:otherwise>8.5in</xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="$pagesize = 'a0'">1189mm</xsl:when>
+          <xsl:when test="$pagesize = 'a1'">841mm</xsl:when>
+          <xsl:when test="$pagesize = 'a2'">594mm</xsl:when>
+          <xsl:when test="$pagesize = 'a3'">420mm</xsl:when>
+          <xsl:when test="$pagesize = 'a4'">297mm</xsl:when>
+          <xsl:when test="$pagesize = 'a5'">210mm</xsl:when>
+          <xsl:when test="$pagesize = 'executive'">10.5in</xsl:when>
+          <xsl:when test="$pagesize = 'folio'">13in</xsl:when>
+          <xsl:when test="$pagesize = 'ledger'">17in</xsl:when>
+          <xsl:when test="$pagesize = 'legal'">14in</xsl:when>
+          <xsl:when test="$pagesize = 'quarto'">10.83in</xsl:when>
+          <xsl:when test="$pagesize = 'tabloid'">17in</xsl:when>
+          <xsl:otherwise>11in</xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+<!-- Determine page width for various page sizes (US Letter portrait
+  is the default) -->
+  <xsl:variable name="pagewidth">
+    <xsl:choose>
+      <xsl:when test="$pageorientation = 'landscape'">
+        <xsl:choose>
+          <xsl:when test="$pagesize = 'a0'">1189mm</xsl:when>
+          <xsl:when test="$pagesize = 'a1'">841mm</xsl:when>
+          <xsl:when test="$pagesize = 'a2'">594mm</xsl:when>
+          <xsl:when test="$pagesize = 'a3'">420mm</xsl:when>
+          <xsl:when test="$pagesize = 'a4'">297mm</xsl:when>
+          <xsl:when test="$pagesize = 'a5'">210mm</xsl:when>
+          <xsl:when test="$pagesize = 'executive'">10.5in</xsl:when>
+          <xsl:when test="$pagesize = 'folio'">13in</xsl:when>
+          <xsl:when test="$pagesize = 'ledger'">17in</xsl:when>
+          <xsl:when test="$pagesize = 'legal'">14in</xsl:when>
+          <xsl:when test="$pagesize = 'quarto'">10.83in</xsl:when>
+          <xsl:when test="$pagesize = 'tabloid'">17in</xsl:when>
+          <xsl:otherwise>11in</xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="$pagesize = 'a0'">841mm</xsl:when>
+          <xsl:when test="$pagesize = 'a1'">594mm</xsl:when>
+          <xsl:when test="$pagesize = 'a2'">420mm</xsl:when>
+          <xsl:when test="$pagesize = 'a3'">297mm</xsl:when>
+          <xsl:when test="$pagesize = 'a4'">210mm</xsl:when>
+          <xsl:when test="$pagesize = 'a5'">148mm</xsl:when>
+          <xsl:when test="$pagesize = 'executive'">7.25in</xsl:when>
+          <xsl:when test="$pagesize = 'folio'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'ledger'">11in</xsl:when>
+          <xsl:when test="$pagesize = 'legal'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'letter'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'quarto'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'tabloid'">11in</xsl:when>
+          <xsl:otherwise>8.5in</xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:template match="/">
+     <xsl:message>kkkkkkkkkkkkkkkkkkkkkk</xsl:message>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="first-page"
+          page-height="{$pageheight}"
+          page-width="{$pagewidth}"
+          margin-top="{$topmargin}"
+          margin-bottom="{$bottommargin}"
+          margin-left="{$innermargin}"
+          margin-right="{$outermargin}">
+          <fo:region-body
+            margin-top="0.5in"
+            margin-bottom=".5in"/>
+          <fo:region-after
+            region-name="first-footer"
+            extent=".5in"
+            display-align="before"/>
+        </fo:simple-page-master>
+        <fo:simple-page-master master-name="even-page"
+          page-height="{$pageheight}"
+          page-width="{$pagewidth}"
+          margin-top="{$topmargin}"
+          margin-bottom="{$bottommargin}">
+          <xsl:choose>
+            <xsl:when test="$doublesided = 'true'">
+              <xsl:attribute name="margin-left">
+                <xsl:value-of select="$outermargin"/>
+              </xsl:attribute>
+              <xsl:attribute name="margin-right">
+                <xsl:value-of select="$innermargin"/>
+              </xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:attribute name="margin-left">
+                <xsl:value-of select="$innermargin"/>
+              </xsl:attribute>
+              <xsl:attribute name="margin-right">
+                <xsl:value-of select="$outermargin"/>
+              </xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <fo:region-before
+            region-name="even-header"
+            extent="0.5in"
+            border-bottom="0.5pt solid"/>
+          <fo:region-body
+            margin-top="0.5in"
+            margin-bottom=".5in"/>
+          <fo:region-after
+            region-name="even-footer"
+            extent=".5in"
+            display-align="before"/>
+        </fo:simple-page-master>
+        <fo:simple-page-master master-name="odd-page"
+          page-height="{$pageheight}"
+          page-width="{$pagewidth}"
+          margin-top="{$topmargin}"
+          margin-bottom="{$bottommargin}"
+          margin-left="{$innermargin}"
+          margin-right="{$outermargin}">
+          <fo:region-before
+            region-name="odd-header"
+            extent="0.5in"
+            border-bottom="0.5pt solid"/>
+          <fo:region-body
+            margin-top="0.5in"
+            margin-bottom=".5in"/>
+          <fo:region-after
+            region-name="odd-footer"
+            extent=".5in"
+            display-align="before"/>
+        </fo:simple-page-master>
+        <fo:page-sequence-master master-name="book">
+          <fo:repeatable-page-master-alternatives>
+            <fo:conditional-page-master-reference
+              page-position="first"
+              master-reference="first-page"/>
+            <fo:conditional-page-master-reference
+              odd-or-even="odd"
+              master-reference="odd-page"/>
+            <fo:conditional-page-master-reference
+              odd-or-even="even"
+              master-reference="even-page"/>
+          </fo:repeatable-page-master-alternatives>
+        </fo:page-sequence-master>
+      </fo:layout-master-set>
+      <xsl:apply-templates select="/site/document" mode="outline"/>
+      <fo:page-sequence master-reference="book" language="zh">
+        <xsl:apply-templates select="/site/document"/>
+      </fo:page-sequence>
+    </fo:root>
+  </xsl:template>
+  <xsl:template match="document">
+    <fo:title>
+      <xsl:value-of select="header/title"/>
+    </fo:title>
+    <fo:static-content flow-name="first-footer">
+      <fo:block
+        font-family="AR PL UMing"
+        border-top="0.25pt solid"
+        padding-before="6pt"
+        text-align="center">
+        <xsl:apply-templates select="footer"/>
+      </fo:block>
+<!-- don't list page number on first page if it's contents is just the TOC -->
+      <xsl:if test="not($toc-max-depth > 0 and $page-break-top-sections)">
+        <xsl:call-template name="insertPageNumber">
+          <xsl:with-param name="text-align">start</xsl:with-param>
+        </xsl:call-template>
+      </xsl:if>
+      <xsl:call-template name="info"/>
+    </fo:static-content>
+    <fo:static-content flow-name="even-header">
+      <fo:block
+        font-family="AR PL UMing"
+        font-size="70%"
+        text-align="end"
+        font-style="italic">
+        <xsl:value-of select="header/title"/>
+      </fo:block>
+    </fo:static-content>
+    <fo:static-content flow-name="even-footer">
+      <fo:block
+        font-family="AR PL UMing"
+        border-top="0.25pt solid"
+        padding-before="6pt"
+        text-align="center">
+        <xsl:apply-templates select="footer"/>
+      </fo:block>
+      <xsl:call-template name="insertPageNumber">
+        <xsl:with-param name="text-align">end</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="info"/>
+    </fo:static-content>
+    <fo:static-content flow-name="odd-header">
+      <fo:block
+        font-family="AR PL UMing"
+        font-size="70%"
+        text-align="start"
+        font-style="italic">
+        <xsl:value-of select="header/title"/>
+      </fo:block>
+    </fo:static-content>
+    <fo:static-content flow-name="odd-footer">
+      <fo:block
+        font-family="AR PL UMing"
+        border-top="0.25pt solid"
+        padding-before="6pt"
+        text-align="center">
+        <xsl:apply-templates select="footer"/>
+      </fo:block>
+      <xsl:call-template name="insertPageNumber">
+        <xsl:with-param name="text-align">start</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="info"/>
+    </fo:static-content>
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block
+        font-family="AR PL UMing"
+        padding-before="24pt"
+        padding-after="24pt"
+        font-size="24pt"
+        font-weight="bold"
+        id="{generate-id()}">
+        <xsl:value-of select="header/title"/>
+      </fo:block>
+      <fo:block
+        text-align="{$text-align}"
+        padding-before="18pt"
+        padding-after="18pt">
+        <xsl:apply-templates/>
+      </fo:block>
+<!-- Total number of pages calculation... -->
+      <fo:block id="term"/>
+    </fo:flow>
+  </xsl:template>
+  <xsl:template match="abstract">
+    <fo:block
+      font-size="12pt"
+      text-align="center"
+      space-before="20pt"
+      space-after="25pt"
+      width="7.5in"
+      font-family="AR PL UMing"
+      font-style="italic">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="notice">
+    <fo:block
+      font-size="10pt"
+      text-align="left"
+      space-before="20pt"
+      width="7.5in"
+      font-family="AR PL UMing"
+      border-top="0.25pt solid"
+      border-bottom="0.25pt solid"
+      padding-before="6pt"
+      padding-after="6pt">
+      <xsl:call-template name="insertPageBreaks"/>
+<!-- insert i18n stuff here -->
+      NOTICE: <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="anchor">
+    <fo:block id="{@id}"/>
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template match="section">
+    <xsl:param name="level">0</xsl:param>
+    <xsl:variable name="size">
+<!-- 14pt for level 1 12pt for level 2 -->
+      <xsl:value-of select="14-number($level)"/>
+    </xsl:variable>
+    <xsl:variable name="background-color" select="//skinconfig/colors/color[@name='body']/@value"/>
+    <xsl:variable name="heading-color" select="//skinconfig/colors/color[@name='subheading']/@value"/>
+    <xsl:variable name="heading-type" select="//skinconfig/headings/@type"/>
+    <fo:block
+      font-family="AR PL UMing"
+      font-size="{$size}pt"
+      font-weight="bold"
+      space-before="12pt"
+      space-after="4pt">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:if test="$heading-type = 'boxed'">
+        <xsl:attribute name="background-color">
+          <xsl:value-of select="$heading-color"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:attribute name="id">
+        <xsl:choose>
+          <xsl:when test="normalize-space(@id)!=''">
+            <xsl:value-of select="@id"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="generate-id()"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <xsl:if test="$numbersections = 'true' and number($level) &lt; $numbering-max-depth+1">
+        <xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
+<xsl:text>. </xsl:text>
+      </xsl:if>
+<!-- For sections 4  or more nestings deep, indent instead of number -->
+      <xsl:if test="number($level) &gt; $numbering-max-depth+1">
+        <xsl:attribute name="start-indent">
+          <xsl:value-of select="4+number($level)"/>
+<xsl:text>pt</xsl:text>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:value-of select="title"/>
+    </fo:block>
+    <xsl:if test="$heading-type = 'underlined'">
+<!-- The non-breaking space in this block is required, otherwise
+      the block won't be rendered at all. -->
+      <fo:block
+        font-family="AR PL UMing"
+        font-size="{10 div (number($level) +1 )}pt"
+        background-color="{$heading-color}">&#160;</fo:block>
+    </xsl:if>
+    <fo:block
+        background-color="{$background-color}">
+      <xsl:apply-templates>
+        <xsl:with-param name="level" select="number($level)+1"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="title">
+<!-- do nothing as titles are handled in their parent templates -->
+  </xsl:template>
+  <xsl:template match="subtitle">
+    <xsl:param name="level">0</xsl:param>
+    <xsl:variable name="size" select="16-(number($level)*1.5)"/>
+    <fo:block
+      font-weight="bold"
+      font-size="{$size}pt">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="authors">
+    <fo:block
+      font-family="AR PL UMing"
+      space-before="20pt"
+      font-weight="bold"
+      font-size="9pt">
+      <xsl:call-template name="insertPageBreaks"/>
+<!-- insert i18n stuff here -->
+      by
+      <xsl:for-each select="person">
+        <xsl:value-of select="@name"/>
+        <xsl:if test="not(position() = last())">, </xsl:if>
+      </xsl:for-each>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="p">
+    <xsl:choose>
+      <xsl:when test="ancestor::li and not(preceding-sibling::*)">
+        <fo:block
+          space-after="4pt"
+          font-family="AR PL UMing">
+          <xsl:call-template name="insertPageBreaks"/>
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:block
+          space-before="4pt"
+          space-after="4pt"
+          font-family="AR PL UMing">
+          <xsl:call-template name="insertPageBreaks"/>
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="source">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name='code']/@value"/>
+    <fo:block
+      font-family="monospace"
+      font-size="10pt"
+      background-color="{$color}"
+      white-space-collapse="false"
+      linefeed-treatment="preserve"
+      white-space-treatment="preserve"
+      wrap-option="wrap"
+      text-align="start">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="ol|ul">
+    <fo:list-block
+      provisional-distance-between-starts="18pt"
+      provisional-label-separation="3pt"
+      text-align="start">
+      <xsl:apply-templates/>
+    </fo:list-block>
+  </xsl:template>
+  <xsl:template match="ol/li">
+    <fo:list-item>
+      <xsl:if test="not(following-sibling::li[1])">
+        <xsl:attribute name="space-after">6pt"</xsl:attribute>
+      </xsl:if>
+      <fo:list-item-label
+        end-indent="label-end()">
+        <fo:block>
+          <xsl:number format="1."/>
+        </fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body
+        start-indent="body-start()">
+        <fo:block
+          font-family="AR PL UMing">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+<!-- Emulate browser handling of these invalid combinations that our DTD
+  unfortunately allows -->
+  <xsl:template match="ul/ul | ul/ol | ol/ul | ol/ol">
+    <fo:list-item>
+      <fo:list-item-label end-indent="label-end()">
+        <fo:block></fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body start-indent="body-start()">
+        <fo:block font-family="AR PL UMing">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+  <xsl:template match="ul/li">
+    <fo:list-item>
+      <xsl:if test="not(following-sibling::li[1])">
+        <xsl:attribute name="space-after">6pt</xsl:attribute>
+      </xsl:if>
+      <fo:list-item-label end-indent="label-end()">
+        <fo:block>&#x2022;</fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body start-indent="body-start()">
+        <fo:block
+          font-family="AR PL UMing">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+  <xsl:template match="dl">
+    <fo:list-block
+      provisional-distance-between-starts="18pt"
+      provisional-label-separation="3pt"
+      text-align="start">
+      <xsl:apply-templates/>
+    </fo:list-block>
+  </xsl:template>
+  <xsl:template match="dt">
+    <fo:list-item>
+      <fo:list-item-label end-indent="label-end()">
+        <fo:block></fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body start-indent="body-start()">
+        <fo:block
+          font-weight="bold">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+  <xsl:template match="dd">
+    <fo:list-item>
+      <fo:list-item-label end-indent="label-end()">
+        <fo:block font-family="AR PL UMing"></fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body start-indent="body-start()">
+        <fo:block font-family="AR PL UMing">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+  <xsl:template match="strong">
+    <fo:inline font-weight="bold">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+  <xsl:template match="em">
+    <fo:inline font-style="italic">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+  <xsl:template match="code">
+    <fo:inline font-family="AR PL UMing">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+  <xsl:template match="warning">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name='warning']/@value"/>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-weight="bold"
+      font-size="10pt"
+      font-family="AR PL UMing"
+      space-before="10pt"
+      border-before-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="{$color}"
+      color="#ffffff">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:choose>
+        <xsl:when test="@label">
+          <xsl:value-of select="@label"/>
+        </xsl:when>
+        <xsl:otherwise>Warning: </xsl:otherwise>
+      </xsl:choose>
+      <xsl:value-of select="title"/>
+    </fo:block>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-family="AR PL UMing"
+      font-size="8pt"
+      border-after-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="#fff0f0"
+      padding-start="3pt"
+      padding-end="3pt"
+      padding-before="3pt"
+      padding-after="3pt"
+      space-after="10pt">
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="note">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name='note']/@value"/>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-weight="bold"
+      font-size="10pt"
+      color="#ffffff"
+      font-family="AR PL UMing"
+      space-before="10pt"
+      border-before-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="{$color}">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:choose>
+        <xsl:when test="@label">
+          <xsl:value-of select="@label"/>
+        </xsl:when>
+<!-- insert i18n stuff here -->
+        <xsl:otherwise>Note: </xsl:otherwise>
+      </xsl:choose>
+      <xsl:value-of select="title"/>
+    </fo:block>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-family="AR PL UMing"
+      font-size="8pt"
+      space-after="10pt"
+      border-after-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="#F0F0FF"
+      padding-start="3pt"
+      padding-end="3pt"
+      padding-before="3pt"
+      padding-after="3pt">
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="fixme">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name='fixme']/@value"/>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-weight="bold"
+      font-size="10pt"
+      color="#FFFFFF"
+      font-family="AR PL UMing"
+      space-before="10pt"
+      border-before-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="{$color}">
+      <xsl:call-template name="insertPageBreaks"/>
+<!-- insert i18n stuff here -->
+      FIXME (<xsl:value-of select="&#x40;author"/>): <xsl:value-of select="title"/>
+    </fo:block>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-family="AR PL UMing"
+      font-size="8pt"
+      space-after="10pt"
+      border-after-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="#FFF0F0"
+      padding-start="3pt"
+      padding-end="3pt"
+      padding-before="3pt"
+      padding-after="3pt">
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="link|fork|jump">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name = 'body']/@link"/>
+    <xsl:choose>
+      <xsl:when test="starts-with(@href, '#')">
+        <fo:basic-link color="{$color}" text-decoration="underline" internal-destination="{substring(@href,2)}">
+          <xsl:apply-templates/>
+        </fo:basic-link>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:basic-link color="{$color}" text-decoration="underline" external-destination="{@href}">
+          <xsl:apply-templates/>
+        </fo:basic-link>
+        <xsl:if test="$show-external-urls = 'true' and @href != string(.)">
+          (<xsl:value-of select="@href"/>)
+        </xsl:if>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="figure|img">
+    <fo:block text-align="center">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:if test="normalize-space(@id)!=''">
+        <xsl:attribute name="id">
+          <xsl:value-of select="@id"/>
+        </xsl:attribute>
+      </xsl:if>
+<!-- Make relative paths absolute -->
+      <xsl:variable name="imgpath">
+        <xsl:choose>
+<!-- resources image dir -->
+          <xsl:when test="starts-with(string(@src),'images/')">
+            <xsl:value-of select="concat($imagesdir,substring-after(@src,'images'))"/>
+          </xsl:when>
+          <xsl:when test="contains(string(@src),'/images/')">
+            <xsl:value-of select="concat($imagesdir,substring-after(@src,'/images'))"/>
+          </xsl:when>
+<!-- already absolute -->
+          <xsl:when test="contains(string(@src),':') or starts-with(string(@src),'/')">
+            <xsl:value-of select="@src"/>
+          </xsl:when>
+<!-- relative to document -->
+          <xsl:otherwise>
+            <xsl:value-of select="concat($xmlbasedir,@src)"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <fo:external-graphic src="{$imgpath}">
+        <xsl:if test="@height">
+          <xsl:attribute name="height">
+            <xsl:value-of select="@height"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:if test="@width">
+          <xsl:attribute name="width">
+            <xsl:value-of select="@width"/>
+          </xsl:attribute>
+        </xsl:if>
+      </fo:external-graphic>
+<!-- alt text -->
+      <xsl:if test="//skinconfig/pdf/show-image-alt-text='true'">
+        <xsl:if test="normalize-space(@alt)!=''">
+          <fo:block>
+            <xsl:value-of select="@alt"/>
+          </fo:block>
+        </xsl:if>
+      </xsl:if>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="table">
+<!-- FIXME: Apache FOP must have column widths specified at present,
+         this section can be removed when this limitation is removed from Fop.
+         Unfortunately, this means that each column is a fixed width,
+         but at least the table displays! -->
+    <xsl:variable name="max-number-columns-td">
+      <xsl:for-each select="tr">
+        <xsl:sort select="count(td|th)" data-type="number"
+          order="descending"/>
+        <xsl:if test="position() = 1">
+          <xsl:value-of select="count(td|th)"/>
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="max-number-columns-colspan">
+      <xsl:for-each select="tr">
+        <xsl:sort select="count(td|th)" data-type="number"
+          order="descending"/>
+        <xsl:if test="position() = 1">
+          <xsl:value-of
+            select="sum(td/@colspan|th/@colspan)"/>
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="max-number-columns">
+      <xsl:choose>
+        <xsl:when
+          test="$max-number-columns-colspan&gt;$max-number-columns-td">
+          <xsl:value-of
+            select="$max-number-columns-colspan"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$max-number-columns-td"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="column-width">
+      <xsl:value-of select="6.25 div number($max-number-columns)"/>in
+    </xsl:variable>
+    <fo:table>
+      <fo:table-column>
+        <xsl:attribute name="column-width">
+          <xsl:value-of select="$column-width"/>
+        </xsl:attribute>
+        <xsl:attribute name="number-columns-repeated">
+          <xsl:value-of select="number($max-number-columns)"/>
+        </xsl:attribute>
+      </fo:table-column>
+<!-- End of hack for Fop support (if removing this hack, remember
+           you need the <fo:table> element) -->
+      <fo:table-body
+        font-size="10pt"
+        font-family="sans-serif">
+        <xsl:apply-templates select="tr"/>
+      </fo:table-body>
+    </fo:table>
+<!-- FIXME: Apache Fop does not support the caption element yet.
+         This hack will display the table caption accordingly. -->
+    <xsl:if test="caption">
+      <fo:block
+        text-align="center"
+        font-weight="bold">
+<!-- insert i18n stuff here -->
+        Table
+        <xsl:text> </xsl:text>
+        <xsl:number count="table" level="multiple"/>
+<xsl:text>: </xsl:text>
+        <xsl:value-of select="caption"/>
+      </fo:block>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="tr">
+    <fo:table-row>
+      <xsl:apply-templates/>
+    </fo:table-row>
+  </xsl:template>
+  <xsl:template match="th">
+    <xsl:variable name="border-color" select="//skinconfig/colors/color[@name = 'table']/@value"/>
+    <xsl:variable name="background-color" select="$border-color"/>
+    <fo:table-cell
+        font-family="AR PL UMing"
+        padding-before="4pt"
+        padding-after="4pt"
+        padding-start="4pt"
+        padding-end="4pt"
+        color="#FFFFFF"
+        background-color="{$background-color}"
+        border="1pt solid {$border-color}">
+      <xsl:attribute name="number-columns-spanned">
+        <xsl:value-of select="@colspan"/>
+      </xsl:attribute>
+      <xsl:attribute name="number-rows-spanned">
+        <xsl:value-of select="@rowspan"/>
+      </xsl:attribute>
+      <fo:block
+          text-align="center">
+        <xsl:apply-templates/>
+      </fo:block>
+    </fo:table-cell>
+  </xsl:template>
+  <xsl:template match="td">
+    <xsl:variable name="border-color" select="//skinconfig/colors/color[@name = 'table']/@value"/>
+    <xsl:variable name="background-color" select="//skinconfig/colors/color[@name = 'table-cell']/@value"/>
+    <fo:table-cell
+      font-family="AR PL UMing"
+      padding-before="4pt"
+      padding-after="4pt"
+      padding-start="4pt"
+      padding-end="4pt"
+      background-color="{$background-color}"
+      border="1pt solid {$border-color}">
+      <xsl:attribute name="number-columns-spanned">
+        <xsl:value-of select="@colspan"/>
+      </xsl:attribute>
+      <xsl:attribute name="number-rows-spanned">
+        <xsl:value-of select="@rowspan"/>
+      </xsl:attribute>
+      <fo:block>
+        <xsl:apply-templates/>
+      </fo:block>
+    </fo:table-cell>
+  </xsl:template>
+  <xsl:template match="br">
+    <fo:block fonts-family="AR PL UMing"></fo:block>
+  </xsl:template>
+  <xsl:template match="legal">
+    <fo:inline
+      font-size="8pt">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+  <xsl:template match="body[count(//section) != 0]">
+    <xsl:if test="$toc-max-depth > 0">
+      <fo:block font-family="AR PL UMing" font-size="14pt" font-weight="bold"
+      space-after="5pt" space-before="5pt" text-align="justify" width="7.5in">
+        <xsl:call-template name="insertPageBreaks"/>
+<!-- insert i18n stuff here -->
+<xsl:text>目录</xsl:text>
+      </fo:block>
+      <fo:block font-family="AR PL UMing" font-size="12pt" space-after="5pt"
+      space-before="0pt" text-align="justify" width="7.5in">
+        <xsl:if test="$page-break-top-sections">
+          <xsl:attribute name="break-after">page</xsl:attribute>
+        </xsl:if>
+        <xsl:apply-templates select="section" mode="toc" />
+      </fo:block>
+    </xsl:if>
+    <xsl:apply-templates />
+  </xsl:template>
+  <xsl:template match="section" mode="toc">
+<!-- FIXME: see bug FOR-640 -->
+    <xsl:param name="depth" select="'1'"/>
+    <fo:block space-before="5pt" text-align-last="justify" start-indent=".5em" text-indent=".5em">
+      <fo:inline>
+        <xsl:variable name="id">
+          <xsl:choose>
+            <xsl:when test="normalize-space(@id)!=''">
+              <xsl:value-of select="@id"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="generate-id()"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+        <fo:basic-link internal-destination="{$id}">
+          <xsl:value-of select="substring('&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;', 0, 2 * $depth - 1)" />
+          <fo:inline font-size="10pt">
+            <xsl:number count="section" format="1.1.1.1.1.1.1" level="multiple" />
+          </fo:inline>
+<xsl:text> </xsl:text>
+          <xsl:value-of select="title" />
+          <fo:leader leader-pattern="dots" />
+          <fo:page-number-citation ref-id="{$id}" />
+        </fo:basic-link>
+      </fo:inline>
+      <xsl:if test="$toc-max-depth > $depth">
+        <xsl:apply-templates select="section" mode="toc">
+          <xsl:with-param name="depth" select="$depth + 1"/>
+        </xsl:apply-templates>
+      </xsl:if>
+    </fo:block>
+  </xsl:template>
+<!-- ====================================================================== -->
+<!-- Local Extensions section -->
+<!-- ====================================================================== -->
+  <xsl:template match="citation">
+    <fo:inline>
+     [<xsl:value-of select="@def"/>]
+   </fo:inline>
+  </xsl:template>
+  <xsl:template match="p[@class='quote']">
+    <fo:block start-indent="1em"
+     space-before="4pt"
+     space-after="4pt"
+     background-color="#f0f0f0"
+     font-family="monospace">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template name="insertPageBreaks">
+<!-- if marked as a 'pageBreakBefore', and we're breaking on pages, and were not the first node -->
+    <xsl:if test="contains(@class, 'pageBreakBefore') and preceding-sibling::node()">
+      <xsl:attribute name="break-before">page</xsl:attribute>
+    </xsl:if>
+<!-- if marked as a 'pageBreakAfter', and we're breaking on pages, and were not the last node -->
+    <xsl:if test="contains(@class, 'pageBreakAfter') and following-sibling::node()">
+      <xsl:attribute name="break-after">page</xsl:attribute>
+    </xsl:if>
+  </xsl:template>
+<!-- Display the document numerotation -->
+  <xsl:template name="insertPageNumber">
+    <xsl:param name="text-align" select="'start'"/>
+    <xsl:variable name="prefixe" select="substring-before($page-numbering-format,'1')"/>
+    <xsl:variable name="sep" select="substring-before(substring-after($page-numbering-format,'1'),'1')"/>
+    <xsl:variable name="postfixe">
+      <xsl:choose>
+        <xsl:when test="contains(substring-after($page-numbering-format,'1'),'1')">
+          <xsl:value-of select="substring-after(substring-after($page-numbering-format,'1'),'1')"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="substring-after($page-numbering-format,'1')"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+<!-- if 'page-numbering-format' contains 1 digits, the page number is displayed in the footer -->
+    <xsl:if test="contains($page-numbering-format,'1')">
+      <fo:block font-size="70%" text-align="{$text-align}">
+<!-- if the separator is not found, the total page number is skipped -->
+        <xsl:value-of select="$prefixe"/>
+        <fo:page-number/>
+        <xsl:if test="$sep != ''">
+          <xsl:value-of select="$sep"/>
+          <fo:page-number-citation ref-id="term"/>
+        </xsl:if>
+        <xsl:value-of select="$postfixe"/>
+      </fo:block>
+    </xsl:if>
+  </xsl:template>
+<!-- ====================================================================== -->
+<!-- Temporary section - subject to change on short notice  -->
+<!-- ====================================================================== -->
+  <xsl:template match="//style">
+<!-- HACK: The OpenOffice.org input plugin currently produces
+   intermediate documents that contain a style element, invalid per
+   the Forrest Document DTD. This style element must be ignored
+   here. To find out why this is done this way, read the comments
+   attached to issue FOR-433. -->
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/fo/d2fo.xml
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/fo/d2fo.xml	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/fo/d2fo.xml	(revision 0)
@@ -0,0 +1,1015 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+<xsl:param name="l10n.gentext.language" select="'zh_cn'"/>
+<!-- left, justify, right -->
+  <xsl:variable name="text-align" select="string(//skinconfig/pdf/page/@text-align)"/>
+<!-- print URL of external links -->
+  <xsl:variable name="show-external-urls" select="//skinconfig/pdf/show-external-urls"/>
+<!-- Get the section depth to use when generating the minitoc (default is 2) -->
+  <xsl:variable name="toc-max-depth" select="number(//skinconfig/toc/@max-depth)"/>
+<!-- The page size to be used -->
+  <xsl:variable name="pagesize"
+                select="string(//skinconfig/pdf/page/@size)"/>
+<!-- The page orientation ("portrait" or "landscape") -->
+  <xsl:variable name="pageorientation"
+                select="string(//skinconfig/pdf/page/@orientation)"/>
+<!-- Double-sided printing toggle -->
+  <xsl:variable name="doublesided"
+                select="string(//skinconfig/pdf/margins/@double-sided)"/>
+<!-- The top page margin -->
+  <xsl:variable name="topmargin"
+                select="string(//skinconfig/pdf/margins/top)"/>
+<!-- The bottom page margin -->
+  <xsl:variable name="bottommargin"
+                select="string(//skinconfig/pdf/margins/bottom)"/>
+<!-- The inner page margin (always the left margin if
+  double-sided printing is off, alternating between left and right if
+  it's on) -->
+  <xsl:variable name="innermargin"
+                select="string(//skinconfig/pdf/margins/inner)"/>
+<!-- The outer page margin (always the right margin if
+  double-sided printing is off, alternating between right and left if
+  it's on)-->
+  <xsl:variable name="outermargin"
+                select="string(//skinconfig/pdf/margins/outer)"/>
+  <xsl:param name="numbersections" select="'true'"/>
+<!-- page breaks after TOC and each page if an aggregate document -->
+  <xsl:variable name="page-break-top-sections" select="'true'"/>
+<!-- page numbering format -->
+  <xsl:variable name="page-numbering-format" select="string(//skinconfig/pdf/page-numbering-format)"/>
+<!-- Section depth at which we stop numbering and just indent -->
+  <xsl:param name="numbering-max-depth" select="'3'"/>
+  <xsl:param name="imagesdir" select="."/>
+  <xsl:param name="xmlbasedir"/>
+  <xsl:include href="pdfoutline.xsl"/>
+  <xsl:include href="footerinfo.xsl"/>
+<!-- Determine page height for various page sizes (US Letter portrait
+  is the default) -->
+<!-- FIXME: JJP:would this be better of a file? -->
+  <xsl:variable name="pageheight">
+    <xsl:choose>
+      <xsl:when test="$pageorientation = 'landscape'">
+        <xsl:choose>
+          <xsl:when test="$pagesize = 'a0'">841mm</xsl:when>
+          <xsl:when test="$pagesize = 'a1'">594mm</xsl:when>
+          <xsl:when test="$pagesize = 'a2'">420mm</xsl:when>
+          <xsl:when test="$pagesize = 'a3'">297mm</xsl:when>
+          <xsl:when test="$pagesize = 'a4'">210mm</xsl:when>
+          <xsl:when test="$pagesize = 'a5'">148mm</xsl:when>
+          <xsl:when test="$pagesize = 'executive'">7.25in</xsl:when>
+          <xsl:when test="$pagesize = 'folio'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'ledger'">11in</xsl:when>
+          <xsl:when test="$pagesize = 'legal'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'letter'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'quarto'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'tabloid'">11in</xsl:when>
+          <xsl:otherwise>8.5in</xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="$pagesize = 'a0'">1189mm</xsl:when>
+          <xsl:when test="$pagesize = 'a1'">841mm</xsl:when>
+          <xsl:when test="$pagesize = 'a2'">594mm</xsl:when>
+          <xsl:when test="$pagesize = 'a3'">420mm</xsl:when>
+          <xsl:when test="$pagesize = 'a4'">297mm</xsl:when>
+          <xsl:when test="$pagesize = 'a5'">210mm</xsl:when>
+          <xsl:when test="$pagesize = 'executive'">10.5in</xsl:when>
+          <xsl:when test="$pagesize = 'folio'">13in</xsl:when>
+          <xsl:when test="$pagesize = 'ledger'">17in</xsl:when>
+          <xsl:when test="$pagesize = 'legal'">14in</xsl:when>
+          <xsl:when test="$pagesize = 'quarto'">10.83in</xsl:when>
+          <xsl:when test="$pagesize = 'tabloid'">17in</xsl:when>
+          <xsl:otherwise>11in</xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+<!-- Determine page width for various page sizes (US Letter portrait
+  is the default) -->
+  <xsl:variable name="pagewidth">
+    <xsl:choose>
+      <xsl:when test="$pageorientation = 'landscape'">
+        <xsl:choose>
+          <xsl:when test="$pagesize = 'a0'">1189mm</xsl:when>
+          <xsl:when test="$pagesize = 'a1'">841mm</xsl:when>
+          <xsl:when test="$pagesize = 'a2'">594mm</xsl:when>
+          <xsl:when test="$pagesize = 'a3'">420mm</xsl:when>
+          <xsl:when test="$pagesize = 'a4'">297mm</xsl:when>
+          <xsl:when test="$pagesize = 'a5'">210mm</xsl:when>
+          <xsl:when test="$pagesize = 'executive'">10.5in</xsl:when>
+          <xsl:when test="$pagesize = 'folio'">13in</xsl:when>
+          <xsl:when test="$pagesize = 'ledger'">17in</xsl:when>
+          <xsl:when test="$pagesize = 'legal'">14in</xsl:when>
+          <xsl:when test="$pagesize = 'quarto'">10.83in</xsl:when>
+          <xsl:when test="$pagesize = 'tabloid'">17in</xsl:when>
+          <xsl:otherwise>11in</xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="$pagesize = 'a0'">841mm</xsl:when>
+          <xsl:when test="$pagesize = 'a1'">594mm</xsl:when>
+          <xsl:when test="$pagesize = 'a2'">420mm</xsl:when>
+          <xsl:when test="$pagesize = 'a3'">297mm</xsl:when>
+          <xsl:when test="$pagesize = 'a4'">210mm</xsl:when>
+          <xsl:when test="$pagesize = 'a5'">148mm</xsl:when>
+          <xsl:when test="$pagesize = 'executive'">7.25in</xsl:when>
+          <xsl:when test="$pagesize = 'folio'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'ledger'">11in</xsl:when>
+          <xsl:when test="$pagesize = 'legal'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'letter'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'quarto'">8.5in</xsl:when>
+          <xsl:when test="$pagesize = 'tabloid'">11in</xsl:when>
+          <xsl:otherwise>8.5in</xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:template match="/">
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="first-page"
+          page-height="{$pageheight}"
+          page-width="{$pagewidth}"
+          margin-top="{$topmargin}"
+          margin-bottom="{$bottommargin}"
+          margin-left="{$innermargin}"
+          margin-right="{$outermargin}">
+          <fo:region-body
+            margin-top="0.5in"
+            margin-bottom=".5in"/>
+          <fo:region-after
+            region-name="first-footer"
+            extent=".5in"
+            display-align="before"/>
+        </fo:simple-page-master>
+        <fo:simple-page-master master-name="even-page"
+          page-height="{$pageheight}"
+          page-width="{$pagewidth}"
+          margin-top="{$topmargin}"
+          margin-bottom="{$bottommargin}">
+          <xsl:choose>
+            <xsl:when test="$doublesided = 'true'">
+              <xsl:attribute name="margin-left">
+                <xsl:value-of select="$outermargin"/>
+              </xsl:attribute>
+              <xsl:attribute name="margin-right">
+                <xsl:value-of select="$innermargin"/>
+              </xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:attribute name="margin-left">
+                <xsl:value-of select="$innermargin"/>
+              </xsl:attribute>
+              <xsl:attribute name="margin-right">
+                <xsl:value-of select="$outermargin"/>
+              </xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <fo:region-before
+            region-name="even-header"
+            extent="0.5in"
+            border-bottom="0.5pt solid"/>
+          <fo:region-body
+            margin-top="0.5in"
+            margin-bottom=".5in"/>
+          <fo:region-after
+            region-name="even-footer"
+            extent=".5in"
+            display-align="before"/>
+        </fo:simple-page-master>
+        <fo:simple-page-master master-name="odd-page"
+          page-height="{$pageheight}"
+          page-width="{$pagewidth}"
+          margin-top="{$topmargin}"
+          margin-bottom="{$bottommargin}"
+          margin-left="{$innermargin}"
+          margin-right="{$outermargin}">
+          <fo:region-before
+            region-name="odd-header"
+            extent="0.5in"
+            border-bottom="0.5pt solid"/>
+          <fo:region-body
+            margin-top="0.5in"
+            margin-bottom=".5in"/>
+          <fo:region-after
+            region-name="odd-footer"
+            extent=".5in"
+            display-align="before"/>
+        </fo:simple-page-master>
+        <fo:page-sequence-master master-name="book">
+          <fo:repeatable-page-master-alternatives>
+            <fo:conditional-page-master-reference
+              page-position="first"
+              master-reference="first-page"/>
+            <fo:conditional-page-master-reference
+              odd-or-even="odd"
+              master-reference="odd-page"/>
+            <fo:conditional-page-master-reference
+              odd-or-even="even"
+              master-reference="even-page"/>
+          </fo:repeatable-page-master-alternatives>
+        </fo:page-sequence-master>
+      </fo:layout-master-set>
+      <xsl:apply-templates select="/site/document" mode="outline"/>
+      <fo:page-sequence master-reference="book">
+        <xsl:apply-templates select="/site/document"/>
+      </fo:page-sequence>
+    </fo:root>
+  </xsl:template>
+  <xsl:template match="document">
+    <fo:title>
+      <xsl:value-of select="header/title"/>
+    </fo:title>
+    <fo:static-content flow-name="first-footer">
+      <fo:block
+        border-top="0.25pt solid"
+        padding-before="6pt"
+        text-align="center">
+        <xsl:apply-templates select="footer"/>
+      </fo:block>
+<!-- don't list page number on first page if it's contents is just the TOC -->
+      <xsl:if test="not($toc-max-depth > 0 and $page-break-top-sections)">
+        <xsl:call-template name="insertPageNumber">
+          <xsl:with-param name="text-align">start</xsl:with-param>
+        </xsl:call-template>
+      </xsl:if>
+      <xsl:call-template name="info"/>
+    </fo:static-content>
+    <fo:static-content flow-name="even-header">
+      <fo:block
+        font-size="70%"
+        text-align="end"
+        font-style="italic">
+        <xsl:value-of select="header/title"/>
+      </fo:block>
+    </fo:static-content>
+    <fo:static-content flow-name="even-footer">
+      <fo:block
+        border-top="0.25pt solid"
+        padding-before="6pt"
+        text-align="center">
+        <xsl:apply-templates select="footer"/>
+      </fo:block>
+      <xsl:call-template name="insertPageNumber">
+        <xsl:with-param name="text-align">end</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="info"/>
+    </fo:static-content>
+    <fo:static-content flow-name="odd-header">
+      <fo:block
+        font-size="70%"
+        text-align="start"
+        font-style="italic">
+        <xsl:value-of select="header/title"/>
+      </fo:block>
+    </fo:static-content>
+    <fo:static-content flow-name="odd-footer">
+      <fo:block
+        border-top="0.25pt solid"
+        padding-before="6pt"
+        text-align="center">
+        <xsl:apply-templates select="footer"/>
+      </fo:block>
+      <xsl:call-template name="insertPageNumber">
+        <xsl:with-param name="text-align">start</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="info"/>
+    </fo:static-content>
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block
+        padding-before="24pt"
+        padding-after="24pt"
+        font-size="24pt"
+        font-weight="bold"
+        id="{generate-id()}">
+        <xsl:value-of select="header/title"/>
+      </fo:block>
+      <fo:block
+        text-align="{$text-align}"
+        padding-before="18pt"
+        padding-after="18pt">
+        <xsl:apply-templates/>
+      </fo:block>
+<!-- Total number of pages calculation... -->
+      <fo:block id="term"/>
+    </fo:flow>
+  </xsl:template>
+  <xsl:template match="abstract">
+    <fo:block
+      font-size="12pt"
+      text-align="center"
+      space-before="20pt"
+      space-after="25pt"
+      width="7.5in"
+      font-family="serif"
+      font-style="italic">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="notice">
+    <fo:block
+      font-size="10pt"
+      text-align="left"
+      space-before="20pt"
+      width="7.5in"
+      font-family="serif"
+      border-top="0.25pt solid"
+      border-bottom="0.25pt solid"
+      padding-before="6pt"
+      padding-after="6pt">
+      <xsl:call-template name="insertPageBreaks"/>
+<!-- insert i18n stuff here -->
+      NOTICE: <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="anchor">
+    <fo:block id="{@id}"/>
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template match="section">
+    <xsl:param name="level">0</xsl:param>
+    <xsl:variable name="size">
+<!-- 14pt for level 1 12pt for level 2 -->
+      <xsl:value-of select="14-number($level)"/>
+    </xsl:variable>
+    <xsl:variable name="background-color" select="//skinconfig/colors/color[@name='body']/@value"/>
+    <xsl:variable name="heading-color" select="//skinconfig/colors/color[@name='subheading']/@value"/>
+    <xsl:variable name="heading-type" select="//skinconfig/headings/@type"/>
+    <fo:block
+      font-family="serif"
+      font-size="{$size}pt"
+      font-weight="bold"
+      space-before="12pt"
+      space-after="4pt">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:if test="$heading-type = 'boxed'">
+        <xsl:attribute name="background-color">
+          <xsl:value-of select="$heading-color"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:attribute name="id">
+        <xsl:choose>
+          <xsl:when test="normalize-space(@id)!=''">
+            <xsl:value-of select="@id"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="generate-id()"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <xsl:if test="$numbersections = 'true' and number($level) &lt; $numbering-max-depth+1">
+        <xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
+<xsl:text>. </xsl:text>
+      </xsl:if>
+<!-- For sections 4  or more nestings deep, indent instead of number -->
+      <xsl:if test="number($level) &gt; $numbering-max-depth+1">
+        <xsl:attribute name="start-indent">
+          <xsl:value-of select="4+number($level)"/>
+<xsl:text>pt</xsl:text>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:value-of select="title"/>
+    </fo:block>
+    <xsl:if test="$heading-type = 'underlined'">
+<!-- The non-breaking space in this block is required, otherwise
+      the block won't be rendered at all. -->
+      <fo:block
+        font-family="serif"
+        font-size="{10 div (number($level) +1 )}pt"
+        background-color="{$heading-color}">&#160;</fo:block>
+    </xsl:if>
+    <fo:block
+        background-color="{$background-color}">
+      <xsl:apply-templates>
+        <xsl:with-param name="level" select="number($level)+1"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="title">
+<!-- do nothing as titles are handled in their parent templates -->
+  </xsl:template>
+  <xsl:template match="subtitle">
+    <xsl:param name="level">0</xsl:param>
+    <xsl:variable name="size" select="16-(number($level)*1.5)"/>
+    <fo:block
+      font-weight="bold"
+      font-size="{$size}pt">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="authors">
+    <fo:block
+      space-before="20pt"
+      font-weight="bold"
+      font-size="9pt">
+      <xsl:call-template name="insertPageBreaks"/>
+<!-- insert i18n stuff here -->
+      by
+      <xsl:for-each select="person">
+        <xsl:value-of select="@name"/>
+        <xsl:if test="not(position() = last())">, </xsl:if>
+      </xsl:for-each>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="p">
+    <xsl:choose>
+      <xsl:when test="ancestor::li and not(preceding-sibling::*)">
+        <fo:block
+          space-after="4pt"
+          font-family="serif">
+          <xsl:call-template name="insertPageBreaks"/>
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:block
+          space-before="4pt"
+          space-after="4pt"
+          font-family="serif">
+          <xsl:call-template name="insertPageBreaks"/>
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="source">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name='code']/@value"/>
+    <fo:block
+      font-family="monospace"
+      font-size="10pt"
+      background-color="{$color}"
+      white-space-collapse="false"
+      linefeed-treatment="preserve"
+      white-space-treatment="preserve"
+      wrap-option="wrap"
+      text-align="start">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="ol|ul">
+    <fo:list-block
+      provisional-distance-between-starts="18pt"
+      provisional-label-separation="3pt"
+      text-align="start">
+      <xsl:apply-templates/>
+    </fo:list-block>
+  </xsl:template>
+  <xsl:template match="ol/li">
+    <fo:list-item>
+      <xsl:if test="not(following-sibling::li[1])">
+        <xsl:attribute name="space-after">6pt"</xsl:attribute>
+      </xsl:if>
+      <fo:list-item-label
+        end-indent="label-end()">
+        <fo:block>
+          <xsl:number format="1."/>
+        </fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body
+        start-indent="body-start()">
+        <fo:block
+          font-family="serif">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+<!-- Emulate browser handling of these invalid combinations that our DTD
+  unfortunately allows -->
+  <xsl:template match="ul/ul | ul/ol | ol/ul | ol/ol">
+    <fo:list-item>
+      <fo:list-item-label end-indent="label-end()">
+        <fo:block></fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body start-indent="body-start()">
+        <fo:block font-family="serif">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+  <xsl:template match="ul/li">
+    <fo:list-item>
+      <xsl:if test="not(following-sibling::li[1])">
+        <xsl:attribute name="space-after">6pt</xsl:attribute>
+      </xsl:if>
+      <fo:list-item-label end-indent="label-end()">
+        <fo:block>&#x2022;</fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body start-indent="body-start()">
+        <fo:block
+          font-family="serif">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+  <xsl:template match="dl">
+    <fo:list-block
+      provisional-distance-between-starts="18pt"
+      provisional-label-separation="3pt"
+      text-align="start">
+      <xsl:apply-templates/>
+    </fo:list-block>
+  </xsl:template>
+  <xsl:template match="dt">
+    <fo:list-item>
+      <fo:list-item-label end-indent="label-end()">
+        <fo:block></fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body start-indent="body-start()">
+        <fo:block
+          font-weight="bold">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+  <xsl:template match="dd">
+    <fo:list-item>
+      <fo:list-item-label end-indent="label-end()">
+        <fo:block></fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body start-indent="body-start()">
+        <fo:block>
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+  <xsl:template match="strong">
+    <fo:inline font-weight="bold">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+  <xsl:template match="em">
+    <fo:inline font-style="italic">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+  <xsl:template match="code">
+    <fo:inline font-family="monospace">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+  <xsl:template match="warning">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name='warning']/@value"/>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-weight="bold"
+      font-size="10pt"
+      font-family="serif"
+      space-before="10pt"
+      border-before-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="{$color}"
+      color="#ffffff">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:choose>
+        <xsl:when test="@label">
+          <xsl:value-of select="@label"/>
+        </xsl:when>
+        <xsl:otherwise>Warning: </xsl:otherwise>
+      </xsl:choose>
+      <xsl:value-of select="title"/>
+    </fo:block>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-family="serif"
+      font-size="8pt"
+      border-after-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="#fff0f0"
+      padding-start="3pt"
+      padding-end="3pt"
+      padding-before="3pt"
+      padding-after="3pt"
+      space-after="10pt">
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="note">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name='note']/@value"/>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-weight="bold"
+      font-size="10pt"
+      color="#ffffff"
+      font-family="serif"
+      space-before="10pt"
+      border-before-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="{$color}">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:choose>
+        <xsl:when test="@label">
+          <xsl:value-of select="@label"/>
+        </xsl:when>
+<!-- insert i18n stuff here -->
+        <xsl:otherwise>Note: </xsl:otherwise>
+      </xsl:choose>
+      <xsl:value-of select="title"/>
+    </fo:block>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-family="serif"
+      font-size="8pt"
+      space-after="10pt"
+      border-after-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="#F0F0FF"
+      padding-start="3pt"
+      padding-end="3pt"
+      padding-before="3pt"
+      padding-after="3pt">
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="fixme">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name='fixme']/@value"/>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-weight="bold"
+      font-size="10pt"
+      color="#FFFFFF"
+      font-family="serif"
+      space-before="10pt"
+      border-before-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="{$color}">
+      <xsl:call-template name="insertPageBreaks"/>
+<!-- insert i18n stuff here -->
+      FIXME (<xsl:value-of select="&#x40;author"/>): <xsl:value-of select="title"/>
+    </fo:block>
+    <fo:block
+      margin-left="0.25in"
+      margin-right="0.25in"
+      font-family="serif"
+      font-size="8pt"
+      space-after="10pt"
+      border-after-style="solid"
+      border-start-style="solid"
+      border-end-style="solid"
+      border-color="{$color}"
+      background-color="#FFF0F0"
+      padding-start="3pt"
+      padding-end="3pt"
+      padding-before="3pt"
+      padding-after="3pt">
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="link|fork|jump">
+    <xsl:variable name="color" select="//skinconfig/colors/color[@name = 'body']/@link"/>
+    <xsl:choose>
+      <xsl:when test="starts-with(@href, '#')">
+        <fo:basic-link color="{$color}" text-decoration="underline" internal-destination="{substring(@href,2)}">
+          <xsl:apply-templates/>
+        </fo:basic-link>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:basic-link color="{$color}" text-decoration="underline" external-destination="{@href}">
+          <xsl:apply-templates/>
+        </fo:basic-link>
+        <xsl:if test="$show-external-urls = 'true' and @href != string(.)">
+          (<xsl:value-of select="@href"/>)
+        </xsl:if>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="figure|img">
+    <fo:block text-align="center">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:if test="normalize-space(@id)!=''">
+        <xsl:attribute name="id">
+          <xsl:value-of select="@id"/>
+        </xsl:attribute>
+      </xsl:if>
+<!-- Make relative paths absolute -->
+      <xsl:variable name="imgpath">
+        <xsl:choose>
+<!-- resources image dir -->
+          <xsl:when test="starts-with(string(@src),'images/')">
+            <xsl:value-of select="concat($imagesdir,substring-after(@src,'images'))"/>
+          </xsl:when>
+          <xsl:when test="contains(string(@src),'/images/')">
+            <xsl:value-of select="concat($imagesdir,substring-after(@src,'/images'))"/>
+          </xsl:when>
+<!-- already absolute -->
+          <xsl:when test="contains(string(@src),':') or starts-with(string(@src),'/')">
+            <xsl:value-of select="@src"/>
+          </xsl:when>
+<!-- relative to document -->
+          <xsl:otherwise>
+            <xsl:value-of select="concat($xmlbasedir,@src)"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <fo:external-graphic src="{$imgpath}">
+        <xsl:if test="@height">
+          <xsl:attribute name="height">
+            <xsl:value-of select="@height"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:if test="@width">
+          <xsl:attribute name="width">
+            <xsl:value-of select="@width"/>
+          </xsl:attribute>
+        </xsl:if>
+      </fo:external-graphic>
+<!-- alt text -->
+      <xsl:if test="//skinconfig/pdf/show-image-alt-text='true'">
+        <xsl:if test="normalize-space(@alt)!=''">
+          <fo:block>
+            <xsl:value-of select="@alt"/>
+          </fo:block>
+        </xsl:if>
+      </xsl:if>
+    </fo:block>
+  </xsl:template>
+  <xsl:template match="table">
+<!-- FIXME: Apache FOP must have column widths specified at present,
+         this section can be removed when this limitation is removed from Fop.
+         Unfortunately, this means that each column is a fixed width,
+         but at least the table displays! -->
+    <xsl:variable name="max-number-columns-td">
+      <xsl:for-each select="tr">
+        <xsl:sort select="count(td|th)" data-type="number"
+          order="descending"/>
+        <xsl:if test="position() = 1">
+          <xsl:value-of select="count(td|th)"/>
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="max-number-columns-colspan">
+      <xsl:for-each select="tr">
+        <xsl:sort select="count(td|th)" data-type="number"
+          order="descending"/>
+        <xsl:if test="position() = 1">
+          <xsl:value-of
+            select="sum(td/@colspan|th/@colspan)"/>
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="max-number-columns">
+      <xsl:choose>
+        <xsl:when
+          test="$max-number-columns-colspan&gt;$max-number-columns-td">
+          <xsl:value-of
+            select="$max-number-columns-colspan"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$max-number-columns-td"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="column-width">
+      <xsl:value-of select="6.25 div number($max-number-columns)"/>in
+    </xsl:variable>
+    <fo:table>
+      <fo:table-column>
+        <xsl:attribute name="column-width">
+          <xsl:value-of select="$column-width"/>
+        </xsl:attribute>
+        <xsl:attribute name="number-columns-repeated">
+          <xsl:value-of select="number($max-number-columns)"/>
+        </xsl:attribute>
+      </fo:table-column>
+<!-- End of hack for Fop support (if removing this hack, remember
+           you need the <fo:table> element) -->
+      <fo:table-body
+        font-size="10pt"
+        font-family="sans-serif">
+        <xsl:apply-templates select="tr"/>
+      </fo:table-body>
+    </fo:table>
+<!-- FIXME: Apache Fop does not support the caption element yet.
+         This hack will display the table caption accordingly. -->
+    <xsl:if test="caption">
+      <fo:block
+        text-align="center"
+        font-weight="bold">
+<!-- insert i18n stuff here -->
+        Table
+        <xsl:text> </xsl:text>
+        <xsl:number count="table" level="multiple"/>
+<xsl:text>: </xsl:text>
+        <xsl:value-of select="caption"/>
+      </fo:block>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="tr">
+    <fo:table-row>
+      <xsl:apply-templates/>
+    </fo:table-row>
+  </xsl:template>
+  <xsl:template match="th">
+    <xsl:variable name="border-color" select="//skinconfig/colors/color[@name = 'table']/@value"/>
+    <xsl:variable name="background-color" select="$border-color"/>
+    <fo:table-cell
+        padding-before="4pt"
+        padding-after="4pt"
+        padding-start="4pt"
+        padding-end="4pt"
+        color="#FFFFFF"
+        background-color="{$background-color}"
+        border="1pt solid {$border-color}">
+      <xsl:attribute name="number-columns-spanned">
+        <xsl:value-of select="@colspan"/>
+      </xsl:attribute>
+      <xsl:attribute name="number-rows-spanned">
+        <xsl:value-of select="@rowspan"/>
+      </xsl:attribute>
+      <fo:block
+          text-align="center">
+        <xsl:apply-templates/>
+      </fo:block>
+    </fo:table-cell>
+  </xsl:template>
+  <xsl:template match="td">
+    <xsl:variable name="border-color" select="//skinconfig/colors/color[@name = 'table']/@value"/>
+    <xsl:variable name="background-color" select="//skinconfig/colors/color[@name = 'table-cell']/@value"/>
+    <fo:table-cell
+      padding-before="4pt"
+      padding-after="4pt"
+      padding-start="4pt"
+      padding-end="4pt"
+      background-color="{$background-color}"
+      border="1pt solid {$border-color}">
+      <xsl:attribute name="number-columns-spanned">
+        <xsl:value-of select="@colspan"/>
+      </xsl:attribute>
+      <xsl:attribute name="number-rows-spanned">
+        <xsl:value-of select="@rowspan"/>
+      </xsl:attribute>
+      <fo:block>
+        <xsl:apply-templates/>
+      </fo:block>
+    </fo:table-cell>
+  </xsl:template>
+  <xsl:template match="br">
+    <fo:block></fo:block>
+  </xsl:template>
+  <xsl:template match="legal">
+    <fo:inline
+      font-size="8pt">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+  <xsl:template match="body[count(//section) != 0]">
+    <xsl:if test="$toc-max-depth > 0">
+      <fo:block font-family="serif" font-size="14pt" font-weight="bold"
+      space-after="5pt" space-before="5pt" text-align="justify" width="7.5in">
+        <xsl:call-template name="insertPageBreaks"/>
+<!-- insert i18n stuff here -->
+<xsl:text>Table of contents</xsl:text>
+      </fo:block>
+      <fo:block font-family="sans" font-size="12pt" space-after="5pt"
+      space-before="0pt" text-align="justify" width="7.5in">
+        <xsl:if test="$page-break-top-sections">
+          <xsl:attribute name="break-after">page</xsl:attribute>
+        </xsl:if>
+        <xsl:apply-templates select="section" mode="toc" />
+      </fo:block>
+    </xsl:if>
+    <xsl:apply-templates />
+  </xsl:template>
+  <xsl:template match="section" mode="toc">
+<!-- FIXME: see bug FOR-640 -->
+    <xsl:param name="depth" select="'1'"/>
+    <fo:block space-before="5pt" text-align-last="justify" start-indent=".5em" text-indent=".5em">
+      <fo:inline>
+        <xsl:variable name="id">
+          <xsl:choose>
+            <xsl:when test="normalize-space(@id)!=''">
+              <xsl:value-of select="@id"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="generate-id()"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+        <fo:basic-link internal-destination="{$id}">
+          <xsl:value-of select="substring('&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;', 0, 2 * $depth - 1)" />
+          <fo:inline font-size="10pt">
+            <xsl:number count="section" format="1.1.1.1.1.1.1" level="multiple" />
+          </fo:inline>
+<xsl:text> </xsl:text>
+          <xsl:value-of select="title" />
+          <fo:leader leader-pattern="dots" />
+          <fo:page-number-citation ref-id="{$id}" />
+        </fo:basic-link>
+      </fo:inline>
+      <xsl:if test="$toc-max-depth > $depth">
+        <xsl:apply-templates select="section" mode="toc">
+          <xsl:with-param name="depth" select="$depth + 1"/>
+        </xsl:apply-templates>
+      </xsl:if>
+    </fo:block>
+  </xsl:template>
+<!-- ====================================================================== -->
+<!-- Local Extensions section -->
+<!-- ====================================================================== -->
+  <xsl:template match="citation">
+    <fo:inline>
+     [<xsl:value-of select="@def"/>]
+   </fo:inline>
+  </xsl:template>
+  <xsl:template match="p[@class='quote']">
+    <fo:block start-indent="1em"
+     space-before="4pt"
+     space-after="4pt"
+     background-color="#f0f0f0"
+     font-family="monospace">
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template name="insertPageBreaks">
+<!-- if marked as a 'pageBreakBefore', and we're breaking on pages, and were not the first node -->
+    <xsl:if test="contains(@class, 'pageBreakBefore') and preceding-sibling::node()">
+      <xsl:attribute name="break-before">page</xsl:attribute>
+    </xsl:if>
+<!-- if marked as a 'pageBreakAfter', and we're breaking on pages, and were not the last node -->
+    <xsl:if test="contains(@class, 'pageBreakAfter') and following-sibling::node()">
+      <xsl:attribute name="break-after">page</xsl:attribute>
+    </xsl:if>
+  </xsl:template>
+<!-- Display the document numerotation -->
+  <xsl:template name="insertPageNumber">
+    <xsl:param name="text-align" select="'start'"/>
+    <xsl:variable name="prefixe" select="substring-before($page-numbering-format,'1')"/>
+    <xsl:variable name="sep" select="substring-before(substring-after($page-numbering-format,'1'),'1')"/>
+    <xsl:variable name="postfixe">
+      <xsl:choose>
+        <xsl:when test="contains(substring-after($page-numbering-format,'1'),'1')">
+          <xsl:value-of select="substring-after(substring-after($page-numbering-format,'1'),'1')"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="substring-after($page-numbering-format,'1')"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+<!-- if 'page-numbering-format' contains 1 digits, the page number is displayed in the footer -->
+    <xsl:if test="contains($page-numbering-format,'1')">
+      <fo:block font-size="70%" text-align="{$text-align}">
+<!-- if the separator is not found, the total page number is skipped -->
+        <xsl:value-of select="$prefixe"/>
+        <fo:page-number/>
+        <xsl:if test="$sep != ''">
+          <xsl:value-of select="$sep"/>
+          <fo:page-number-citation ref-id="term"/>
+        </xsl:if>
+        <xsl:value-of select="$postfixe"/>
+      </fo:block>
+    </xsl:if>
+  </xsl:template>
+<!-- ====================================================================== -->
+<!-- Temporary section - subject to change on short notice  -->
+<!-- ====================================================================== -->
+  <xsl:template match="//style">
+<!-- HACK: The OpenOffice.org input plugin currently produces
+   intermediate documents that contain a style element, invalid per
+   the Forrest Document DTD. This style element must be ignored
+   here. To find out why this is done this way, read the comments
+   attached to issue FOR-433. -->
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/fo/pdfoutline.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/fo/pdfoutline.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/fo/pdfoutline.xsl	(revision 0)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:fox="http://xml.apache.org/fop/extensions"
+                version="1.0">
+  <xsl:template match="document" mode="outline">
+    <xsl:apply-templates select="body/section" mode="outline"/>
+  </xsl:template>
+  <xsl:template match="section" mode="outline">
+    <fox:outline>
+      <xsl:attribute name="internal-destination">
+        <xsl:choose>
+          <xsl:when test="normalize-space(@id)!=''">
+            <xsl:value-of select="@id"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="generate-id()"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <fox:label>
+        <xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
+<xsl:text> </xsl:text>
+        <xsl:value-of select="normalize-space(title)"/>
+      </fox:label>
+      <xsl:apply-templates select="section" mode="outline"/>
+    </fox:outline>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/split.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/split.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/split.xsl	(revision 0)
@@ -0,0 +1,124 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!--
+ This stylesheet was taken from the XSLT FAQ http://www.dpawson.co.uk/xsl/
+ 
+ Comments and adaption to be used without normalize-space()
+  by forrest-dev@xml.apache.org
+-->
+<!--
+  Input:
+
+<doc>
+
+<para>
+ 123456 2345 343434 545454 43434 343 
+ 12345 343434 545454 43434 343 
+ 32345645 343434 545454 43434 343 
+ 3422222225 343434 545454 43434 343 
+ llllllllllllllllllllllooooooooooooooonnnnnnnnnnnggggggggg
+ 345 343434 545454 43434 343 
+</para>
+
+</doc>
+
+Output:
+
+<HTML>
+<BODY>
+<PRE>123456 2345 343434 545454 
+43434 343 12345 343434 545454 
+43434 343 32345645 343434 
+545454 43434 343 3422222225 
+343434 545454 43434 343 
+lllllllllllllllllllllloooooooo
+ooooooonnnnnnnnnnnggggggggg 
+345 343434 545454 43434 
+343
+</PRE>
+</BODY>
+</HTML>
+
+Fragment ised: 
+
+ <xsl:template match="/doc">
+ <HTML><BODY><PRE>
+    <xsl:call-template name="format">
+    <xsl:with-param select="normalize-space(para)" name="txt" /> 
+     <xsl:with-param name="width">30</xsl:with-param> 
+     </xsl:call-template>
+  </PRE></BODY></HTML>
+  </xsl:template>
+
+
+-->
+  <xsl:template match="/body">
+    <body>
+      <xsl:call-template name="format">
+        <xsl:with-param select="source" name="txt" />
+        <xsl:with-param name="width">40</xsl:with-param>
+      </xsl:call-template>
+    </body>
+  </xsl:template>
+  <xsl:template name="format">
+    <xsl:param name="txt" />
+    <xsl:param name="width" />
+<!-- if there is still text left -->
+    <xsl:if test="$txt">
+      <xsl:variable name = "pretxt" select = "substring($txt,0, $width)" />
+      <xsl:choose>
+        <xsl:when test="contains($pretxt, '&#xA;')">
+          <xsl:value-of select="substring-before($pretxt, '&#xA;')"/>
+<xsl:text>&#xA;</xsl:text>
+          <xsl:call-template name="format">
+            <xsl:with-param name="txt" select="substring-after($txt,'&#xA;')"/>
+            <xsl:with-param select="$width" name="width" />
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+<!-- get the width at which to break-->
+          <xsl:variable name="real-width">
+            <xsl:call-template name="tune-width">
+              <xsl:with-param select="$txt" name="txt" />
+              <xsl:with-param select="$width" name="width" />
+              <xsl:with-param select="$width" name="def" />
+            </xsl:call-template>
+          </xsl:variable>
+<!-- output the first part of the broken string -->
+          <xsl:value-of select="substring($txt, 1, $real-width)" />
+<!-- output a newline -->
+<xsl:text>&#xA;</xsl:text>
+<!-- call itself with the remaining part of the text -->
+          <xsl:call-template name="format">
+            <xsl:with-param select="substring($txt,$real-width + 1)" name="txt" />
+            <xsl:with-param select="$width" name="width" />
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:if>
+  </xsl:template>
+<!-- used by template "format", it calculates the width at the given def 
+       
+       It starts at def length and comes back till it finds a space -->
+  <xsl:template name="tune-width">
+    <xsl:param name="txt" />
+    <xsl:param name="width" />
+    <xsl:param name="def" />
+    <xsl:choose>
+      <xsl:when test="$width = 0">
+        <xsl:value-of select="$def" />
+      </xsl:when>
+      <xsl:when test="substring($txt, $width, 1 ) = ' '">
+        <xsl:value-of select="$width" />
+      </xsl:when>
+      <xsl:otherwise>
+<!-- otherwise need to tune again, trying with $width - 1 -->
+        <xsl:call-template name="tune-width">
+          <xsl:with-param select="$width - 1" name="width" />
+          <xsl:with-param select="$txt" name="txt" />
+          <xsl:with-param select="$def" name="def" />
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/book-to-menu.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/book-to-menu.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/book-to-menu.xsl	(revision 0)
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--
+book-to-menu.xsl generates the HTML menu. It outputs XML/HTML of the form:
+  <div class="menu">
+     ...
+  </div>
+which is then merged with other HTML by site-to-xhtml.xsl
+
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!-- ================================================================ -->
+<!-- These templates SHOULD be overridden                             -->
+<!-- ================================================================ -->
+  <xsl:template name="selected">
+    <xsl:value-of select="@label"/>
+  </xsl:template>
+  <xsl:template name="unselected"><a href="{@href}">
+    <xsl:if test="@description">
+      <xsl:attribute name="title">
+        <xsl:value-of select="@description"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:value-of select="@label"/></a>
+  </xsl:template>
+  <xsl:template name="print-external">
+<!-- Use apply-imports when overriding -->
+    <xsl:value-of select="@label"/>
+  </xsl:template>
+<!-- ================================================================ -->
+<!-- These templates CAN be overridden                                -->
+<!-- ================================================================ -->
+<!-- Eg, if tab href is 'index.html#foo', this will be called when index.html
+  is selected -->
+  <xsl:template name="selected-anchor">
+<!-- By default, render as unselected so that it is clickable (takes user
+    to the anchor) -->
+    <xsl:call-template name="unselected"/>
+  </xsl:template>
+  <xsl:template name="unselected-anchor">
+    <xsl:call-template name="unselected"/>
+  </xsl:template>
+  <xsl:template match="book">
+    <xsl:apply-templates select="menu"/>
+  </xsl:template>
+  <xsl:template match="menu">
+    <div class="menu">
+      <xsl:call-template name="base-menu"/>
+    </div>
+  </xsl:template>
+  <xsl:template match="menu-item">
+<!-- Use apply-imports when overriding -->
+    <xsl:variable name="href-nofrag">
+      <xsl:call-template name="path-nofrag">
+        <xsl:with-param name="path" select="@href"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:variable name="node-path">
+      <xsl:call-template name="normalize">
+        <xsl:with-param name="path" select="concat($dirname, $href-nofrag)"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:choose>
+<!-- Compare with extensions stripped -->
+      <xsl:when test="$node-path = $path-nofrag">
+        <xsl:choose>
+          <xsl:when test="contains(@href, '#')">
+            <xsl:call-template name="selected-anchor"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="selected"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="contains(@href, '#')">
+            <xsl:call-template name="unselected-anchor"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="unselected"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!-- ================================================================ -->
+<!-- These templates SHOULD NOT be overridden                         -->
+<!-- ================================================================ -->
+  <xsl:param name="path"/>
+  <xsl:include href="pathutils.xsl"/>
+  <xsl:variable name="filename">
+    <xsl:call-template name="filename">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="path-nofrag">
+    <xsl:call-template name="path-nofrag">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="dirname">
+    <xsl:call-template name="dirname">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:template match="external">
+    <li><xsl:choose>
+        <xsl:when test="starts-with(@href, $path-nofrag)">
+          <span class="externalSelected">
+            <xsl:call-template name="print-external"/>
+          </span>
+        </xsl:when>
+        <xsl:otherwise><a href="{@href}" target="_blank">
+          <xsl:value-of select="@label"/></a>
+        </xsl:otherwise>
+      </xsl:choose></li>
+  </xsl:template>
+  <xsl:template match="menu-item[@type='hidden']"/>
+  <xsl:template match="external[@type='hidden']"/>
+  <xsl:template name="base-menu">
+    <xsl:apply-templates/>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/pathutils.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/pathutils.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/pathutils.xsl	(revision 0)
@@ -0,0 +1,231 @@
+<?xml version="1.0"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!--
+PathUtils.xsl
+
+A set of XSLT templates useful for parsing URI paths:
+
+dirname: return the directory part of a path
+filename: return the file part of a path
+ext: return the last extension of the filename in a path
+filename-noext: return the file part of a path without its last extension
+
+-->
+<!-- Returns the directory part of a path.  Equivalent to Unix 'dirname'.
+Examples:
+'' -> ''
+'foo/index.html' -> 'foo/'
+-->
+  <xsl:template name="dirname">
+    <xsl:param name="path" />
+    <xsl:if test="contains($path, '/')">
+      <xsl:value-of select="concat(substring-before($path, '/'), '/')" />
+      <xsl:call-template name="dirname">
+        <xsl:with-param name="path"
+        select="substring-after($path, '/')" />
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:template>
+<!-- Normalized (..'s eliminated) version of 'dirname' -->
+  <xsl:template name="dirname-nz">
+    <xsl:param name="path" />
+    <xsl:call-template name="normalize">
+      <xsl:with-param name="path">
+        <xsl:call-template name="dirname">
+          <xsl:with-param name="path" select="$path" />
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+<!-- Returns the filename part of a path.  Equivalent to Unix 'basename'
+Examples:
+'index.html'  ->  'index.html' 
+'foo/bar/'  ->  '' 
+'foo/bar/index.html'  ->  'index.html' 
+-->
+  <xsl:template name="filename">
+    <xsl:param name="path"/>
+    <xsl:choose>
+      <xsl:when test="contains($path, '/')">
+        <xsl:call-template name="filename">
+          <xsl:with-param name="path" select="substring-after($path, '/')"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$path"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!-- Returns the last extension of a filename in a path.
+Examples:
+'index.html'  ->  '.html' 
+'index.dtdx.html'  ->  '.html' 
+'foo/bar/'  ->  '' 
+'foo/bar/index.html'  ->  '.html' 
+'foo/bar/index'  ->  '' 
+-->
+  <xsl:template name="ext">
+    <xsl:param name="path"/>
+    <xsl:param name="subflag"/>
+<!-- Outermost call? -->
+    <xsl:choose>
+      <xsl:when test="contains($path, '.')">
+        <xsl:call-template name="ext">
+          <xsl:with-param name="path" select="substring-after($path, '.')"/>
+          <xsl:with-param name="subflag" select="'sub'"/>
+        </xsl:call-template>
+      </xsl:when>
+<!-- Handle extension-less filenames by returning '' -->
+      <xsl:when test="not($subflag) and not(contains($path, '.'))">
+<xsl:text/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="concat('.', $path)"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!-- Returns a filename of a path stripped of its last extension.
+Examples:
+'foo/bar/index.dtdx.html' -> 'index.dtdx'
+-->
+  <xsl:template name="filename-noext">
+    <xsl:param name="path"/>
+    <xsl:variable name="filename">
+      <xsl:call-template name="filename">
+        <xsl:with-param name="path" select="$path"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:variable name="ext">
+      <xsl:call-template name="ext">
+        <xsl:with-param name="path" select="$filename"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:value-of select="substring($filename, 1, string-length($filename) - string-length($ext))"/>
+  </xsl:template>
+<!-- Returns a path with the filename stripped of its last extension.
+Examples:
+'foo/bar/index.dtdx.html' -> 'foo/bar/index.dtdx'
+-->
+  <xsl:template name="path-noext">
+    <xsl:param name="path"/>
+    <xsl:variable name="ext">
+      <xsl:call-template name="ext">
+        <xsl:with-param name="path" select="$path"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:value-of select="substring($path, 1, string-length($path) - string-length($ext))"/>
+  </xsl:template>
+<!-- Normalized (..'s eliminated) version of 'path-noext' -->
+  <xsl:template name="path-noext-nz">
+    <xsl:param name="path" />
+    <xsl:call-template name="normalize">
+      <xsl:with-param name="path">
+        <xsl:call-template name="path-noext">
+          <xsl:with-param name="path" select="$path" />
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+<!-- Returns a path with any fragment identifier ('#...') stripped off
+Examples:
+'foo/bar/index.dtdx.html#blah' -> 'foo/bar/index.dtdx.html'
+-->
+  <xsl:template name="path-nofrag">
+    <xsl:param name="path"/>
+    <xsl:if test="not(contains($path, '#'))">
+      <xsl:value-of select="$path"/>
+    </xsl:if>
+    <xsl:if test="contains($path, '#')">
+      <xsl:value-of select="substring-before($path, '#')"/>
+    </xsl:if>
+  </xsl:template>
+<!-- Normalizes a path, converting '/' to '\' and eliminating ..'s
+Examples:
+'foo/bar/../baz/index.html' -> foo/baz/index.html'
+-->
+  <xsl:template name="normalize">
+    <xsl:param name="path"/>
+<!-- replace all \  with / -->
+    <xsl:variable name="path-" select="translate($path, '\', '/')"/>
+    <xsl:choose>
+<!-- process relative refs here -->
+      <xsl:when test="contains($path-, '/../')">
+<!--  put part before /../ into $pa: "foo/bar" -->
+        <xsl:variable name="pa" select="substring-before($path-, '/../')"/>
+<!-- put part after first occurrence /../ into $th: "baz/index.html" -->
+        <xsl:variable name="th" select="substring-after($path-, '/../')"/>
+<!-- cut last real directory name before /../ and put rest in $pa- : "foo/"  -->
+        <xsl:variable name="pa-">
+          <xsl:call-template name="dirname">
+            <xsl:with-param name="path" select="$pa"/>
+          </xsl:call-template>
+        </xsl:variable>
+<!-- recombine pieces thus eliminating one .. and one dir step before it
+              and recurse into this template to eliminate more /../
+      -->
+        <xsl:variable name="pa-th" select="concat($pa-, $th)"/>
+        <xsl:call-template name="normalize">
+          <xsl:with-param name="path" select="$pa-th"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$path-"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!--
+Uncomment this to test.
+Usage: saxon pathutils.xsl pathutils.xsl path=foo/bar
+
+<xsl:param name="path" select="'/foo/bar/../baz/index.html'"/>
+<xsl:template match="/">
+  <xsl:message>
+    path           = <xsl:value-of select="$path"/>
+    normalize      = <xsl:call-template name="normalize">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+    dirname        = <xsl:call-template name="dirname">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+    dirname-nz     = <xsl:call-template name="dirname-nz">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+    filename       = <xsl:call-template name="filename">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+    ext            = <xsl:call-template name="ext">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+    filename-noext = <xsl:call-template name="filename-noext">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+    path-noext     = <xsl:call-template name="path-noext">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+    path-noext-nz  = <xsl:call-template name="path-noext-nz">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+    path-nofrag    = <xsl:call-template name="path-nofrag">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+ 
+  </xsl:message>
+</xsl:template>
+-->
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl	(revision 0)
@@ -0,0 +1,388 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--
+site-to-xhtml.xsl is the final stage in HTML page production.  It merges HTML from
+document-to-html.xsl, tab-to-menu.xsl and book-to-menu.xsl, and adds the site header,
+footer, searchbar, css etc.  As input, it takes XML of the form:
+
+<site>
+  <div class="menu">
+    ...
+  </div>
+  <div class="tab">
+    ...
+  </div>
+  <div class="content">
+    ...
+  </div>
+</site>
+
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java">
+  <xsl:variable name="config" select="//skinconfig"/>
+<!-- If true, a txt link for this page will not be generated -->
+  <xsl:variable name="disable-txt-link" select="//skinconfig/disable-txt-link"/>
+<!-- If true, a PDF link for this page will not be generated -->
+  <xsl:variable name="disable-pdf-link" select="//skinconfig/disable-pdf-link"/>
+<!-- If true, a "print" link for this page will not be generated -->
+  <xsl:variable name="disable-print-link" select="//skinconfig/disable-print-link"/>
+<!-- If true, an XML link for this page will not be generated -->
+  <xsl:variable name="disable-xml-link" select="//skinconfig/disable-xml-link"/>
+<!-- If true, a POD link for this page will not be generated -->
+  <xsl:variable name="disable-pod-link" select="//skinconfig/disable-pod-link"/>
+<!-- Get the location where to generate the minitoc -->
+  <xsl:variable name="minitoc-location" select="//skinconfig/toc/@location"/>
+  <xsl:param name="path"/>
+  <xsl:include href="dotdots.xsl"/>
+  <xsl:include href="pathutils.xsl"/>
+  <xsl:include href="renderlogo.xsl"/>
+<!-- Path (..'s) to the root directory -->
+  <xsl:variable name="root">
+    <xsl:call-template name="dotdots">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+<!-- Source filename (eg 'foo.xml') of current page -->
+  <xsl:variable name="filename">
+    <xsl:call-template name="filename">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+<!-- Path of Lucene search results page (relative to $root) -->
+  <xsl:param name="lucene-search" select="'lucene-search.html'"/>
+  <xsl:variable name="filename-noext">
+    <xsl:call-template name="filename-noext">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+<!-- Whether to obfuscate email links -->
+  <xsl:variable name="obfuscate-mail-links" select="//skinconfig/obfuscate-mail-links"/>
+<!-- If true, the font size script will not be rendered -->
+  <xsl:variable name="disable-font-script" select="//skinconfig/disable-font-script"/>
+<!-- If true, an the images on all external links will not be added -->
+  <xsl:variable name="disable-external-link-image" select="//skinconfig/disable-external-link-image"/>
+  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
+  <xsl:variable name="spacer" select="concat($root, 'skin/images/spacer.gif')"/>
+  <xsl:template name="breadcrumbs">
+    <xsl:if test="(//skinconfig/trail/link1/@name)and(//skinconfig/trail/link1/@name!='')"><a href="{//skinconfig/trail/link1/@href}">
+      <xsl:value-of select="//skinconfig/trail/link1/@name"/></a>
+    </xsl:if>
+    <xsl:if test="(//skinconfig/trail/link2/@name)and(//skinconfig/trail/link2/@name!='')"> &gt; <a href="{//skinconfig/trail/link2/@href}">
+      <xsl:value-of select="//skinconfig/trail/link2/@name"/></a>
+    </xsl:if>
+    <xsl:if test="(//skinconfig/trail/link3/@name)and(//skinconfig/trail/link3/@name!='')"> &gt; <a href="{//skinconfig/trail/link3/@href}">
+      <xsl:value-of select="//skinconfig/trail/link3/@name"/></a>
+    </xsl:if>
+<script type="text/javascript" language="JavaScript" src="{$root}skin/breadcrumbs.js"/>
+  </xsl:template>
+  <xsl:template match="site">
+    <html>
+      <head>
+        <title><xsl:value-of select="div[@class='content']/table/tr/td/h1"/></title>
+        <xsl:if test="//skinconfig/favicon-url"><link rel="shortcut icon">
+          <xsl:attribute name="href">
+            <xsl:value-of select="concat($root,//skinconfig/favicon-url)"/>
+          </xsl:attribute></link>
+        </xsl:if>
+      </head>
+      <body>
+        <xsl:if test="//skinconfig/group-url">
+          <xsl:call-template name="renderlogo">
+            <xsl:with-param name="name" select="//skinconfig/group-name"/>
+            <xsl:with-param name="url" select="//skinconfig/group-url"/>
+            <xsl:with-param name="logo" select="//skinconfig/group-logo"/>
+            <xsl:with-param name="root" select="$root"/>
+            <xsl:with-param name="description" select="//skinconfig/group-description"/>
+          </xsl:call-template>
+        </xsl:if>
+        <xsl:call-template name="renderlogo">
+          <xsl:with-param name="name" select="//skinconfig/project-name"/>
+          <xsl:with-param name="url" select="//skinconfig/project-url"/>
+          <xsl:with-param name="logo" select="//skinconfig/project-logo"/>
+          <xsl:with-param name="root" select="$root"/>
+          <xsl:with-param name="description" select="//skinconfig/project-description"/>
+        </xsl:call-template>
+        <xsl:comment>================= start Tabs ==================</xsl:comment>
+        <xsl:apply-templates select="div[@class='tab']"/>
+        <xsl:comment>================= end Tabs ==================</xsl:comment>
+        <xsl:comment>================= start Menu items ==================</xsl:comment>
+        <xsl:apply-templates select="div[@class='menu']"/>
+        <xsl:comment>================= end Menu items ==================</xsl:comment>
+        <xsl:comment>================= start Content==================</xsl:comment>
+        <xsl:apply-templates select="div[@class='content']"/>
+        <xsl:comment>================= end Content==================</xsl:comment>
+        <xsl:comment>================= start Footer ==================</xsl:comment>
+        <xsl:choose>
+          <xsl:when test="$config/copyright-link"><a>
+            <xsl:attribute name="href">
+              <xsl:value-of select="$config/copyright-link"/>
+            </xsl:attribute>
+              Copyright &#169; <xsl:value-of select="$config/year"/>
+            <xsl:call-template name="current-year">
+              <xsl:with-param name="copyrightyear" select="$config/year"/>
+            </xsl:call-template>&#160;
+              <xsl:value-of select="$config/vendor"/></a>
+          </xsl:when>
+          <xsl:otherwise>
+            Copyright &#169; <xsl:value-of select="$config/year"/>
+            <xsl:call-template name="current-year">
+              <xsl:with-param name="copyrightyear" select="$config/year"/>
+            </xsl:call-template>&#160;
+            <xsl:value-of select="$config/vendor"/>
+          </xsl:otherwise>
+        </xsl:choose>
+        All rights reserved.
+        <script language="JavaScript" type="text/javascript"><![CDATA[<!--
+          document.write(" - "+"Last Published: " + document.lastModified);
+          //  -->]]></script>
+        <xsl:if test="//skinconfig/host-logo and not(//skinconfig/host-logo = '')"><a href="{//skinconfig/host-url}">
+          <xsl:call-template name="renderlogo">
+            <xsl:with-param name="name" select="//skinconfig/host-name"/>
+            <xsl:with-param name="url" select="//skinconfig/host-url"/>
+            <xsl:with-param name="logo" select="//skinconfig/host-logo"/>
+            <xsl:with-param name="root" select="$root"/>
+          </xsl:call-template></a>
+        </xsl:if>
+        <xsl:if test="$filename = 'index.html' and //skinconfig/credits">
+          <xsl:for-each select="//skinconfig/credits/credit[not(@role='pdf')]">
+            <xsl:call-template name="renderlogo">
+              <xsl:with-param name="name" select="name"/>
+              <xsl:with-param name="url" select="url"/>
+              <xsl:with-param name="logo" select="image"/>
+              <xsl:with-param name="root" select="$root"/>
+              <xsl:with-param name="width" select="width"/>
+              <xsl:with-param name="height" select="height"/>
+            </xsl:call-template>
+          </xsl:for-each>
+        </xsl:if><a href="http://validator.w3.org/check/referer">
+        <img class="skin" border="0"
+            src="http://www.w3.org/Icons/valid-html401"
+            alt="Valid HTML 4.01!" height="31" width="88"/></a>
+      </body>
+    </html>
+  </xsl:template>
+<!-- Add links to any standards-compliance logos -->
+  <xsl:template name="compliancy-logos">
+    <xsl:if test="$filename = 'index.html' and //skinconfig/disable-compliance-links = 'false'"><a href="http://validator.w3.org/check/referer">
+      <img class="logoImage"
+          src="{$skin-img-dir}/valid-html401.png"
+          alt="Valid HTML 4.01!" title="Valid HTML 4.01!" height="31" width="88" border="0"/></a><a href="http://jigsaw.w3.org/css-validator/check/referer">
+      <img class="logoImage"
+          src="{$skin-img-dir}/vcss.png"
+          alt="Valid CSS!" title="Valid CSS!" height="31" width="88" border="0"/></a>
+    </xsl:if>
+  </xsl:template>
+<!-- Generates the PDF link -->
+  <xsl:template match="div[@id='skinconf-pdflink']">
+    <xsl:if test="not($config/disable-pdf-link) or $disable-pdf-link = 'false'">
+      <td align="center" width="40" nowrap="nowrap"><a href="{$filename-noext}.pdf" class="dida">
+        <img class="skin" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF"/>
+        <br/>
+        PDF</a>
+      </td>
+    </xsl:if>
+  </xsl:template>
+<!-- Generates the TXT link -->
+  <xsl:template match="div[@id='skinconf-txtlink']">
+    <xsl:if test="$disable-txt-link = 'false'">
+      <td align="center" width="40" nowrap="nowrap"><a href="{$filename-noext}.txt" class="dida">
+        <img class="skin" src="{$skin-img-dir}/txtdoc.png" alt="TXT"/>
+        <br/>
+        TXT</a>
+      </td>
+    </xsl:if>
+  </xsl:template>
+<!-- Generates the POD link -->
+  <xsl:template match="div[@id='skinconf-podlink']">
+    <xsl:if test="$disable-pod-link = 'false'">
+      <td align="center" width="40" nowrap="nowrap"><a href="{$filename-noext}.pod" class="dida">
+        <img class="skin" src="{$skin-img-dir}/poddoc.png" alt="POD"/>
+        <br/>
+        POD</a>
+      </td>
+    </xsl:if>
+  </xsl:template>
+<!-- Generates the XML link -->
+  <xsl:template match="div[@id='skinconf-xmllink']">
+    <xsl:if test="$disable-xml-link = 'false'">
+      <td align="center" width="40" nowrap="nowrap"><a href="{$filename-noext}.xml" class="dida">
+        <img class="skin" src="{$skin-img-dir}/xmldoc.gif" alt="XML"/>
+        <br/>
+        XML</a>
+      </td>
+    </xsl:if>
+  </xsl:template>
+<!-- Generates the "printer friendly version" link -->
+  <xsl:template match="div[@id='skinconf-printlink']">
+    <xsl:if test="$disable-print-link = 'false'">
+<script type="text/javascript" language="Javascript">
+function printit() {
+  if (window.print) {
+    window.focus();
+    window.print();
+  }
+}
+
+var NS = (navigator.appName == "Netscape");
+var VERSION = parseInt(navigator.appVersion);
+if (VERSION > 3) {
+    document.write('<td align="center" width="40" nowrap="nowrap">');
+    document.write('  <a href="javascript:printit()" class="dida">');
+    document.write('    <img class="skin" src="{$skin-img-dir}/printer.gif" alt="Print this Page"/><br />');
+    document.write('  print</a>');
+    document.write('</td>');
+}
+</script>
+    </xsl:if>
+  </xsl:template>
+<!-- handle all obfuscating mail links and disabling external link images -->
+  <xsl:template match="a">
+    <xsl:choose>
+      <xsl:when test="$obfuscate-mail-links='true' and starts-with(@href, 'mailto:') and contains(@href, '@')">
+        <xsl:variable name="mailto-1" select="substring-before(@href,'@')"/>
+        <xsl:variable name="mailto-2" select="substring-after(@href,'@')"/>
+        <xsl:variable name="obfuscation" select="normalize-space(//skinconfig/obfuscate-mail-value)"/><a href="{$mailto-1}{$obfuscation}{$mailto-2}">
+        <xsl:apply-templates/></a>
+      </xsl:when>
+      <xsl:when test="not($disable-external-link-image='true') and contains(@href, ':') and not(contains(@href, //skinconfig/group-url)) and not(contains(@href, //skinconfig/project-url))"><a href="{@href}" class="external">
+        <xsl:apply-templates/></a>
+      </xsl:when>
+      <xsl:otherwise>
+<!-- xsl:copy-of makes sure we copy <a href> as well as <a name>
+             or any other <a ...> forms -->
+        <xsl:copy-of select="."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="div[@id='skinconf-toc-page']">
+    <xsl:if test="$config/toc">
+      <xsl:if test="contains($minitoc-location,'page')">
+        <xsl:if test="(count(//tocitems/tocitem) >= $config/toc/@min-sections) or (//tocitems/@force = 'true')">
+          <xsl:call-template name="minitoc">
+            <xsl:with-param name="tocroot" select="//tocitems"/>
+          </xsl:call-template>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template name="minitoc">
+    <xsl:param name="tocroot"/>
+    <xsl:if test="(count($tocroot/tocitem) >= $config/toc/@min-sections) or ($tocroot/@force = 'true')">
+      <xsl:if test="contains($config/toc/@location,'page')">
+        <ul class="minitoc">
+          <xsl:for-each select="$tocroot/tocitem">
+            <li><a href="{@href}">
+              <xsl:value-of select="@title"/></a>
+              <xsl:if test="@level&lt;//skinconfig/toc/@max-depth+1">
+                <xsl:call-template name="minitoc">
+                  <xsl:with-param name="tocroot" select="."/>
+                </xsl:call-template>
+              </xsl:if></li>
+          </xsl:for-each>
+        </ul>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template name="html-meta">
+    <meta name="Generator" content="Apache Forrest"/>
+    <meta name="Forrest-version">
+      <xsl:attribute name="content">
+        <xsl:value-of select="//info/forrest-version"/>
+      </xsl:attribute>
+    </meta>
+    <meta name="Forrest-skin-name">
+      <xsl:attribute name="content">
+        <xsl:value-of select="//info/project-skin"/>
+      </xsl:attribute>
+    </meta>
+  </xsl:template>
+<!-- meta information from v 2.0 documents
+       FIXME: the match is really inefficient -->
+  <xsl:template name="meta-data">
+    <xsl:for-each select="//meta-data/meta">
+      <xsl:element name="meta">
+        <xsl:attribute name="name">
+          <xsl:value-of select="@name"/>
+        </xsl:attribute>
+        <xsl:attribute name="content">
+          <xsl:value-of select="."/>
+        </xsl:attribute>
+        <xsl:if test="@xml:lang">
+          <xsl:attribute name="lang">
+            <xsl:value-of select="@xml:lang"/>
+          </xsl:attribute>
+        </xsl:if>
+      </xsl:element>
+    </xsl:for-each>
+  </xsl:template>
+  <xsl:template name="feedback">
+    <div id="feedback">
+      <xsl:value-of select="$config/feedback"/>
+      <xsl:choose>
+        <xsl:when test="$config/feedback/@href and not($config/feedback/@href='')"><a id="feedbackto">
+          <xsl:attribute name="href">
+            <xsl:value-of select="$config/feedback/@href"/>
+            <xsl:value-of select="$path"/>
+          </xsl:attribute>
+          <xsl:value-of select="$config/feedback/@to"/></a>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$config/feedback/@to"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </div>
+  </xsl:template>
+  <xsl:template match="node()|@*" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+<!-- inception year copyright management -->
+  <xsl:template name="current-year">
+<!-- Displays the current year after the inception year (in the copyright i.e: 2002-2005)
+       - the copyright year (2005 by default) can be indicated in the copyrightyear parameter,
+       - the year format (yyyy by default) can be indicated in the dateformat parameter,
+       - the dates separator (- by default) can be indicated in the dateseparator parameter.
+       For instance the following call will format the year on 2 digits and separates the dates
+       with /
+       (copyright 02/05)
+        <xsl:call-template name="current-year">
+           <xsl:with-param name="copyrightyear" select="'02'"/>
+           <xsl:with-param name="dateformat" select="'yy'"/>
+           <xsl:with-param name="dateseparator" select="'/'"/>
+         </xsl:call-template>
+       Warning, to enable inception year, inception attribute must be set to "true" in copyright/year/@inception
+     -->
+    <xsl:param name="copyrightyear">2005</xsl:param>
+    <xsl:param name="dateformat">yyyy</xsl:param>
+    <xsl:param name="dateseparator">-</xsl:param>
+    <xsl:if test="$copyrightyear[@inception = 'true']">
+      <xsl:variable name="tz" select='java:java.util.SimpleTimeZone.new(0,"GMT+00:00")' />
+      <xsl:variable name="formatter" select="java:java.text.SimpleDateFormat.new($dateformat)"/>
+      <xsl:variable name="settz" select="java:setTimeZone($formatter, $tz)" />
+      <xsl:variable name="date" select="java:java.util.Date.new()"/>
+      <xsl:variable name="year" select="java:format($formatter, $date)"/>
+      <xsl:if test="$copyrightyear != $year">
+        <xsl:value-of select="$dateseparator"/>
+        <xsl:value-of select="$year"/>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/renderlogo.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/renderlogo.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/renderlogo.xsl	(revision 0)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+<!--
+A simple callable template that renders a logo for an entity. The logo will 
+be a hyperlink and may include an image (with width and height if specified)
+or else it will just include the specified text.
+
+Note that text and image are mandatory parts of the template.
+-->
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:template name="renderlogo">
+    <xsl:param name="name"/>
+    <xsl:param name="url"/>
+    <xsl:param name="logo"/>
+    <xsl:param name="width"/>
+    <xsl:param name="height"/>
+    <xsl:param name="root"/>
+    <xsl:param name="description"/><a href="{$url}">
+    <xsl:choose>
+      <xsl:when test="$logo and not($logo = '')">
+        <img alt="{$name}" class="logoImage">
+          <xsl:attribute name="src">
+            <xsl:if test="not(starts-with($logo, 'http://'))">
+              <xsl:value-of select="$root"/>
+            </xsl:if>
+            <xsl:value-of select="$logo"/>
+          </xsl:attribute>
+          <xsl:if test="$width">
+            <xsl:attribute name="width">
+              <xsl:value-of select="$width"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:if test="$height">
+            <xsl:attribute name="height">
+              <xsl:value-of select="$height"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:if test="$description">
+            <xsl:attribute name="title">
+              <xsl:value-of select="$description"/>
+            </xsl:attribute>
+          </xsl:if>
+        </img>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$name"/>
+      </xsl:otherwise>
+    </xsl:choose></a>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/strip_namespaces.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/strip_namespaces.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/strip_namespaces.xsl	(revision 0)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!-- FIXME: FOR-555. This might not be the best solution though, but it sure works -->
+  <xsl:template match="comment()|processing-instruction()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
+    </xsl:copy>
+  </xsl:template>
+<!-- End fixme FOR-555 -->
+  <xsl:template match="*">
+<!-- remove element prefix (if any) -->
+    <xsl:element name="{local-name()}">
+<!-- process attributes -->
+      <xsl:for-each select="@*">
+<!-- remove attribute prefix (if any) -->
+        <xsl:attribute name="{local-name()}">
+          <xsl:value-of select="."/>
+        </xsl:attribute>
+      </xsl:for-each>
+      <xsl:apply-templates/>
+    </xsl:element>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/document-to-html.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/document-to-html.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/document-to-html.xsl	(revision 0)
@@ -0,0 +1,374 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--
+This stylesheet contains the majority of templates for converting documentv11
+to HTML.  It renders XML as HTML in this form:
+
+  <div class="content">
+   ...
+  </div>
+
+..which site-to-xhtml.xsl then combines with HTML from the index (book-to-menu.xsl)
+and tabs (tab-to-menu.xsl) to generate the final HTML.
+
+Section handling
+  - <a name/> anchors are added if the id attribute is specified
+
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:param name="dynamic-page" select="'false'"/>
+  <xsl:param name="notoc"/>
+  <xsl:param name="path"/>
+<!-- <xsl:include href="split.xsl"/> -->
+  <xsl:include href="dotdots.xsl"/>
+  <xsl:include href="pathutils.xsl"/>
+<!-- Path to site root, eg '../../' -->
+  <xsl:variable name="root">
+    <xsl:call-template name="dotdots">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
+  <xsl:template match="/">
+    <xsl:apply-templates mode="toc"/>
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template match="document">
+    <div class="content">
+      <table summary="" class="title">
+        <tr>
+          <td valign="middle">
+            <xsl:if test="normalize-space(header/title)!=''">
+              <h1>
+                <xsl:value-of select="header/title"/>
+              </h1>
+            </xsl:if>
+          </td>
+          <div id="skinconf-printlink"/>
+          <xsl:if test="$dynamic-page='false'">
+            <div id="skinconf-pdflink"/>
+            <div id="skinconf-xmllink"/>
+          </xsl:if>
+        </tr>
+      </table>
+      <xsl:if test="normalize-space(header/subtitle)!=''">
+        <h3>
+          <xsl:value-of select="header/subtitle"/>
+        </h3>
+      </xsl:if>
+      <xsl:apply-templates select="header/type"/>
+      <xsl:apply-templates select="header/notice"/>
+      <xsl:apply-templates select="header/abstract"/>
+      <xsl:apply-templates select="body"/>
+      <div class="attribution">
+        <xsl:apply-templates select="header/authors"/>
+        <xsl:if test="header/authors and header/version">
+<xsl:text>; </xsl:text>
+        </xsl:if>
+        <xsl:apply-templates select="header/version"/>
+      </div>
+    </div>
+  </xsl:template>
+  <xsl:template match="body">
+    <div id="skinconf-toc-page"/>
+    <xsl:apply-templates/>
+  </xsl:template>
+<!-- Generate a <a name="..."> tag for an @id -->
+  <xsl:template match="@id">
+    <xsl:if test="normalize-space(.)!=''"><a name="{.}"/>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="section">
+<!-- count the number of section in the ancestor-or-self axis to compute
+         the title element name later on -->
+    <xsl:variable name="sectiondepth" select="count(ancestor-or-self::section)"/><a name="{generate-id()}"/>
+    <xsl:apply-templates select="@id"/>
+<!-- generate a title element, level 1 -> h3, level 2 -> h4 and so on... -->
+    <xsl:element name="{concat('h',$sectiondepth + 2)}">
+      <xsl:value-of select="title"/>
+      <xsl:if test="$notoc='true' and $sectiondepth = 3">
+        <span style="float: right"><a href="#{@id}-menu">^</a>
+        </span>
+      </xsl:if>
+    </xsl:element>
+<!-- Indent FAQ entry text 15 pixels -->
+    <xsl:variable name="indent">
+      <xsl:choose>
+        <xsl:when test="$notoc='true' and $sectiondepth = 3">
+<xsl:text>15</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+<xsl:text>0</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <div style="margin-left: {$indent} ; border: 2px">
+      <xsl:apply-templates select="*[not(self::title)]"/>
+    </div>
+  </xsl:template>
+  <xsl:template match="note | warning | fixme">
+    <xsl:apply-templates select="@id"/>
+    <div>
+      <xsl:call-template name="add.class">
+        <xsl:with-param name="class">
+          <xsl:value-of select="local-name()"/>
+        </xsl:with-param>
+      </xsl:call-template>
+      <div class="label">
+        <xsl:choose>
+<!-- FIXME: i18n Transformer here -->
+          <xsl:when test="@label">
+            <xsl:value-of select="@label"/>
+          </xsl:when>
+          <xsl:when test="local-name() = 'note'">Note</xsl:when>
+          <xsl:when test="local-name() = 'warning'">Warning</xsl:when>
+          <xsl:otherwise>Fixme (<xsl:value-of select="&#x40;author"/>)</xsl:otherwise>
+        </xsl:choose>
+      </div>
+      <div class="content">
+        <xsl:apply-templates/>
+      </div>
+    </div>
+  </xsl:template>
+  <xsl:template match="notice">
+    <div class="notice">
+<!-- FIXME: i18n Transformer here -->
+<xsl:text>Notice: </xsl:text>
+      <xsl:apply-templates/>
+    </div>
+  </xsl:template>
+  <xsl:template match="link">
+    <xsl:apply-templates select="@id"/><a>
+    <xsl:if test="@class='jump'">
+      <xsl:attribute name="target">_top</xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@class='fork'">
+      <xsl:attribute name="target">_blank</xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/></a>
+  </xsl:template>
+  <xsl:template match="jump">
+    <xsl:apply-templates select="@id"/><a href="{@href}" target="_top">
+    <xsl:apply-templates/></a>
+  </xsl:template>
+  <xsl:template match="fork">
+    <xsl:apply-templates select="@id"/><a href="{@href}" target="_blank">
+    <xsl:apply-templates/></a>
+  </xsl:template>
+  <xsl:template match="p[@xml:space='preserve']">
+    <xsl:apply-templates select="@id"/>
+    <div class="pre">
+      <xsl:copy-of select="@id"/>
+      <xsl:apply-templates/>
+    </div>
+  </xsl:template>
+  <xsl:template match="source">
+    <xsl:apply-templates select="@id"/>
+    <pre class="code">
+<!-- Temporarily removed long-line-splitter ... gives out-of-memory problems -->
+      <xsl:copy-of select="@id"/>
+      <xsl:apply-templates/>
+<!--
+    <xsl:call-template name="format">
+    <xsl:with-param select="." name="txt" />
+     <xsl:with-param name="width">80</xsl:with-param>
+     </xsl:call-template>
+-->
+    </pre>
+  </xsl:template>
+  <xsl:template match="anchor"><a name="{@id}">
+    <xsl:copy-of select="@id"/></a>
+  </xsl:template>
+  <xsl:template match="icon">
+    <xsl:apply-templates select="@id"/>
+    <img class="icon">
+      <xsl:copy-of select="@height | @width | @src | @alt | @id"/>
+    </img>
+  </xsl:template>
+  <xsl:template match="code">
+    <xsl:apply-templates select="@id"/>
+    <span>
+      <xsl:call-template name="add.class">
+        <xsl:with-param name="class">codefrag</xsl:with-param>
+      </xsl:call-template>
+      <xsl:copy-of select="@id"/>
+      <xsl:value-of select="."/>
+    </span>
+  </xsl:template>
+  <xsl:template match="figure">
+    <xsl:apply-templates select="@id"/>
+    <div align="center">
+      <xsl:copy-of select="@id"/>
+      <img class="figure">
+        <xsl:copy-of select="@height | @width | @src | @alt | @id"/>
+      </img>
+    </div>
+  </xsl:template>
+  <xsl:template match="table">
+    <xsl:apply-templates select="@id"/>
+    <xsl:choose>
+<!-- Limit Forrest specific processing to tables without class -->
+      <xsl:when test="not(@class) or @class=''">
+        <table cellpadding="4" cellspacing="1" class="ForrestTable">
+          <xsl:copy-of select="@cellspacing | @cellpadding | @border | @class | @bgcolor |@id"/>
+          <xsl:apply-templates/>
+        </table>
+      </xsl:when>
+      <xsl:otherwise>
+<!-- Tables with class are passed without change -->
+        <xsl:copy>
+          <xsl:copy-of select="@*"/>
+          <xsl:apply-templates/>
+        </xsl:copy>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:if test="@class = ''"></xsl:if>
+  </xsl:template>
+  <xsl:template match="acronym/@title">
+    <xsl:attribute name="title">
+      <xsl:value-of select="normalize-space(.)"/>
+    </xsl:attribute>
+  </xsl:template>
+  <xsl:template match="header/authors">
+    <xsl:for-each select="person">
+      <xsl:choose>
+        <xsl:when test="position()=1">by</xsl:when>
+        <xsl:otherwise>,</xsl:otherwise>
+      </xsl:choose>
+<xsl:text> </xsl:text>
+      <xsl:value-of select="@name"/>
+    </xsl:for-each>
+  </xsl:template>
+  <xsl:template match="version">
+    <span class="version">
+      <xsl:apply-templates select="@major"/>
+      <xsl:apply-templates select="@minor"/>
+      <xsl:apply-templates select="@fix"/>
+      <xsl:apply-templates select="@tag"/>
+      <xsl:choose>
+        <xsl:when test="starts-with(., '$Revision: ')">
+          version <xsl:value-of select="substring(., 12, string-length(.) -11-2)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="."/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </span>
+  </xsl:template>
+  <xsl:template match="@major">
+     v<xsl:value-of select="."/>
+  </xsl:template>
+  <xsl:template match="@minor | @fix">
+    <xsl:value-of select="concat('.',.)"/>
+  </xsl:template>
+  <xsl:template match="@tag">
+    <xsl:value-of select="concat('-',.)"/>
+  </xsl:template>
+  <xsl:template match="type">
+    <p class="type">
+<!-- FIXME: i18n Transformer here -->
+<xsl:text>Type: </xsl:text>
+      <xsl:value-of select="."/>
+    </p>
+  </xsl:template>
+  <xsl:template match="abstract">
+    <p>
+      <xsl:apply-templates/>
+    </p>
+  </xsl:template>
+  <xsl:template name="email"><a>
+    <xsl:attribute name="href">
+      <xsl:value-of select="concat('mailto:',@email)"/>
+    </xsl:attribute>
+    <xsl:value-of select="@name"/></a>
+  </xsl:template>
+  <xsl:template name="generate-id">
+    <xsl:choose>
+      <xsl:when test="@id">
+        <xsl:value-of select="@id"/>
+      </xsl:when>
+      <xsl:when test="@title">
+        <xsl:value-of select="@title"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="generate-id(.)"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!--  Templates for "toc" mode.  This will generate a complete
+        Table of Contents for the document.  This will then be used
+        by the site2xhtml to generate a Menu ToC and a Page ToC -->
+  <xsl:template match="document" mode="toc">
+    <xsl:apply-templates mode="toc"/>
+  </xsl:template>
+  <xsl:template match="body" mode="toc">
+    <tocitems>
+      <xsl:if test="../header/meta[@name='forrest.force-toc'] = 'true'">
+        <xsl:attribute name="force">true</xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates select="section" mode="toc">
+        <xsl:with-param name="level" select="1"/>
+      </xsl:apply-templates>
+    </tocitems>
+  </xsl:template>
+  <xsl:template match="section" mode="toc">
+    <xsl:param name="level"/>
+    <tocitem level="{$level}">
+      <xsl:attribute name="href">#<xsl:call-template name="generate-id"/>
+      </xsl:attribute>
+      <xsl:attribute name="title">
+        <xsl:value-of select="title"/>
+      </xsl:attribute>
+      <xsl:apply-templates mode="toc">
+        <xsl:with-param name="level" select="$level+1"/>
+      </xsl:apply-templates>
+    </tocitem>
+  </xsl:template>
+  <xsl:template name="add.class">
+<!-- use the parameter to set class attribute -->
+<!-- if there are already classes set, adds to them -->
+    <xsl:param name="class"/>
+    <xsl:attribute name="class">
+      <xsl:choose>
+        <xsl:when test="@class">
+          <xsl:value-of select="$class"/>
+<xsl:text> </xsl:text>
+          <xsl:value-of select="@class"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$class"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+  </xsl:template>
+  <xsl:template match="node()|@*" mode="toc"/>
+<!-- End of "toc" mode templates -->
+  <xsl:template match="node()|@*" priority="-1">
+<!-- id processing will create its own a-element so processing has to 
+         happen outside the copied element 
+    -->
+    <xsl:apply-templates select="@id"/>
+    <xsl:copy>
+      <xsl:apply-templates select="@*[name(.) != 'id']"/>
+      <xsl:copy-of select="@id"/>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/dotdots.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/dotdots.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/dotdots.xsl	(revision 0)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+<!--
+Contains the 'dotdots' template, which, given a path, will output a set of
+directory traversals to get back to the source directory. Handles both '/' and
+'\' directory separators.
+
+Examples:
+  Input                           Output 
+    index.html                    ""
+    dir/index.html                "../"
+    dir/subdir/index.html         "../../"
+    dir//index.html              "../"
+    dir/                          "../"
+    dir//                         "../"
+    \some\windows\path            "../../"
+    \some\windows\path\           "../../../"
+    \Program Files\mydir          "../"
+
+Cannot handle ..'s in the path, so don't expect 'dir/subdir/../index.html' to
+work.
+
+-->
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:template name="dotdots">
+    <xsl:param name="path"/>
+    <xsl:variable name="dirs" select="normalize-space(translate(concat($path, 'x'), ' /\', '_  '))"/>
+<!-- The above does the following:
+       o Adds a trailing character to the path. This prevents us having to deal
+         with the special case of ending with '/'
+       o Translates all directory separators to ' ', and normalize spaces,
+		 cunningly eliminating duplicate '//'s. We also translate any real
+		 spaces into _ to preserve them.
+    -->
+    <xsl:variable name="remainder" select="substring-after($dirs, ' ')"/>
+    <xsl:if test="$remainder">
+<xsl:text>../</xsl:text>
+      <xsl:call-template name="dotdots">
+        <xsl:with-param name="path" select="translate($remainder, ' ', '/')"/>
+<!-- Translate back to /'s because that's what the template expects. -->
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:template>
+<!--
+  Uncomment to test.
+  Usage: saxon dotdots.xsl dotdots.xsl path='/my/test/path'
+
+  <xsl:param name="path"/>
+  <xsl:template match="/">
+    <xsl:message>Path: <xsl:value-of select="$path"/></xsl:message>
+    <xsl:call-template name="dotdots">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:template>
+ -->
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/tabutils.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/tabutils.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/tabutils.xsl	(revision 0)
@@ -0,0 +1,98 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--
+Some callable templates useful when dealing with tab paths.  Mostly used in
+tab-to-menu.xsl
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:param name="site-file" select="'cocoon://abs-menulinks'"/>
+  <xsl:variable name="site" select="document($site-file)"/>
+<!-- Given the current path and a tabs.xml entry, returns a relative path to
+  the specified tab's URL.  When rendering a set of tabs, this template will be
+  called once per tab.
+  -->
+  <xsl:template name="calculate-tab-href">
+    <xsl:param name="dir_index" select="'index.html'"/>
+    <xsl:param name="tab"/>
+<!-- current 'tab' node -->
+    <xsl:param name="path" select="$path"/>
+    <xsl:if test="starts-with($tab/@href, 'http')">
+<!-- Absolute URL -->
+      <xsl:value-of select="$tab/@href"/>
+    </xsl:if>
+    <xsl:if test="not(starts-with($tab/@href, 'http'))">
+<!-- Root-relative path -->
+      <xsl:variable name="backpath">
+        <xsl:call-template name="dotdots">
+          <xsl:with-param name="path" select="$path"/>
+        </xsl:call-template>
+<xsl:text>/</xsl:text>
+        <xsl:value-of select="$tab/@dir | $tab/@href"/>
+<!-- If we obviously have a directory, add /index.html -->
+        <xsl:if test="$tab/@dir or substring($tab/@href, string-length($tab/@href),
+          string-length($tab/@href)) = '/'">
+<xsl:text>/</xsl:text>
+          <xsl:if test="$tab/@indexfile">
+            <xsl:value-of select="$tab/@indexfile"/>
+          </xsl:if>
+          <xsl:if test="not(@indexfile)">
+            <xsl:value-of select="$dir_index"/>
+          </xsl:if>
+        </xsl:if>
+      </xsl:variable>
+      <xsl:value-of
+        select="translate(normalize-space(translate($backpath, ' /', '/ ')), ' /', '/ ')"/>
+<!-- Link to backpath, normalizing slashes -->
+    </xsl:if>
+  </xsl:template>
+<!--
+    The id of any tab, whose path is a subset of the current URL.  Ie,
+    the path of the 'current' tab.
+  -->
+  <xsl:template name="matching-id" xmlns:l="http://apache.org/forrest/linkmap/1.0">
+    <xsl:value-of select="$site//*[starts-with(@href, $path)]/@tab"/>
+  </xsl:template>
+<!--
+    The longest path of any level 1 tab, whose path is a subset of the current URL.  Ie,
+    the path of the 'current' tab.
+  -->
+  <xsl:template name="longest-dir">
+    <xsl:param name="tabfile"/>
+    <xsl:for-each select="$tabfile/tabs/tab[starts-with($path, @dir|@href)]">
+      <xsl:sort select="string-length(@dir|@href)"
+        data-type="number" order="descending"/>
+      <xsl:if test="position()=1">
+        <xsl:value-of select="@dir|@href"/>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:template>
+<!--
+    The longest path of any level 2 tab, whose path is a subset of the current URL.  Ie,
+    the path of the 'current' tab.
+  -->
+  <xsl:template name="level2-longest-dir">
+    <xsl:param name="tabfile"/>
+    <xsl:for-each select="$tabfile/tabs/tab/tab[starts-with($path, @dir|@href)]">
+      <xsl:sort select="string-length(@dir|@href)"
+        data-type="number" order="descending"/>
+      <xsl:if test="position()=1">
+        <xsl:value-of select="@dir|@href"/>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skins/common/xslt/html/tab-to-menu.xsl
===================================================================
--- src/docs/cn/src/documentation/skins/common/xslt/html/tab-to-menu.xsl	(revision 0)
+++ src/docs/cn/src/documentation/skins/common/xslt/html/tab-to-menu.xsl	(revision 0)
@@ -0,0 +1,195 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!--
+This stylesheet generates 'tabs' at the top left of the screen.  Tabs are
+visual indicators that a certain subsection of the URI space is being browsed.
+For example, if we had tabs with paths:
+
+Tab1:  ''
+Tab2:  'community'
+Tab3:  'community/howto'
+Tab4:  'community/howto/xmlform/index.html'
+
+Then if the current path was 'community/howto/foo', Tab3 would be highlighted.
+The rule is: the tab with the longest path that forms a prefix of the current
+path is enabled.
+
+The output of this stylesheet is HTML of the form:
+    <div class="tab">
+      ...
+    </div>
+
+which is then merged by site-to-xhtml.xsl
+
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!-- ================================================================ -->
+<!-- These templates SHOULD be overridden                             -->
+<!-- ================================================================ -->
+<!-- Called before first level 1 tag -->
+  <xsl:template name="pre-separator"></xsl:template>
+<!-- Called after last level 1 tag -->
+  <xsl:template name="post-separator"></xsl:template>
+<!-- Called between level 1 tags -->
+  <xsl:template name="separator">
+<xsl:text> | </xsl:text>
+  </xsl:template>
+<!-- Called before first level 2 tag -->
+  <xsl:template name="level2-pre-separator"></xsl:template>
+<!-- Called after last level 2 tag -->
+  <xsl:template name="level2-post-separator"></xsl:template>
+<!-- Called between level 2 tags -->
+  <xsl:template name="level2-separator">
+<xsl:text> | </xsl:text>
+  </xsl:template>
+<!--
+  Note: sub-stylesheets can't do apply-imports here, because it would choose
+  the 'tags' template and infinitely recurse. Hence call-template used instead.
+  -->
+<!-- Display a selected level 1 tab node -->
+  <xsl:template name="selected">
+    <xsl:call-template name="base-selected"/>
+  </xsl:template>
+<!-- Display an unselected level 1 tab node -->
+  <xsl:template name="not-selected">
+    <xsl:call-template name="base-not-selected"/>
+  </xsl:template>
+<!-- Display a selected second level tab node -->
+  <xsl:template name="level2-selected">
+    <xsl:call-template name="base-selected"/>
+  </xsl:template>
+<!-- Display an unselected second level tab node -->
+  <xsl:template name="level2-not-selected">
+    <xsl:call-template name="base-not-selected"/>
+  </xsl:template>
+<!-- ================================================================ -->
+<!-- These templates CAN be overridden                             -->
+<!-- ================================================================ -->
+  <xsl:template match="tabs">
+    <div class="tab">
+      <xsl:call-template name="base-tabs"/>
+    </div>
+  </xsl:template>
+<!-- ================================================================ -->
+<!-- These templates SHOULD NOT be overridden                         -->
+<!-- ================================================================ -->
+  <xsl:param name="path"/>
+  <xsl:include href="dotdots.xsl"/>
+  <xsl:include href="tabutils.xsl"/>
+<!-- NOTE: Xalan has a bug (race condition?) where sometimes $root is only half-evaluated -->
+  <xsl:variable name="root">
+    <xsl:call-template name="dotdots">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
+<!--
+    The longest path of any level 1 tab, whose path is a subset of the current URL.  Ie,
+    the path of the 'current' level 1 tab.
+  -->
+  <xsl:variable name="longest-dir">
+    <xsl:call-template name="longest-dir">
+      <xsl:with-param name="tabfile" select="/"/>
+    </xsl:call-template>
+  </xsl:variable>
+<!--
+    The longest path of any level 2 tab, whose path is a subset of the current URL.  Ie,
+    the path of the 'current' level 2 tab.
+  -->
+  <xsl:variable name="level2-longest-dir">
+    <xsl:call-template name="level2-longest-dir">
+      <xsl:with-param name="tabfile" select="/"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="matching-id">
+    <xsl:call-template name="matching-id"/>
+  </xsl:variable>
+<!-- Called from tabs, after it has written the outer 'div class=tabs' and
+  any other HTML -->
+  <xsl:template name="base-tabs">
+    <xsl:call-template name="pre-separator"/>
+    <xsl:for-each select="tab">
+      <xsl:if test="position()!=1">
+        <xsl:call-template name="separator"/>
+      </xsl:if>
+      <xsl:apply-templates select="." mode="level1"/>
+    </xsl:for-each>
+    <xsl:call-template name="post-separator"/>
+  </xsl:template>
+<!-- Called from tabs, after it has written the outer 'div class=tabs' and
+  any other HTML -->
+  <xsl:template name="level2tabs">
+    <xsl:call-template name="level2-pre-separator"/>
+    <xsl:for-each select="tab[@dir=$longest-dir]/tab|tab[@href=$longest-dir]/tab|tab[tab/@id=$matching-id]/tab">
+      <xsl:if test="position()!=1">
+        <xsl:call-template name="level2-separator"/>
+      </xsl:if>
+      <xsl:apply-templates select="." mode="level2"/>
+    </xsl:for-each>
+    <xsl:call-template name="level2-post-separator"/>
+  </xsl:template>
+  <xsl:template match="tab" mode="level1">
+    <xsl:choose>
+      <xsl:when test="@id and @id = $matching-id">
+        <xsl:call-template name="selected"/>
+      </xsl:when>
+      <xsl:when test="not(@id) and @dir = $longest-dir or @href = $longest-dir">
+        <xsl:call-template name="selected"/>
+      </xsl:when>
+      <xsl:when test="tab[@id = $matching-id]">
+        <xsl:call-template name="selected"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="not-selected"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="tab" mode="level2">
+    <xsl:choose>
+      <xsl:when test="@id and @id = $matching-id">
+        <xsl:call-template name="level2-selected"/>
+      </xsl:when>
+      <xsl:when test="@dir = $level2-longest-dir">
+        <xsl:call-template name="level2-selected"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="level2-not-selected"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!-- Called from 'selected' -->
+  <xsl:template name="base-selected"><a class="selected">
+    <xsl:attribute name="href">
+      <xsl:call-template name="calculate-tab-href">
+        <xsl:with-param name="tab" select="."/>
+        <xsl:with-param name="path" select="$path"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:value-of select="@label"/></a>
+  </xsl:template>
+<!-- Called from 'not-selected' -->
+  <xsl:template name="base-not-selected"><a class="unselected">
+    <xsl:attribute name="href">
+      <xsl:call-template name="calculate-tab-href">
+        <xsl:with-param name="tab" select="."/>
+        <xsl:with-param name="path" select="$path"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:value-of select="@label"/></a>
+  </xsl:template>
+</xsl:stylesheet>
Index: src/docs/cn/src/documentation/skinconf.xml
===================================================================
--- src/docs/cn/src/documentation/skinconf.xml	(revision 0)
+++ src/docs/cn/src/documentation/skinconf.xml	(revision 0)
@@ -0,0 +1,345 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-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.
+-->
+
+<!--
+Skin configuration file. This file contains details of your project,
+which will be used to configure the chosen Forrest skin.
+-->
+
+<!DOCTYPE skinconfig PUBLIC "-//APACHE//DTD Skin Configuration V0.6-3//EN" "http://forrest.apache.org/dtd/skinconfig-v06-3.dtd">
+<skinconfig>
+  <!-- To enable lucene search add provider="lucene" (default is google).
+    Add box-location="alt" to move the search box to an alternate location
+    (if the skin supports it) and box-location="all" to show it in all
+    available locations on the page.  Remove the <search> element to show
+    no search box. @domain will enable sitesearch for the specific domain with google.
+    In other words google will search the @domain for the query string.
+
+  -->
+  <search name="Lucene" domain="hadoop.apache.org" provider="google"/>
+
+  <!-- Disable the print link? If enabled, invalid HTML 4.0.1 -->
+  <disable-print-link>true</disable-print-link>  
+  <!-- Disable the PDF link? -->
+  <disable-pdf-link>false</disable-pdf-link>
+  <!-- Disable the POD link? -->
+  <disable-pod-link>true</disable-pod-link>
+  <!-- Disable the Text link? FIXME: NOT YET IMPLEMENETED. -->
+  <disable-txt-link>true</disable-txt-link>
+  <!-- Disable the xml source link? -->
+  <!-- The xml source link makes it possible to access the xml rendition
+    of the source frim the html page, and to have it generated statically.
+    This can be used to enable other sites and services to reuse the
+    xml format for their uses. Keep this disabled if you don't want other
+    sites to easily reuse your pages.-->
+  <disable-xml-link>true</disable-xml-link>
+
+  <!-- Disable navigation icons on all external links? -->
+  <disable-external-link-image>true</disable-external-link-image>
+
+  <!-- Disable w3c compliance links? 
+    Use e.g. align="center" to move the compliance links logos to 
+    an alternate location default is left.
+    (if the skin supports it) -->
+  <disable-compliance-links>true</disable-compliance-links>
+
+  <!-- Render mailto: links unrecognisable by spam harvesters? -->
+  <obfuscate-mail-links>false</obfuscate-mail-links>
+
+  <!-- Disable the javascript facility to change the font size -->
+  <disable-font-script>true</disable-font-script>
+
+  <!-- project logo -->
+  <project-name>Hadoop</project-name>
+  <project-description>Scalable Computing Platform</project-description>
+  <project-url>http://hadoop.apache.org/core/</project-url>
+  <project-logo>images/core-logo.gif</project-logo>
+
+  <!-- group logo -->
+  <group-name>Hadoop</group-name>
+  <group-description>Apache Hadoop</group-description>
+  <group-url>http://hadoop.apache.org/</group-url>
+  <group-logo>images/hadoop-logo.jpg</group-logo>
+
+  <!-- optional host logo (e.g. sourceforge logo)
+       default skin: renders it at the bottom-left corner -->
+  <host-url></host-url>
+  <host-logo></host-logo>
+
+  <!-- relative url of a favicon file, normally favicon.ico -->
+  <favicon-url>images/favicon.ico</favicon-url>
+
+  <!-- The following are used to construct a copyright statement -->
+  <year>2007</year>
+  <vendor>The Apache Software Foundation.</vendor>
+  <copyright-link>http://www.apache.org/licenses/</copyright-link>
+
+  <!-- Some skins use this to form a 'breadcrumb trail' of links.
+    Use location="alt" to move the trail to an alternate location
+    (if the skin supports it).
+	  Omit the location attribute to display the trail in the default location.
+	  Use location="none" to not display the trail (if the skin supports it).
+    For some skins just set the attributes to blank.
+  -->
+  <trail>
+    <link1 name="Apache" href="http://www.apache.org/"/>
+    <link2 name="Hadoop" href="http://hadoop.apache.org/"/>
+    <link3 name="Core" href="http://hadoop.apache.org/core/"/>
+  </trail>
+
+  <!-- Configure the TOC, i.e. the Table of Contents.
+  @max-depth
+   how many "section" levels need to be included in the
+   generated Table of Contents (TOC). 
+  @min-sections
+   Minimum required to create a TOC.
+  @location ("page","menu","page,menu", "none")
+   Where to show the TOC.
+  -->
+  <toc max-depth="2" min-sections="1" location="page"/>
+
+  <!-- Heading types can be clean|underlined|boxed  -->
+  <headings type="clean"/>
+  
+  <!-- The optional feedback element will be used to construct a
+    feedback link in the footer with the page pathname appended:
+    <a href="@href">{@to}</a>
+  <feedback to="webmaster@foo.com"
+    href="mailto:webmaster@foo.com?subject=Feedback&#160;" >
+    Send feedback about the website to:
+  </feedback>
+    -->
+  <!--
+    extra-css - here you can define custom css-elements that are 
+    a. overriding the fallback elements or 
+    b. adding the css definition from new elements that you may have 
+       used in your documentation.
+    -->
+  <extra-css>
+    <!--Example of b. 
+        To define the css definition of a new element that you may have used
+        in the class attribute of a <p> node. 
+        e.g. <p class="quote"/>
+    -->
+    p.quote {
+      margin-left: 2em;
+      padding: .5em;
+      background-color: #f0f0f0;
+      font-family: monospace;
+    }
+  </extra-css>
+
+  <colors>
+  <!-- These values are used for the generated CSS files. -->
+
+  <!-- Krysalis -->
+<!--
+    <color name="header"    value="#FFFFFF"/>
+
+    <color name="tab-selected" value="#a5b6c6" link="#000000" vlink="#000000" hlink="#000000"/>
+    <color name="tab-unselected" value="#F7F7F7"  link="#000000" vlink="#000000" hlink="#000000"/>
+    <color name="subtab-selected" value="#a5b6c6"  link="#000000" vlink="#000000" hlink="#000000"/>
+    <color name="subtab-unselected" value="#a5b6c6"  link="#000000" vlink="#000000" hlink="#000000"/>
+
+    <color name="heading" value="#a5b6c6"/>
+    <color name="subheading" value="#CFDCED"/>
+        
+    <color name="navstrip" value="#CFDCED" font="#000000" link="#000000" vlink="#000000" hlink="#000000"/>
+    <color name="toolbox" value="#a5b6c6"/>
+    <color name="border" value="#a5b6c6"/>
+        
+    <color name="menu" value="#F7F7F7" link="#000000" vlink="#000000" hlink="#000000"/>    
+    <color name="dialog" value="#F7F7F7"/>
+            
+    <color name="body"    value="#ffffff" link="#0F3660" vlink="#009999" hlink="#000066"/>
+    
+    <color name="table" value="#a5b6c6"/>    
+    <color name="table-cell" value="#ffffff"/>    
+    <color name="highlight" value="#ffff00"/>
+    <color name="fixme" value="#cc6600"/>
+    <color name="note" value="#006699"/>
+    <color name="warning" value="#990000"/>
+    <color name="code" value="#a5b6c6"/>
+        
+    <color name="footer" value="#a5b6c6"/>
+-->
+  
+  <!-- Forrest -->
+<!--
+    <color name="header"    value="#294563"/>
+
+    <color name="tab-selected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="tab-unselected" value="#b5c7e7" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="subtab-selected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="subtab-unselected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+
+    <color name="heading" value="#294563"/>
+    <color name="subheading" value="#4a6d8c"/>
+        
+    <color name="navstrip" value="#cedfef" font="#0F3660" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="toolbox" value="#4a6d8c"/>
+    <color name="border" value="#294563"/>
+    
+    <color name="menu" value="#4a6d8c" font="#cedfef" link="#ffffff" vlink="#ffffff" hlink="#ffcf00"/>    
+    <color name="dialog" value="#4a6d8c"/>
+            
+    <color name="body" value="#ffffff"  link="#0F3660" vlink="#009999" hlink="#000066"/>
+    
+    <color name="table" value="#7099C5"/>    
+    <color name="table-cell" value="#f0f0ff"/>    
+    <color name="highlight" value="#ffff00"/>
+    <color name="fixme" value="#cc6600"/>
+    <color name="note" value="#006699"/>
+    <color name="warning" value="#990000"/>
+    <color name="code" value="#CFDCED"/>
+        
+    <color name="footer" value="#cedfef"/>
+-->
+
+  <!-- Collabnet --> 
+<!--
+    <color name="header"    value="#003366"/>
+
+    <color name="tab-selected" value="#dddddd" link="#555555" vlink="#555555" hlink="#555555"/>
+    <color name="tab-unselected" value="#999999" link="#ffffff" vlink="#ffffff" hlink="#ffffff"/>
+    <color name="subtab-selected" value="#cccccc" link="#000000" vlink="#000000" hlink="#000000"/>
+    <color name="subtab-unselected" value="#cccccc" link="#555555" vlink="#555555" hlink="#555555"/>
+
+    <color name="heading" value="#003366"/>
+    <color name="subheading" value="#888888"/>
+    
+    <color name="navstrip" value="#dddddd" font="#555555"/>
+    <color name="toolbox" value="#dddddd" font="#555555"/>
+    <color name="border" value="#999999"/>
+    
+    <color name="menu" value="#ffffff"/>    
+    <color name="dialog" value="#eeeeee"/>
+            
+    <color name="body"      value="#ffffff"/>
+    
+    <color name="table" value="#ccc"/>    
+    <color name="table-cell" value="#ffffff"/>   
+    <color name="highlight" value="#ffff00"/>
+    <color name="fixme" value="#cc6600"/>
+    <color name="note" value="#006699"/>
+    <color name="warning" value="#990000"/>
+    <color name="code" value="#003366"/>
+        
+    <color name="footer" value="#ffffff"/>
+-->
+ <!-- Lenya using pelt-->
+<!--
+    <color name="header" value="#ffffff"/>
+
+    <color name="tab-selected" value="#4C6C8F" link="#ffffff" vlink="#ffffff" hlink="#ffffff"/>
+    <color name="tab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
+    <color name="subtab-selected" value="#000000" link="#000000" vlink="#000000" hlink="#000000"/>
+    <color name="subtab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
+
+    <color name="heading" value="#E5E4D9"/>
+    <color name="subheading" value="#000000"/>
+    <color name="published" value="#4C6C8F" font="#FFFFFF"/>
+    <color name="feedback" value="#4C6C8F" font="#FFFFFF" align="center"/>
+    <color name="navstrip" value="#E5E4D9" font="#000000"/>
+
+    <color name="toolbox" value="#CFDCED" font="#000000"/>
+
+    <color name="border" value="#999999"/>
+    <color name="menu" value="#4C6C8F" font="#ffffff" link="#ffffff" vlink="#ffffff" hlink="#ffffff" current="#FFCC33" />    
+    <color name="menuheading" value="#cfdced" font="#000000" />
+    <color name="searchbox" value="#E5E4D9" font="#000000"/>
+    
+    <color name="dialog" value="#CFDCED"/>
+    <color name="body" value="#ffffff" />            
+    
+    <color name="table" value="#ccc"/>    
+    <color name="table-cell" value="#ffffff"/>   
+    <color name="highlight" value="#ffff00"/>
+    <color name="fixme" value="#cc6600"/>
+    <color name="note" value="#006699"/>
+    <color name="warning" value="#990000"/>
+    <color name="code" value="#003366"/>
+        
+    <color name="footer" value="#E5E4D9"/>
+-->
+  </colors>
+ 
+  <!-- Settings specific to PDF output. -->
+  <pdf>
+    <!-- 
+       Supported page sizes are a0, a1, a2, a3, a4, a5, executive,
+       folio, legal, ledger, letter, quarto, tabloid (default letter).
+       Supported page orientations are portrait, landscape (default
+       portrait).
+       Supported text alignments are left, right, justify (default left).
+    -->
+    <page size="letter" orientation="portrait" text-align="left"/>
+
+    <!--
+       Margins can be specified for top, bottom, inner, and outer
+       edges. If double-sided="false", the inner edge is always left
+       and the outer is always right. If double-sided="true", the
+       inner edge will be left on odd pages, right on even pages,
+       the outer edge vice versa.
+       Specified below are the default settings.
+    -->
+    <margins double-sided="false">
+      <top>1in</top>
+      <bottom>1in</bottom>
+      <inner>1.25in</inner>
+      <outer>1in</outer>
+    </margins>
+
+    <!--
+      Print the URL text next to all links going outside the file
+    -->
+    <show-external-urls>false</show-external-urls>
+
+    <!--
+      Disable the copyright footer on each page of the PDF.
+      A footer is composed for each page. By default, a "credit" with role=pdf
+      will be used, as explained below. Otherwise a copyright statement
+      will be generated. This latter can be disabled.
+    -->
+    <disable-copyright-footer>false</disable-copyright-footer>
+  </pdf>
+
+  <!-- Credits are typically rendered as a set of small clickable
+    images in the page footer.
+    Use box-location="alt" to move the credit to an alternate location
+    (if the skin supports it). 
+  -->
+  <credits>
+    <credit box-location="alt">
+      <name>Built with Apache Forrest</name>
+      <url>http://forrest.apache.org/</url>
+      <image>images/built-with-forrest-button.png</image>
+      <width>88</width>
+      <height>31</height>
+    </credit>
+    <!-- A credit with @role="pdf" will be used to compose a footer
+     for each page in the PDF, using either "name" or "url" or both.
+    -->
+    <!--
+    <credit role="pdf">
+      <name>Built with Apache Forrest</name>
+      <url>http://forrest.apache.org/</url>
+    </credit>
+    -->
+  </credits>
+
+</skinconfig>
Index: src/docs/cn/src/documentation/resources/images/hdfsarchitecture.odg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/hdfsarchitecture.odg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/hdfsdatanodes.odg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/hdfsdatanodes.odg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/hadoop-logo-big.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/hadoop-logo-big.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/architecture.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/architecture.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/hadoop-logo.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/hadoop-logo.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/core-logo.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/core-logo.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/hdfsarchitecture.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/hdfsarchitecture.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/hdfsdatanodes.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/hdfsdatanodes.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/hdfsarchitecture.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/hdfsarchitecture.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/hdfsdatanodes.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/hdfsdatanodes.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/resources/images/favicon.ico
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/docs/cn/src/documentation/resources/images/favicon.ico
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: src/docs/cn/src/documentation/content/xdocs/native_libraries.xml
===================================================================
--- src/docs/cn/src/documentation/content/xdocs/native_libraries.xml	(revision 0)
+++ src/docs/cn/src/documentation/content/xdocs/native_libraries.xml	(revision 0)
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2002-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.
+-->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+  
+  <header>
+    <title>Hadoop本地库</title>
+  </header>
+  
+  <body>
+  
+    <section>
+      <title>目的</title>
+      
+      <p>
+     鉴于性能问题以及某些Java类库的缺失，对于某些组件，Hadoop提供了自己的本地实现。
+	这些组件保存在Hadoop的一个独立的动态链接的库里。这个库在*nix平台上叫<em>libhadoop.so</em>. 本文主要介绍本地库的使用方法以及如何构建本地库。
+</p>
+    </section>
+    
+    <section>
+      <title>组件</title>
+      
+      <p>Hadoop现在已经有以下
+      <a href="ext:api/org/apache/hadoop/io/compress/compressioncodec">
+      compression codecs</a>本地组件：</p>
+      <ul>
+        <li><a href="ext:zlib">zlib</a></li>
+        <li><a href="ext:gzip">gzip</a></li>
+        <li><a href="ext:lzo">lzo</a></li>
+      </ul>
+      
+      <p>在以上组件中，lzo和gzip压缩编解码器必须使用hadoop本地库才能运行。
+      </p>
+    </section>
+
+    <section>
+      <title>使用方法</title>
+      
+      <p>hadoop本地库的用法很简单：</p>
+
+      <ul>
+        <li>
+          看一下
+	<a href="#支持的平台">支持的平台</a>.
+        </li>
+        <li>
+           <a href="ext:releases/download">下载</a> 预构建的32位i386架构的Linux本地hadoop库（可以在hadoop发行版的<code>lib/native</code>目录下找到）或者自己
+          <a href="#构建Hadoop本地库">构建</a> 这些库。
+        </li>
+        <li>
+          确保你的平台已经安装了<strong>zlib-1.2</strong>以上版本或者<strong>lzo2.0</strong>以上版本的软件包或者两者均已安装（根据你的需要）。
+        </li>
+      </ul>
+      
+      <p><code>bin/hadoop</code> 脚本通过系统属性
+      <em>-Djava.library.path=&lt;path&gt;</em>来确认hadoop本地库是否包含在库路径里。</p>
+
+      <p>检查hadoop日志文件可以查看hadoop库是否正常，正常情况下会看到：</p>
+      
+      <p>
+        <code>
+          DEBUG util.NativeCodeLoader - Trying to load the custom-built 
+          native-hadoop library... 
+        </code><br/>
+        <code>
+          INFO  util.NativeCodeLoader - Loaded the native-hadoop library
+        </code>
+      </p>
+
+      <p>如果出错，会看到：</p>
+      <p>
+        <code>
+          INFO util.NativeCodeLoader - Unable to load native-hadoop library for 
+          your platform... using builtin-java classes where applicable
+        </code>
+      </p>
+    </section>
+    
+    <section>
+      <title>支持的平台</title>
+      
+      <p>Hadoop本地库只支持*nix平台，已经广泛使用在GNU/Linux平台上，但是不支持
+      <a href="ext:cygwin">Cygwin</a> 
+      和 <a href="ext:osx">Mac OS X</a>。 
+      </p>
+
+      <p>已经测试过的GNU/Linux发行版本：</p>
+      <ul>
+        <li>
+          <a href="http://www.redhat.com/rhel/">RHEL4</a>/<a href="http://fedora.redhat.com/">Fedora</a>
+        </li>
+        <li><a href="http://www.ubuntu.com/">Ubuntu</a></li>
+        <li><a href="http://www.gentoo.org/">Gentoo</a></li>
+      </ul>
+
+      <p>在上述平台上，32/64位Hadoop本地库分别能和32/64位的jvm一起正常运行。
+      </p>
+    </section>
+    
+    <section>
+      <title>构建Hadoop本地库</title>
+      
+      <p>Hadoop本地库使用
+      <a href="http://en.wikipedia.org/wiki/ANSI_C">ANSI C</a> 编写，使用GNU autotools工具链 (autoconf, autoheader, automake, autoscan, libtool)构建。也就是说构建hadoop库的平台需要有标准C的编译器和GNU autotools工具链。请参看
+      <a href="#支持的平台">支持的平台</a>。</p>
+
+      <p>你的目标平台上可能会需要的软件包：
+      </p>
+      <ul>
+        <li>
+          C 编译器 (e.g. <a href="http://gcc.gnu.org/">GNU C Compiler</a>)
+        </li>
+        <li>
+          GNU Autools 工具链: 
+          <a href="http://www.gnu.org/software/autoconf/">autoconf</a>, 
+          <a href="http://www.gnu.org/software/automake/">automake</a>, 
+          <a href="http://www.gnu.org/software/libtool/">libtool</a>
+        </li>
+        <li> 
+          zlib开发包 (stable version >= 1.2.0)
+        </li>
+        <li> 
+          lzo开发包 (stable version >= 2.0)
+        </li> 
+      </ul>
+
+      <p>如果已经满足了上述先决条件，可以使用<code>build.xml</code> 
+      文件，并把其中的<code>compile.native</code>置为 
+      <code>true</code>，这样就可以生成hadoop本地库：</p>
+
+      <p><code>$ ant -Dcompile.native=true &lt;target&gt;</code></p>
+
+      <p>因为不是所有用户都需要Hadoop本地库，所以默认情况下hadoop不生成该库。
+      </p>
+
+      <p>你可以在下面的路径查看新生成的hadoop本地库：</p>
+
+      <p><code>$ build/native/&lt;platform&gt;/lib</code></p>
+
+      <p>其中&lt;platform&gt;是下列系统属性的组合 
+      <code>${os.name}-${os.arch}-${sun.arch.data.model}</code>；例如 
+      Linux-i386-32。</p>
+
+      <section>
+        <title>注意</title>
+        
+        <ul>
+          <li>
+            在生成hadoop本地库的目标平台上<strong>必须</strong> 安装了zlib和lzo开发包；但是如果你只希望使用其中一个的话，在部署时，安装其中任何一个都是足够的。
+          </li>
+          <li>
+		  在目标平台上生成以及部署hadoop本地库时，都需要根据32/64位jvm选取对应的32/64位zlib/lzo软件包。
+          </li>
+        </ul>
+      </section>
+    </section>
+  </body>
+  
+</document>
Index: src/docs/cn/src/documentation/content/xdocs/hod_user_guide.xml
===================================================================
--- src/docs/cn/src/documentation/content/xdocs/hod_user_guide.xml	(revision 0)
+++ src/docs/cn/src/documentation/content/xdocs/hod_user_guide.xml	(revision 0)
@@ -0,0 +1,521 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+          "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+  <header>
+    <title>
+      Hadoop On Demand用户指南
+    </title>
+  </header>
+
+<body>
+  <section>
+    <title>简介</title><anchor id="Introduction"></anchor>
+  <p>Hadoop On Demand (HOD)是一个能在大规模物理集群上供应虚拟Hadoop集群的系统。它使用Torque资源管理器进行节点分配。在所分配的节点上，它能启动Hadoop Map/Reduce以及HDFS守护进程。它能自动为Hadoop守护进程及客户端生成合适的配置文件(Hadoop-site.xml)。HOD还能够将Hadoop分发到它分配的虚拟集群节点上。总之，HOD方便管理者和用户快速安装与使用Hadoop。它也是需要在同一物理集群上测试各自版本的Hadoop开发者和测试者的实用工具。</p>
+  <p>HOD支持Hadoop 0.15及其后续版本。</p>
+  <p>后面的文档包括一个快速入门指南能让你快速上手HOD，一个所有HOD特性的详细手册，命令行选项，一些已知问题和故障排除的信息。</p>
+  </section>
+  <section>
+          <title>HOD使用入门</title><anchor id="Getting_Started_Using_HOD_0_4"></anchor>
+
+<p>在这部分，我们将会逐步骤地介绍使用HOD涉及到的最基本的操作。在开始遵循这些步骤之前，我们假定HOD及其依赖的软硬件均已被正确安装和配置。这步通常由集群的系统管理员负责。</p>
+  <p>HOD的用户界面是一个命令行工具，叫做<code>hod</code>。它被一个通常由系统管理员为用户设置好的配置文件所驱动。用户在使用<code>hod</code>的时候可以覆盖这个配置，文档的后面会由介绍。使用<code>hod</code>时有如下两种方式可以指定配置文件：</p>
+  <ul>
+    <li>在命令行中指定，使用 -c 选项。例如<code>hod &lt;operation&gt; &lt;required-args&gt; -c path-to-the-configuration-file [ohter-options]</code></li>
+    <li>在运行<code>hod</code>的地方设置环境变量<em>HOD_CONF_DIR</em>。这个变量应指向指向一个本地目录，其中有名为<em>hodrc</em>的文件。这与Hadoop中的<em>HADOOP_CONF_DIR</em>与<em>hadoop-site.xml</em>文件是类似的。如果命令行中未指定配置文件，<code>hod</code>会查找<em>HOD_CONF_DIR</em>环境变量指定目录下的<em>hodrc</em>文件。</li>
+    </ul>
+  <p>下面的例子中，我们将不会明确指出这个配置选项，假定其已正确指定。</p>
+  <section><title>一个典型HOD会话</title><anchor id="HOD_Session"></anchor>
+  <p>一个典型HOD会话至少包括三个步骤：分配，执行Hadoop作业，回收。为此，执行如下步骤。</p>
+  <p><strong>创建一个集群目录</strong></p><anchor id="Create_a_Cluster_Directory"></anchor>
+  <p><em>集群目录</em>是本地文件系统上的一个目录，<code>hod</code>会依据它分配的集群产生出Hadoop配置，<em>hadoop-site.xml</em>，放在这个目录下。创建这个目录，并按下文所述方式传递给<code>hod</code>操作。一但分配好了集群，用户可通过Hadoop --config选项指定集群目录，在之上运行Hadoop作业。</p>
+  <p><strong><em>allocate</em>操作</strong></p><anchor id="Operation_allocate"></anchor>
+  <p><em>allocate</em>操作用来分配一组节点并在之上安装和提供Hadoop。它的语法如下。注意它要求指定参数集群目录（-d, --hod.clusterdir）和节点个数（-n, --hod.nodecount）：</p>
+    <table>
+      
+        <tr>
+          <td><code>$ hod allocate -d cluster_dir -n number_of_nodes [OPTIONS]</code></td>
+        </tr>
+      
+    </table>
+  <p>如果命令成功执行，<code>cluster_dir/hadoop-site.xml</code>会被生成，文件中包含了分配出的集群的信息。它也会打印出关于Hadoop的web UI的信息。</p>
+  <p>试运行这个命令会产生如下输出。注意在这个例子中集群目录是<code>~/hod-clusters/test</code>，我们要分配5个节点：</p>
+  <table>
+    <tr>
+      <td><code>$ hod allocate -d ~/hod-clusters/test -n 5</code><br/>
+      <code>INFO - HDFS UI on http://foo1.bar.com:53422</code><br/>
+      <code>INFO - Mapred UI on http://foo2.bar.com:55380</code><br/></td>
+      </tr>
+   </table>
+
+  <p><strong>在分配的集群上执行Hadoop作业</strong></p><anchor id="Running_Hadoop_jobs_using_the_al"></anchor>
+  <p>现在，可以用一般的方式在分配的集群上执行Hadoop作业了。这是假定像<em>JAVA_HOME</em>，指向Hadoop安装的路径已被正确地设置了：</p>
+    <table>
+      
+        <tr>
+          <td><code>$ hadoop --config cluster_dir hadoop_command hadoop_command_args</code></td>
+        </tr>
+      
+    </table>
+  <p>或者</p>
+    <table>
+      
+        <tr>
+          <td><code>$ export HADOOP_CONF_DIR=cluster_dir</code> <br />
+              <code>$ hadoop hadoop_command hadoop_command_args</code></td>
+        </tr>
+      
+    </table>
+  <p>继续我们的例子，下面的命令会在分配的集群上运行wordcount的例子：</p>
+  <table><tr><td><code>$ hadoop --config ~/hod-clusters/test jar /path/to/hadoop/hadoop-examples.jar wordcount /path/to/input /path/to/output</code></td></tr></table>
+  <p>或者</p>
+  <table><tr>
+    <td><code>$ export HADOOP_CONF_DIR=~/hod-clusters/test</code><br />
+    <code>$ hadoop jar /path/to/hadoop/hadoop-examples.jar wordcount /path/to/input /path/to/output</code></td>
+    </tr>
+  </table>
+  <p><strong> <em>deallocate</em>操作</strong></p><anchor id="Operation_deallocate"></anchor>
+  <p><em>deallocate</em>操作用来回收分配到的集群。当完成集群使用之后，必须执行回收操作使这些节点可以为其他用户所用。<em>deallocate</em>操作的语法如下。注意它需要集群目录（-d, --hod.clusterdir）作为参数：</p>
+    <table>
+      
+        <tr>
+          <td><code>$ hod deallocate -d cluster_dir</code></td>
+        </tr>
+      
+    </table>
+  <p>继续我们的例子，如下命令会回收集群：</p>
+  <table><tr><td><code>$ hod deallocate -d ~/hod-clusters/test</code></td></tr></table>
+  <p>如你所见，HOD允许用户分配一个集群，随意的使用它来运行Hadoop作业。例如，通过从多个shell中启动使用同一个配置的hadoop，用户可以做到在同一个集群上并发运行多个作业。</p>
+	</section>
+  <section><title>使用HOD运行Hadoop脚本</title><anchor id="HOD_Script_Mode"></anchor>
+  <p>HOD的<em>script操作</em>能将集群的分配，使用和回收组织在一起。这对那些想运行Hadoop作业脚本，期望HOD能在脚本结束后自动完成清理操作的用户特别管用。用<code>hod</code>执行Hadoop脚本，需要这么做：</p>
+  <p><strong>创建脚本文件</strong></p><anchor id="Create_a_script_file"></anchor>
+  <p>这是一个普通的shell脚本，通常里面会包含hadoop命令，如：</p>
+  <table><tr><td><code>$ hadoop jar jar_file options</code></td>
+  </tr></table>
+  <p>当然，用户可以向脚本中添加任何有效的命令。HOD会在执行这个脚本时自动地将<em>HADOOP_CONF_DIR</em>设置为指向分配的集群。对比用户不必担心。不过像分配操作时一样，用户需要创建一个集群目录。</p>
+  <p><strong>运行脚本</strong></p><anchor id="Running_the_script"></anchor>
+  <p><em>脚本操作</em>的语法如下。注意它需要集群目录（-d, --hod.clusterdir），节点个数（-n, --hod.nodecount）以及脚本文件（-s, --hod.script）作为参数：</p>
+    <table>
+      
+        <tr>
+          <td><code>$ hod script -d cluster_directory -n number_of_nodes -s script_file</code></td>
+        </tr>
+      
+    </table>
+  <p>注意一但脚本执行完毕，HOD就会回收集群，这意味着脚本必须要做到等hadoop作业完成后脚本才结束。用户写脚本时必须注意这点。</p>
+   </section>
+  </section>
+  <section>
+          <title>HOD的功能</title><anchor id="HOD_0_4_Features"></anchor>
+  <section><title>供应与管理Hadoop集群</title><anchor id="Provisioning_and_Managing_Hadoop"></anchor>
+	  <p>HOD主要功能是供应Hadoop的Map/Reduce和HDFS集群。这些在见入门一节已经做过描述。 此外，要是还有节点可用，并且组织上也批准，一个用户可以在同一时间内使用HOD分配多个Map/Reduce集群。对于分配到的不同集群，用户需要为上面提到的<code>cluster_dir</code>参数指定不同的路径。HOD提供<em>list</em>和<em>info</em>操作可以管理多个集群。</p>
+  <p><strong><em>list</em>操作</strong></p><anchor id="Operation_list"></anchor>
+  <p>list操作能列举到目前为止用户所创建的所有集群。存放hadoop-site.xml的集群目录，与JobTracker和／或HDFS的连接及状态也会被显示出来。list操作的使用语法如下：</p>
+    <table>
+      
+        <tr>
+          <td><code>$ hod list</code></td>
+        </tr>
+      
+    </table>
+  <p><strong><em>info</em>操作</strong></p><anchor id="Operation_info"></anchor>
+  <p>info操作会显示指定集群相关的信息。这些信息包括Torque作业id，HOD Ringmaster进程，Hadoop的JobTracker和NameNode守护进程等重要守护进程的位置。info操作的语法如下。注意它需要集群目录（-d, --hod.clusterdir）作为参数：</p>
+    <table>
+      
+        <tr>
+          <td><code>$ hod info -d cluster_dir</code></td>
+        </tr>
+      
+    </table>
+  <p><code>cluster_dir</code>应为前面<em>allocate</em>操作中指定的有效集群目录。</p>
+  </section>
+  <section><title>使用tarball分发Hadoop</title><anchor id="Using_a_tarball_to_distribute_Ha"></anchor>
+<p>供应Hadoop时，HOD可以使用集群节点上已经安装好的Hadoop，也可以将hadoop的tarball作为供应操作的一部分在节点上进行分发和安装。如果使用tarball选项，就不必非得使用预装的Hadoop了，也不要求集群节点上必须有一个预装的版本。这对开发／QE环境下在一个共享集群上测试不同版本hadoop的开发者尤其有用。</p>
+  <p>要使用预装的Hadoop，你必须在hodrc中的<code>gridservice-hdfs</code>部分和<code>gridservice-mapred</code>部分指定<code>pkgs</code>选项。它必须指向集群中所有节点上Hadoop的安装路径。</p>
+  <p>指定Tarball的语法如下：</p>
+    <table>
+        <tr>
+          <td><code>$ hod allocate -d cluster_dir -n number_of_nodes -t hadoop_tarball_location</code></td>
+        </tr>
+    </table>
+  <p>例如，下面的命令根据tarball<code>~/share/hadoop.tar.gz</code>分配Hadoop：</p>
+  <table><tr><td><code>$ hod allocate -d ~/hadoop-cluster -n 10 -t ~/share/hadoop.tar.gz</code></td></tr></table>
+  <p>类似地，使用hod脚本的语法如下：</p>
+    <table>
+        <tr>
+          <td><code>$ hod script -d cluster_directory -s scritp_file -n number_of_nodes -t hadoop_tarball_location</code></td>
+        </tr>
+    </table>
+  <p>上面语法中指定的hadoop_tarball_location应指向从所有计算节点都可以访问的共享文件系统的路径。当前，HOD只支持挂载的NFS。</p>
+  <p><em>注意：</em></p>
+  <ul>
+    <li>为了获得更好分发性能，建议Hadoop tarball只包含库与二进制文件，不包含源代码或文档。</li>
+    <li>当你希望在用tarball方式分配的集群上执行作业，你必须使用兼容的Hadoop版本提交你的作业。最好的方式是解压，使用Tarball中的版本。</li>
+  </ul>
+  </section>
+  <section><title>使用外部HDFS</title><anchor id="Using_an_external_HDFS"></anchor>
+  <p>在典型的由HOD提供的Hadoop集群中，HDFS已经被静态地（未使用HOD）设置好。这能使数据在HOD提供的集群被回收后还可以持久保存在HDFS中。为使用静态配置的HDFS，你的hodrc必须指向一个外部HDFS。具体就是，在hodrc的<code>gridservice-hdfs</code>部分将下面选项设置为正确的值：</p>
+   <table><tr><td>external = true</td></tr><tr><td>host = HDFS NameNode主机名</td></tr><tr><td>fs_port = HDFS NameNode端口</td></tr><tr><td>info_port = HDFS NameNode web UI的端口</td></tr></table>
+  <p><em>注意：</em>你也可以从命令行开启这个选项。即，你这样去使用一个静态HDFS：<br />
+    </p>
+    <table>
+        <tr>
+          <td><code>$ hod allocate -d cluster_dir -n number_of_nodes --gridservice-hdfs.external</code></td>
+        </tr>
+    </table>
+    <p>如果需要，HOD即可以供应HDFS集群也可以供应Map/Reduce的集群HOD。这需要设置hodrc中的<code>gridservice-hdfs</code>部分的下列选项：</p>
+  <table><tr><td>external = false</td></tr></table>
+  </section>
+  <section><title>配置Hadoop的选项</title><anchor id="Options_for_Configuring_Hadoop"></anchor>
+  <p>HOD提供一个非常方便的机制能配置它提供的Hadoop守护进程和它在客户端生成的hadoop-site.xml。通过在HOD配置文件中指定配置参数，或在分配集群时在命令行指定都可做到这点。</p>
+  <p><strong>配置Hadoop守护进程</strong></p><anchor id="Configuring_Hadoop_Daemons"></anchor>
+  <p>要配置Hadoop守护进程，你可以这么做：</p>
+  <p>对于Map/Reduce，指定<code>gridservice-mapred</code>部分的<code>server-params</code>项的指为一个以逗号分割的key-value对列表。同配置动态HDFS集群一样，设置<code>gridservice-hdfs</code>部分的<code>server-params</code>项。如果这些参数应被标记成<em>final</em>，将这些参数包含到相应部分的<code>final-server-params</code>项中。</p>
+  <p>例如：</p>
+  <table><tr><td><code>server-params = mapred.reduce.parallel.copies=20,io.sort.factor=100,io.sort.mb=128,io.file.buffer.size=131072</code></td></tr><tr><td><code>final-server-params = mapred.child.java.opts=-Xmx512m,dfs.block.size=134217728,fs.inmemory.size.mb=128</code></td>
+  </tr></table>
+  <p>要从命令行指定选项，你可以用如下语法：</p>
+  <p>配置Map/Reduce守护进程：</p>
+    <table>
+        <tr>
+          <td><code>$ hod allocate -d cluster_dir -n number_of_nodes -Mmapred.reduce.parallel.copies=20 -Mio.sort.factor=100</code></td>
+        </tr>
+    </table>
+  <p>在上述例子中，<em>mapred.reduce.parallel.copies</em>参数和<em>io.sort.factor</em>参数将会被添加到<code>server-params</code>中，如果已经在<code>server-params</code>中存在，则它们会被覆盖。要将这些参数指定成<em>final</em>类型，你可以：</p>
+    <table>
+        <tr>
+          <td><code>$ hod allocate -d cluster_dir -n number_of_nodes -Fmapred.reduce.parallel.copies=20 -Fio.sort.factor=100</code></td>
+        </tr>
+    </table>
+  <p>不过，应注意final参数无法被命令行改写的，只有在未指定的情形才能追加。</p>
+  <p>配置动态供应的HDFS守护进程的选项与此相似。用-H替换-M以，用-S替换-F即可。</p>
+  <p><strong>配置Hadoop的作业提交（客户端）程序</strong></p><anchor id="Configuring_Hadoop_Job_Submissio"></anchor>
+  <p>如上所述，当allocate操作成功后，<code>cluster_dir/hadoop-site.xml</code>将会生成，其中会包含分配的集群的JobTracker和NameNode的信息。这个配置用于向集群提交作业。HOD提供选项可将其它的hadoop配置参数添加到该文件，其语法如下：</p>
+    <table>
+        <tr>
+          <td><code>$ hod allocate -d cluster_dir -n number_of_nodes -Cmapred.userlog.limit.kb=200 -Cmapred.child.java.opts=-Xmx512m</code></td>
+        </tr>
+    </table>
+  <p>上例中，<em>mapred.userlog.limit.kb</em>和<em>mapred.child.java.opts</em>会被添加到hod产生的hadoop-site.xml中。</p>
+  </section>
+  <section><title>查看Hadoop的Web-UI</title><anchor id="Viewing_Hadoop_Web_UIs"></anchor>
+  <p>HOD的allocate操作会打印出JobTracker和NameNode的Web UI的URL。例如：</p>
+   <table><tr><td><code>$ hod allocate -d ~/hadoop-cluster -n 10 -c ~/hod-conf-dir/hodrc</code><br/>
+    <code>INFO - HDFS UI on http://host242.foo.com:55391</code><br/>
+    <code>INFO - Mapred UI on http://host521.foo.com:54874</code>
+    </td></tr></table>
+  <p>上面提到的<em>info</em>操作可以给你同样的信息。</p>
+  </section>
+  <section><title>收集和查看Hadoop日志</title><anchor id="Collecting_and_Viewing_Hadoop_Lo"></anchor>
+  <p>要获取在某些分配节点上运行的守护进程的Hadoop日志：</p>
+  <ul>
+    <li>登录感兴趣的节点。如果你想查看JobTracker或者NameNode的日志，<em>list</em>和<em>info</em>操作能告诉你这些进程在那些节点上运行。</li>
+    <li>获取感兴趣的守护进程的进程信息（例如，<code>ps ux | grep TaskTracker</code>）</li>
+    <li>在这些进程信息中，查找变量<code>-Dhadoop.log.dir</code>的值。通常是hod配置文件里<code>hodring.temp-dir</code>目录的一个子目录 。</li>
+    <li>切换到<code>hadoop.log.dir</code>目录以查看守护进程日志和用户日志。</li>
+  </ul>
+  <p>HOD也提供了一个机制，能让你在集群回收后将日志收集存放到文件系统，或者一个在外部配置的HDFS中。这样的话，在作业完成，节点回收后你还可以看这些日志。要做到这点，像下面一样为log-destination-uri指定一个URI：</p>
+   <table><tr><td><code>log-destination-uri= hdfs://host123:45678/user/hod/logs</code>或者</td></tr>
+    <tr><td><code>log-destination-uri= file://path/to/store/log/files</code></td></tr>
+    </table>
+    <p>在上面指定的的根目录中，HOD会创建路径user_name/torque_jobid，把作业涉及到的每个节点上的日志文件gzip压缩，存放在里面。</p>
+  <p>注意要在HDFS上存储这些文件，你得将<code>hodring.pkgs</code>项配置为和刚才提到的HDFS兼容的版本。否则，HOD会尝试使用它供应Hadoop集群时用到的Hadoop版本。</p>
+  </section>
+  <section><title>闲置集群的自动回收</title><anchor id="Auto_deallocation_of_Idle_Cluste"></anchor>
+  <p>HOD会自动回收在一段时间内没有运行Hadoop作业的集群。每次的HOD分配会带有一个监控设施不停地检查Hadoop作业的执行。如果侦测到在一定时间内没Hadoop作业在执行，它就回收这个集群，释放那些未被有效利用的节点。</p>
+  <p><em>注意：</em>当集群被回收时，<em>集群目录</em>没有被自动清空。用户须通过一个正式的<em>deallcocate</em>操作清理它。</p>
+	</section>
+  <section><title>指定额外的作业属性</title><anchor id="Specifying_Additional_Job_Attrib"></anchor>
+  <p>HOD允许用户为一个Torque作业指定一个时钟时间和一个名称（或者标题）。 </p>
+  <p>时钟时间是对Torque作业有效时间的一个估计。这个时间过期后，Torque将自动删除这个作业，释放其节点。指定这个时钟时间还能帮助作业调度程序更好的安排作业，提高对集群资源的使用率。</p>
+  <p>指定时钟时间的语法如下：</p>
+    <table>
+        <tr>
+          <td><code>$ hod allocate -d cluster_dir -n number_of_nodes -l time_in_seconds</code></td>
+        </tr>
+    </table>
+  <p>Torque作业的名称或标题能给用户以友好的作业标识。每次展示Torque作业的属性的时候，这个字符串就会出现，包括<code>qstat</code>命令。</p>
+  <p>指定名称或标题的语法如下：</p>
+    <table>
+        <tr>
+          <td><code>$ hod allocate -d cluster_dir -n number_of_nodes -N name_of_job</code></td>
+        </tr>
+    </table>
+  <p><em>注意：</em>由于底层Torque资源管理器的限制，不以字母开头或者包含空格的名字将导致作业失败。失败信息会表明问题存在于指定的作业名称中。</p>
+  </section>
+  <section><title>捕获HOD在Torque中的退出码</title><anchor id="Capturing_HOD_exit_codes_in_Torq"></anchor>
+  <p>HOD退出码出现在Torque的exit_status字段中。这有助于使用者和系统管理员区分成功的HOD执行和失败的HOD执行。如果分配成功且所有Hadoop作业在所分配的集群上正确的执行，退出码为0。如果分配失败或者部分hadoop作业在分配集群上运行失败，退出码非0。下表列出了可能出现的退出码。<em>注意：只有所使用的Hadoop版本是0.16或以上时，Hadoop作业状态才可以被捕获。</em></p>
+  <table>
+    
+      <tr>
+        <td>退出码</td>
+        <td>含义</td>
+      </tr>
+      <tr>
+        <td> 6 </td>
+        <td>Ringmaster故障</td>
+      </tr>
+      <tr>
+        <td> 7 </td>
+        <td> DFS故障</td>
+      </tr>
+      <tr>
+        <td> 8 </td>
+        <td> Job tracker故障</td>
+      </tr>
+      <tr>
+        <td> 10 </td>
+        <td> 集群死亡</td>
+      </tr>
+      <tr>
+        <td> 12 </td>
+        <td> 集群已分配 </td>
+      </tr>
+      <tr>
+        <td> 13 </td>
+        <td> HDFS死亡</td>
+      </tr>
+      <tr>
+        <td> 14 </td>
+        <td> Mapred死亡</td>
+      </tr>
+      <tr>
+        <td> 16 </td>
+        <td>集群中所有的Map/Reduce作业失败。查看hadoop日志了解更多细节。</td>
+      </tr>
+      <tr>
+        <td> 17 </td>
+        <td>集群中部分的Map/Reduce作业失败。查看hadoop日志了解更多细节。</td>
+      </tr>
+  </table>
+  </section>
+  <section>
+    <title>命令行</title><anchor id="Command_Line"></anchor>
+    <p>HOD命令行的通用的语法如下：<br/>
+      <em>hod &lt;operation&gt; [ARGS] [OPTIONS]<br/></em>
+      允许的操作有‘allocate’，‘deallocate’，‘info’，‘list’，‘script’以及‘help’。要获取某特定操作的帮助你可以执行：<code>hod help &lt;operation&gt;</code>。要查看可能的操作你可以执行<code>hod help options</code>。</p>
+      <p><em>allocate</em><br />
+      <em>用法：hod allocate -d cluster_dir -n number_of_nodes [OPTIONS]</em><br />
+      分配一个指定节点数目的集群，把分配信息存放在cluster_dir方便后续<code>hadoop</code>命令使用。注意<code>cluster_dir</code>必须在运行该命令前已经存在。</p>
+      <p><em>list</em><br/>
+      <em>用法：hod list [OPTIONS]</em><br />
+      列举出用户分配的所有集群。提供的信息包括集群对应的的Torque作业标识，存储分配信息的集群目录，Map/Reduce守护进程是否存活。</p>
+      <p><em>info</em><br/>
+      <em>用法：hod info -d cluster_dir [OPTIONS]</em><br />
+      列举集群分配信息存放于某指定集群目录的集群信息。</p>
+      <p><em>deallocate</em><br/>
+      <em>用法：hod deallocate -d cluster_dir [OPTIONS]</em><br />
+      回收集群分配信息存放于某指定集群目录的集群。</p>
+      <p><em>script</em><br/>
+      <em>用法：hod script -s script_file -d cluster_directory -n number_of_node [OPTIONS]</em><br />
+      用HOD<em>script</em>操作执行一个hadoop脚本。在给定数目的节点上提供Hadoop，在提交的节点执行这个脚本，并在脚本执行结束后回收集群。</p>
+      <p><em>help</em><br/>
+      <em>用法：hod help [operation | 'options']</em><br/>
+      未指定参数时，<code>hod help</code>给出用法以及基本选项，等同于<code>hod --help</code> （见下文）。当指定参数‘options’时，显示hod的基本选项。当指定operation时，它会显示出该特定operation的用法和相应的描述。例如，希望了解allocate操作，你可以执行<code>hod help allocate</code></p>
+      <p>除上面的操作外，HOD还能接受下列命令行选项。</p>
+      <p><em>--help</em><br />
+      打印出用法和基本选项的帮助信息。</p>
+      <p><em>--verbose-help</em><br />
+      hodrc文件中所有的配置项均可通过命令行传递，使用语法<code>--section_name.option_name[=vlaue]</code>。这种方式下，命令行传递的参数会覆盖hodrc中的配置项。verbose-help命令会列出hodrc文件中全部可用项。这也是一个了解配置选项含义的好方法。</p>
+      <p><a href="#Options_Configuring_HOD">下一部分</a>有多数重要的hod配置项的描述。对于基本选项，你可以通过<code>hod help options</code>了解，对于所有的hod配置中的可能选项，你可以参看<code>hod --verbose-help</code>的输出。了解所有选项的描述，请参看<a href="hod_config_guide.html">配置指南</a>。</p>
+  </section>
+  <section><title> HOD配置选项</title><anchor id="Options_Configuring_HOD"></anchor>
+  <p> 如上所述，HOD的配置是通过系统管理员设置配置文件完成。这是一个INI风格的配置文件，文件分成多个段，每个段包含一些配置项。这些段分别和HOD的进程：client，ringmaster，hodring，mapreduce或hdfs相关。每一个配置项有选项名和值构成。</p>
+  <p>有两种方式可让用户覆盖默认配置文件里的设定：</p>
+  <ul>
+    <li>在每条命令前，用户可以向HOD提供自己的配置文件，使用<code>-c</code>选项。</li>
+    <li>用户可以在命令行指定HOD的配置选项覆盖正使用的配置文件中提供的值。</li>
+  </ul>
+  <p>这一节介绍一些最常用的配置项。为了指定方便，这些常用选项通常会有一个<em>短</em>选项名。所有其它选项可能用随后介绍的<em>长</em>选项指定。</p>
+  <p><em>-c config_file</em><br />
+  提供要使用的配置文件。可与其他任何的HOD选项一起使用。此外，可定义<code>HOD_CONF_DIR</code>环境变量为一个包含<code>hodrc</code>文件的目录，避免每条HOD命令都要指定配置文件。</p>
+  <p><em>-d cluster_dir</em><br />
+  大多数hod操作都要求这个选项。如<a href="#Create_a_Cluster_Directory">此处</a>描述，<em>集群目录</em>是在本地文件系统上的一个目录，<code>hod</code>将Hadoop的配置产生在这个目录里，即<em>hadoop-site.xml</em>，这个文件对应于它分配的集群。创建该目录，并使用-d或者--hod.clusterdir参数传递给<code>hod</code>操作。集群分配好后，用户可在这个集群上，通过指定hadoop--config选项为集群目录来执行Hadoop作业。</p>
+  <p><em>-n number_of_nodes</em><br />
+  hod allocation操作和script操作要求这个选项。表示要分配的节点数。</p>
+  <p><em>-s script-file</em><br/>
+  脚本操作时需要，用于指定要执行的脚本文件。</p>
+  <p><em>-b 1|2|3|4</em><br />
+  启用给定的调试级别。能与其他HOD选项一起使用。级别4最为详尽。</p>
+  <p><em>-t hadoop_tarball</em><br />
+  从指定tar.gz文件提供Hadoop分发。此选项值只适用于<em>allocate</em>操作。为获得更好的分发性能，强烈推荐创建Hadoop tarball<em>前</em>删除其中的源代码或文档。</p>
+  <p><em>-N job-name</em><br />
+  内部使用的资源管理作业名。比如，对于Torque作为资源管理器的情况，会被解释成<code>qsub -N</code>选项，使用<code>qstat</code>命令时可以看到这个作业名。</p>
+  <p><em>-l wall-clock-time</em><br />
+  用户希望在分配的集群作业的时间总量。它被传递给HOD底层的资源管理器，用于更有效地调度和利用集群。注意对于Torque的情形，这个时间到期后，集群会在被自动回收。</p>
+  <p><em>-j java-home</em><br />
+  JAVA_HOME环境变量里指定的路径。在<em>script</em>操作中使用。HOD将JAVA_HOME环境变量设置为这个值，并在此环境下启动用户脚本。</p>
+  <p><em>-A account-string</em><br />
+  传递给后台资源管理器的核计信息。</p>
+  <p><em>-Q queue-name</em><br />
+  接受作业提交的后台资源管理器中队列的名称。</p>
+  <p><em>-Mkey1=value1 -Mkey2=value2</em><br/>
+  为供应的Map/Reduce守护进程（JobTracker以及TaskTracker）提供配置参数。在集群节点上，会根据这些值产生一个hadoop-site.xml。 <br />
+  <em>注意：</em>值中的下列字符：空格，逗号，等号，分号需要使用‘\’转义， 且放置在引号中。你也可以使用‘\’来转义‘\’。</p>
+  <p><em>-Hkey1=value1 -Hkey2=value2</em><br />
+  为供应的HDFS守护进程（NameNode以及DataNode）提供配置参数。在集群节点上，会根据这些值产生一个hadoop-site.xml。 <br />
+  <em>注意：</em>值中的下列字符：空格，逗号，等号，分号需要使用‘\’转义， 且放置在引号中。你也可以使用‘\’来转义‘\’。</p>
+  <p><em>-Ckey1=value1 -Ckey2=value2</em><br />
+  为提交作业的客户端提供配置参数。在提交节点上，会根据这些值产生一个hadoop-site.xml。<br />
+  <em>注意：</em>参数值可以使用以下符号：空格，逗号，等号，需要‘\’做转义符的分号，上述符号要用引号进行分割。你也可以使用‘\’转义‘\’。 </p>
+  <p><em>--section-name.option-name=value</em><br />
+  这是用<em>长</em>格式提供配置选项的方法。比如，你可以<em>--hod.script-wait-time=20</em></p>
+	</section>
+	</section>
+<!--here we go -->
+<section>
+	  <title>故障排除</title><anchor id="Troubleshooting"></anchor>
+  <p>下节列出了一些用户使用HOD时可能碰到的多发错误的条件以及解决问题的方法</p>
+<section><title>分配操作时<code>hod</code>挂起</title><anchor id="_hod_Hangs_During_Allocation"></anchor><anchor id="hod_Hangs_During_Allocation"></anchor>
+  <p><em>可能原因：</em>HOD或Hadoop的一个组件启动失败。这种情况下，<code>hod</code>命令会在一段时间（通常是2-3分钟）后返回，退出码是错误代码部分定义的错误码7或8。参考该部分以获得更多细节。 </p>
+  <p><em>可能原因：</em>使用tarball模式申请了大规模的集群。有时由于网络负载，或者是分配节点上的负载，tarball分发过程可能会慢的比较明显，需要几分钟才能响应。等待命令完成。还可以检查一下tarball，看是否不含Hadoop源码或文档。</p>
+  <p><em>可能原因：</em>Torque相关的问题。如果原因与Torque相关，<code>hod</code>命令5分钟内是不会返回的。在调试模式下运行<code>hod</code>你会发现<code>qstat</code>命令被重复执行。在另一个shell中执行<code>qstat</code>命令你会发现作业处于<code>Q</code>（排队）状态。这通常说明Torque出现了问题。可能原因有个别节点宕机，或者增加了新节点但Torque不知。通常，需要系统管理员帮助解决此问题。</p>
+    </section>
+<section><title>回收操作时<code>hod</code>挂起</title><anchor id="_hod_Hangs_During_Deallocation"></anchor><anchor id="hod_Hangs_During_Deallocation"></anchor>
+  <p><em>可能原因：</em>Torque相关的问题，通常是Torque server上的负载较大，或者是分配的集群非常大。一般来说，你唯一能做的是等待命令执行完成。</p>
+  </section>
+  <section><title><code>hod</code>失败时的错误代码和错误信息</title><anchor id="hod_Fails_With_an_error_code_and"></anchor><anchor id="_hod_Fails_With_an_error_code_an"></anchor>
+  <p>如果<code>hod</code>命令的退出码不是<code>0</code>，参考下面的退出代码表确定此情况发生的原因和相应的调试方法。</p>
+  <p><strong>错误代码</strong></p><anchor id="Error_Codes"></anchor>
+  <table>
+    
+      <tr>
+        <th>错误代码</th>
+        <th>含义</th>
+        <th>可能原因及补救方法</th>
+      </tr>
+      <tr>
+        <td> 1 </td>
+        <td>配置错误 </td>
+        <td>hodrc中的参数错误，或者其他与HOD配置相关的错误。此类情况下，错误信息已经足够帮你发现和解决问题。</td>
+      </tr>
+      <tr>
+        <td> 2 </td>
+        <td>无效操作</td>
+        <td>执行<code>hod help</code>查看有效的操作列表。</td>
+      </tr>
+      <tr>
+        <td> 3 </td>
+        <td>无效操作参数</td>
+        <td>执行<code>hod help operation</code>查看特定操作的用法。</td>
+      </tr>
+      <tr>
+        <td> 4 </td>
+        <td>调度失败</td>
+        <td> 1. 请求分配了过多的资源。执行<code>checknodes cluster_name</code>查看是否有足够多的可用节点。<br />
+             2. Torque配置错误，Torque可执行文件的路径配置错误或其他Torque相关问题。联系系统管理员。</td>
+      </tr>
+      <tr>
+        <td> 5 </td>
+        <td>执行作业失败</td>
+        <td> 1. Torque作业被外部删除。执行Torque <code>qstat</code>命令查看是否有作业处于<code>R</code>（运行）状态。如果没有，尝试重新运行HOD。<br/>
+          2. Torque的问题诸如服务器暂时性宕机，或者无响应。联系系统管理员。 </td>
+      </tr>
+      <tr>
+        <td> 6 </td>
+        <td>Ringmaster故障</td>
+        <td> 1. <code>ringmaster</code>段的配置无效，<br />
+          2. <code>gridservice-mapred or gridservice-hdfs</code>段中无效的<code>pkgs</code>选项，<br />
+          3. 无效的hadoop tarball，<br />
+          4. Hadoop中的MapReduce与外部HDFS版本不匹配。<br />
+          Torque <code>qstat</code>命令非常可能显示一个<code>C</code> (已完成)状态的作业。参考下面的<em>定位Ringmaster日志</em>一节了解更多信息。</td>
+      </tr>
+      <tr>
+        <td> 7 </td>
+        <td> DFS故障</td>
+	<td>1. 启动Hadoop集群出现问题。检查Hadoop相关配置。按上述<em>Getting Hadoop Logs</em>一节中介绍的方法查看Hadoop日志。<br />
+          2. hodrc中<code>hodring</code>段的配置无效。<code>ssh</code>到所有已分配节点（由<code>qstat -f torque_job_id</code>确定），在hdring日志中grep<code>ERROR</code>或<code>CRITICAL</code>。参考下面<em>定位Hodring日志</em>部分以获取更多信息。<br />
+	  3. 指定未正确打包的无效traball。<br />
+          4. 无法与外部配置的HDFS通信。</td>
+      </tr>
+      <tr>
+        <td> 8 </td>
+        <td>Job tracker故障</td>
+        <td>与<em>DFS故障</em>情形中的原因类似。</td>
+      </tr>
+      <tr>
+        <td> 10 </td>
+        <td>集群死亡</td>
+        <td>1. 集群因为较长时间空闲被自动回收。<br />
+          2. 集群因系统管理员或者用户指定的时钟时间到期被自动回收。<br />
+          3. 无法与成功分配的JobTracker以及HDFS的NameNode通信。回收集群，重新分配。</td>
+      </tr>
+      <tr>
+        <td> 12 </td>
+        <td>集群已分配</td>
+        <td>指定的集群目录是已被用于先前的分配操作,且尚未回收。指定另外一个目录，或者先回收先前分配的。</td>
+      </tr>
+      <tr>
+        <td> 13 </td>
+        <td>HDFS死亡</td>
+        <td>无法与HDFS的NameNode通信。HDFS的NameNode停掉了。</td>
+      </tr>
+      <tr>
+        <td> 14 </td>
+        <td>Mapred死亡</td>
+        <td> 1. 集群因为长时间闲置被自动回收。 <br />
+          2. 集群因系统管理员或用户指定的时钟时间到期被自动回收。<br />
+	  3. 无法与Map/Reduce的JobTracker通信。JobTracker节点宕机。 <br />
+          </td>
+      </tr>
+      <tr>
+        <td> 15 </td>
+        <td>集群未分配</td>
+        <td>一个需要已分配集群的操作被指以一个没有状态信息的集群目录。</td>
+      </tr>
+   
+      <tr>
+        <td>任意非0退出代码</td>
+        <td>HOD脚本错误</td>
+        <td>如果使用了hod的脚本选项，很可能这个退出代码是脚本的退出吗。不幸的是，这可能会与hod自己的退出码冲突。为帮助用户区分两者，如果脚本返回了一个退出码，hod将此退出码写到了集群目录下的script.exitcode文件。你可以cat这个文件以确定脚本的退出码。如果文件不存在，则退出代码是hod命令的退出码。</td> 
+      </tr>
+  </table>
+    </section>
+  <section><title>成功分配的集群上无法运行Hadoop作业</title><anchor id="Hadoop_Jobs_Not_Running_on_a_Suc"></anchor>
+  <p>这一情景通常发生在这种情形：一个集群已经分配，并且一段时间内处于不活跃状态，之后hadoop作业试图在这个集群上运行。Hadoop作业会失败，产生如下异常信息：</p>
+  <table><tr><td><code>08/01/25 16:31:40 INFO ipc.Client: Retrying connect to server: foo.bar.com/1.1.1.1:53567. Already tried 1 time(s).</code></td></tr></table>
+  <p><em>可能原因：</em>相当长的时间内无hadoop作业运行，集群会如<em>闲置集群的自动回收</em>一节介绍的那样被自动回收。回收该集群，然后重新分配。</p>
+  <p><em>可能原因：</em>从分配开始算起，Torque管理员指定的或<em>指定额外的作业属性</em>一节中定义的<code>-l</code>选项指定的时间上限过期。这种情况下集群可能已被释放。回收集群，然后重新分配。</p>
+  <p><em>可能原因：</em>提交作业使用的hadoop版本和供应集群的Hadoop版本（通常通过tarball选项）不匹配。确保使用的兼容的版本。</p>
+  <p><em>可能原因：</em> 提交job的hadoop客户端与提供的hadoop(通常通过tarball选项)版本不兼容。 确保所使用hadoop软件版本兼容。</p>
+  <p><em>可能原因：</em> 你使用了<code>-M or -H</code>中的一个指定Hadoop配置，其中有未正确转义的字符比如空格或逗号。参考<em>HOD配置选项</em>一节以了解如何正确指定这些选项。</p>
+    </section>
+  <section><title>我的Hadoop作业被中止了</title><anchor id="My_Hadoop_Job_Got_Killed"></anchor>
+  <p><em>可能原因：</em>从分配开始算起，Torque管理员指定的或<em>指定额外的作业属性</em>一节中定义的<code>-l</code>选项指定的时间上限过期。这种情况下集群可能已被释放。回收集群，然后重新分配，这次要制定一个大点儿的时钟时间。</p>
+  <p><em>可能原因：</em> JobTracker节点出现问题。参考<em>收集和查看Hadoop日志</em>一节以获取更多信息。</p>
+    </section>
+  <section><title>Hadoop作业失败并返回消息：‘Job tracker still initializing’</title><anchor id="Hadoop_Job_Fails_with_Message_Jo"></anchor>
+  <p><em>可能原因：</em>hadoop作业是作为HOD脚本的一部分运行的，它在JobTracker完全就绪前开始了执行。分配集群时为配置选<code>--hod.script-wait-time</code>设定一个大点儿的值。通常取120是可以工作的，尽管通常没必要这么大。</p>
+    </section>
+  <section><title>Torque的退出代码没有包含HOD的</title><anchor id="The_Exit_Codes_For_HOD_Are_Not_G"></anchor>
+  <p><em>可能原因：</em>此功能需要Hadoop 0.16。所用的Hadoop版本不满足这个条件。请使用合适的Hadoop版本。</p>
+  <p><em>可能原因：</em>没有使用<code>hod</code>命令回收集群；例如直接使用<code>qdel</code>。当使用这种方式回收集群时，HOD进程被信号中止。这会导致退出码是基于signal number的，而不是程序的退出码。</p>
+    </section>
+  <section><title>Hadoop日志未被上传到DFS</title><anchor id="The_Hadoop_Logs_are_Not_Uploaded"></anchor>
+  <p><em>可能原因：</em>上传日志的使用的hadoop与外部的HDFS版本不兼容。确保<code>hodring.pkgs</code>选项指定了正确的版本。</p>
+    </section>
+  <section><title>定位Ringmaster日志</title><anchor id="Locating_Ringmaster_Logs"></anchor>
+  <p>遵循以下步骤定位ringmaster日志：</p>
+  <ul>
+    <li>用-b选项在调试模式执行hod。这会打印出当前运行的Torque作业的标识。</li>
+    <li>执行<code>qstat -f torque_job_id</code>，在输出中查找<code>exec_host</code>参数的值。列表中的第一个主机就是ringmaster节点。</li>
+    <li>登陆该节点。</li>
+  <li>ringmaster日志的位置由hodrc中的<code>ringmaster.log-dir</code>项指定。日志文件的名字会是<code>username.torque_job_id/ringmaster-main.log</code>。</li>
+    <li>如果你没有获取到足够的信息，你可以将ringmaster的调试级别设为4。这可通过向hod命令行传递<code>--ringmaster.debug 4</code>做到。</li>
+  </ul>
+  </section>
+  <section><title>定位Hodring日志</title><anchor id="Locating_Hodring_Logs"></anchor>
+  <p>遵循以下步骤定位hodring日志：</p>
+  <ul>
+    <li>用-b选项在调试模式下运行hod。这将打印当前运行的Torque作业的标识。</li>
+    <li>执行<code>qstat -f torque_job_id</code>，查看输出中<code>exec_host</code>参数的值。列表中的的所有节点上都有一个hodring。</li>
+    <li>登陆到任何一个节点。</li>
+    <li>hodring日志的位置由hodrc中的<code>hodring.log-dir</code>项指定。日志文件的名字会是<code>username.torque_job_id/hodring-main.log</code>。</li>
+    <li>如果你没有获得足够的信息，你或许想将hodring的调试等级更改为4。这可以向hod命令行传递<code>--hodring.debug 4</code> 来做到。</li>
+  </ul>
+  </section>
+	</section>	
+</body>
+</document>
Index: src/docs/cn/src/documentation/content/xdocs/streaming.xml
===================================================================
--- src/docs/cn/src/documentation/content/xdocs/streaming.xml	(revision 0)
+++ src/docs/cn/src/documentation/content/xdocs/streaming.xml	(revision 0)
@@ -0,0 +1,604 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2002-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.
+-->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+          "http://forrest.apache.org/dtd/document-v20.dtd">
+
+
+<document>
+<header>
+<title>Hadoop Streaming</title>
+<meta name="http-equiv">Content-Type</meta>
+<meta name="content">text/html;</meta>
+<meta name="charset">utf-8</meta>
+</header>
+<body>
+<section>
+<title>Hadoop Streaming</title>
+
+<p>
+Hadoop streaming是Hadoop的一个工具，
+    它帮助用户创建和运行一类特殊的map/reduce作业，
+    这些特殊的map/reduce作业是由一些可执行文件或脚本文件充当mapper或者reducer。例如： 
+</p>
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input myInputDirs \
+    -output myOutputDir \
+    -mapper /bin/cat \
+    -reducer /bin/wc
+</source>
+</section>
+
+<section>
+<title>Streaming工作原理</title>
+<p>
+在上面的例子里，mapper和reducer都是可执行文件，它们从标准输入读入数据（一行一行读），
+并把计算结果发给标准输出。Streaming工具会创建一个map/reduce作业，
+并把它发送给合适的集群，同时监视这个作业的整个执行过程。
+</p><p>
+如果一个可执行文件被用于mapper，则在mapper初始化时，
+每一个mapper任务会把这个可执行文件作为一个单独的进程启动。
+mapper任务运行时，它把输入切分成行并把每一行提供给可执行文件进程的标准输入。
+同时，mapper收集可执行文件进程标准输出的内容，并把收到的每一行内容转化成key/value对，作为mapper的输出。
+默认情况下，一行中第一个tab之前的部分作为<strong>key</strong>，之后的（不包括tab）作为<strong>value</strong>。
+如果没有tab，整行作为key值，value值为null。在下文中将会讨论如何自定义key和value的切分方式。
+</p>
+<p>如果一个可执行文件被用于reducer，每个reducer任务会把这个可执行文件作为一个单独的进程启动。
+Reducer任务运行时，它把输入切分成行并把每一行提供给可执行文件进程的标准输入。
+同时，reducer收集可执行文件进程标准输出的内容，并把每一行内容转化成key/value对，作为reducer的输出。
+默认情况下，一行中第一个tab之前的部分作为key，之后的（不包括tab）作为value。在下文中将会讨论如何自定义key和value的切分方式。
+</p><p>
+这是map/reduce框架和streaming mapper/reducer之间的基本通信协议。
+</p><p>
+用户也可以使用java类作为mapper或者reducer。上面的例子与这里的代码等价：
+</p>
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input myInputDirs \
+    -output myOutputDir \
+    -mapper org.apache.hadoop.mapred.lib.IdentityMapper \
+    -reducer /bin/wc
+</source>
+</section>
+
+<section>
+<title>将文件打包在提交的作业中</title>
+<p>
+任何可执行文件都可以被指定为mapper/reducer。这些可执行文件不需要事先已经存放在集群上；
+用-file选项可以让framework把可执行文件作为作业的一部分，一起打包提交。例如：
+</p>
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input myInputDirs \
+    -output myOutputDir \
+    -mapper myPythonScript.py \
+    -reducer /bin/wc \
+    -file myPythonScript.py 
+</source>
+<p> 
+上面的例子描述了一个用户把可执行python文件作为mapper。
+其中的选项“-file myPythonScirpt.py”使可执行python文件作为作业提交的一部分被上传到集群的机器上。
+</p>
+<p>
+除了可执行文件外，其他mapper或reducer需要用到的辅助文件（比如字典，配置文件等）也可以用打包的方式上传。例如：
+</p>
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input myInputDirs \
+    -output myOutputDir \
+    -mapper myPythonScript.py \
+    -reducer /bin/wc \
+    -file myPythonScript.py \
+    -file myDictionary.txt
+</source>
+</section>
+
+<section>
+<title>Streaming选项与用法</title>
+
+<section>
+<title>只使用Mapper的作业</title>
+<p>
+有时只需要map函数处理输入数据。这时只需把mapred.reduce.tasks设置为零，Map/reduce框架就不会创建reducer任务，mapper任务的输出就是整个作业的最终输出。
+</p><p>
+为了做到向下兼容，Hadoop Streaming也支持“-reduce None”选项，它与“-jobconf mapred.reduce.tasks=0”等价。
+</p>
+</section>
+
+<section>
+<title>为作业指定其他插件</title>
+<p>
+和其他普通的map/reduce作业一样，用户可以为streaming作业指定其他插件：
+</p>
+<source>
+   -inputformat JavaClassName
+   -outputformat JavaClassName
+   -partitioner JavaClassName
+   -combiner JavaClassName
+</source>
+<p>用于处理输入格式的类要能返回Text类型的key/value对。
+    如果不指定输入格式，则默认会使用TextInputFormat。
+因为TextInputFormat得到的key值是LongWritable类型的（其实key值并不是输入文件中的内容，而是value偏移量），
+所以key会被丢弃，只把value用管道方式发给mapper。
+</p><p>
+用户提供的定义输出格式的类需要能够处理Text类型的key/value对。如果不指定输出格式，则默认会使用TextOutputFormat类。
+</p>
+</section>
+
+<section>
+<title>Hadoop Streaming中的大文件和档案</title>
+
+<p>
+    任务使用-cacheFile和-cacheArchive选项获得文档，
+    选项的参数是用户已上传至HDFS的文件或档案的URI。
+    这些文件和档案在不同的作业间缓存。
+用户可以通过fs.default.name.config配置参数的值得到文件所在的host和fs_port。
+</p>
+<p>
+这个是使用-cacheFile选项的例子：
+</p> 
+<source>
+-cacheFile hdfs://host:fs_port/user/testfile.txt#testlink
+</source>
+<p>在上面的例子里，url中#后面的部分是建立在任务当前工作目录
+    下的符号链接的名字。这里的任务的当前工作目录下有一个“testlink”符号链接，它指向testfile.txt文件在本地的拷贝。如果有多个文件，选项可以写成：
+</p>
+<source>
+-cacheFile hdfs://host:fs_port/user/testfile1.txt#testlink1 -cacheFile hdfs://host:fs_port/user/testfile2.txt#testlink2
+</source>
+<p>
+-cacheArchive选项用于把jar文件拷贝到任务当前工作目录并自动把jar文件解压缩。例如： 
+</p>
+<source>
+-cacheArchive hdfs://host:fs_port/user/testfile.jar#testlink3
+</source>
+<p>
+在上面的例子中，testlink3是当前工作目录下的符号链接，它指向testfile.jar解压后的目录。
+</p>
+<p>
+下面是使用-cacheArchive选项的另一个例子。其中，input.txt文件有两行内容，分别是两个文件的名字：testlink/cache.txt和testlink/cache2.txt。“testlink”是指向档案目录（jar文件解压后的目录）的符号链接，这个目录下有“cache.txt”和“cache2.txt”两个文件。
+</p>
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+                  -input "/user/me/samples/cachefile/input.txt"  \
+                  -mapper "xargs cat"  \
+                  -reducer "cat"  \
+                  -output "/user/me/samples/cachefile/out" \  
+                  -cacheArchive 'hdfs://hadoop-nn1.example.com:8020/user/me/samples/cachefile/cachedir.jar#testlink' \  
+                  -jobconf mapred.map.tasks=1 \
+                  -jobconf mapred.reduce.tasks=1 \ 
+                  -jobconf mapred.job.name="Experiment"
+
+$ ls test_jar/
+cache.txt  cache2.txt
+
+$ jar cvf cachedir.jar -C test_jar/ .
+added manifest
+adding: cache.txt(in = 30) (out= 29)(deflated 3%)
+adding: cache2.txt(in = 37) (out= 35)(deflated 5%)
+
+$ hadoop dfs -put cachedir.jar samples/cachefile
+
+$ hadoop dfs -cat /user/me/samples/cachefile/input.txt
+testlink/cache.txt
+testlink/cache2.txt
+
+$ cat test_jar/cache.txt 
+This is just the cache string
+
+$ cat test_jar/cache2.txt 
+This is just the second cache string
+
+$ hadoop dfs -ls /user/me/samples/cachefile/out      
+Found 1 items
+/user/me/samples/cachefile/out/part-00000  &lt;r 3&gt;   69
+
+$ hadoop dfs -cat /user/me/samples/cachefile/out/part-00000
+This is just the cache string   
+This is just the second cache string
+
+</source>
+</section>
+
+<section>
+<title>为作业指定附加配置参数</title>
+<p>
+用户可以使用“-jobconf  &lt;n&gt;=&lt;v&gt;”增加一些配置变量。例如：
+</p>
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input myInputDirs \
+    -output myOutputDir \
+    -mapper org.apache.hadoop.mapred.lib.IdentityMapper\
+    -reducer /bin/wc \
+    -jobconf mapred.reduce.tasks=2
+</source>
+<p>
+上面的例子中，-jobconf mapred.reduce.tasks=2表明用两个reducer完成作业。
+</p>
+<p>
+关于jobconf参数的更多细节可以参考：<a href="http://wiki.apache.org/hadoop/JobConfFile">http://wiki.apache.org/hadoop/JobConfFile</a></p>
+</section>
+
+<section>
+<title>其他选项</title>
+<p>
+Streaming 作业的其他选项如下表：
+</p>
+<table>
+<tr><th>选项</th><th>可选/必须</th><th>描述</th></tr>
+<tr><td> -cluster name </td><td> 可选 </td><td> 在本地Hadoop集群与一个或多个远程集群间切换</td></tr>
+
+<tr><td> -dfs  host:port or local </td><td> 可选 </td><td> 覆盖作业的DFS配置</td></tr>
+<tr><td> -jt host:port or local </td><td> 可选 </td><td> 覆盖作业的JobTracker配置</td></tr>
+<tr><td> -additionalconfspec specfile </td><td> 可选 </td><td> 用一个类似于hadoop-site.xml的XML文件保存所有配置，从而不需要用多个"-jobconf name=value"类型的选项单独为每个配置变量赋值</td></tr>
+<tr><td> -cmdenv   name=value </td><td> 可选 </td><td> 传递环境变量给streaming命令</td></tr>
+<tr><td> -cacheFile fileNameURI </td><td> 可选 </td><td> 指定一个上传到HDFS的文件</td></tr>
+<tr><td> -cacheArchive fileNameURI </td><td> 可选 </td><td> 指定一个上传到HDFS的jar文件，这个jar文件会被自动解压缩到当前工作目录下</td></tr>
+
+<tr><td> -inputreader JavaClassName </td><td> 可选 </td><td> 为了向下兼容：指定一个record reader类（而不是input format类）</td></tr>
+<tr><td> -verbose </td><td> 可选 </td><td> 详细输出 </td></tr>
+</table>
+<p>
+使用-cluster &lt;name&gt;实现“本地”Hadoop和一个或多个远程Hadoop集群间切换。默认情况下，使用hadoop-default.xml和hadoop-site.xml；当使用-cluster &lt;name&gt;选项时，会使用$HADOOP_HOME/conf/hadoop-&lt;name&gt;.xml。
+</p>
+<p>
+下面的选项改变temp目录：
+</p>
+<source>
+  -jobconf dfs.data.dir=/tmp
+</source>
+<p>
+下面的选项指定其他本地temp目录：
+</p>
+<source>
+   -jobconf mapred.local.dir=/tmp/local
+   -jobconf mapred.system.dir=/tmp/system
+   -jobconf mapred.temp.dir=/tmp/temp
+</source>
+<p>
+更多有关jobconf的细节请参考：<a href="http://wiki.apache.org/hadoop/JobConfFile">http://wiki.apache.org/hadoop/JobConfFile</a>
+</p><p>
+在streaming命令中设置环境变量：
+</p>
+<source>
+-cmdenv EXAMPLE_DIR=/home/example/dictionaries/
+</source>
+</section>
+</section>
+
+<section>
+<title>其他例子</title>
+
+<section>
+<title>使用自定义的方法切分行来形成Key/Value对</title>
+<p>
+之前已经提到，当map/reduce框架从mapper的标准输入读取一行时，它把这一行切分为key/value对。
+在默认情况下，每行第一个tab符之前的部分作为key，之后的部分作为value（不包括tab符）。
+</p>
+<p>
+但是，用户可以自定义，可以指定分隔符是其他字符而不是默认的tab符，或者指定在第n（n>=1）个分割符处分割而不是默认的第一个。例如：
+</p>
+
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input myInputDirs \
+    -output myOutputDir \
+    -mapper org.apache.hadoop.mapred.lib.IdentityMapper \
+    -reducer org.apache.hadoop.mapred.lib.IdentityReducer \
+    -jobconf stream.map.output.field.separator=. \
+    -jobconf stream.num.map.output.key.fields=4 
+</source>
+<p>
+在上面的例子，“-jobconf stream.map.output.field.separator=.”指定“.”作为map输出内容的分隔符，并且
+并且从在第四个“.”之前的部分作为key，之后的部分作为value（不包括这第四个“.”）。 
+如果一行中的“.”少于四个，则整行的内容作为key，value设为空的Text对象（就像这样创建了一个Text：new Text("")）。
+</p><p>
+同样，用户可以使用“-jobconf stream.reduce.output.field.separator=SEP”和“-jobconf stream.num.reduce.output.fields=NUM”来指定reduce输出的行中，第几个分隔符处分割key和value。
+</p>
+</section>
+
+
+<section>
+<title>一个实用的Partitioner类<!--A Useful Partitioner Class--> （二次排序，-partitioner org.apache.hadoop.mapred.lib.KeyFieldBasedPartitioner 选项） </title>
+<p>
+Hadoop有一个工具类org.apache.hadoop.mapred.lib.KeyFieldBasedPartitioner，
+它在应用程序中很有用。Map/reduce框架用这个类切分map的输出，
+切分是基于key值的前缀，而不是整个key。例如：
+</p>
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input myInputDirs \
+    -output myOutputDir \
+    -mapper org.apache.hadoop.mapred.lib.IdentityMapper \
+    -reducer org.apache.hadoop.mapred.lib.IdentityReducer \
+    -partitioner org.apache.hadoop.mapred.lib.KeyFieldBasedPartitioner \
+    -jobconf stream.map.output.field.separator=. \
+    -jobconf stream.num.map.output.key.fields=4 \
+    -jobconf map.output.key.field.separator=. \
+    -jobconf num.key.fields.for.partition=2 \
+    -jobconf mapred.reduce.tasks=12
+</source>
+<p>
+其中，<em>-jobconf stream.map.output.field.separator=.</em> 和<em>-jobconf stream.num.map.output.key.fields=4</em>是前文中的例子。Streaming用这两个变量来得到mapper的key/value对。
+</p><p>
+上面的map/reduce 作业中map输出的key一般是由“.”分割成的四块。但是因为使用了
+<em>-jobconf num.key.fields.for.partition=2</em> 
+选项，所以map/reduce框架使用key的前两块来切分map的输出。其中，
+<em>-jobconf map.output.key.field.separator=.</em>
+指定了这次切分使用的key的分隔符。这样可以保证在所有key/value对中，
+key值前两个块值相同的所有key被分到一组，分配给一个reducer。 
+</p><p>
+<em>这种高效的方法等价于指定前两块作为主键，后两块作为副键。
+主键用于切分块，主键和副键的组合用于排序。</em>一个简单的示例如下：
+</p>
+<p>
+Map的输出（key）</p><source>
+11.12.1.2
+11.14.2.3
+11.11.4.1
+11.12.1.1
+11.14.2.2
+
+</source>
+<p>
+切分给3个reducer（前两块的值用于切分）</p><source>
+11.11.4.1
+-----------
+11.12.1.2
+11.12.1.1
+-----------
+11.14.2.3
+11.14.2.2
+</source>
+<p>
+在每个切分后的组内排序（四个块的值都用于排序）
+</p><source>
+11.11.4.1
+-----------
+11.12.1.1
+11.12.1.2
+-----------
+11.14.2.2
+11.14.2.3
+</source>
+</section>
+
+<section>
+    <title>Hadoop聚合功能包的使用（-reduce aggregate 选项）</title>
+<p>
+Hadoop有一个工具包“Aggregate”（
+<a href="https://svn.apache.org/repos/asf/hadoop/core/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate">https://svn.apache.org/repos/asf/hadoop/core/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate</a>）。
+“Aggregate”提供一个特殊的reducer类和一个特殊的combiner类，
+并且有一系列的“聚合器”（“aggregator”）（例如“sum”，“max”，“min”等）用于聚合一组value的序列。
+用户可以使用Aggregate定义一个mapper插件类，
+这个类用于为mapper输入的每个key/value对产生“可聚合项”。
+combiner/reducer利用适当的聚合器聚合这些可聚合项。 
+</p><p>
+要使用Aggregate，只需指定“-reducer aggregate”：</p>
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input myInputDirs \
+    -output myOutputDir \
+    -mapper myAggregatorForKeyCount.py \
+    -reducer aggregate \
+    -file myAggregatorForKeyCount.py \
+    -jobconf mapred.reduce.tasks=12
+</source>
+<p>
+python程序myAggregatorForKeyCount.py例子：
+</p>
+<source>
+#!/usr/bin/python
+
+import sys;
+
+def generateLongCountToken(id):
+    return "LongValueSum:" + id + "\t" + "1"
+
+def main(argv):
+    line = sys.stdin.readline();
+    try:
+        while line:
+            line = line&#91;:-1];
+            fields = line.split("\t");
+            print generateLongCountToken(fields&#91;0]);
+            line = sys.stdin.readline();
+    except "end of file":
+        return None
+if __name__ == "__main__":
+     main(sys.argv)
+</source>
+</section>
+
+<section>
+<title>字段的选取（类似于unix中的 'cut' 命令） </title>
+<p>
+Hadoop的工具类org.apache.hadoop.mapred.lib.FieldSelectionMapReduce帮助用户高效处理文本数据，
+就像unix中的“cut”工具。工具类中的map函数把输入的key/value对看作字段的列表。
+用户可以指定字段的分隔符（默认是tab），
+可以选择字段列表中任意一段（由列表中一个或多个字段组成）作为map输出的key或者value。
+同样，工具类中的reduce函数也把输入的key/value对看作字段的列表，用户可以选取任意一段作为reduce输出的key或value。例如： 
+</p>
+<source>
+$HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input myInputDirs \
+    -output myOutputDir \
+    -mapper org.apache.hadoop.mapred.lib.FieldSelectionMapReduce\
+    -reducer org.apache.hadoop.mapred.lib.FieldSelectionMapReduce\
+    -partitioner org.apache.hadoop.mapred.lib.KeyFieldBasedPartitioner \
+    -jobconf map.output.key.field.separa=. \
+    -jobconf num.key.fields.for.partition=2 \
+    -jobconf mapred.data.field.separator=. \
+    -jobconf map.output.key.value.fields.spec=6,5,1-3:0- \
+    -jobconf reduce.output.key.value.fields.spec=0-2:5- \
+    -jobconf mapred.reduce.tasks=12
+</source>
+<p>
+选项“-jobconf map.output.key.value.fields.spec=6,5,1-3:0-”指
+指定了如何为map的输出选取key和value。Key选取规则和value选取规则由“:”分割。
+在这个例子中，map输出的key由字段6，5，1，2和3组成。输出的value由所有字段组成（“0-”指字段0以及之后所有字段）。
+</p>
+<p>
+选项“-jobconf reduce.output.key.value.fields.spec=0-2:0-”（译者注：此处应为”0-2:5-“）指定如何为reduce的输出选取value。
+本例中，reduce的输出的key将包含字段0，1，2（对应于原始的字段6，5，1）。
+reduce输出的value将包含起自字段5的所有字段（对应于所有的原始字段）。
+</p>
+</section>
+</section>
+
+<section>
+<title>常见问题</title>
+
+<section>
+<title>我该怎样使用Hadoop Streaming运行一组独立（相关）的任务呢？</title>
+<p>
+多数情况下，你不需要Map Reduce的全部功能，
+而只需要运行同一程序的多个实例，或者使用不同数据，或者在相同数据上使用不同的参数。
+你可以通过Hadoop Streaming来实现。</p>
+
+</section>
+
+<section>
+<title>如何处理多个文件，其中每个文件一个map？</title>
+<p>
+例如这样一个问题，在集群上压缩（zipping）一些文件，你可以使用以下几种方法：</p><ol>
+<li>使用Hadoop Streaming和用户编写的mapper脚本程序：<ul>
+  <li> 生成一个文件，文件中包含所有要压缩的文件在DFS上的完整路径。每个map 任务获得一个路径名作为输入。</li>
+  <li> 创建一个mapper脚本程序，实现如下功能：获得文件名，把该文件拷贝到本地，压缩该文件并把它发到期望的输出目录。</li>
+</ul></li>
+<li>使用现有的Hadoop框架：<ul>
+   <li>在main函数中添加如下命令：
+<source>
+       OutputFormatBase.setCompressOutput(conf, true);
+       OutputFormatBase.setOutputCompressorClass(conf, org.apache.hadoop.io.compress.GzipCodec.class);
+       conf.setOutputFormat(NonSplitableTextInputFormat.class);
+       conf.setNumReduceTasks(0);
+</source></li>
+   <li>编写map函数：
+<source>
+
+       public void map(WritableComparable key, Writable value, 
+                               OutputCollector output, 
+                               Reporter reporter) throws IOException {
+            output.collect((Text)value, null);
+       }
+</source></li>
+  <li>注意输出的文件名和原文件名不同</li>
+</ul></li>
+</ol>
+</section>
+
+<section>
+<title>应该使用多少个reducer？</title>
+<p>
+请参考Hadoop Wiki：<a href="http://wiki.apache.org/hadoop/HowManyMapsAndReduces">http://wiki.apache.org/hadoop/HowManyMapsAndReduces</a>
+</p>
+</section>
+
+<section>
+<title>
+如果在Shell脚本里设置一个别名，并放在-mapper之后，Streaming会正常运行吗？
+例如，alias cl='cut -fl'，-mapper "cl"会运行正常吗？
+</title>
+<p>
+脚本里使用别名会不起作用，但是允许变量替换，例如：
+</p>
+<source>
+$ hadoop dfs -cat samples/student_marks
+alice   50
+bruce   70
+charlie 80
+dan     75
+
+$ c2='cut -f2'; $HADOOP_HOME/bin/hadoop jar $HADOOP_HOME/hadoop-streaming.jar \
+    -input /user/me/samples/student_marks 
+    -mapper \"$c2\" -reducer 'cat'  
+    -output /user/me/samples/student_out 
+    -jobconf mapred.job.name='Experiment'
+
+$ hadoop dfs -ls samples/student_out
+Found 1 items/user/me/samples/student_out/part-00000    &lt;r 3&gt;   16
+
+$ hadoop dfs -cat samples/student_out/part-00000
+50
+70
+75
+80
+</source>
+</section>
+
+<section>
+<title>
+我可以使用UNIX pipes吗？例如 –mapper "cut –fl | set s/foo/bar/g"管用么？
+</title>
+<p>
+现在不支持，而且会给出错误信息“java.io.IOException: Broken pipe”。这或许是一个bug，需要进一步研究。
+</p>
+</section>
+
+<section>
+<title>在streaming作业中用-file选项运行一个<strong>分布式的超大可执行文件（例如，3.6G）</strong>时，
+我得到了一个错误信息“No space left on device”。如何解决？
+</title>
+<p>
+配置变量stream.tmpdir指定了一个目录，在这个目录下要进行打jar包的操作。stream.tmpdir的默认值是/tmp，你需要将这个值设置为一个有更大空间的目录：
+</p>
+<source>
+-jobconf stream.tmpdir=/export/bigspace/...
+</source>
+</section>
+
+<section>
+<title>如何设置多个输入目录？</title>
+<p>
+可以使用多个-input选项设置多个输入目录：
+</p><source>
+ hadoop jar hadoop-streaming.jar -input '/user/foo/dir1' -input '/user/foo/dir2' 
+</source>
+</section>
+
+<section>
+<title>如何生成gzip格式的输出文件？</title>
+<p>
+除了纯文本格式的输出，你还可以生成gzip文件格式的输出，你只需设置streaming作业中的选项‘-jobconf mapred.output.compress=true -jobconf mapred.output.compression.codec=org.apache.hadoop.io.compress.GzipCode’。
+</p>
+</section>
+
+<section>
+<title>Streaming中如何自定义input/output format？</title>
+<p>
+至少在Hadoop 0.14版本以前，不支持多个jar文件。所以当指定自定义的类时，你要把他们和原有的streaming jar打包在一起，并用这个自定义的jar包替换默认的hadoop streaming jar包。
+</p>
+</section>
+
+<section>
+<title>Streaming如何解析XML文档？</title>
+<p>
+你可以使用StreamXmlRecordReader来解析XML文档。
+</p>
+<source>
+hadoop jar hadoop-streaming.jar -inputreader "StreamXmlRecord,begin=BEGIN_STRING,end=END_STRING" ..... (rest of the command)
+</source>
+<p>
+Map 任务会把BEGIN_STRING和END_STRING之间的部分看作一条记录。
+</p>
+</section>
+</section>
+</body>
+</document>
Index: src/docs/cn/src/documentation/content/xdocs/tabs.xml
===================================================================
--- src/docs/cn/src/documentation/content/xdocs/tabs.xml	(revision 0)
+++ src/docs/cn/src/documentation/content/xdocs/tabs.xml	(revision 0)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2002-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.
+-->
+
+<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.0//EN" 
+          "http://forrest.apache.org/dtd/tab-cocoon-v10.dtd">
+
+<tabs software="Hadoop"
+      title="Hadoop"
+      copyright="The Apache Software Foundation"
+      xmlns:xlink="http://www.w3.org/1999/xlink">
+
+  <!-- The rules are:
+    @dir will always have /index.html added.
+    @href is not modified unless it is root-relative and obviously specifies a
+    directory (ends in '/'), in which case /index.html will be added
+  -->
+
+  <tab label="项目" href="http://hadoop.apache.org/core/" />
+  <tab label="维基" href="http://wiki.apache.org/hadoop" />
+  <tab label="Hadoop 0.17文档" dir="" />  
+  
+</tabs>
Index: src/docs/cn/src/documentation/content/xdocs/quickstart.xml
===================================================================
--- src/docs/cn/src/documentation/content/xdocs/quickstart.xml	(revision 0)
+++ src/docs/cn/src/documentation/content/xdocs/quickstart.xml	(revision 0)
@@ -0,0 +1,257 @@
+<!--
+  Copyright 2002-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.
+-->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+  
+  <header>
+    <title>Hadoop快速入门</title>
+  </header>
+  
+  <body>
+  
+    <section>
+      <title>目的</title>
+      <p>这篇文档的目的是帮助使用者快速完成单机上的Hadoop安装与使用以便使用者对<a href ="hdfs_design.html">Hadoop分布式文件系统(<acronym title="Hadoop Distributed File System">HDFS</acronym>)</a>和Map-Reduce框架有所体会，比如在HDFS上运行示例程序或简单作业等。</p>
+    </section>
+    
+    <section id="PreReqs">
+      <title>先决条件</title>
+      
+      <section>
+        <title>支持平台</title>
+        
+        <ul>
+          <li>
+	        Hadoop已在有2000个节点的GNU/Linux主机组成的集群系统上得到验证。
+          </li>
+          <li>
+            Win32平台是作为<em>开发平台</em>支持的。分布式操作尚未在Win32平台上充分测试，这导致Win32平台还不是一个<em>产品平台</em>。
+          </li>
+        </ul>        
+      </section>
+      
+      <section>
+        <title>所需软件</title>
+        
+        <ol>
+          <li>
+            Java<sup>TM</sup>1.5.x，必须安装，建议选择Sun公司发行的Java版本。
+          </li>
+          <li>
+            <strong>ssh</strong> 必须安装并且保证 <strong>sshd</strong>一直运行，以便用Hadoop
+	    脚本管理远端Hadoop守护进程。
+          </li>
+        </ol>
+        
+        <section>
+		<title>Windows下的附加软件需求</title>
+          
+          <ol>
+            <li>
+              <a href="http://www.cygwin.com/">Cygwin</a> - 提供上述软件之外的shell支持。 
+            </li>
+          </ol>
+        </section>
+        
+      </section>
+
+      <section>
+        <title>安装软件</title>
+          
+        <p>如果你的集群尚未安装所需软件，你得首先安装它们。</p>
+          
+        <p>以Ubuntu Linux为例:</p>
+        <p>
+          <code>$ sudo apt-get install ssh</code><br/>
+          <code>$ sudo apt-get install rsync</code>
+        </p>
+          
+        <p>在Windows平台上，如果安装cygwin时未安装全部所需软件，则需启动cyqwin安装管理器安装如下软件包：</p>
+        <ul>
+          <li>openssh - <em>Net</em> 类</li>
+        </ul>
+      </section>
+      
+    </section>
+    
+    <section>
+      <title>下载</title>
+      
+      <p>
+        为了获取Hadoop的发行版，从Apache的某个镜像服务器上下载最近的
+        <a href="ext:releases">稳定发行版</a>。</p>
+    </section>
+
+    <section>
+      <title>运行Hadoop集群的准备工作</title>
+      <p>
+        解压所下载的Hadoop发行版。编辑
+        <code>conf/hadoop-env.sh</code>文件，至少需要将<code>JAVA_HOME</code>设置为Java安装根路径。
+      </p>
+
+	  <p>
+	    尝试如下命令：<br/>
+        <code>$ bin/hadoop</code><br/>
+        将会显示<strong>hadoop</strong> 脚本的使用文档。
+      </p>
+      
+      <p>现在你可以用以下三种支持的模式中的一种启动Hadoop集群：
+      </p>
+      <ul>
+        <li>单机模式</li>
+        <li>伪分布式模式</li>
+        <li>完全分布式模式</li>
+      </ul>
+    </section>
+    
+    <section id="Local">
+	    <title>单机模式的操作方法</title>
+      
+      <p>默认情况下，Hadoop被配置成以非分布式模式运行的一个独立Java进程。这对调试非常有帮助。</p>
+      
+      <p>
+        下面的实例将未解压的 <code>conf</code> 目录拷贝作为输入，查找并显示匹配给定正则表达式的条目。输出写入到指定的<code>output</code>目录。
+        <br/>
+        <code>$ mkdir input</code><br/>
+        <code>$ cp conf/*.xml input</code><br/>
+        <code>
+          $ bin/hadoop jar hadoop-*-examples.jar grep input output 'dfs[a-z.]+'
+        </code><br/>
+        <code>$ cat output/*</code>
+      </p>
+    </section>
+    
+    <section id="PseudoDistributed">
+      <title>伪分布式模式的操作方法</title>
+
+	  <p>Hadoop可以在单节点上以所谓的伪分布式模式运行，此时每一个Hadoop守护进程都作为一个独立的Java进程运行。</p>
+	  
+      <section>
+        <title>配置</title>
+        <p>使用如下的 <code>conf/hadoop-site.xml</code>:</p>
+        <table>
+        <tr><td>&lt;configuration&gt;</td></tr>
+
+          <tr><td>&nbsp;&nbsp;&lt;property&gt;</td></tr>
+            <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;fs.default.name&lt;/name&gt;</td></tr>
+            <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&lt;value&gt;localhost:9000&lt;/value&gt;</td></tr>
+          <tr><td>&nbsp;&nbsp;&lt;/property&gt;</td></tr>
+
+          <tr><td>&nbsp;&nbsp;&lt;property&gt;</td></tr>
+            <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;mapred.job.tracker&lt;/name&gt;</td></tr>
+            <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&lt;value&gt;localhost:9001&lt;/value&gt;</td></tr>
+          <tr><td>&nbsp;&nbsp;&lt;/property&gt;</td></tr>
+
+          <tr><td>&nbsp;&nbsp;&lt;property&gt;</td></tr>
+            <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;dfs.replication&lt;/name&gt;</td></tr>
+            <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&lt;value&gt;1&lt;/value&gt;</td></tr>
+          <tr><td>&nbsp;&nbsp;&lt;/property&gt;</td></tr>
+
+        <tr><td>&lt;/configuration&gt;</td></tr>
+        </table>
+     </section>
+
+      <section>
+        <title>免密码<em>ssh</em>设置</title>
+        
+        <p>
+          现在确认能否不输入口令就用ssh登录localhost:<br/>
+          <code>$ ssh localhost</code>
+        </p>
+        
+        <p>
+          如果不输入口令就无法用ssh登陆localhost，执行下面的命令：<br/>
+   		  <code>$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa</code><br/>
+		  <code>$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys</code>
+		</p>
+      </section>
+    
+      <section>
+        <title>执行</title>
+        
+        <p>
+          格式化一个新的分布式文件系统：<br/>
+          <code>$ bin/hadoop namenode -format</code>
+        </p>
+
+		<p>
+		  启动Hadoop守护进程：<br/>
+          <code>$ bin/start-all.sh</code>
+        </p>
+
+        <p>Hadoop守护进程的日志写入到 
+        <code>${HADOOP_LOG_DIR}</code> 目录 (默认是 
+        <code>${HADOOP_HOME}/logs</code>).</p>
+
+        <p>浏览NameNode和JobTracker的网络接口，它们的地址默认为：</p>
+        <ul>
+          <li>
+            <code>NameNode</code> - 
+            <a href="http://localhost:50070/">http://localhost:50070/</a>
+          </li>
+          <li>
+            <code>JobTracker</code> - 
+            <a href="http://localhost:50030/">http://localhost:50030/</a>
+          </li>
+        </ul>
+        
+        <p>
+          将输入文件拷贝到分布式文件系统：<br/>
+		  <code>$ bin/hadoop dfs -put conf input</code>
+		</p>
+		
+        <p>
+          运行发行版提供的示例程序：<br/>
+          <code>
+            $ bin/hadoop jar hadoop-*-examples.jar grep input output 'dfs[a-z.]+'
+          </code>
+        </p>
+        
+        <p>查看输出文件：</p>
+        <p>
+          将输出文件从分布式文件系统拷贝到本地文件系统查看：<br/>
+          <code>$ bin/hadoop dfs -get output output</code><br/>
+          <code>$ cat output/*</code>
+        </p>
+        <p> 或者 </p>
+        <p>
+          查看分布式文件系统上的输出文件：<br/>
+          <code>$ bin/hadoop dfs -cat output/*</code>
+        </p>
+
+		<p>
+		  完成全部操作后，停止守护进程：<br/>
+		  <code>$ bin/stop-all.sh</code>
+		</p>
+      </section>
+    </section>
+    
+    <section id="FullyDistributed">
+      <title>完全分布式模式的操作方法</title>
+      
+	  <p>关于搭建完全分布式模式的，有实际意义的集群的资料
+		  可以在<a href="cluster_setup.html">这里</a>找到。</p>  
+    </section>
+    
+    <p>
+	    <em>Java与JNI是Sun Microsystems, Inc.在美国以及其他国家地区的商标或注册商标。</em>
+    </p>
+    
+  </body>
+  
+</document>
Index: src/docs/cn/src/documentation/content/xdocs/mapred_tutorial.xml
===================================================================
--- src/docs/cn/src/documentation/content/xdocs/mapred_tutorial.xml	(revision 0)
+++ src/docs/cn/src/documentation/content/xdocs/mapred_tutorial.xml	(revision 0)
@@ -0,0 +1,2473 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2002-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.
+-->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+  
+  <header>
+    <title>Hadoop Map-Reduce教程</title>
+  </header>
+  
+  <body>
+  
+    <section>
+      <title>目的</title>
+      
+      <p>这篇教程从用户的角度出发，全面地介绍了Hadoop Map-Reduce框架的各个方面。</p>
+    </section>
+    
+    <section>
+      <title>先决条件</title>
+      
+      <p>请先确认Hadoop被正确安装、配置和正常运行中。更多信息见：</p> 
+      <ul>
+        <li>
+          <a href="quickstart.html">Hadoop快速入门</a>对初次使用者。
+        </li>
+        <li>
+          <a href="cluster_setup.html">Hadoop集群搭建</a>对大规模分布式集群。
+        </li>
+      </ul>
+    </section>
+    
+    <section>
+      <title>概述</title>
+      
+      <p>Hadoop Map-Reduce是一个使用简易的软件框架，基于它写出来的应用程序能够运行在
+      由上千个商用机器组成的大型集群上，并以一种可靠容错的方式并行处理上T级别的数据集。</p>
+      
+      <p>一个Map-Reduce <em>作业（job）</em> 通常会把输入的数据集切分为若干独立的数据块，由
+      <em>map任务（task）</em>以完全并行的方式处理它们。框架会对map的输出先进行排序，
+      然后把结果输入给<em>reduce任务</em>。通常作业的输入和输出都会被存储在文件系统中。
+      整个框架负责任务的调度和监控，以及重新执行已经失败的任务。</p>
+      
+      <p>通常，Map-Reduce框架和<a href="hdfs_design.html">分布式文件系统</a>是运行在
+      一组相同的节点上的，也就是说，计算节点和存储节点通常在一起。这种配置允许框架在那些
+      已经存好数据的节点上高效地调度任务，这可以使整个集群的网络带宽被非常高效地利用。</p>
+      
+      <p>Map-Reduce框架由单独一个master <code>JobTracker</code> 和每个集群节点一个
+      slave <code>TaskTracker</code>共同组成。这个master负责调度构成一个作业的所有任务，
+      这些任务分布在不同的slave上，master监控它们的执行，重新执行已经失败的任务。而slave
+      仅负责执行由master指派的任务。</p>
+      
+      <p>应用程序至少应该指明输入/输出的位置（路径），并通过实现合适的接口或抽象类提供map和reduce函数。
+      再加上其他作业的参数，就构成了<em>作业配置（job configuration）</em>。然后，Hadoop的 <em>job client</em>
+      提交作业（jar包/可执行程序 等）和配置信息给<code>JobTracker</code>，后者负责分发这些软件和配置信息
+      给slave、调度任务且监控它们的执行，同时提供状态和诊断信息给job-client。</p>
+      
+      <p>虽然Hadoop框架是用Java<sup>TM</sup>实现的，但Map-Reduce应用程序则不一定要用
+      Java来写 。</p>
+      <ul>
+        <li>
+          <a href="ext:api/org/apache/hadoop/streaming/package-summary">
+          Hadoop Streaming</a>是一种运行作业的实用工具，它允许用户创建和运行任何可执行程序
+          （例如：Shell工具）来做为mapper和reducer。
+        </li>
+        <li>
+          <a href="ext:api/org/apache/hadoop/mapred/pipes/package-summary">
+          Hadoop Pipes</a>是一个与<a href="http://www.swig.org/">SWIG</a>兼容的C++ API
+          （没有基于JNI<sup>TM</sup>技术），它也可用于实现Map-Reduce应用程序。
+        </li>
+      </ul>
+    </section>
+    
+    <section>
+      <title>输入与输出</title>
+
+      <p>Map-Reduce框架运转在<code>&lt;key, value&gt;</code> 键值对上，也就是说，
+      框架把作业的输入看为是一组<code>&lt;key, value&gt;</code> 键值对，同样也产出一组
+      <code>&lt;key, value&gt;</code> 键值对做为作业的输出，这两组键值对的类型可能不同。</p> 
+      
+      <p>框架需要对<code>key</code>和<code>value</code>的类(classes)进行序列化操作，
+      因此，这些类需要实现 <a href="ext:api/org/apache/hadoop/io/writable">Writable</a>接口。
+      另外，为了方便框架执行排序操作，<code>key</code>类必须实现
+      <a href="ext:api/org/apache/hadoop/io/writablecomparable">
+      WritableComparable</a>接口。
+      </p>
+
+      <p>一个Map-Reduce 作业的输入和输出类型如下所示：</p>
+      <p>
+        (input) <code>&lt;k1, v1&gt;</code> 
+        -&gt; 
+        <strong>map</strong> 
+        -&gt; 
+        <code>&lt;k2, v2&gt;</code> 
+        -&gt; 
+        <strong>combine</strong> 
+        -&gt; 
+        <code>&lt;k2, v2&gt;</code> 
+        -&gt; 
+        <strong>reduce</strong> 
+        -&gt; 
+        <code>&lt;k3, v3&gt;</code> (output)
+      </p>
+    </section>
+
+    <section>
+      <title>例子：WordCount v1.0</title>
+      
+      <p>在深入细节之前，让我们先看一个Map-Reduce的应用示例，以便对它们的工作方式有
+      一个初步的认识。</p>
+      
+      <p><code>WordCount</code>是一个简单的应用，它可以计算出指定数据集中每一个单词
+      出现的次数。</p>
+      
+      <p>这个应用适用于
+      <a href="quickstart.html#Standalone+Operation">单机模式</a>，
+      <a href="quickstart.html#SingleNodeSetup">伪分布式模式</a> 或
+      <a href="quickstart.html#Fully-Distributed+Operation">完全分布式模式</a> 
+      三种Hadoop安装方式。</p>
+      
+      <section>
+        <title>源代码</title>
+        
+        <table>
+          <tr>
+            <th></th>
+            <th>WordCount.java</th>
+          </tr>
+          <tr>
+            <td>1.</td>
+            <td>
+              <code>package org.myorg;</code>
+            </td>
+          </tr>
+          <tr>
+            <td>2.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>3.</td>
+            <td>
+              <code>import java.io.IOException;</code>
+            </td>
+          </tr>
+          <tr>
+            <td>4.</td>
+            <td>
+              <code>import java.util.*;</code>
+            </td>
+          </tr>
+          <tr>
+            <td>5.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>6.</td>
+            <td>
+              <code>import org.apache.hadoop.fs.Path;</code>
+            </td>
+          </tr>
+          <tr>
+            <td>7.</td>
+            <td>
+              <code>import org.apache.hadoop.conf.*;</code>
+            </td>
+          </tr>
+          <tr>
+            <td>8.</td>
+            <td>
+              <code>import org.apache.hadoop.io.*;</code>
+            </td>
+          </tr>
+          <tr>
+            <td>9.</td>
+            <td>
+              <code>import org.apache.hadoop.mapred.*;</code>
+            </td>
+          </tr>
+          <tr>
+            <td>10.</td>
+            <td>
+              <code>import org.apache.hadoop.util.*;</code>
+            </td>
+          </tr>
+          <tr>
+            <td>11.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>12.</td>
+            <td>
+              <code>public class WordCount {</code>
+            </td>
+          </tr>
+          <tr>
+            <td>13.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>14.</td>
+            <td>
+              &nbsp;&nbsp;
+              <code>
+                public static class Map extends MapReduceBase 
+                implements Mapper&lt;LongWritable, Text, Text, IntWritable&gt; {
+              </code>
+            </td>
+          </tr>
+          <tr>
+            <td>15.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>
+                private final static IntWritable one = new IntWritable(1);
+              </code>
+            </td>
+          </tr>
+          <tr>
+            <td>16.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>private Text word = new Text();</code>
+            </td>
+          </tr>
+          <tr>
+            <td>17.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>18.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>
+                public void map(LongWritable key, Text value, 
+                OutputCollector&lt;Text, IntWritable&gt; output, 
+                Reporter reporter) throws IOException {
+              </code>
+            </td>
+          </tr>
+          <tr>
+            <td>19.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>String line = value.toString();</code>
+            </td>
+          </tr>
+          <tr>
+            <td>20.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>StringTokenizer tokenizer = new StringTokenizer(line);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>21.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>while (tokenizer.hasMoreTokens()) {</code>
+            </td>
+          </tr>
+          <tr>
+            <td>22.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>word.set(tokenizer.nextToken());</code>
+            </td>
+          </tr>
+          <tr>
+            <td>23.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>output.collect(word, one);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>24.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>}</code>
+            </td>
+          </tr>
+          <tr>
+            <td>25.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>}</code>
+            </td>
+          </tr>
+          <tr>
+            <td>26.</td>
+            <td>
+              &nbsp;&nbsp;
+              <code>}</code>
+            </td>
+          </tr>
+          <tr>
+            <td>27.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>28.</td>
+            <td>
+              &nbsp;&nbsp;
+              <code>
+                public static class Reduce extends MapReduceBase implements 
+                Reducer&lt;Text, IntWritable, Text, IntWritable&gt; {
+              </code>
+            </td>
+          </tr>
+          <tr>
+            <td>29.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>
+                public void reduce(Text key, Iterator&lt;IntWritable&gt; values,
+                OutputCollector&lt;Text, IntWritable&gt; output, 
+                Reporter reporter) throws IOException {
+              </code>
+            </td>
+          </tr>
+          <tr>
+            <td>30.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>int sum = 0;</code>
+            </td>
+          </tr>
+          <tr>
+            <td>31.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>while (values.hasNext()) {</code>
+            </td>
+          </tr>
+          <tr>
+            <td>32.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>sum += values.next().get();</code>
+            </td>
+          </tr>
+          <tr>
+            <td>33.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>}</code>
+            </td>
+          </tr>
+          <tr>
+            <td>34.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <code>output.collect(key, new IntWritable(sum));</code>
+            </td>
+          </tr>
+          <tr>
+            <td>35.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>}</code>
+            </td>
+          </tr>
+          <tr>
+            <td>36.</td>
+            <td>
+              &nbsp;&nbsp;
+              <code>}</code>
+            </td>
+          </tr>
+          <tr>
+            <td>37.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>38.</td>
+            <td>
+              &nbsp;&nbsp;
+              <code>
+                public static void main(String[] args) throws Exception {
+              </code>
+            </td>
+          </tr>
+          <tr>
+            <td>39.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>
+                JobConf conf = new JobConf(WordCount.class);
+              </code>
+            </td>
+          </tr>
+          <tr>
+            <td>40.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>conf.setJobName("wordcount");</code>
+            </td>
+          </tr>
+          <tr>
+            <td>41.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>42.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>conf.setOutputKeyClass(Text.class);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>43.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>conf.setOutputValueClass(IntWritable.class);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>44.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>45.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>conf.setMapperClass(Map.class);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>46.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>conf.setCombinerClass(Reduce.class);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>47.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>conf.setReducerClass(Reduce.class);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>48.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>49.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>conf.setInputFormat(TextInputFormat.class);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>50.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>conf.setOutputFormat(TextOutputFormat.class);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>51.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>52.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>FileInputFormat.setInputPaths(conf, new Path(args[0]));</code>
+            </td>
+          </tr>
+          <tr>
+            <td>53.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>FileOutputFormat.setOutputPath(conf, new Path(args[1]));</code>
+            </td>
+          </tr>
+          <tr>
+            <td>54.</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td>55.</td>
+            <td>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <code>JobClient.runJob(conf);</code>
+            </td>
+          </tr>
+          <tr>
+            <td>57.</td>
+            <td>
+              &nbsp;&nbsp;
+              <code>}</code>
+            </td>
+          </tr>
+          <tr>
+            <td>58.</td>
+            <td>
+              <code>}</code>
+            </td>
+          </tr>
+          <tr>
+            <td>59.</td>
+            <td></td>
+          </tr>
+        </table>
+      </section>
+      
+      <section>
+        <title>用法</title>
+        
+        <p>假设环境变量<code>HADOOP_HOME</code>对应安装时的根目录，<code>HADOOP_VERSION</code>
+        对应Hadoop的当前安装版本，编译<code>WordCount.java</code>来创建jar包，可如下操作：</p>
+        <p>
+          <code>$ mkdir wordcount_classes</code><br/>
+          <code>
+            $ javac -classpath ${HADOOP_HOME}/hadoop-${HADOOP_VERSION}-core.jar 
+              -d wordcount_classes WordCount.java
+          </code><br/>
+          <code>$ jar -cvf /usr/joe/wordcount.jar -C wordcount_classes/ .</code> 
+        </p>
+        
+        <p>假设：</p>
+        <ul>
+          <li>
+            <code>/usr/joe/wordcount/input</code>  - 是HDFS中的输入路径
+          </li>
+          <li>
+            <code>/usr/joe/wordcount/output</code> - 是HDFS中的输出路径
+          </li>
+        </ul>
+        
+        <p>用示例文本文件做为输入：</p>
+        <p>
+          <code>$ bin/hadoop dfs -ls /usr/joe/wordcount/input/</code><br/>
+          <code>/usr/joe/wordcount/input/file01</code><br/>
+          <code>/usr/joe/wordcount/input/file02</code><br/>
+          <br/>
+          <code>$ bin/hadoop dfs -cat /usr/joe/wordcount/input/file01</code><br/>
+          <code>Hello World Bye World</code><br/>
+          <br/>
+          <code>$ bin/hadoop dfs -cat /usr/joe/wordcount/input/file02</code><br/>
+          <code>Hello Hadoop Goodbye Hadoop</code>
+        </p>
+
+        <p>运行应用程序：</p>
+        <p>
+          <code>
+            $ bin/hadoop jar /usr/joe/wordcount.jar org.myorg.WordCount 
+              /usr/joe/wordcount/input /usr/joe/wordcount/output 
+          </code>
+        </p>
+
+        <p>输出是：</p>
+        <p>
+          <code>
+            $ bin/hadoop dfs -cat /usr/joe/wordcount/output/part-00000
+          </code>
+          <br/>
+          <code>Bye    1</code><br/>
+          <code>Goodbye    1</code><br/>
+          <code>Hadoop    2</code><br/>
+          <code>Hello    2</code><br/>
+          <code>World    2</code><br/>
+        </p>
+      </section>
+      
+      <section>
+        <title>解释</title>
+        
+        <p><code>WordCount</code>应用程序非常直截了当。</p>
+        
+        <p><code>Mapper</code>(14-26行)中的<code>map</code>方法(18-25行)通过指定的
+        <code>TextInputFormat</code>(49行)一次处理一行。然后，它通过<code>StringTokenizer</code>
+        以空格为分隔符将一行切分为若干tokens，之后，输出<code>&lt; &lt;word&gt;, 1&gt;</code>
+        形式的键值对。</p>
+        
+        <p>
+        对于示例中的第一个输入，map输出是：<br/>
+          <code>&lt; Hello, 1&gt;</code><br/>
+          <code>&lt; World, 1&gt;</code><br/>
+          <code>&lt; Bye, 1&gt;</code><br/>
+          <code>&lt; World, 1&gt;</code><br/>
+        </p>
+        
+        <p>
+          第二个输入，map输出是：<br/>
+          <code>&lt; Hello, 1&gt;</code><br/>
+          <code>&lt; Hadoop, 1&gt;</code><br/>
+          <code>&lt; Goodbye, 1&gt;</code><br/>
+          <code>&lt; Hadoop, 1&gt;</code><br/>
+        </p>
+        
+        <p>关于组成一个指定作业的map数目的确定，以及如何以更精细的方式去控制这些map，我们
+        将在教程的后续部分学习到更多的内容。</p>
+        
+        <p><code>WordCount</code>还指定了一个<code>combiner</code> (46行)。因此，每次map过程介绍之后，会对输出按照<em>key</em>进行排序，然后把输出传递给本地的combiner（按照作业的配置是与Reducer一样的，都使用的是Reduce.class），进行本地聚合。</p>
+
+        <p>
+          这时第一个map的输出是：<br/>
+          <code>&lt; Bye, 1&gt;</code><br/>
+          <code>&lt; Hello, 1&gt;</code><br/>
+          <code>&lt; World, 2&gt;</code><br/>
+        </p>
+        
+        <p>
+          而第二个map的输出是：<br/>
+          <code>&lt; Goodbye, 1&gt;</code><br/>
+          <code>&lt; Hadoop, 2&gt;</code><br/>
+          <code>&lt; Hello, 1&gt;</code><br/>
+        </p>
+
+        <p><code>Reducer</code>(28-36行)中的<code>reduce</code>方法(29-35行)
+        仅是将每个key（本例中就是单词）出现的次数求和。
+        </p>
+        
+        <p>
+          因此这个作业的输出就是：<br/>
+          <code>&lt; Bye, 1&gt;</code><br/>
+          <code>&lt; Goodbye, 1&gt;</code><br/>
+          <code>&lt; Hadoop, 2&gt;</code><br/>
+          <code>&lt; Hello, 2&gt;</code><br/>
+          <code>&lt; World, 2&gt;</code><br/>
+        </p>
+        
+        <p>代码中的<code>run</code>方法中指定了作业的几个方面，
+        例如：通过命令行传递过来的输入/输出路径、key/value的类型、输入/输出的格式等等<code>JobConf</code>中的配置信息。
+        随后程序调用了<code>JobClient.runJob</code>(55行)来提交作业并且监控它的执行。</p>
+
+        <p>我们将在本教程的后续部分学习更多的关于<code>JobConf</code>， <code>JobClient</code>，
+        <code>Tool</code>和其他接口和类(class)。</p>
+      </section>
+    </section>
+    
+    <section>
+      <title>Map-Reduce - 用户界面</title>
+      
+      <p>这部分文档为用户将会面临的Map-Reduce框架中的各个环节提供了适当的细节。这应该会
+      帮助用户更细粒度地去实现、配置和调优作业。然而，请注意每个类/接口的javadoc文档依然
+      是能提供最全面的文档；本文只是想起到教程的作用。
+      </p>
+      
+      <p>我们会先看看<code>Mapper</code>和<code>Reducer</code>接口。应用程序
+      通常会通过提供<code>map</code>和<code>reduce</code>方法来实现它们。
+      </p>
+      
+      <p>然后，我们会讨论其他的核心接口，其中包括：
+      <code>JobConf</code>，<code>JobClient</code>，<code>Partitioner</code>， 
+      <code>OutputCollector</code>，<code>Reporter</code>， 
+      <code>InputFormat</code>，<code>OutputFormat</code>等等。</p>
+      
+      <p>最后，我们将以通过讨论框架一些有用的功能点（例如：<code>DistributedCache</code>， 
+      <code>IsolationRunner</code>等等）的方式来收尾。</p>
+
+      <section>
+        <title>核心功能描述</title>
+        
+        <p>应用程序通常会通过提供<code>map</code>和<code>reduce</code>来实现
+        <code>Mapper</code>和<code>Reducer</code>接口，它们组成作业的核心。</p>
+        
+        <section>
+          <title>Mapper</title>
+
+          <p><a href="ext:api/org/apache/hadoop/mapred/mapper">
+          Mapper</a>将输入键值对(key/value pair)映射到一组中间格式的
+          键值对集合。</p>
+ 
+          <p>Map是一类将输入记录集转换为中间格式记录集的独立任务。
+          这种转换的中间格式记录集不需要与输入记录集的类型一致。一个给定的输入键值对可以映射
+          成0个或多个输出键值对。</p> 
+ 
+          <p>Hadoop Map-Reduce框架为每一个<code>InputSplit</code>产生一个map任务，
+          而每个<code>InputSplit</code>是由对应每个作业的<code>InputFormat</code>产生的。</p>
+          
+          <p>概括地说，对<code>Mapper</code>的实现者需要重写
+          <a href="ext:api/org/apache/hadoop/mapred/jobconfigurable/configure">
+          JobConfigurable.configure(JobConf)</a>方法，这个方法需要传递一个<code>JobConf</code>参数，
+          目的是完成Mapper的初始化工作。然后，框架为这个任务的<code>InputSplit</code>中每个键值对调用一次
+          <a href="ext:api/org/apache/hadoop/mapred/mapper/map">
+          map(WritableComparable, Writable, OutputCollector, Reporter)</a>操作。
+          之后，应用程序可以通过重写<a href="ext:api/org/apache/hadoop/io/closeable/close">
+          Closeable.close()</a>方法来执行相应的清理工作。</p>
+ 
+          <p>输出键值对不需要与输入键值对的类型一致。一个给定的输入键值对可以映射
+          成0个或多个输出键值对。通过调用<a href="ext:api/org/apache/hadoop/mapred/outputcollector/collect">
+          OutputCollector.collect(WritableComparable,Writable)</a>可以收集输出的键值对。</p>
+
+          <p>应用程序可以使用<code>Reporter</code>报告进度，设定应用级别的状态消息，
+          更新<code>Counters</code>（计数器），或者仅是表明自己运行正常。</p>
+ 
+          <p>框架随后会把与一个特定key关联的所有中间过程的值（value）分成组，然后把
+          它们传给<code>Reducer</code>以产出最终的结果。用户可以通过
+          <a href="ext:api/org/apache/hadoop/mapred/jobconf/setoutputkeycomparatorclass">
+          JobConf.setOutputKeyComparatorClass(Class)</a>来指定具体负责分组的
+          <code>Comparator</code>。</p>
+
+          <p><code>Mapper</code>的输出被排序后，就被划分给每个<code>Reducer</code>。
+          分块的总数目和一个作业的reduce任务的数目是一样的。用户可以通过实现自定义的
+          <code>Partitioner</code>来控制哪个key被分配去哪个 <code>Reducer</code>。</p>
+ 
+          <p>用户可选择通过<a href="ext:api/org/apache/hadoop/mapred/jobconf/setcombinerclass">
+          JobConf.setCombinerClass(Class)</a>指定一个<code>combiner</code>，它负责
+          对中间过程的输出进行本地的聚集，这会有助于降低从<code>Mapper</code>到
+          <code>Reducer</code>数据传输量。
+          </p>
+ 
+          <p>这些被排好序的中间过程的输出结果通常是以<a href="ext:api/org/apache/hadoop/io/sequencefile">
+          SequenceFile</a>格式的文件被存放的。应用程序可以通过<code>JobConf</code>控制对这些中间结果是否进行压缩
+          以及怎么压缩，使用哪种<a href="ext:api/org/apache/hadoop/io/compress/compressioncodec">
+          CompressionCodec</a>。
+          </p>
+          
+          <section>
+            <title>需要多少个Map？</title>
+             
+            <p>Map的数目通常是由输入数据的大小决定的，一般就是所有输入文件的总块（block）数。</p>
+  
+            <p>Map正常的并行规模大致是每个节点（node）大约10到100个map，对于CPU
+            消耗较小的map任务也曾到达过300个的规模。由于每个任务初始化需要一定的时间，因此，
+            比较合理的情况是map执行的时间至少超过1分钟。</p>
+ 
+            <p>这样，如果你输入10TB的数据，每个块（block）的大小是128MB，你将需要大约
+            82,000个map来完成任务，除非使用
+            <a href="ext:api/org/apache/hadoop/mapred/jobconf/setnummaptasks">
+            setNumMapTasks(int)</a>（注意：这里仅仅是对框架进行了一个提示(hint)，
+            实际决定因素见<a href="ext:api/org/apache/hadoop/mapred/jobconf/setnummaptasks">这里
+            </a>）将这个数值设置得更高。</p>
+          </section>
+        </section>
+        
+        <section>
+          <title>Reducer</title>
+          
+          <p><a href="ext:api/org/apache/hadoop/mapred/reducer">
+          Reducer</a>将与一个key关联的一组中间数值集归约（reduce）为一个更小的数值集。</p>
+          
+          <p>用户可以通过<a href="ext:api/org/apache/hadoop/mapred/jobconf/setnumreducetasks">
+          JobConf.setNumReduceTasks(int)</a>设定一个作业中reduce任务的数目。</p>
+          
+          <p>概括地说，对<code>Reducer</code>的实现者需要重写
+          <a href="ext:api/org/apache/hadoop/mapred/jobconfigurable/configure">
+          JobConfigurable.configure(JobConf)</a>方法，这个方法需要传递一个<code>JobConf</code>参数，
+          目的是完成Reducer的初始化工作。然后，框架为成组的输入数据中的每个
+          <code>&lt;key, (list of values)&gt;</code>对调用一次
+          <a href="ext:api/org/apache/hadoop/mapred/reducer/reduce">
+          reduce(WritableComparable, Iterator, OutputCollector, Reporter)</a>方法。
+          之后，应用程序可以通过重写<a href="ext:api/org/apache/hadoop/io/closeable/close">
+          Closeable.close()</a>来执行相应的清理工作。</p>
+
+          <p><code>Reducer</code>有3个主要阶段：shuffle、sort和reduce。
+          </p>
+          
+          <section>
+            <title>Shuffle</title>
+   
+            <p><code>Reducer</code>的输入就是Mapper已经排好序的输出。在这个阶段，
+            框架通过HTTP为每个Reducer获得所有Mapper输出中与之相关的分块。</p>
+          </section>
+   
+          <section>
+            <title>Sort</title>
+   
+            <p>这个阶段，框架将按照key的值对<code>Reducer</code>的输入进行分组
+            （因为不同mapper的输出中可能会有相同的key）。</p>
+   
+            <p>Shuffle和Sort两个阶段是同时进行的；map的输出也是一边被取回
+            一边被合并的。</p>
+      
+            <section>
+              <title>Secondary Sort</title>
+   
+              <p>如果中间过程key的判等规则和最初reduce之前的规则不同，
+              那么可以通过<a href="ext:api/org/apache/hadoop/mapred/jobconf/setoutputvaluegroupingcomparator">
+              JobConf.setOutputValueGroupingComparator(Class)</a>来指定
+              一个<code>Comparator</code>。再加上
+              <a href="ext:api/org/apache/hadoop/mapred/jobconf/setoutputkeycomparatorclass">
+              JobConf.setOutputKeyComparatorClass(Class)</a>可用于控制
+              中间过程的key如何被分组，所以结合两者可以实现<em>按值的二次排序</em>。
+              </p>
+            </section>
+          </section>
+   
+          <section>   
+            <title>Reduce</title>
+   
+            <p>在这个阶段，框架为已分组的输入数据中的每个
+          <code>&lt;key, (list of values)&gt;</code>对调用一次
+          <a href="ext:api/org/apache/hadoop/mapred/reducer/reduce">
+          reduce(WritableComparable, Iterator, OutputCollector, Reporter)</a>方法。</p>
+            
+            <p>Reduce任务的输出通常是通过调用
+            <a href="ext:api/org/apache/hadoop/mapred/outputcollector/collect">
+            OutputCollector.collect(WritableComparable, Writable)</a>写入
+            <a href="ext:api/org/apache/hadoop/fs/filesystem">
+            文件系统</a>的。</p>
+   
+          <p>应用程序可以使用<code>Reporter</code>报告进度，设定应用级别的状态消息，
+          更新<code>Counters</code>（计数器），或者仅是表明自己运行正常。</p>
+
+	  <p><code>Reducer</code>的输出是<em>没有排序的</em>。</p>
+          </section>
+          
+          <section>
+            <title>需要多少个Reduce？</title>
+ 
+            <p>Reduce的数目建议是<code>0.95</code>或<code>1.75</code>乘以
+            (&lt;<em>no. of nodes</em>&gt; * 
+            <code>mapred.tasktracker.reduce.tasks.maximum</code>)
+            </p>
+ 
+            <p>用0.95，所有reduce可以在maps一完成时就立刻启动，开始传输map的输出结果。
+            用1.75，速度快的节点可以在完成第一轮reduce任务后，可以开始第二轮，这样可以得到比较
+            好的负载均衡的效果。</p>
+ 
+            <p>增加reduce的数目会增加整个框架的开销，但可以改善负载均衡，降低由于
+            执行失败带来的负面影响。</p>
+ 
+            <p>上述比例因子比整体数目稍小一些是为了给框架中的推测性任务（speculative-tasks）
+            或失败的任务预留一些reduce的资源。</p>
+          </section>
+          
+          <section>
+            <title>无Reducer</title>
+            
+	    <p>如果没有归约要进行，那么设置reduce任务的数目为<em>零</em>是合法的。</p>
+ 
+            <p>这种情况下，map任务的输出会直接被写入由
+            <a href="ext:api/org/apache/hadoop/mapred/fileoutputformat/setoutputpath">
+		    setOutputPath(Path)</a>指定的输出路径。框架在把它们写入<code>FileSystem</code>之前没有对
+          它们进行排序。
+            </p>
+          </section>
+        </section>
+        
+        <section>
+          <title>Partitioner</title>
+          
+          <p><a href="ext:api/org/apache/hadoop/mapred/partitioner">
+          Partitioner</a>用于划分键值空间（key space）。</p>
+          
+          <p>Partitioner负责控制map输出结果key的分割。Key（或者一个key子集）被用于产生
+          分区，通常使用的是Hash函数。分区的数目与一个作业的reduce任务的数目是一样的。因此，它
+          控制将中间过程的key（也就是这条记录）应该发送给<code>m</code>个reduce任务中的哪一个来进行reduce操作。
+	  </p>
+          
+          <p><a href="ext:api/org/apache/hadoop/mapred/lib/hashpartitioner">
+          HashPartitioner</a>是默认的 <code>Partitioner</code>。  </p>
+        </section>
+        
+        <section>
+          <title>Reporter</title>
+
+          <p><a href="ext:api/org/apache/hadoop/mapred/reporter">
+          Reporter</a>是用于Map-Reduce应用程序报告进度，设定应用级别的状态消息，
+          更新<code>Counters</code>（计数器）的机制。</p>
+   
+          <p><code>Mapper</code>和<code>Reducer</code>的实现可以利用<code>Reporter</code>
+          来报告进度，或者仅是表明自己运行正常。在那种应用程序花了很长时间处理个别键值对的场景中，
+          这种机制是很关键的，因为否则框架可能会以为这个任务超时了，从而将它强行杀死。另一个避免这种情况
+          发生的方式是，将配置参数<code>mapred.task.timeout</code>设置为一个足够高的值（或者干脆
+          设置为零，则没有超时限制了）。
+          </p>
+
+          <p>应用程序可以用<code>Reporter</code>来更新更新<code>Counter</code>（计数器）。
+          </p>
+        </section>
+      
+        <section>
+          <title>OutputCollector</title>
+        
+          <p><a href="ext:api/org/apache/hadoop/mapred/outputcollector">
+          OutputCollector</a>是一个Map-Reduce框架提供的用于收集
+          <code>Mapper</code>或<code>Reducer</code>输出数据的通用机制
+          （包括中间输出结果和作业的输出结果）。</p>
+        </section>
+      
+        <p>Hadoop Map-Reduce框架附带了一个包含许多实用型的mapper、reducer和partitioner
+        的<a href="ext:api/org/apache/hadoop/mapred/lib/package-summary">类库</a>。</p>
+      </section>
+      
+      <section>
+        <title>作业配置</title>
+        
+        <p><a href="ext:api/org/apache/hadoop/mapred/jobconf">
+        JobConf</a>代表一个Map-Reduce作业的配置。</p>
+ 
+        <p><code>JobConf</code>是用户向Hadoop框架描述一个map-reduce作业如何
+        执行的主要接口。框架会按照<code>JobConf</code>描述的信息忠实地去尝试完成这个作业，
+        然而：</p> 
+        <ul>
+          <li>
+            一些参数可能会被管理者标记为<a href="ext:api/org/apache/hadoop/conf/configuration/final_parameters">
+            final</a>，这意味它们不能被更改。
+          </li>
+          <li>
+          一些作业的参数可以被直截了当地进行设置（例如：
+          <a href="ext:api/org/apache/hadoop/mapred/jobconf/setnumreducetasks">
+            setNumReduceTasks(int)</a>），而另一些参数则与框架或者作业的其他参数之间
+            微妙地相互影响，并且设置起来比较复杂（例如：<a href="ext:api/org/apache/hadoop/mapred/jobconf/setnummaptasks">
+            setNumMapTasks(int)</a>）。
+          </li>
+        </ul>
+ 
+        <p>通常，<code>JobConf</code>会指明<code>Mapper</code>、Combiner(如果有的话)、
+        <code>Partitioner</code>、<code>Reducer</code>、<code>InputFormat</code>和 
+        <code>OutputFormat</code>的具体实现。<code>JobConf</code>还能指定一组输入文件
+        (<a href="ext:api/org/apache/hadoop/mapred/fileinputformat/setinputpaths">setInputPaths(JobConf, Path...)</a>
+        /<a href="ext:api/org/apache/hadoop/mapred/fileinputformat/addinputpath">addInputPath(JobConf, Path)</a>)
+        和(<a href="ext:api/org/apache/hadoop/mapred/fileinputformat/setinputpathstring">setInputPaths(JobConf, String)</a>
+        /<a href="ext:api/org/apache/hadoop/mapred/fileinputformat/addinputpathstring">addInputPaths(JobConf, String)</a>)
+        以及输出文件应该写在哪儿
+        (<a href="ext:api/org/apache/hadoop/mapred/fileoutputformat/setoutputpath">setOutputPath(Path)</a>)。</p>
+
+        <p><code>JobConf</code>可选择地对作业设置一些高级选项，例如：设置<code>Comparator</code>；
+        放到<code>DistributedCache</code>上的文件；中间结果或者作业输出结果是否需要压缩以及怎么压缩；
+        利用用户提供的脚本(<a href="ext:api/org/apache/hadoop/mapred/jobconf/setmapdebugscript">setMapDebugScript(String)</a>/<a href="ext:api/org/apache/hadoop/mapred/jobconf/setreducedebugscript">setReduceDebugScript(String)</a>)     
+        进行调试；作业是否允许<em>推测性（speculative）</em>任务的执行
+        (<a href="ext:api/org/apache/hadoop/mapred/jobconf/setmapspeculativeexecution">setMapSpeculativeExecution(boolean)</a>)/(<a href="ext:api/org/apache/hadoop/mapred/jobconf/setreducespeculativeexecution">setReduceSpeculativeExecution(boolean)</a>)
+        ；每个任务最大的尝试次数
+        (<a href="ext:api/org/apache/hadoop/mapred/jobconf/setmaxmapattempts">setMaxMapAttempts(int)</a>/<a href="ext:api/org/apache/hadoop/mapred/jobconf/setmaxreduceattempts">setMaxReduceAttempts(int)</a>)
+        ；一个作业能容忍的任务失败的百分比
+        (<a href="ext:api/org/apache/hadoop/mapred/jobconf/setmaxmaptaskfailurespercent">setMaxMapTaskFailuresPercent(int)</a>/<a href="ext:api/org/apache/hadoop/mapred/jobconf/setmaxreducetaskfailurespercent">setMaxReduceTaskFailuresPercent(int)</a>) 
+        ；等等。</p>
+        
+        <p>当然，用户能使用
+        <a href="ext:api/org/apache/hadoop/conf/configuration/set">set(String, String)</a>/<a href="ext:api/org/apache/hadoop/conf/configuration/get">get(String, String)</a>
+        来设置或者取得应用程序需要的任意参数。然而，<code>DistributedCache</code>的使用是
+        面向大规模只读数据的。</p>
+      </section>
+
+      <section>
+        <title>任务的执行和环境</title>
+
+        <p><code>TaskTracker</code>是在一个单独的jvm上以子进程的形式执行
+        <code>Mapper</code>/<code>Reducer</code>任务（Task）的。
+        </p>
+        
+        <p>子任务会继承父<code>TaskTracker</code>的环境。用户可以通过JobConf中的
+        <code>mapred.child.java.opts</code>配置参数来设定子jvm上的附加选项，例如：
+        通过<code>-Djava.library.path=&lt;&gt;</code> 将一个非标准路径设为运行时的链接
+        用以搜索共享库，等等。如果<code>mapred.child.java.opts</code>包含一个符号<em>@taskid@</em>，
+        它会被替换成map/reduce的taskid的值。</p>
+        
+        <p>下面是一个包含多个参数和替换的例子，其中包括：记录jvm GC日志；
+        JVM JMX代理程序以无密码的方式启动，这样它就能连接到jconsole上，从而
+        可以查看子进程的内存和线程，得到线程的dump；还把子jvm的最大堆尺寸设置为512MB，
+        并为子jvm的<code>java.library.path</code>添加了一个附加路径。</p>
+
+        <p>
+          <code>&lt;property&gt;</code><br/>
+          &nbsp;&nbsp;<code>&lt;name&gt;mapred.child.java.opts&lt;/name&gt;</code><br/>
+          &nbsp;&nbsp;<code>&lt;value&gt;</code><br/>
+          &nbsp;&nbsp;&nbsp;&nbsp;<code>
+                    -Xmx512M -Djava.library.path=/home/mycompany/lib
+                    -verbose:gc -Xloggc:/tmp/@taskid@.gc</code><br/>
+          &nbsp;&nbsp;&nbsp;&nbsp;<code>
+                    -Dcom.sun.management.jmxremote.authenticate=false 
+                    -Dcom.sun.management.jmxremote.ssl=false</code><br/>
+          &nbsp;&nbsp;<code>&lt;/value&gt;</code><br/>
+          <code>&lt;/property&gt;</code>
+        </p>
+        
+        <p>用户或管理员也可以使用<code>mapred.child.ulimit</code>设定已运行
+        的子任务的最大虚拟内存。</p>
+        
+        <p>当一个作业开始运行后，本地的作业目录
+        <code> ${mapred.local.dir}/taskTracker/jobcache/$jobid/</code>
+        中有如下的目录：</p>
+        <ul>
+        <li>一个创建在本地的、作业专有的共享目录
+        <code>${mapred.local.dir}/taskTracker/jobcache/$jobid/work/</code>。
+        这个目录通过<code>job.local.dir </code>参数暴露给用户。各个任务可以使用这个空间
+        做为暂存空间，用于它们之间共享文件。这个路径可以通过API <a href="ext:api/org/apache/hadoop/mapred/jobconf/getjoblocaldir">
+        JobConf.getJobLocalDir()</a>来访问。它也可以被做为系统属性获得，因此，
+        用户可以调用<code>System.getProperty("job.local.dir")</code>；
+        </li>
+        <li>一个jar路径，用于存放作业的jar文件和展开的jar。</li>
+        <li>一个job.xml文件，通用的作业配置文件。</li>
+        <li>每个任务有一个目录<code>task-id</code>，它里面有如下的目录结构：
+        <ul>
+        <li>一个job.xml文件，任务本地的作业配置文件。</li>
+        <li>一个存放中间过程的输出文件的目录。</li>
+        <li>这个任务的工作目录，目录中有一个临时目录用来创建临时文件。</li>
+        </ul>
+        </li>
+        </ul>
+ 
+        <p><a href="#DistributedCache">DistributedCache</a>可在map/reduce任务中作为
+        一种基础软件分发机制使用。它可以被用于分发jar包和本地库（native libraries）。
+        <a href="ext:api/org/apache/hadoop/filecache/distributedcache/addarchivetoclasspath">
+        DistributedCache.addArchiveToClassPath(Path, Configuration)</a>和 
+        <a href="ext:api/org/apache/hadoop/filecache/distributedcache/addfiletoclasspath">
+        DistributedCache.addFileToClassPath(Path, Configuration)</a> API能够被用于
+        缓存文件和jar包，并把它们加入子jvm的<em>classpath</em>。
+        <code>DistributedCache</code>在任务的工作目录下创建到缓存文件的符号连接，
+	因此这种机制可被用于分发原生库并装载它们。这背后的细节是：执行任务的子jvm实际上总是把自己的<em>当前工作目录</em>
+	添加到<code>java.library.path</code>中，因此，通过
+        <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#loadLibrary(java.lang.String)">
+        System.loadLibrary</a>或者<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#load(java.lang.String)">
+        System.load</a>可以装载已经被缓存的库。</p>
+      </section>
+      
+      <section>
+        <title>作业的提交与监控</title>
+        
+        <p><a href="ext:api/org/apache/hadoop/mapred/jobclient">
+        JobClient</a>是用户提交的作业与<code>JobTracker</code>交互的主要接口。
+        </p>
+ 
+        <p><code>JobClient</code> 提供提交作业，
+	追踪进程，访问子任务的日志记录，
+	获得Map-reduce集群状态信息等功能。
+        </p>
+ 
+        <p>作业提交过程包括： </p>
+        <ol>
+          <li>检查作业输入输出样式细节</li>
+          <li>为作业计算<code>InputSplit</code>值。</li>
+          <li>
+           如果需要的话，为作业的<code>DistributedCache</code>建立必须的统计信息。
+          </li>
+          <li>
+            拷贝作业的jar和配置文件到<code>FileSystem</code>上的map-reduce系统目录下。
+          </li>
+          <li>
+            提交作业到<code>JobTracker</code>并且监控它的状态。
+          </li>
+        </ol>
+        <p>作业的历史文件记录到指定目录的"_logs/history/" 子目录下。
+        这个指定目录由<code>hadoop.job.history.user.location</code>设定，
+        默认是作业输出的目录。 
+        因此默认情况下，文件会存放在
+        mapred.output.dir/_logs/history目录下。用户可以设置 
+	<code>hadoop.job.history.user.location</code>为<code>none</code>来停止日志记录。
+        </p>
+
+        <p> 用户使用下面的命令可以看到在指定目录下的历史日志记录的摘要。
+        <br/>
+        <code>$ bin/hadoop job -history output-dir</code><br/> 
+        这个命令会打印出作业的细节，以及失败的和被杀死的任务细节。<br/>
+        要查看有关作业的更多细节例如成功的任务、任务尝试（task attempt）等，可以使用下面命令
+        <br/>
+       <code>$ bin/hadoop job -history all output-dir</code><br/></p> 
+            
+        <p>用户可以使用 
+        <a href="ext:api/org/apache/hadoop/mapred/outputlogfilter">OutputLogFilter</a>
+        从输出目录列表中筛选日志文件。</p>
+        
+        <p>一般情况，用户利用<code>JobConf</code>创建应用程序并配置作业属性，
+        然后用
+        <code>JobClient</code> 提交作业并监视它的进程。</p>
+
+        <section>
+          <title>作业的控制</title>
+ 
+          <p>有时候，用一个单独的map-reduce作业并不能完成一个复杂的任务，用户也许要链接多个map-reduce作业才行。
+		这是容易实现的，因为作业的输出到分布式文件系统上的，
+		所以可以把这个作业的输出作为下一个作业的输入实现串联。
+          </p>
+ 
+          <p>然而，这也意味着，确保每一作业完成(成功或失败)的责任就直接落在了客户身上。         
+          因此，需要很多控制作业的选项：
+          </p>
+          <ul>
+            <li>
+              <a href="ext:api/org/apache/hadoop/mapred/jobclient/runjob">
+              runJob(JobConf)</a>：提交作业，仅当作业完成时返回。
+            </li>
+            <li>
+              <a href="ext:api/org/apache/hadoop/mapred/jobclient/submitjob">
+              submitJob(JobConf)</a>：只提交作业，之后需要你轮询它返回的
+              <a href="ext:api/org/apache/hadoop/mapred/runningjob">
+              RunningJob</a>句柄的状态，并根据情况调度。
+            </li>
+            <li>
+              <a href="ext:api/org/apache/hadoop/mapred/jobconf/setjobendnotificationuri">
+              JobConf.setJobEndNotificationURI(String)</a>：设置一个作业完成通知，可避免轮询。
+           
+            </li>
+          </ul>
+        </section>
+      </section>
+
+      <section>
+        <title>作业的输入</title>
+        
+        <p><a href="ext:api/org/apache/hadoop/mapred/inputformat">
+        InputFormat</a> 为Map-Reduce 作业描述输入的细节规范。
+        </p> 
+ 
+        <p>Map-Reduce框架根据作业的<code>InputFormat</code>来： 
+        </p>
+        <ol>
+          <li>检查作业输入的有效性。</li>
+          <li>
+            把输入文件切分成多个逻辑<code>InputSplit</code>实例，
+            并把每一实例分别分发给一个
+            <code>Mapper</code>。
+          </li>
+          <li>
+            提供<code>RecordReader</code>的实现，这个RecordReader从逻辑<code>InputSplit</code>中获得输入记录，
+		这些记录将由<code>Mapper</code>处理。 
+          </li>
+        </ol>
+ 
+        <p>基于文件的<code>InputFormat</code>实现（通常是
+	<a href="ext:api/org/apache/hadoop/mapred/fileinputformat">
+        FileInputFormat</a>的子类）
+	默认行为是按照输入文件的字节大小，把输入数据切分成逻辑分块（<em>logical</em> 
+        <code>InputSplit</code> ）。	
+        其中输入文件所在的<code>FileSystem</code>的数据块尺寸是分块大小的上限。下限可以设置<code>mapred.min.split.size</code>
+	的值得到。</p>
+ 
+        <p>考虑到边界情况，对于很多应用程序来说，很明显按照文件大小进行逻辑分割是不能满足需求的。
+        在这种情况下，应用程序需要实现一个<code>RecordReader</code>来处理记录的边界并为每个任务提供一个逻辑分块的面向记录的视图。
+        </p>
+
+        <p><a href="ext:api/org/apache/hadoop/mapred/textinputformat">
+        TextInputFormat</a> 是默认的<code>InputFormat</code>。</p>
+        
+        <p>如果一个作业的<code>Inputformat</code>是<code>TextInputFormat</code>，
+        并且框架检测到输入文件的后缀是<em>.gz</em>和<em>.lzo</em>，就会使用对应的<code>CompressionCodec</code>自动解压缩这些文件。
+        但是需要注意，上述带后缀的压缩文件不会被切分，并且整个压缩文件会分给一个mapper来处理。
+        </p>
+        
+        <section>
+          <title>InputSplit</title>
+          
+          <p><a href="ext:api/org/apache/hadoop/mapred/inputsplit">
+          InputSplit</a> 是一个单独的<code>Mapper</code>要处理的数据块。</p>
+
+          <p>一般的<code>InputSplit</code> 是字节样式
+          输入，然后由<code>RecordReader</code>处理并转化成记录样式。
+          </p>
+          
+          <p><a href="ext:api/org/apache/hadoop/mapred/filesplit">
+			  FileSplit</a> 是默认的<code>InputSplit</code>。 它把
+          <code>map.input.file</code> 设定为输入文件的路径，输入文件是逻辑分块文件。
+          </p>
+        </section>
+        
+        <section>
+          <title>RecordReader</title>
+          
+          <p><a href="ext:api/org/apache/hadoop/mapred/recordreader">
+          RecordReader</a> 从<code>InputSlit</code>读入<code>&lt;key, value&gt;</code>对。 
+          </p>
+
+          <p>一般的，<code>RecordReader</code> 把由<code>InputSplit</code>
+	  提供的字节样式的输入文件，转化成由<code>Mapper</code>处理的记录样式的文件。
+          因此<code>RecordReader</code>负责处理记录的边界情况和把数据表示成keys/values对形式。
+          </p>
+        </section>
+      </section>
+
+      <section>
+        <title>作业的输出</title>
+        
+        <p><a href="ext:api/org/apache/hadoop/mapred/outputformat">
+        OutputFormat</a> 描述Map-Reduce 作业的输出样式。
+        </p>
+
+        <p>Map-Reduce框架根据作业的<code>OutputFormat</code>来：
+        </p>
+        <ol>
+          <li>
+            检验作业的输出，例如检查输出路径是否已经存在。
+          </li>
+          <li>
+            提供一个<code>RecordWriter</code>的实现，用来输出作业结果。
+            输出文件保存在<code>FileSystem</code>上。
+          </li>
+        </ol>
+ 
+        <p><code>TextOutputFormat</code>是默认的
+        <code>OutputFormat</code>。</p>
+ 
+        <section>
+          <title>任务的Side-Effect File</title>
+ 
+          <p>在一些应用程序中，子任务需要产生一些side-file，这些文件与作业实际输出结果的文件不同。
+          </p>
+ 
+	  <p>在这种情况下，同一个<code>Mapper</code>或者<code>Reducer</code>的两个实例（比如预防性任务）同时打开或者写
+	  <code>FileSystem</code>上的同一文件就会产生冲突。因此应用程序在写文件的时候需要为每次任务尝试（不仅仅是每次任务，每个任务可以尝试执行很多次）选取一个独一无二的文件名
+          (使用taskid，例如<code>task_200709221812_0001_m_000000_0</code>)。 
+          </p> 
+ 
+          <p>为了避免冲突，Map-Reduce框架为每次尝试执行任务都建立和维护一个特殊的
+          <code>${mapred.output.dir}/_temporary/_${taskid}</code>子目录，这个目录位于本次尝试执行任务输出结果所在的<code>FileSystem</code>上，可以通过
+          <code>${mapred.work.output.dir}</code>来访问这个子目录。
+          对于成功完成的任务尝试，
+          只有<code>${mapred.output.dir}/_temporary/_${taskid}</code>下的文件会 
+          <em>移动</em>到<code>${mapred.output.dir}</code>。当然，
+	  框架会丢弃那些失败的任务尝试的子目录。
+          这种处理过程对于应用程序来说是完全透明的。</p>
+ 
+          <p>在任务执行期间，应用程序在写文件时可以利用这个特性，比如
+	  通过<a href="ext:api/org/apache/hadoop/mapred/fileoutputformat/getworkoutputpath">
+          FileOutputFormat.getWorkOutputPath()</a>获得<code>${mapred.work.output.dir}</code>目录，
+	  并在其下创建任意任务执行时所需的side-file，框架在任务尝试成功时会马上移动这些文件，因此不需要在程序内
+	  为每次任务尝试选取一个独一无二的名字。
+          </p>
+          
+          <p>注意：在每次任务尝试执行期间，<code>${mapred.work.output.dir}</code> 的值
+          实际上是 
+          <code>${mapred.output.dir}/_temporary/_{$taskid}</code>，这个值是map-reduce框架创建的。
+          所以使用这个特性的方法是，在<a href="ext:api/org/apache/hadoop/mapred/fileoutputformat/getworkoutputpath">
+          FileOutputFormat.getWorkOutputPath() </a>
+	  路径下创建side-file即可。
+	  </p>
+          
+          <p>对于只使用map不使用reduce的作业，这个结论也成立。这种情况下，map的输出结果直接生成到HDFS上。
+           </p> 
+        </section>
+        
+        <section>
+          <title>RecordWriter</title>
+          
+          <p><a href="ext:api/org/apache/hadoop/mapred/recordwriter">
+          RecordWriter</a> 生成<code>&lt;key, value&gt;</code> 
+          对到输出文件。</p>
+
+          <p>RecordWriter的实现把作业的输出结果写到
+          <code>FileSystem</code>。</p>
+        </section>
+      </section>
+      
+      <section>
+        <title>其他有用的特性</title>
+ 
+        <section>
+          <title>Counters</title>
+          
+          <p><code>Counters</code> 是多个由Map-reduce框架或者应用程序定义的全局计数器。
+          每一个<code>Counter</code>可以是任何一种 
+          <code>Enum</code>类型。同一特定<code>Enum</code>类型的Counter可以汇集到一个组，其类型为<code>Counters.Group</code>。</p>
+          
+          <p>应用程序可以通过 <code>map</code> 或者 
+          <code>reduce</code>方法中的 
+          <a href="ext:api/org/apache/hadoop/mapred/reporter/incrcounter">
+          Reporter.incrCounter(Enum, long)</a>定义和更新<code>Counters</code> (
+          <code>Enum</code>类型)。之后框架可以全局使用这些counters。 
+          </p>
+        </section>       
+        
+        <section>
+          <title>DistributedCache</title>
+          
+          <p><a href="ext:api/org/apache/hadoop/filecache/distributedcache">
+          DistributedCache</a> 可将具体应用相关的、大尺寸的、只读的文件有效地分布放置。
+          </p>
+ 
+          <p><code>DistributedCache</code> 是Map-Reduce框架提供的功能，能够缓存应用程序所需的文件
+		（包括文本，档案文件，jar文件等）。
+          </p>
+ 
+          <p>应用程序在<code>JobConf</code>中通过url(hdfs:// 或 http://)指定需要被缓存的文件。
+	  <code>DistributedCache</code>假定由hdfs://格式url指定的文件已经在 
+          <code>FileSystem</code>上了。</p>
+
+          <p>Map-Redcue框架在作业所有任务执行之前会把必要的文件拷贝到slave节点上。
+          它运行高效是因为每个作业的文件只拷贝一次并且为那些没有文档的slave节点缓存文档。
+      
+          </p> 
+          
+          <p><code>DistributedCache</code> 根据缓存文档修改的时间戳进行追踪。
+	  在作业执行期间，当前应用程序或者外部程序不能修改缓存文件。 
+          </p>
+
+          <p><code>distributedCache</code>可以分发简单的只读数据或文本文件，也