Author: pete.muir(a)jboss.org
Date: 2008-03-31 13:58:32 -0400 (Mon, 31 Mar 2008)
New Revision: 7764
Added:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/common.xsl
Modified:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/common-xhtml.xsl
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-pdf.xsl
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl
Log:
Better author layout
Modified:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/common-xhtml.xsl
===================================================================
---
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/common-xhtml.xsl 2008-03-31
17:58:08 UTC (rev 7763)
+++
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/common-xhtml.xsl 2008-03-31
17:58:32 UTC (rev 7764)
@@ -13,10 +13,10 @@
<!-- Enable extensions (needed for callouts) -->
<xsl:param name="use.extensions">1</xsl:param>
-
+
<!-- Enable callouts -->
<xsl:param name="callout.extensions">1</xsl:param>
-
+
<!-- And disable these extensions -->
<xsl:param name="tablecolumns.extension">0</xsl:param>
<xsl:param name="graphicsize.extension">0</xsl:param>
@@ -25,44 +25,42 @@
<xsl:param name="formal.title.placement">
figure after example before equation before table before procedure before
</xsl:param>
-
-
+
+
<!-- Callouts -->
-
+
<!-- Don't use graphics, use a simple number style -->
<xsl:param name="callout.graphics">0</xsl:param>
-
+
<!-- Place callout marks at this column in annotated areas -->
<xsl:param name="callout.defaultcolumn">90</xsl:param>
- <!-- Simple list of authors -->
- <xsl:template match="author" mode="titlepage.mode">
- <div class="{name(.)}">
- <xsl:call-template name="person.name" />
- <xsl:apply-templates mode="titlepage.mode"
select="./contrib" />
- <xsl:apply-templates mode="titlepage.mode"
select="./affiliation" />
- <xsl:apply-templates mode="titlepage.mode"
select="./email" />
- </div>
- </xsl:template>
+ <xsl:template match="authorgroup" mode="titlepage.mode">
+ <div class="authorgroup">
+ <div class="authors">
+ <xsl:call-template name="gentext.by" />
+ <xsl:call-template name="gentext.space" />
+ <xsl:call-template name="person.name.list">
+ <xsl:with-param name="person.list"
select="./author" />
+ </xsl:call-template>
+ </div>
- <!-- Simple affiliation (put it in brackets) -->
- <xsl:template match="affiliation" mode="titlepage.mode">
- (
- <xsl:apply-templates mode="titlepage.mode" />
- )
- </xsl:template>
+ <div class="editors">
+ <xsl:call-template name="gentext.editors" />
+ <xsl:call-template name="gentext.space" />
+ <xsl:call-template name="person.name.list">
+ <xsl:with-param name="person.list"
select="./editor" />
+ </xsl:call-template>
+ </div>
- <!-- And put don't put <br /> everywhere -->
- <xsl:template match="orgname" mode="titlepage.mode">
- <span class="{name(.)}">
- <xsl:apply-templates mode="titlepage.mode" />
- </span>
+ <div class="others">
+ <xsl:call-template name="gentext.others" />
+ <xsl:call-template name="gentext.space" />
+ <xsl:call-template name="person.name.list">
+ <xsl:with-param name="person.list"
select="./othercredit" />
+ </xsl:call-template>
+ </div>
+ </div>
</xsl:template>
-
- <xsl:template match="jobtitle" mode="titlepage.mode">
- <span class="{name(.)}">
- <xsl:apply-templates mode="titlepage.mode" />
- </span>
- </xsl:template>
-
+
</xsl:stylesheet>
Added:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/common.xsl
===================================================================
---
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/common.xsl
(rev 0)
+++
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/common.xsl 2008-03-31
17:58:32 UTC (rev 7764)
@@ -0,0 +1,81 @@
+<?xml version='1.0'?>
+
+<!--
+ Copyright 2007 Red Hat, Inc.
+ License: GPL
+ Author: Pete Muir
+-->
+
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version='1.0'
+
xmlns="http://www.w3.org/TR/xhtml1/transitional"
+
xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ exclude-result-prefixes="#default">
+
+ <xsl:template name="person.name.list">
+ <xsl:param name="person.list"
+ select="author|corpauthor|othercredit|editor" />
+ <xsl:param name="person.count" select="count($person.list)"
/>
+ <xsl:param name="count" select="1" />
+
+ <xsl:choose>
+ <xsl:when test="$count >
$person.count"></xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="person.name">
+ <xsl:with-param name="node"
+ select="$person.list[position()=$count]" />
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when
+
test="$person.list[position()=$count]/affiliation/shortaffil">
+ <xsl:call-template name="gentext.space" />
+ <xsl:text>(</xsl:text>
+ <xsl:value-of
+
select="$person.list[position()=$count]/affiliation/shortaffil" />
+ <xsl:text>)</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+
+
+ <xsl:choose>
+ <xsl:when test="$person.count = 2 and $count = 1">
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context"
select="'authorgroup'" />
+ <xsl:with-param name="name"
select="'sep2'" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when
+ test="$person.count > 2 and $count+1 =
$person.count">
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context"
select="'authorgroup'" />
+ <xsl:with-param name="name"
select="'seplast'" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$count < $person.count">
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context"
select="'authorgroup'" />
+ <xsl:with-param name="name"
select="'sep'" />
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:call-template name="person.name.list">
+ <xsl:with-param name="person.list"
select="$person.list" />
+ <xsl:with-param name="person.count"
select="$person.count" />
+ <xsl:with-param name="count" select="$count+1"
/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+ <xsl:template name="gentext.editors">
+ <xsl:text>edited by</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="gentext.others">
+ <xsl:text>and thanks to</xsl:text>
+ </xsl:template>
+
+
+</xsl:stylesheet>
\ No newline at end of file
Property changes on:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/common.xsl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl
===================================================================
---
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl 2008-03-31
17:58:08 UTC (rev 7763)
+++
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl 2008-03-31
17:58:32 UTC (rev 7764)
@@ -13,6 +13,7 @@
<xsl:import href="classpath:/xslt/org/jboss/main-html.xsl" />
<xsl:import href="common-xhtml.xsl" />
+ <xsl:import href="common.xsl" />
<xsl:param name="html.stylesheet"
select="'css/seamframework.css'" />
Modified:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-pdf.xsl
===================================================================
---
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-pdf.xsl 2008-03-31
17:58:08 UTC (rev 7763)
+++
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-pdf.xsl 2008-03-31
17:58:32 UTC (rev 7764)
@@ -10,9 +10,10 @@
xmlns="http://www.w3.org/TR/xhtml1/transitional"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
exclude-result-prefixes="#default">
-
- <xsl:import href="classpath:/xslt/org/jboss/main-pdf.xsl"/>
+ <xsl:import href="classpath:/xslt/org/jboss/main-pdf.xsl" />
+ <xsl:import href="common.xsl" />
+
<xsl:param name="use.extensions">1</xsl:param>
<!-- Place callout marks at this column in annotated areas -->
@@ -129,34 +130,34 @@
select="bookinfo/releaseinfo" />
</fo:block>
+ <fo:block text-align="center" space-before="15.552pt">
+ <xsl:call-template name="gentext.by" />
+ <xsl:call-template name="gentext.space" />
+ <xsl:call-template name="person.name.list">
+ <xsl:with-param name="person.list"
select="bookinfo/authorgroup/author" />
+ </xsl:call-template>
+ </fo:block>
+
+ <fo:block text-align="center" space-before="15.552pt">
+ <xsl:call-template name="gentext.editors" />
+ <xsl:call-template name="gentext.space" />
+ <xsl:call-template name="person.name.list">
+ <xsl:with-param name="person.list"
select="bookinfo/authorgroup/editor" />
+ </xsl:call-template>
+ </fo:block>
+
+ <fo:block text-align="center" space-before="15.552pt">
+ <xsl:call-template name="gentext.others" />
+ <xsl:call-template name="gentext.space" />
+ <xsl:call-template name="person.name.list">
+ <xsl:with-param name="person.list"
select="bookinfo/authorgroup/othercredit" />
+ </xsl:call-template>
+ </fo:block>
+
</xsl:template>
-
+
<xsl:template name="book.titlepage3.recto">
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="bookinfo/authorgroup" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="info/authorgroup" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="bookinfo/author" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="info/author" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="bookinfo/othercredit" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="info/othercredit" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="bookinfo/copyright" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="info/copyright" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="bookinfo/legalnotice" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="info/legalnotice" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="bookinfo/publisher" />
- <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
- select="info/publisher" />
</xsl:template>
<!-- Change the font color for titles to
SeamFramework.org one -->
@@ -268,10 +269,10 @@
</fo:inline>
</fo:block>
</xsl:template>
-
+
<!-- Include the chapter no -->
- <xsl:param name="section.label.includes.component.label"
select="1"/>
-
+ <xsl:param name="section.label.includes.component.label"
select="1" />
+
<!-- Make the section depth in the TOC 2, same as html -->
<xsl:param name="toc.section.depth">2</xsl:param>
Modified:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl
===================================================================
---
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl 2008-03-31
17:58:08 UTC (rev 7763)
+++
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl 2008-03-31
17:58:32 UTC (rev 7764)
@@ -14,6 +14,7 @@
<xsl:import href="classpath:/xslt/org/jboss/nochunk-html.xsl"/>
<xsl:import href="common-xhtml.xsl" />
+ <xsl:import href="common.xsl" />
<xsl:param name="html.stylesheet"
select="'css/seamframework-nochunk.css'" />
<xsl:param name="jbossOrgHref"
select="'http://www.seamframework.org'" />