OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Font size changes in <author> and <affiliation>


Title: Re: [docbook-apps] Font size changes in <author> and <affi
Thanks Bob, now it uses my customization, BUT the affiliation appears twice, the first time large large and blue, the second small and green.  It seems that

    <xsl:apply-templates select="." mode="titlepage.mode"/>

outputs both the author and the affiliation. I think I need to say select="author and not author/affiliation" somehow.

Ron

<?xsl version="1.0" ?>
<xsl:stylesheet
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
      xmlns:fo="http://www.w3.org/1999/XSL/Format" >
<xsl:import href="/Applications/Utilities/oxygen/8.1/oxygen/frameworks/docbook/xsl/fo/docbook.xsl" />
<xsl:param name="xep.extensions" select ="1" />
<xsl:template match="processing-instruction('lb')">
<fo:block/>
</xsl:template>
<xsl:template match="authorgroup" mode="book.titlepage.recto.mode">
 
<fo:wrapper>
   
<xsl:if test="@id">
     
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
   
</xsl:if>
   
<xsl:apply-templates mode="book.titlepage.recto.mode"/>
 
</fo:wrapper>
</xsl:template>
<xsl:template match="author" mode="book.titlepage.recto.mode">
 
<fo:block font-size="23pt"
            color="blue"
            space-before="20pt"
            keep-with-next.within-column="always">
    <xsl:apply-templates select="." mode="titlepage.mode"/>
  </fo:block>
 
<fo:block font-size="12pt"
            color="green"
            space-before="18pt" >
    <xsl:apply-templates select="affiliation" mode="titlepage.mode"/>
  </fo:block>
</xsl:template>
</xsl:stylesheet>


Ah, that's because you don't have a customization of authorgroup at the same level also.  By default, authorgroup is handled by the template with match="authorgroup" mode="titlepage.mode" in titlepage.xsl, and it processes its children in mode="titlepage.mode", so your custom templates are bypassed.
 
If you add a template like this it should work:
 
<xsl:template match="authorgroup" mode="book.titlepage.recto.mode">
  <fo:wrapper>
    <xsl:if test="@id">
      <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
    </xsl:if>
    <xsl:apply-templates mode="book.titlepage.recto.mode"/>
  </fo:wrapper>
</xsl:template>
 
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
 

-- 
Ron Catterall, Phd, DSc                         email: ron@catterall.net
Prolongacion de Hidalgo 140                             http://catterall.net/
San Felipe del Agua                                        tel: +52 951 520 1821
Oaxaca      68020  Mexico                          fax: +1 530 348 8309


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]