[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Adding Contributefield to Titlepage
Hi,Just to be precise here, I think you mean "inside the author element I have firstname, surname, and contrib". The template handling author in titlepages is this one in fo/titlepage.xsl:
<xsl:template match="author" mode="titlepage.mode"> <fo:block> <xsl:call-template name="anchor"/> <xsl:choose> <xsl:when test="orgname"> <xsl:apply-templates/> </xsl:when> <xsl:otherwise> <xsl:call-template name="person.name"/> <xsl:if test="affiliation/orgname"> <xsl:text>, </xsl:text> <xsl:apply-templates select="affiliation/orgname" mode="titlepage.mode"/> </xsl:if> <xsl:if test="email|affiliation/address/email"> <xsl:text> </xsl:text> <xsl:apply-templates select="(email|affiliation/address/email)[1]"/> </xsl:if> </xsl:otherwise> </xsl:choose> </fo:block> </xsl:template>You can copy this to your customization layer and add another xsl:if statement like this:
<xsl:if test="contrib"> <xsl:text> </xsl:text> <xsl:apply-templates select="contrib" mode="titlepage.mode"/> </xsl:if>Be sure to specify mode="titlepage.mode", because info elements are not processing in normal mode.
Bob Stayton Sagehill Enterprises bobs@sagehill.net----- Original Message ----- From: "Sascha Manns" <Sascha.Manns@open-slx.de>
To: <docbook@lists.oasis-open.org> Sent: Monday, July 30, 2012 12:40 AM Subject: [docbook] Adding Contributefield to Titlepage
Hello Listmates, i have written a Main-XML which have: articleinfo/authorgroup. Inside the authorgroup i have: Name, Surname and Contrib. The article.titlepage.xsl has: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template name="article.titlepage.before.recto"> <xsl:param name="filename">kugel.pdf</xsl:param> <fo:block space-after="0em"> <fo:external-graphic width="5px"> <xsl:attribute name="src"> <xsl:call-template name="fo-external-image"> <xsl:with-param name="filename"> <xsl:value-of select="concat($logos.src.path, $filename)"/> </xsl:with-param> </xsl:call-template> </xsl:attribute> </fo:external-graphic> </fo:block> </xsl:template> <!-- article.titlepage.before.verso --> <xsl:template name="article.titlepage.separator"> <fo:block page-break-after="always"> <fo:leader leader-pattern="space"/> </fo:block> </xsl:template> <xsl:template name="table.of.contents.titlepage.recto"> <fo:block xsl:use-attribute-sets="own-title-color" start-indent="0pt" font-size="17.28pt" font-weight="normal" font-family="{$title.fontset}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'TableofContents'"/> </xsl:call-template></fo:block> </xsl:template> </xsl:stylesheet> After creating a PDF the Standardsettings are used. It prints $NAME $SURNAME. Now i would like to see $NAME $SURNAME $CONTRIB. But how can i tell this to my article.titlepage.xsl? -- Sincerly yours Sascha Manns Community & Support Agent / Balsam Plasma Active Developer open-slx GmbH Web (business): http://www.open-slx.com Web (private): http://saigkill.homelinux.net --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]