Subject: Re: [xsl] how to trigger a new page sequence, depending on specific input conditions From: team wise <dfanster@xxxxxxxxx> Date: Mon, 3 Oct 2011 17:59:06 +0800 |
Hi Tony, I was grateful to your patience in guiding me through the problem solving scenario. When I applied the original line of code you indicated below, <xsl:apply-templates select=". |preceding-sibling::*[count(preceding-sibling::concept[title/@outputclass='pa gebreak'] = $position - 1" /> the command line threw errors when running against Saxon 6.5.5 as XSLT processor. Obviously, it missed a pair of both square bracket and bracket. I have just made amendments to it and the resulting code is as follows: <xsl:apply-templates select=". | preceding-sibling::*[count(preceding-sibling::*[contains(@outputclass, 'pagebreak')] = $position )-1]" /> However, the command line threw error again: /infoshare.dita2fo.setup.xsl: Error in expression . | preceding-sibling::*[count(preceding-sibling::[contain s(@outputclass, 'pagebreak')] = $position )- 1]: Unexpected token [[] after axis name Transformation failed: Run-time errors were reported Kindly, note also that the outputclass=pagebreak should be placed within such as <concept> , <task> or <reference> elements. As such, I thought *[contains(@outputclass, pagebreak)] can return what I desire to get. Can you please advise how to debug the above? Does it implement exslt:node-set() [1]? set:difference() [2]? -->I am not sure if it was intended to be the EXSTL Sets module? if that being the case, I dont quite understand how to apply it, given the syntax rule according to the Jenis book entitled XSLT and XPATH on the Edge indicates Node-set set: difference (node-set, node-set). With above changes, the line of code is as follows, which failed: <xsl:if test="$outputformat = 'UG_Booklet_Print'"> <xsl:for-each select="*[contains(@outputclass, 'pagebreak')]"> <xsl:variable name="position" select="position()" /> <fo:page-sequence initial-page-number="auto" format="1"> <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> <xsl:otherwise> <xsl:attribute name="color">rgb-icc(#CMYK,0%,0%,0%,80%)</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:apply-templates select=". | preceding-sibling::*[count(preceding-sibling::*[contains(@outputclass, 'pagebreak')] = $position )- 1]" /> </fo:page-sequence> </xsl:for-each> </xsl:if>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to trigger a new page, Tony Graham | Thread | Re: [xsl] how to trigger a new page, Tony Graham |
Re: [xsl] change xslt processing or, Brandon Ibach | Date | Re: [xsl] () eq () vs () = (), Brandon Ibach |
Month |