Subject: [xsl] Double processing From: "Norma Yeazell" <Nyeazell@xxxxxxxxx> Date: Fri, 30 Jan 2004 13:25:49 -0500 |
What I'm trying to do is: if there is more than one consecutive warning the first para of each warning needs a bullet. This is working but once it processes that, it repeats the second and third warning again and then the third one again before continuing. Can anyone tell me how to get it to stop after the last warning in a group and move on? I'm stuck. Thanks in advance for any advice! Xsl snip: <xsl:template name="warning-list"> <fo:list-block font-weight="bold" keep-with-previous.within-page="always" space-after="4mm"> <fo:list-item margin-left="2cm" space-after="4mm" provisional-distance-between-starts="1cm"> <fo:list-item-label end-indent="label-end()"> <fo:block> <fo:character character="•"/> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()-1.95cm"> <fo:block> <xsl:apply-templates select="para"/> </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> <xsl:variable name="next" select="following-sibling::*[1]"/> <xsl:for-each select="$next[self::warning]"> <xsl:call-template name="warning-list"/> </xsl:for-each> </xsl:template> <xsl:template match="warning"> <xsl:choose> <xsl:when test="following-sibling::warning"> <fo:block text-indent="2cm" font-weight="bold" font-size="12pt" text-decoration="underline" text-align="center" keep-with-next.within-page="always" keep-with-previous.within-page="always" space-after="4mm"> <xsl:text>WARNINGS</xsl:text> </fo:block> <fo:block> <xsl:call-template name="warning-list"/> </fo:block> </xsl:when> <xsl:when test="para"> <fo:block text-indent="2cm" font-weight="bold" font-size="12pt" text-decoration="underline" text-align="center" keep-with-next.within-page="always" keep-with-previous.within-page="always" space-after="4mm"> <xsl:text>WARNING(1)</xsl:text> </fo:block> <xsl:value-of select="symbol"/> <xsl:for-each select="para"> <fo:block font-weight="bold" margin-left="2cm" keep-with-previous.within-page="always" space-after="4mm"> <xsl:apply-templates/> </fo:block> </xsl:for-each> <xsl:for-each select="randlist/item|seqlist/item"> <xsl:value-of select="title"/> <fo:list-block font-weight="bold" margin-left="2cm" keep-with-previous.within-page="always"> <fo:list-item provisional-distance-between-starts="1mm"> <fo:list-item-label margin-left="2cm" end-indent="label-end()"> <fo:block> <fo:character character="•"/> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <xsl:apply-templates/> </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </xsl:for-each> </xsl:when> </xsl:choose> </xsl:template> XML snip <step1> <warning> <para>warning-1-1 Batteries weigh 75lbs. (34 Kg) each. Do not lift or move batteries without the aid of an assistant. This is a warning in a step 1.</para> <para>1-2Batteries weigh 75lbs. (34 Kg) each. Do not lift or move batteries without the aid of an assistant. This is a warning in a step 1.</para> <para>1-3Batteries weigh 75lbs. (34 Kg) each. Do not lift or move batteries without the aid of an assistant. This is a warning in a step 1.</para> </warning> <warning> <para>warning-2-1 Batteries weigh 75lbs. (34 Kg) each. Do not lift or move batteries without the aid of an assistant. This is a warning in a step 1.</para> <para>2-2 Batteries weigh 75lbs. (34 Kg) each. Do not lift or move batteries without the aid of an assistant. This is a warning in a step 1.</para> <para>2-3 Batteries weigh 75lbs. (34 Kg) each. Do not lift or move batteries without the aid of an assistant. This is a warning in a step 1.</para> </warning> <warning> <para>warning-3-1 Batteries weigh 75lbs. (34 Kg) each. Do not lift or move batteries without the aid of an assistant. This is a warning in a step 1.</para> <para>3-2 Batteries weigh 75lbs. (34 Kg) each. Do not lift or move batteries without the aid of an assistant. This is a warning in a step 1.</para> </warning> <para>With the aid of an assistant, position batteries in battery box. This is the first step 1.</para> </step1> Confidentiality Notice The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl-fo apache fop-0.20.5 , Mike Haarman | Thread | Re: [xsl] Double processing, G. Ken Holman |
[xsl] xsl-fo apache fop-0.20.5 how , Robert . Walker | Date | RE: [xsl] Encoding attribute, G. Ken Holman |
Month |