Subject: Re: [xsl] how to trigger a new page sequence, depending on specific input conditions From: "Tony Graham" <tgraham@xxxxxxxxxx> Date: Sun, 2 Oct 2011 20:01:43 +0100 (IST) |
On Sun, October 2, 2011 2:52 pm, team wise wrote: ... > --->In the context of the top level DITA Map , yes, that <concept> is the child of the document element. ... > ---> > I forgot mentioning that with <fo: break-before name=bpageb/>, I made > the bspecificb concept XML fragment distinct, therefore the > @xtrf=bGUID-1234b should be replaced with > bconcept[title/@outputclass=bpagebreakb]b> > > 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') > o > ---> > Considering the xtrf value, such as GUID-1234' is bvariableb and not predictable until at the publishing time, which means that it can only be determined and fetched when users specify the bcontextb. How can I > apply that syntax? I think you solved it yourself when you used @outputclass='pagebreak'. You indicated in off-list email that you are using XSLT 1.0, so xsl:for-each-group isn't available to you. What XSLT processor are you using? Does it implement exslt:node-set() [1]? set:difference() [2]? Actually, you may be able to do something like the following: <xsl:for-each select="concept[title/@outputclass='pagebreak']"> <xsl:variable name="position" select="position()" /> <fo:page-sequence ...> ... <xsl:apply-templates select=". | preceding-sibling::*[count(preceding-sibling::concept[title/@outputclass='pagebreak'] = $position - 1" /> </fo:page-sequence> </xsl:for-each> Regards, Tony Graham tgraham@xxxxxxxxxx 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.exslt.org/exsl/functions/node-set/index.html [2] http://www.exslt.org/set/index.html
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to trigger a new page, team wise | Thread | Re: [xsl] how to trigger a new page, team wise |
Re: [xsl] Thank you, Xmlizer | Date | [xsl] Can this hard-coded template , Mark |
Month |