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 20:55:02 UTC

svn commit: r1431583 - in /cayenne/main/trunk/docs/docbook: ./ css/ docbook-stylesheets/ docbook-stylesheets/src/ docbook-stylesheets/src/main/ docbook-stylesheets/src/main/resources/ docbook-stylesheets/src/main/resources/css/ docbook-stylesheets/src/...

Author: aadamchik
Date: Thu Jan 10 19:55:01 2013
New Revision: 1431583

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

patch 'Add versions support.patch' by Ilya Drabenia

Added:
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/pom.xml
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css
      - copied, changed from r1431557, cayenne/main/trunk/docs/docbook/css/cayenne-doc.css
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/highlight.css
      - copied, changed from r1431557, cayenne/main/trunk/docs/docbook/css/highlight.css
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/common-customizations.xsl
      - copied, changed from r1431557, cayenne/main/trunk/docs/docbook/stylesheets/common-customizations.xsl
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/highlight.xsl
      - copied, changed from r1431557, cayenne/main/trunk/docs/docbook/stylesheets/highlight.xsl
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl
    cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/pdf.xsl
      - copied, changed from r1431557, cayenne/main/trunk/docs/docbook/stylesheets/pdf.xsl
Removed:
    cayenne/main/trunk/docs/docbook/css/
    cayenne/main/trunk/docs/docbook/stylesheets/
Modified:
    cayenne/main/trunk/docs/docbook/pom.xml

Added: cayenne/main/trunk/docs/docbook/docbook-stylesheets/pom.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/docbook-stylesheets/pom.xml?rev=1431583&view=auto
==============================================================================
--- cayenne/main/trunk/docs/docbook/docbook-stylesheets/pom.xml (added)
+++ cayenne/main/trunk/docs/docbook/docbook-stylesheets/pom.xml Thu Jan 10 19:55:01 2013
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.cayenne.docs</groupId>
+        <artifactId>cayenne-docbook</artifactId>
+        <version>3.2M1-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.cayenne.docs</groupId>
+    <artifactId>docbook-stylesheets</artifactId>
+    <version>3.2M1-SNAPSHOT</version>
+    <name>Docbook: Cayenne Stylesheets</name>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+    </build>
+
+</project>

