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: Best way to implement author-specified keep-with-next options?


    In the document I'm working on, I'm finding a need to specify the
keep-with-next option in several places.  Since docbook-xsl 1.73.0
doesn't seem to provide this by itself, I came up with the following
simplistic approach.  Is this the "right" way to do things?

<!-- ---------------- in FO customization layer: ---------------- -->
        Custom processing instruction target:  NeoBook
    <xsl:template match="processing-instruction('NeoBook')">
        <xsl:variable name="keep.with.next">
            <xsl:call-template name="pi-attribute">
                <xsl:with-param name="pis" select="." />
                <xsl:with-param name="attribute"
select="'keep-with-next'" />
        <xsl:if test="$keep.with.next != ''">
            <xsl:attribute name="keep-with-next.within-column">
                <xsl:value-of select="$keep.with.next" />

<!-- ---------------- in document: ---------------- -->

    <para><?NeoBook keep-with-next="always"?>
        text of paragraph goes here
        The previous paragraph will always be kept
        with this paragraph.

<!-- ---------------- ---------------- -->

Thanks in advance!
- Johnson

Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.

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