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] | [Elist Home]

Subject: Re: DOCBOOK-APPS: Re: Q's:Adding affiliation to authorgroup template

On Tue, Nov 05, 2002 at 06:12:48PM -0500, Val Schmidt wrote:
> Hmmm.
> Do you have your "author" elements embedded in "authorgroup" tags in
> your source xml?  
> I do, the result is that the <authorgroup/>
> portion of the template is all that produces stylesheet code that
> impacts the style and format of the authors.  
> I stuck the "predicate" line into the authorgroup tag with no results.
> I removed it and then added a second <authorgroup
> predicate="/affiliation"/> below it. It generated this:
> _____________________
>   <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
>   <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> mode="book.titlepage.recto.auto.mode"
> select="bookinfo/authorgroup/affiliation"/>
> ______________________
> This looks promising but again doesn't work.
> I'm afraid I'm stabbing in the dark.
> Do I need to rewrite the authorgroup template? (Yikes!)
> Val
> On Tue, 2002-11-05 at 17:24, Martin Stemplinger wrote:
> > Hi Val,
> > 
> > AFAIK you need to add an attribute "predicate" to the author in your
> > template
> > 
> > <author predicate="/affiliation"
> >         fo:font-size="&hsize3;"
> >         fo:space-before="&hsize2space;"
> >         fo:keep-with-next="always"/>
> > 
> > At least this works for me to add the latest revision number on the title
> > page.
> > 

Well, the 'predicate' attribute is normally used to
add a square bracket XSL predicate like [@role = 'foo']
to an element to
modify the selection pattern.  The fact that it is
simply appended to the element name means a value
like '/affiliation' might work in some cases to
select a child element.  But not in this case, since
the affiliation is the child of author, not authorgroup.

In general, the titlepage.template.xml file specifies
a flat order for items to appear on a title page.
Any internal structure for one of the elements
needs to be handled by the template assigned to it.
In this case, it is the authorgroup template that
needs to handle its authors and affiliations.

It turns out that Norm wrote a special template for
authorgroup just for books, and it doesn't include
affiliation.  You'll have to ask him why.  It's in
fo/titlepage.xsl and starts with:

<xsl:template match="bookinfo/authorgroup" mode="titlepage.mode" priority="2">

But there is another more generic template that 
you might like, and you don't have to write it.
It is in fo/titlepage.xsl and starts with:

<xsl:template match="authorgroup" mode="titlepage.mode">

If you copy that template to your customization layer,
you will get a stack of authors and affiliations on
your title page.

In your customization, you should probably change the first
line to use this mode:

<xsl:template match="authorgroup" mode="book.titlepage.recto.mode">

That mode means it will only be used for book recto title
pages, and not other title pages.

The title page stuff is one of the most complex parts of 
the DocBook XSL stylesheets.  I've written some doc on
them at:


It includes a listing of the sequence of templates used to
produce a book title page.

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com

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

Powered by eList eXpress LLC