Copied: cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css (from r1431557, cayenne/main/trunk/docs/docbook/css/cayenne-doc.css)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css?p2=cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css&p1=cayenne/main/trunk/docs/docbook/css/cayenne-doc.css&r1=1431557&r2=1431583&rev=1431583&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/css/cayenne-doc.css (original)
+++ cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/cayenne-doc.css Thu Jan 10 19:55:01 2013
@@ -131,4 +131,10 @@ p.pubdate {
 span.productname {
     font-size: 200%;
     font-weight: bold;
+}
+
+div.buildversion {
+    left: 3px;
+    position: relative;
+    top: 21px;
 }
\ No newline at end of file

Copied: cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/highlight.css (from r1431557, cayenne/main/trunk/docs/docbook/css/highlight.css)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/highlight.css?p2=cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/css/highlight.css&p1=cayenne/main/trunk/docs/docbook/css/highlight.css&r1=1431557&r2=1431583&rev=1431583&view=diff
==============================================================================
    (empty)

Copied: cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/common-customizations.xsl (from r1431557, cayenne/main/trunk/docs/docbook/stylesheets/common-customizations.xsl)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/common-customizations.xsl?p2=cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/common-customizations.xsl&p1=cayenne/main/trunk/docs/docbook/stylesheets/common-customizations.xsl&r1=1431557&r2=1431583&rev=1431583&view=diff
==============================================================================
    (empty)

Copied: cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/highlight.xsl (from r1431557, cayenne/main/trunk/docs/docbook/stylesheets/highlight.xsl)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/highlight.xsl?p2=cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/highlight.xsl&p1=cayenne/main/trunk/docs/docbook/stylesheets/highlight.xsl&r1=1431557&r2=1431583&rev=1431583&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/stylesheets/highlight.xsl (original)
+++ cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/highlight.xsl Thu Jan 10 19:55:01 2013
@@ -13,6 +13,8 @@
    See ../README or http://docbook.sf.net/release/xsl/current/ for
    and other information.
 
+
+
    ******************************************************************** -->
     <!-- <xsl:import href="urn:/highlighting/common.xsl"/> -->
     <xsl:template match="xslthl:keyword" mode="xslthl">

Added: cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl?rev=1431583&view=auto
==============================================================================
--- cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl (added)
+++ cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/html.xsl Thu Jan 10 19:55:01 2013
@@ -0,0 +1,135 @@
+<?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"
+        version="1.0" xmlns:d="http://docbook.org/ns/docbook">
+
+
+    <xsl:import href="urn:docbkx:stylesheet" />
+    <xsl:import href="highlight.xsl" />
+    <xsl:include href="common-customizations.xsl"/>
+
+    <!--<xsl:param name="highlight.source" select="1"/>-->
+    <xsl:param name="html.stylesheet" select="'css/cayenne-doc.css'"/>
+    <xsl:param name="chunker.output.encoding">UTF-8</xsl:param>
+
+    <!-- Only chapters start a new page -->
+    <xsl:param name="chunk.section.depth">0</xsl:param>
+
+    <!-- Don't add any embedded styles -->
+    <xsl:param name="css.decoration">0</xsl:param>
+
+    <xsl:param name="ignore.image.scaling">1</xsl:param>
+
+    <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:template name="head.content">
+        <xsl:param name="node" select="."/>
+        <xsl:param name="title">
+            <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
+        </xsl:param>
+
+        <title>
+            <xsl:copy-of select="$title"/>
+        </title>
+
+        <xsl:if test="$html.base != ''">
+            <base href="{$html.base}"/>
+        </xsl:if>
+
+        <!-- Insert links to CSS files or insert literal style elements -->
+        <xsl:call-template name="generate.css"/>
+
+        <xsl:if test="$html.stylesheet != ''">
+            <xsl:call-template name="output.html.stylesheets">
+                <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
+            </xsl:call-template>
+        </xsl:if>
+
+        <xsl:if test="$link.mailto.url != ''">
+            <link rev="made" href="{$link.mailto.url}"/>
+        </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}" />
+
+
+        <xsl:if test="$generate.meta.abstract != 0">
+            <xsl:variable name="info" select="(d:articleinfo
+                                      |d:bookinfo
+                                      |d:prefaceinfo
+                                      |d:chapterinfo
+                                      |d:appendixinfo
+                                      |d:sectioninfo
+                                      |d:sect1info
+                                      |d:sect2info
+                                      |d:sect3info
+                                      |d:sect4info
+                                      |d:sect5info
+                                      |d:referenceinfo
+                                      |d:refentryinfo
+                                      |d:partinfo
+                                      |d:info
+                                      |d:docinfo)[1]"/>
+            <xsl:if test="$info and $info/d:abstract">
+                <meta name="description">
+                    <xsl:attribute name="content">
+                        <xsl:for-each select="$info/d:abstract[1]/*">
+                            <xsl:value-of select="normalize-space(.)"/>
+                            <xsl:if test="position() &lt; last()">
+                                <xsl:text> </xsl:text>
+                            </xsl:if>
+                        </xsl:for-each>
+                    </xsl:attribute>
+                </meta>
+            </xsl:if>
+        </xsl:if>
+
+        <xsl:if test="($draft.mode = 'yes' or
+                ($draft.mode = 'maybe' and
+                ancestor-or-self::*[@status][1]/@status = 'draft'))
+                and $draft.watermark.image != ''">
+            <style type="text/css"><xsl:text>
+body { background-image: url('</xsl:text>
+                <xsl:value-of select="$draft.watermark.image"/><xsl:text>');
+       background-repeat: no-repeat;
+       background-position: top left;
+       /* The following properties make the watermark "fixed" on the page. */
+       /* I think that's just a bit too distracting for the reader... */
+       /* background-attachment: fixed; */
+       /* background-position: center center; */
+     }</xsl:text>
+            </style>
+        </xsl:if>
+        <xsl:apply-templates select="." mode="head.keywords.content"/>
+    </xsl:template>
+
+</xsl:stylesheet>

Copied: cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/pdf.xsl (from r1431557, cayenne/main/trunk/docs/docbook/stylesheets/pdf.xsl)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/pdf.xsl?p2=cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/pdf.xsl&p1=cayenne/main/trunk/docs/docbook/stylesheets/pdf.xsl&r1=1431557&r2=1431583&rev=1431583&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/stylesheets/pdf.xsl (original)
+++ cayenne/main/trunk/docs/docbook/docbook-stylesheets/src/main/resources/stylesheets/pdf.xsl Thu Jan 10 19:55:01 2013
@@ -5,7 +5,6 @@
 -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:d="http://docbook.org/ns/docbook"
                 version="1.0">
 
     <xsl:import href="urn:docbkx:stylesheet"/>
@@ -142,11 +141,13 @@
         <xsl:param name="position" select="''"/>
         <xsl:param name="gentext-key" select="''"/>
         <xsl:variable name="Version">
-            <xsl:if test="//releaseinfo">
-                <xsl:text>Spring-Integration (</xsl:text>
-                <xsl:value-of select="//releaseinfo"/>
-                <xsl:text>)</xsl:text>
-            </xsl:if>
+            <!--<xsl:if test="//releaseinfo">-->
+                <!--<xsl:text>Spring-Integration (</xsl:text>-->
+                <!--<xsl:value-of select="//releaseinfo"/>-->
+                <!--${pom.version}-->
+                <!--<xsl:text>)</xsl:text>-->
+            <!--</xsl:if>-->
+            <fo:inline min-width="150mm">Apache Cayenne ${pom.version}</fo:inline>
         </xsl:variable>
         <xsl:choose>
             <xsl:when test="$sequence='blank'">

Modified: cayenne/main/trunk/docs/docbook/pom.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/pom.xml?rev=1431583&r1=1431582&r2=1431583&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/pom.xml (original)
+++ cayenne/main/trunk/docs/docbook/pom.xml Thu Jan 10 19:55:01 2013
@@ -16,9 +16,7 @@
 	KIND, either express or implied.  See the License for the
 	specific language governing permissions and limitations
 	under the License.   
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
 	<modelVersion>4.0.0</modelVersion>
 	<prerequisites>
@@ -33,11 +31,16 @@
 	</parent>
 	
 	<modules>
+        <module>docbook-stylesheets</module>
 		<module>cayenne-guide</module>
 		<module>getting-started</module>
 		<module>getting-started-rop</module>
 		<module>upgrade-guide</module>
-	</modules>
+    </modules>
+
+    <properties>
+        <project.stylesheetdir>${project.parent.basedir}/docbook-stylesheets/target/classes</project.stylesheetdir>
+    </properties>
 
 	<groupId>org.apache.cayenne.docs</groupId>
 	<artifactId>cayenne-docbook</artifactId>
@@ -78,12 +81,12 @@
 					<execution>
 						<id>build-pdf</id>
 						<configuration>
-							<foCustomization>${project.parent.basedir}/stylesheets/pdf.xsl</foCustomization>
+							<foCustomization>${project.stylesheetdir}/stylesheets/pdf.xsl</foCustomization>
 							<postProcess>
 								<delete failonerror="false">
-									<fileset dir="target/site/" includes="*.fo" />
+									<fileset dir="target/site/" includes="*.fo"/>
 								</delete>
-								<move file="target/site/index.pdf" tofile="target/site/${project.artifactId}.pdf" />
+								<move file="target/site/index.pdf" tofile="target/site/${project.artifactId}.pdf"/>
 							</postProcess>
 						</configuration>
 						<phase>generate-resources</phase>
@@ -94,11 +97,11 @@
 					<execution>
 						<id>build-html</id>
 						<configuration>
-							<htmlCustomization>${project.parent.basedir}/stylesheets/html.xsl</htmlCustomization>
+							<htmlCustomization>${project.stylesheetdir}/stylesheets/html.xsl</htmlCustomization>
 							<chunkedOutput>true</chunkedOutput>
 							<postProcess>
 								<copy todir="${basedir}/target/site/index/css">
-									<fileset dir="${project.parent.basedir}/css" />
+									<fileset dir="${project.stylesheetdir}/css" />
 								</copy>
 								<copy todir="${basedir}/target/site/index/images">
 									<fileset dir="${basedir}/src/images" />
@@ -114,4 +117,4 @@
 			</plugin>
 		</plugins>
 	</build>
-</project>
+</project>
\ No newline at end of file