You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by jgpha9 <ju...@yahoo.fr> on 2009/03/01 18:39:01 UTC
xsl:foreach problem : help !!
Hi all,
Here is my xsl (part of) code :
<xsl:for-each select="/payment/advances/advance">
<fo:page-sequence master-reference="simple" initial-page-number="1">
<fo:flow flow-name="xsl-region-body">
<fo:table background-color="white" padding-right="5pt"
padding-left="5pt">
<fo:table-column column-width="180mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>
AVANCE
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:table background-color="white" padding-right="5pt"
padding-left="5pt">
<fo:table-column column-width="100mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>
advanceid :
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:value-of select="advanceid"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</xsl:for-each>
The xml file looks like :
<payment><advances><advance><advanceid>194</advanceid></advance><advance><advanceid>196</advanceid></advance></advances></payment>
I just want to generate one page per "advance". But the <xsl:value-of
select="advanceid"/> displayes nothing.
What am I doing wrong ??
Thanks in advance.
--
View this message in context: http://www.nabble.com/xsl%3Aforeach-problem-%3A-help-%21%21-tp22275258p22275258.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: xsl:foreach problem : help !!
Posted by jgpha9 <ju...@yahoo.fr>.
Ok, thanks.
I just put the xsl:foreach instruction before the <fo:layout-master-set> tag
(instead of before the <fo:page-sequence>) and it works !
Andreas Delmelle-2 wrote:
>
> On 01 Mar 2009, at 18:39, jgpha9 wrote:
>
> Hi
>
>> Here is my xsl (part of) code :
>
> <snip />
>>
>> I just want to generate one page per "advance". But the <xsl:value-of
>> select="advanceid"/> displayes nothing.
>> What am I doing wrong ??
>
> The below table defines only one table-column, but you need at least
> two:
>
>> <fo:table background-color="white" padding-right="5pt"
>> padding-left="5pt">
>> <fo:table-column column-width="100mm"/>
>> <fo:table-body>
>> <fo:table-row>
>> <fo:table-cell>
>> <fo:block>
>> advanceid :
>> </fo:block>
>> </fo:table-cell>
>> <fo:table-cell>
>> <fo:block>
>> <xsl:value-of select="advanceid"/>
>> </fo:block>
>> </fo:table-cell>
>> </fo:table-row>
>> </fo:table-body>
>> </fo:table>
>> </fo:flow>
>> </fo:page-sequence>
>> </xsl:for-each>
>>
>
>
> HTH!
>
> Cheers
>
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/xsl%3Aforeach-problem-%3A-help-%21%21-tp22275258p22277996.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: xsl:foreach problem : help !!
Posted by Andreas Delmelle <an...@telenet.be>.
On 01 Mar 2009, at 18:39, jgpha9 wrote:
Hi
> Here is my xsl (part of) code :
<snip />
>
> I just want to generate one page per "advance". But the <xsl:value-of
> select="advanceid"/> displayes nothing.
> What am I doing wrong ??
The below table defines only one table-column, but you need at least
two:
> <fo:table background-color="white" padding-right="5pt"
> padding-left="5pt">
> <fo:table-column column-width="100mm"/>
> <fo:table-body>
> <fo:table-row>
> <fo:table-cell>
> <fo:block>
> advanceid :
> </fo:block>
> </fo:table-cell>
> <fo:table-cell>
> <fo:block>
> <xsl:value-of select="advanceid"/>
> </fo:block>
> </fo:table-cell>
> </fo:table-row>
> </fo:table-body>
> </fo:table>
> </fo:flow>
> </fo:page-sequence>
> </xsl:for-each>
>
HTH!
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org