Pages: 1
Author Topic: Page Breaks Between Topic Level 1 and 2  (Read 2443 times)

Posts: 4

« on: February 10, 2014, 05:34:14 AM »

Good Day

I am currently using XMetal to create PDF`s for training guides.

We have Level 1 Topics that are the headings and then Level 2 Topics.

What I want is a automatic break on only Level 2 Topics and no break between other levels of Topics:

If I insert <xsl:attribute name="page-break-before">always</xsl:attribute> against <xsl:attribute-set name="topic.topic.title">

Then it only puts a break on Level 2 Topics but then there is a break between the Topic.Title and Topic.Topic.title.

I also have tried the following:

<xsl:attribute-set name="topic">
        <xsl:attribute name="font-size"> <xsl:value-of select="$xm.document.font-size"/> </xsl:attribute>
        <!--MB Add page break if outputclass set to 'pagebreak' -->
        <xsl:attribute name="break-before">
     <xsl:when test="@outputclass='nobreak'">auto</xsl:when>

But this is manual and we have huge guides and will require a lot of work just for a pagebreak.

Please let me know.

I will appreciate some help.

Kind Regards

Posts: 80

« Reply #1 on: February 17, 2014, 11:14:38 AM »

Have you tried to modify the template that processes topics to add a when statement that says "if this is a level 2, use topicLevel2 attributes" and then create an attribute set for "topicLevel2" that includes a pagebreak?

In the when statement, you could  use a depth variable like this <xsl:variable name="depth" select="count(ancestor-or-self::*[contains(@class, ' map/topicref')])" /> (the depth variable idea comes from the topic numbering template that you can get from

Pages: 1
Jump to:  

email us