titlepage.xsl
branchcda
changeset 0 ff2810600648
equal deleted inserted replaced
-1:000000000000 0:ff2810600648
       
     1 <?xml version="1.0" encoding="utf-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
       
     2 
       
     3 <!-- This stylesheet was created by template/titlepage.xsl; do not edit it by hand. -->
       
     4 
       
     5 <xsl:template name="book.titlepage.recto">
       
     6   <xsl:choose>
       
     7     <xsl:when test="bookinfo/title">
       
     8       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
       
     9     </xsl:when>
       
    10     <xsl:when test="title">
       
    11       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
       
    12     </xsl:when>
       
    13   </xsl:choose>
       
    14 
       
    15   <xsl:choose>
       
    16     <xsl:when test="bookinfo/subtitle">
       
    17       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
       
    18     </xsl:when>
       
    19     <xsl:when test="subtitle">
       
    20       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
       
    21     </xsl:when>
       
    22   </xsl:choose>
       
    23 
       
    24   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
       
    25   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
       
    26   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
       
    27 </xsl:template>
       
    28 
       
    29 <xsl:template name="book.titlepage.verso">
       
    30   <xsl:choose>
       
    31     <xsl:when test="bookinfo/title">
       
    32       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
       
    33     </xsl:when>
       
    34     <xsl:when test="title">
       
    35       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
       
    36     </xsl:when>
       
    37   </xsl:choose>
       
    38 
       
    39   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
       
    40   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
       
    41   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
       
    42   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
       
    43   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
       
    44   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
       
    45   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
       
    46   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
       
    47   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/revhistory"/>
       
    48 </xsl:template>
       
    49 
       
    50 <xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
       
    51 </xsl:template>
       
    52 
       
    53 <xsl:template name="book.titlepage.before.recto">
       
    54 </xsl:template>
       
    55 
       
    56 <xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
       
    57 </xsl:template>
       
    58 
       
    59 <xsl:template name="book.titlepage">
       
    60   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
       
    61     <fo:block>
       
    62     <xsl:call-template name="book.titlepage.before.recto"/>
       
    63     <xsl:call-template name="book.titlepage.recto"/>
       
    64     </fo:block>
       
    65     <fo:block>
       
    66     <xsl:call-template name="book.titlepage.before.verso"/>
       
    67     <xsl:call-template name="book.titlepage.verso"/>
       
    68     </fo:block>
       
    69     <xsl:call-template name="book.titlepage.separator"/>
       
    70   </fo:block>
       
    71 </xsl:template>
       
    72 
       
    73 <xsl:template match="*" mode="book.titlepage.recto.mode">
       
    74   <!-- if an element isn't found in this mode, -->
       
    75   <!-- try the generic titlepage.mode -->
       
    76   <xsl:apply-templates select="." mode="titlepage.mode"/>
       
    77 </xsl:template>
       
    78 
       
    79 <xsl:template match="*" mode="book.titlepage.verso.mode">
       
    80   <!-- if an element isn't found in this mode, -->
       
    81   <!-- try the generic titlepage.mode -->
       
    82   <xsl:apply-templates select="." mode="titlepage.mode"/>
       
    83 </xsl:template>
       
    84 
       
    85 <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
       
    86 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.font.family}">
       
    87 <xsl:call-template name="division.title">
       
    88 <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
       
    89 </xsl:call-template>
       
    90 </fo:block>
       
    91 </xsl:template>
       
    92 
       
    93 <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
       
    94 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-family="{$title.font.family}">
       
    95 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
       
    96 </fo:block>
       
    97 </xsl:template>
       
    98 
       
    99 <xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
       
   100 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" keep-with-next="always" space-before="2in">
       
   101 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
       
   102 </fo:block>
       
   103 </xsl:template>
       
   104 
       
   105 <xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
       
   106 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in">
       
   107 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
       
   108 </fo:block>
       
   109 </xsl:template>
       
   110 
       
   111 <xsl:template match="author" mode="book.titlepage.recto.auto.mode">
       
   112 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" space-before="10.8pt" keep-with-next="always">
       
   113 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
       
   114 </fo:block>
       
   115 </xsl:template>
       
   116 
       
   117 <xsl:template match="title" mode="book.titlepage.verso.auto.mode">
       
   118 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="14.4pt" font-weight="bold" font-family="{$title.font.family}">
       
   119 <xsl:call-template name="book.verso.title">
       
   120 </xsl:call-template>
       
   121 </fo:block>
       
   122 </xsl:template>
       
   123 
       
   124 <xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
       
   125 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
       
   126 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
       
   127 </fo:block>
       
   128 </xsl:template>
       
   129 
       
   130 <xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
       
   131 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
       
   132 <xsl:call-template name="verso.authorgroup">
       
   133 </xsl:call-template>
       
   134 </fo:block>
       
   135 </xsl:template>
       
   136 
       
   137 <xsl:template match="author" mode="book.titlepage.verso.auto.mode">
       
   138 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
       
   139 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
       
   140 </fo:block>
       
   141 </xsl:template>
       
   142 
       
   143 <xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
       
   144 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
       
   145 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
       
   146 </fo:block>
       
   147 </xsl:template>
       
   148 
       
   149 <xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
       
   150 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
       
   151 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
       
   152 </fo:block>
       
   153 </xsl:template>
       
   154 
       
   155 <xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
       
   156 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
       
   157 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
       
   158 </fo:block>
       
   159 </xsl:template>
       
   160 
       
   161 <xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
       
   162 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
       
   163 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
       
   164 </fo:block>
       
   165 </xsl:template>
       
   166 
       
   167 <xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
       
   168 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
       
   169 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
       
   170 </fo:block>
       
   171 </xsl:template>
       
   172 
       
   173 <xsl:template match="revhistory" mode="book.titlepage.verso.auto.mode">
       
   174 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt" space-before="8pt">
       
   175 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
       
   176 </fo:block>
       
   177 </xsl:template>
       
   178 
       
   179 <xsl:template match="revision/revdescription" mode="titlepage.mode">
       
   180 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" 
       
   181   space-after="8pt">
       
   182   <xsl:apply-templates mode="titlepage.mode"/>
       
   183 </fo:block>
       
   184 </xsl:template>
       
   185 
       
   186 </xsl:stylesheet>