You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2013/01/10 21:15:39 UTC

svn commit: r1431603 - in /cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources: css/cayenne-doc.css stylesheets/html.xsl

Author: aadamchik
Date: Thu Jan 10 20:15:39 2013
New Revision: 1431603

URL: http://svn.apache.org/viewvc?rev=1431603&view=rev
Log:
CAY-1733 update docs

patch 'Customize header.patch' by Ilya Drabenia

(cherry picked from commit 75766884ea74ae8b5d91537878c8ce98867b7ac7)

Modified:
    cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css
    cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css?rev=1431603&r1=1431602&r2=1431603&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css Thu Jan 10 20:15:39 2013
@@ -133,8 +133,8 @@ span.productname {
     font-weight: bold;
 }
 
-div.buildversion {
-    left: 3px;
-    position: relative;
-    top: 21px;
+th.versioninfo {
+    font-size: small;
+    font-weight: normal;
+    text-align: left;
 }
\ No newline at end of file

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl?rev=1431603&r1=1431602&r2=1431603&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl Thu Jan 10 20:15:39 2013
@@ -18,11 +18,11 @@
 	under the License.
 -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-        version="1.0" xmlns:d="http://docbook.org/ns/docbook">
+                version="1.0" xmlns:d="http://docbook.org/ns/docbook">
 
 
-    <xsl:import href="urn:docbkx:stylesheet" />
-    <xsl:import href="highlight.xsl" />
+    <xsl:import href="urn:docbkx:stylesheet"/>
+    <xsl:import href="highlight.xsl"/>
     <xsl:include href="common-customizations.xsl"/>
 
     <!--<xsl:param name="highlight.source" select="1"/>-->
@@ -39,17 +39,13 @@
 
     <xsl:param name="use.id.as.filename">1</xsl:param>
 
-    <xsl:template name="user.head.content">
-        <div class="buildversion">Apache Cayenne ${pom.version}</div>
-    </xsl:template>
-
-    <!--<xsl:template name="head.content.generator">-->
-        <!--<xsl:param name="node" select="."/>-->
-        <!--<meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>-->
-        <!--<meta name="keywords" content="Cayenne ${pom.version} documentation" />-->
-        <!--<meta name="description" content="User documentation for Apache Cayenne version ${pom.version}" />-->
-    <!--</xsl:template>-->
+    <xsl:param name="navig.showtitles">1</xsl:param>
 
+    <!--
+        BODY > HEAD Customization
+        Customized template for generate meta tags with cayenne version in head of
+        page with documentation
+    -->
     <xsl:template name="head.content">
         <xsl:param name="node" select="."/>
         <xsl:param name="title">
@@ -78,8 +74,8 @@
         </xsl:if>
 
         <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
-        <meta name="keywords" content="Cayenne ${pom.version} documentation" />
-        <meta name="description" content="User documentation for Apache Cayenne version ${pom.version}" />
+        <meta name="keywords" content="Cayenne ${pom.version} documentation"/>
+        <meta name="description" content="User documentation for Apache Cayenne version ${pom.version}"/>
 
 
         <xsl:if test="$generate.meta.abstract != 0">
@@ -132,4 +128,105 @@ body { background-image: url('</xsl:text
         <xsl:apply-templates select="." mode="head.keywords.content"/>
     </xsl:template>
 
+
+    <!--
+        TOP NAVIGATION
+    -->
+    <xsl:template name="header.navigation">
+        <xsl:param name="prev" select="/d:foo"/>
+        <xsl:param name="next" select="/d:foo"/>
+        <xsl:param name="nav.context"/>
+
+        <xsl:variable name="home" select="/*[1]"/>
+        <xsl:variable name="up" select="parent::*"/>
+
+        <xsl:variable name="row1" select="$navig.showtitles != 0"/>
+        <xsl:variable name="row2" select="count($prev) &gt; 0
+                                    or (count($up) &gt; 0
+                                        and generate-id($up) != generate-id($home)
+                                        and $navig.showtitles != 0)
+                                    or count($next) &gt; 0"/>
+
+        <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
+            <div class="navheader">
+                <xsl:if test="$row1 or $row2">
+                    <table width="100%" summary="Navigation header">
+                        <xsl:if test="$row2">
+
+                            <tr>
+                                <td width="20%" align="{$direction.align.start}">
+                                    <xsl:if test="count($prev)>0">
+                                        <a accesskey="p">
+                                            <xsl:attribute name="href">
+                                                <xsl:call-template name="href.target">
+                                                    <xsl:with-param name="object" select="$prev"/>
+                                                </xsl:call-template>
+                                            </xsl:attribute>
+                                            <xsl:call-template name="navig.content">
+                                                <xsl:with-param name="direction" select="'prev'"/>
+                                            </xsl:call-template>
+                                        </a>
+                                    </xsl:if>
+                                    <xsl:text>&#160;</xsl:text>
+                                </td>
+
+                                <!-- Make parent caption as link -->
+                                <th width="60%" align="center">
+                                    <xsl:choose>
+                                        <xsl:when test="count($up) > 0
+                                  and generate-id($up) != generate-id($home)
+                                  and $navig.showtitles != 0">
+                                            <a accesskey="u">
+                                                <xsl:attribute name="href">
+                                                    <xsl:call-template name="href.target">
+                                                        <xsl:with-param name="object" select="$up"/>
+                                                    </xsl:call-template>
+                                                </xsl:attribute>
+                                                <xsl:apply-templates select="$up" mode="object.title.markup"/>
+                                            </a>
+                                        </xsl:when>
+                                        <xsl:otherwise>&#160;</xsl:otherwise>
+                                    </xsl:choose>
+                                </th>
+
+
+                                <td width="20%" align="{$direction.align.end}">
+                                    <xsl:text>&#160;</xsl:text>
+                                    <xsl:if test="count($next)>0">
+                                        <a accesskey="n">
+                                            <xsl:attribute name="href">
+                                                <xsl:call-template name="href.target">
+                                                    <xsl:with-param name="object" select="$next"/>
+                                                </xsl:call-template>
+                                            </xsl:attribute>
+                                            <xsl:call-template name="navig.content">
+                                                <xsl:with-param name="direction" select="'next'"/>
+                                            </xsl:call-template>
+                                        </a>
+                                    </xsl:if>
+                                </td>
+                            </tr>
+
+                        </xsl:if>
+
+                        <!-- Add Apache Cayenne version info -->
+                        <xsl:if test="$row1">
+                            <tr>
+                                <th class="versioninfo">Apache Cayenne ${pom.version}</th>
+                                <th colspan="" align="center">
+                                    <xsl:apply-templates select="." mode="object.title.markup"/>
+                                </th>
+                                <th></th>
+                            </tr>
+                        </xsl:if>
+
+                    </table>
+                </xsl:if>
+                <xsl:if test="$header.rule != 0">
+                    <hr/>
+                </xsl:if>
+            </div>
+        </xsl:if>
+    </xsl:template>
+
 </xsl:stylesheet>