mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r779594 [3/4] - in /lucene/mahout/site: ./ publish/ publish/skin/ publish/skin/images/ src/documentation/ src/documentation/skins/ src/documentation/skins/common/ src/documentation/skins/common/css/ src/documentation/skins/common/images/ sr...
Date Thu, 28 May 2009 13:15:02 GMT
Added: lucene/mahout/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/document-to-html.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/document-to-html.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/document-to-html.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/document-to-html.xsl Thu May 28 13:14:59 2009
@@ -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="@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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/dotdots.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/dotdots.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/dotdots.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/dotdots.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/pathutils.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/pathutils.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/pathutils.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/pathutils.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/renderlogo.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/renderlogo.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/renderlogo.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/renderlogo.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/split.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/split.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/split.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/split.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/html/tabutils.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/html/tabutils.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/html/tabutils.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/html/tabutils.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl (added)
+++ lucene/mahout/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl Thu May 28 13:14:59 2009
@@ -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>

Added: lucene/mahout/site/src/documentation/skins/lucene/css/basic.css
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/lucene/css/basic.css?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/lucene/css/basic.css (added)
+++ lucene/mahout/site/src/documentation/skins/lucene/css/basic.css Thu May 28 13:14:59 2009
@@ -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%;
+}

Added: lucene/mahout/site/src/documentation/skins/lucene/css/print.css
URL: http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/skins/lucene/css/print.css?rev=779594&view=auto
==============================================================================
--- lucene/mahout/site/src/documentation/skins/lucene/css/print.css (added)
+++ lucene/mahout/site/src/documentation/skins/lucene/css/print.css Thu May 28 13:14:59 2009
@@ -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;
+}



Mime
View raw message