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] force pagebreaks in a glossary


Hi Tom,
I meant for you to put the code snippet inside the template that handles
your processing instruction:

<xsl:template match="processing-instruction('pagebreak')">
  <xsl:choose>
  ...
</xsl:template>

Also, you will need to add a namespace declaration to your customization
stylesheet for the fo: namespace.  You can do that at the top of the file as
described here:

http://www.sagehill.net/docbookxsl/CustomMethods.html#WriteCustomization

Hopefully this will work now.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Tom Peters" <tpeters@xs4all.nl>
To: "docbook-apps" <docbook-apps@lists.oasis-open.org>
Sent: Saturday, May 07, 2005 6:21 AM
Subject: Re: [docbook-apps] force pagebreaks in a glossary


> On Sat, 7 May 2005, Tom Peters wrote:
>
> > Thanx for your explanation.  It remains problematic however.
> > Setting "--stringparam  glossary.as.blocks 1", I first do a
pre-processing
> > with xsltproc and an xsl file to automatically add <indexterm> stanzas
> > after each <glossterm>.  However, in the process the <?pagebreak?>s get
> > removed from the output .xml, so they are no longer present to be
> > processed in the next xsltproc that generates the .fo file.
>
> O, hold on, apparently that depends on where I put the <?pagebreak?>.  I
> do get an intermediate xml file now that still has them.  I can process
> that with "--stringparam  glossary.as.blocks 1" which does appear to
> obey pagebreaks.  As you wrote, that gives a different formatting as well.
> I hope I don't sound too niggling when I prefer the original lay-out.  So
> I'd like to make your alternative (with "--stringparam glossary.as.blocks
> 0") work.  However the code snippet in my xsl file is not understood by
> xsltproc:
>
> $ ./doitglos
> compilation error: file printglos.xsl line 28 element choose
> xsltParseStylesheetTop: unknown choose element
>
> I've been experimenting with where to put it in the printglos.xsl file,
> with varying results, but none proper.  I do not get the intended
> <fo:list-item break-before="page"> stanzas in my output .fo file.
>
>
> > This is my call:
> >
> > xsltproc -o Glos.tmp --stringparam glossary.as.blocks 0
> > add-indexterms-glos.xsl Glos.xml
> >
> > This is the relevant piece of code (which you provided before and which
> > I put at the end of the xsl file):
> >
> > <xsl:choose>
> >   <xsl:when test="parent::glossary and $glossary.as.blocks = 0">
> >       <fo:list-item break-before="page">
> >             <fo:list-item-label><fo:block/></fo:list-item-label>
> >             <fo:list-item-body><fo:block/></fo:list-item-body>
> >       </fo:list-item>
> >   </xsl:when>
> >   <xsl:otherwise>
> >     <fo:block break-before="page"/>
> >   </xsl:otherwise>
> > </xsl:choose>
>
> --
>
#>!$!%(@^%#%*(&(#@#*$^@^$##*#@&(%)@**$!(&!^(#((#&%!)%*@)(&$($$%(@#)&*!^$)^@*
^@)
>
> Tom Peters
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>




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