I don't think that helps, because he still gets the empty fo:block and hence the blank page. But by rearranging your code, perhaps this will work instead:
<xsl:choose> <xsl:when test="0 < count(CodeDecode)"> <fo:page-sequence master-reference="page3"> <fo:flow flow-name="body3"> <xsl:apply-templates select="CodeDecode" /> </fo:flow> </fo:page-sequence> </xsl:when> <xsl:otherwise> </xsl:otherwise> <xsl:choose> I think this will work. No fo:page-sequence--and hence no blank page--will be output if there is no data. Glen --- Dennis Myrén <[EMAIL PROTECTED]> wrote: > Neeru, > > You can test if there are any occurrences of > CodeDecode, if not then just write out an empty > block: > <fo:page-sequence master-reference="page3"> > <fo:flow flow-name="body3"> > <xsl:choose> > <xsl:when test="0 < count(CodeDecode)"> > <xsl:apply-templates select="CodeDecode" /> > </xsl:when> > <xsl:otherwise> > <fo:block /> > </xsl:otherwise> > <xsl:choose> > </fo:flow> > </fo:page-sequence> > > > Regards, > Dennis JD Myrén > Developer > Oslo Kodebureau > Tel: (+47) 98 00 11 92 > Mail: [EMAIL PROTECTED] > Web: www.oslokb.no > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: 1. mars 2005 16:36 > To: [EMAIL PROTECTED] > Subject: fo:flow must contain block-level children > > > > > > I get the following error > fo:flow must contain block-level children > when I don't have the matching elements in my xml by > using the following > code generates the error. > > <fo:page-sequence master-reference="page3"> > <fo:flow flow-name="body3"> > <xsl:apply-templates select="CodeDecode"> > </xsl:apply-templates> > </fo:flow> > </fo:page-sequence> > > If I replace the above code with the code below I > get an extra blank page > and I want to suppress this blank page > > <fo:page-sequence master-reference="page3"> > <fo:flow flow-name="body3"> > <fo:block> > <xsl:apply-templates select="CodeDecode"> > </xsl:apply-templates> > </fo:block> > </fo:flow> > </fo:page-sequence> > > Thanks > > -Neeru > > ---------------------------------------------------------- > Le présent message ainsi que ses éventuelles pièces > jointes est > exclusivement destiné au(x) destinataire(s), > personnes physiques ou > morales, qu'il désigne. > Il constitue de ce fait une correspondance à > caractère privé et peut > contenir des informations confidentielles. > Si ce message vous est parvenu par erreur, nous vous > remercions d'en aviser > immédiatement l'expéditeur par retour de courrier > électronique puis de le > détruire, ainsi que ses éventuelles pièces jointes, > sans en conserver de > copie. > > > This message, including any attachment, is intended > for the use of the > individual or entity to which it is addressed. > It is therefore to be considered as a private > correspondence which may > contain confidential information. > If you are not the intended recipient, please advise > the sender immediately > by reply e.mail and delete this message and any > attachment thereto without > retaining a copy. > ---------------------------------------------------------- > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]