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]