directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r986630 - in /directory/apacheds-manuals/trunk: ./ src/advanced-user-guide/images/ src/basic-user-guide/images/ src/docbkx-stylesheet/fo/ src/docbkx-stylesheet/html/
Date Wed, 18 Aug 2010 11:41:49 GMT
Author: felixk
Date: Wed Aug 18 11:41:48 2010
New Revision: 986630

URL: http://svn.apache.org/viewvc?rev=986630&view=rev
Log:
- Use available graphics from docbook-xsl for admonitions
- Add some color to pdf admonitions

Removed:
    directory/apacheds-manuals/trunk/src/advanced-user-guide/images/note.gif
    directory/apacheds-manuals/trunk/src/advanced-user-guide/images/tip.gif
    directory/apacheds-manuals/trunk/src/advanced-user-guide/images/warning.gif
    directory/apacheds-manuals/trunk/src/basic-user-guide/images/important.gif
    directory/apacheds-manuals/trunk/src/basic-user-guide/images/note.gif
    directory/apacheds-manuals/trunk/src/basic-user-guide/images/tip.gif
    directory/apacheds-manuals/trunk/src/basic-user-guide/images/warning.gif
Modified:
    directory/apacheds-manuals/trunk/pom.xml
    directory/apacheds-manuals/trunk/src/docbkx-stylesheet/fo/docbook.xsl
    directory/apacheds-manuals/trunk/src/docbkx-stylesheet/html/docbook.xsl

Modified: directory/apacheds-manuals/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds-manuals/trunk/pom.xml?rev=986630&r1=986629&r2=986630&view=diff
==============================================================================
--- directory/apacheds-manuals/trunk/pom.xml (original)
+++ directory/apacheds-manuals/trunk/pom.xml Wed Aug 18 11:41:48 2010
@@ -54,6 +54,31 @@ under the License.
   <build>
     <plugins>
       <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+          <id>extract-images-from-docbook-xsl</id>
