On Sun, October 2, 2011 1:44 am, team wise wrote:
I am after a proper sort of method how to trigger a new page sequence,
depending on specific input conditions.
For example, as input, below is a content model XML with xtrf
attribute featuring an unique identifier, such as GUID-1234,
<concept>
<title xtrf="GUID-1234">
Explore and get support
</title>
<conbody/>
</concept>
I, for one, am not sure what you are after. What comes before and after
this <concept>? Is it nested within several levels of elements or is it a
child of the document element?
If the <concept> is a child of the document element, then it might be as
simple as using xsl:for-each-group [1] with 'group-ending-with', e.g.:
<xsl:for-each-group
select="*"
group-ending-with="concept[title/@xtrf = 'GUID-1234']">
<fo:page-sequence ...>
...
<xsl:apply-templates select="current-group()" />
</fo:page-sequence>
</xsl:for-each>
If you need to do this for multiple specific <context>, you can use a
sequence of @xtrf values in the predicate instead, e.g.:
title/@xtrf = ('GUID-1234', 'GUID-5678')
The intention is that the above XML content model shall be placed on
It's more commonly referred to as a 'fragment', BTW: 'content model' is a
term from DTDs for the definition of what's allowed in a particular
element.
the last page of a PDF document with the following rendering effect
<xsl:if test="$outputformat = 'UG_Booklet_Print'">
<xsl:choose>
<xsl:when test="position() = last()">
<xsl:attribute name="axf:background-color"><xsl:value-of
select="$background_colour"/></xsl:attribute>
<xsl:attribute
name="color">rgb-icc(#CMYK,0%,0%,0%,0%)</xsl:attribute>
</xsl:when>
Presumably the 'last()' is for this particular <concept> only?
Regards,
Tony Graham tgraham(_at_)mentea(_dot_)net
Consultant http://www.mentea.net
Mentea 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
XML, XSL FO and XSLT consulting, training and programming
[1] http://www.w3.org/TR/xslt20/#xsl-for-each-group
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--