Thanks for the solution. Works fine with <xsl:with-param name="content">.

Since I created a similar document as an article in way of solution seeking, I 
guess I will switch everything tomorrow, since I have found a mail in the 
archives that says, that omitting pagebreaks with a new chapter is "difficult".

Thanks a lot for your advice. Need to get to sleep now.

Best regards,

Marius

From: [email protected]
To: [email protected]; [email protected]
Date: Sun, 23 Dec 2012 16:26:59 -0800
Subject: Re: [docbook-apps] glossary in before lot








Sorry, I should have tested that suggestion before 
replying.  
 
Yes, I meant for you to replace the call to 
list.of.titles with a call to make-glossary.  But now I realize that 
calling that template directly won't work, because it expects the context 
element to be the glossary element.  The way to set the context 
element when processing out of order is by using the xsl:for-each 
statement:
 
...
<xsl:param name="content">  

  <xsl:for-each 
select="//d:glossary">
    <xsl:call-template 
name="make-glossary"/>
  </xsl:for-each>
</xsl:param>
...
 
Removing the glossary from the printed table of 
contents can be done with this:
 
<xsl:template match="d:glossary" 
mode="toc"/>
 
and from the PDF bookmarks using:
 
<xsl:template match="d:glossary" 
mode="fop1.outline"/>
 
 
 
Bob Stayton
Sagehill Enterprises
[email protected]




From: Marius Microshit 
Sent: Sunday, December 23, 2012 3:15 PM
To: Bob 
Stayton ; [email protected] 

Subject: RE: [docbook-apps] glossary in before lot


Hello,

At first I have to thank you for your fast response, 
Bob.

I will try to be more precise this time. It is a book, I thought I 
would have most liberty. I am also using docbook 5 and the 1.77.1 
stylesheets.

<xsl:template match="d:glossary"/>  suppresses 
the glossary but not the toc entry for it. I only mention it, because i guess 
it 
could be important for the second issue I have 
now.

        <xsl:if 
test="contains($toc.params,'glossary') and 
.//d:glossary">
            
<xsl:call-template 
name="page.sequence">
                
<xsl:with-param 
name="master-reference"
                    
select="$lot-master-reference"/>
                
<xsl:with-param name="element" 
select="'toc'"/>
                
<xsl:with-param name="gentext-key" 
select="'Glossary'"/>
               
<xsl:with-param 
name="content">
                   
<xsl:call-template 
name="list.of.titles">
                        
<xsl:with-param name="titles" 
select="'glossary'"/>
                        
<xsl:with-param name="nodes" 
select=".//d:glossary[d:title]"/>
                   
</xsl:call-template> 

                 
</xsl:with-param>
           
</xsl:call-template>
        
</xsl:if>

The above gets me some output: "???-Verzeichnis" 
(???-List) and "Abkürzungsverzeichnis" (Glossarytitle) formatted as a list, 
which is not yet the right format, but the content shows up already.

If I 
replace <xsl:call-template name="list.of.titles"> by <xsl:call-template 
name="make-glossary"/> I get the 
following message:

net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: 
Property ID "d5e1" (found on "fo:block") previously used; ID values must be 
unique within a document! (Siehe Position 23:-1)

My guess is 
that it doesn't (want to) process the 
glossary twice.

Of course I then tried to  add <xsl:template 
match="glossary[@role = 'NotInToc']"  mode="toc" /> to my 
customization layer and  role = 'NotInToc' to the glossary-tag, but that didn't 
work at all. 

Best regards

Marius





From: [email protected]
To: [email protected]; 
[email protected]
Date: Sun, 23 Dec 2012 09:45:24 
-0800
Subject: Re: [docbook-apps] glossary in before lot




Hi,
Yes, it is possible.  If your document is a 
book,then you need to customize the template named 'make.book.tocs' from 
fo/division.xsl.  If you document is an article, then you need to customize 
the template named 'make.component.tocs' from fo/component.xsl.  In each of 
those, you can put:
 
<xsl:call-template 
name="make-glossary"/>
 
between the main TOC and the LOTs.  If it is a 
book, then you will need to follow the examples of the LOTs and put the call to 
that template inside  a call to the "page.sequence" utility 
template to generate a page sequence for it.  For an article, there is only 
one page sequence.
 
You'll also need to turn off the glossary where it 
would appear in document order.  That can be done with a template like 
this:
 
<xsl:template match="glossary"/>  

 
Bob Stayton
Sagehill Enterprises
[email protected]




From: Marius Microshit 
Sent: Sunday, December 23, 2012 4:28 AM
To: [email protected] 

Subject: [docbook-apps] glossary in before lot


Hello,

I am currently working on my term paper and would 
like to use docbook. I already spent hours for customization since in Germany 
universities have strict layout rules regarding term papers. What I couldn't 
find until now is a way to have the glossary being printed before the list of 
tables. Is there any way to do it?

If I can't find a way I would be 
forced to use MS Word. :-(

Best regards and many thanks in 
advance

Marius
                                          

Reply via email to