+          <phase>pre-site</phase>
+          <configuration>
+            <artifactItems>
+              <artifactItem>
+                <artifactId>docbook-xsl</artifactId>
+                <groupId>net.sf.docbook</groupId>
+                <version>1.75.2</version>
+                <classifier>ns-resources</classifier>
+                <type>zip</type>
+              </artifactItem>
+            </artifactItems>
+            <includes>**\/*.gif</includes>
+            <outputDirectory>${project.build.directory}/docbook-xsl</outputDirectory>
+          </configuration>
+          <goals>
+          <goal>unpack</goal>
+          </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <!-- http://docbkx-tools.sourceforge.net/docbkx-maven-plugin/plugin-info.html
-->
         <groupId>com.agilejava.docbkx</groupId>
         <artifactId>docbkx-maven-plugin</artifactId>
@@ -102,6 +127,9 @@ under the License.
                 <copy todir="${project.build.directory}/docbook/manuals/basic-user-guide-${pom.version}/html/images">
                   <fileset dir="${basedir}/src/basic-user-guide/images" />
                 </copy>
+                <copy todir="${project.build.directory}/docbook/manuals/basic-user-guide-${pom.version}/html/images">
+                  <fileset dir="${project.build.directory}/docbook-xsl/docbook/images"
/>
+                </copy>
                 <!-- Copy the data -->
                 <copy todir="${project.build.directory}/docbook/manuals/basic-user-guide-${pom.version}/html/data">
                   <fileset dir="${basedir}/src/basic-user-guide/data" />
@@ -120,6 +148,7 @@ under the License.
               <sourceDirectory>${basedir}/src/basic-user-guide</sourceDirectory>
               <targetDirectory>${project.build.directory}/docbook/manuals/basic-user-guide-${pom.version}/pdf</targetDirectory>
               <imgSrcPath>${basedir}/src/basic-user-guide/</imgSrcPath>
+              <admonGraphicsPath>${project.build.directory}/docbook-xsl/docbook/images/</admonGraphicsPath>
             </configuration>
           </execution>
           <execution>
@@ -137,6 +166,9 @@ under the License.
                 <copy todir="${project.build.directory}//manuals/advanced-user-guide-${pom.version}/html/images">
                   <fileset dir="${basedir}/src/advanced-user-guide/images" />
                 </copy>
+                <copy todir="${project.build.directory}//manuals/advanced-user-guide-${pom.version}/html/images">
+                  <fileset dir="${project.build.directory}/docbook-xsl/docbook/images"
/>
+                </copy>
                 <!-- Copy the data -->
                 <copy todir="${project.build.directory}//manuals/advanced-user-guide-${pom.version}/html/data">
                   <fileset dir="${basedir}/src/advanced-user-guide/data" />
@@ -153,8 +185,9 @@ under the License.
             <configuration>
               <!-- per execution configuration -->
               <sourceDirectory>${basedir}/src/advanced-user-guide</sourceDirectory>
-              <targetDirectory>${project.build.directory}//manuals/advanced-user-guide-${pom.version}/pdf</targetDirectory>
+              <targetDirectory>${project.build.directory}/manuals/advanced-user-guide-${pom.version}/pdf</targetDirectory>
               <imgSrcPath>${basedir}/src/advanced-user-guide/</imgSrcPath>
+              <admonGraphicsPath>${project.build.directory}/docbook-xsl/docbook/images/</admonGraphicsPath>
             </configuration>
           </execution>
         </executions>

Modified: directory/apacheds-manuals/trunk/src/docbkx-stylesheet/fo/docbook.xsl
URL: http://svn.apache.org/viewvc/directory/apacheds-manuals/trunk/src/docbkx-stylesheet/fo/docbook.xsl?rev=986630&r1=986629&r2=986630&view=diff
==============================================================================
--- directory/apacheds-manuals/trunk/src/docbkx-stylesheet/fo/docbook.xsl (original)
+++ directory/apacheds-manuals/trunk/src/docbkx-stylesheet/fo/docbook.xsl Wed Aug 18 11:41:48
2010
@@ -41,6 +41,85 @@ under the License.
     name="section.label.includes.component.label"
     select="2" />
 
+  <xsl:param name="use.extensions">1</xsl:param>
+
+  <!-- Adjust fonts & styles -->
+  <xsl:attribute-set name="monospace.verbatim.properties">
+      <xsl:attribute name="font-size">
+          <xsl:value-of select="7"/>
+          <xsl:text>pt</xsl:text>
+      </xsl:attribute>
+  </xsl:attribute-set>
+
+  <!-- Shade literallayout, programlisting, screen -->
+  <xsl:param name="shade.verbatim">1</xsl:param>
+  <xsl:attribute-set name="shade.verbatim.style">
+      <xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
+  </xsl:attribute-set>
+
+  <!-- Add background for admonitions -->
+  <xsl:template name="graphical.admonition">
+    <xsl:param name="node" select="."/>
+    <xsl:variable name="id">
+      <xsl:call-template name="object.id"/>
+    </xsl:variable>
+    <xsl:variable name="graphic.width">
+       <xsl:apply-templates select="." mode="admon.graphic.width"/>
+    </xsl:variable>
+  
+    <fo:block id="{$id}"
+              xsl:use-attribute-sets="graphical.admonition.properties">
+              <xsl:attribute name="background-color">
+      <xsl:choose>
+        <xsl:when test="name($node)='note'">#D8E4F1</xsl:when>
+        <xsl:when test="name($node)='warning'">#FFCCCC</xsl:when>
+        <!-- xsl:when test="name($node)='caution'"></xsl:when -->
+        <xsl:when test="name($node)='tip'">#DDFFDD</xsl:when>
+        <xsl:when test="name($node)='important'">#FFFFCE</xsl:when>
+        <xsl:otherwise>#D8E4F1</xsl:otherwise>
+      </xsl:choose>
+      </xsl:attribute>
+  
+      <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt"
+                      provisional-label-separation="18pt">
+        <fo:list-item>
+            <fo:list-item-label end-indent="label-end()">
+              <fo:block>
+                <fo:external-graphic width="auto" height="auto"
+                                           content-width="{$graphic.width}" >
+                  <xsl:attribute name="src">
+                    <xsl:call-template name="admon.graphic"/>
+                  </xsl:attribute>
+                </fo:external-graphic>
+              </fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body start-indent="body-start()">
+              <xsl:if test="$admon.textlabel != 0 or title">
+                <fo:block xsl:use-attribute-sets="admonition.title.properties">
+                  <xsl:apply-templates select="." mode="object.title.markup"/>
+                </fo:block>
+              </xsl:if>
+              <fo:block xsl:use-attribute-sets="admonition.properties">
+                <xsl:apply-templates/>
+              </fo:block>
+            </fo:list-item-body>
+        </fo:list-item>
+      </fo:list-block>
+    </fo:block>
+  </xsl:template>
+
+  <!-- Add graphic symbols to admonitions -->
+  <xsl:param name="admon.graphics" select="1"/>
+  <xsl:param name="admon.graphics.extension">.gif</xsl:param>
+  <!-- Hide default admonition title if none set explicitly -->
+  <xsl:param name="admon.textlabel">0</xsl:param>
+ 
+  <!-- Add linebreak processing instruction -->
+  <xsl:template match="processing-instruction('linebreak')">
+    <fo:block/>
+  </xsl:template>
+  
+  <!-- Footer -->
   <xsl:template name="footer.content">
     <xsl:param name="pageclass" select="''"/>
     <xsl:param name="sequence" select="''"/>
@@ -72,8 +151,4 @@ under the License.
     </xsl:choose>
   </xsl:template>  
 
-  <xsl:template match="processing-instruction('linebreak')">
-    <fo:block/>
-  </xsl:template>
-  
 </xsl:stylesheet>
\ No newline at end of file

Modified: directory/apacheds-manuals/trunk/src/docbkx-stylesheet/html/docbook.xsl
URL: http://svn.apache.org/viewvc/directory/apacheds-manuals/trunk/src/docbkx-stylesheet/html/docbook.xsl?rev=986630&r1=986629&r2=986630&view=diff
==============================================================================
--- directory/apacheds-manuals/trunk/src/docbkx-stylesheet/html/docbook.xsl (original)
+++ directory/apacheds-manuals/trunk/src/docbkx-stylesheet/html/docbook.xsl Wed Aug 18 11:41:48
2010
@@ -47,7 +47,15 @@ under the License.
   <!-- Add graphic symbols to admonitions -->
   <xsl:param name="admon.graphics" select="1"/>
   <xsl:param name="admon.graphics.extension">.gif</xsl:param>
+  <!-- Hide default admonition title if none set explicitly -->
+  <xsl:param name="admon.textlabel">0</xsl:param>
 
+  <!-- Add linebreak processing instruction -->
+  <xsl:template match="processing-instruction('linebreak')">
+    <br/>
+  </xsl:template>
+
+  <!-- Header -->
   <xsl:template
     name="user.head.content">
     <style
@@ -58,10 +66,7 @@ under the License.
     <link rel="shortcut icon" href="images/server-icon_16x16.png" />
   </xsl:template>
 
-  <xsl:template match="processing-instruction('linebreak')">
-    <br/>
-  </xsl:template>
-
+  <!-- Footer -->
   <xsl:template name="user.footer.navigation">
     <hr/>
     <table



Mime
View raw message