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 ab...@freenet.de on 2002/10/07 12:42:48 UTC

for-each and table-row problem!

hello,
I\'m working with fop-0.20.4rc  Transform xsl/xml-file to PDF-Format
In the Part of my programm i have  a statemen, which generate a table-rows and fill it:


<xsl:for-each select=\"/document/data/EKDATA\">

<fo:table-row>
<fo:table-cell>
<fo:block><xsl:value-of select=\"/document/data/EKDATA/SPALTOBJ\"/>
</fo:block> </fo:table-cell>

<fo:table-cell number-columns-spanned=\"3\">
<fo:block><xsl:value-of select=\"/document/data/EKDATA/SPALTTERM\"/>
</fo:block> </fo:table-cell>



<fo:table-cell>
<fo:block><xsl:value-of select=\"/document/data/EKDATA/SPALT3\"/>
</fo:block> </fo:table-cell>

</fo:table-row>
</xsl:for-each>
even though i had 100 different \"EKDATA\"s, as a result  i get 100 rows with the same content!!
f.example:  
row1   EKDATA1
row2   EKDATA1
.......
row100 EKDATA1	    

could somebody help?
I thank at advance

amad


--
SMS zu teuer? 50 SMS aus dem E-Mail Office versenden - und  das Monat fuer Monat!
Dazu gibt es noch 100 MB Speicherplatz fuer die Mailbox, 700 MB virtuelle Festplatte
und 50 Faxe pro Monat! Jetzt anmelden unter  http://www.freenet.de/tipp/premium/index.html

AW: for-each and table-row problem!

Posted by Marko Petersen <lg...@rzserv2.fhnon.de>.
Hi,

try this: when you call the value, call the one of the node
that was found. For example:

<xsl:value-of select=\"SPALTOBJ\"/>

This should work (I think) :-)
In your example you always take the value "/document/data/EKDATA/SPALTOBJ" -
beginning at the root node ("/").

Marko

> -----Ursprüngliche Nachricht-----
> Von: abdolah@freenet.de [mailto:abdolah@freenet.de]
> Gesendet: Montag, 7. Oktober 2002 12:43
> An: fop-user@xml.apache.org
> Betreff: for-each and table-row problem!
>
>
> hello,
> I\'m working with fop-0.20.4rc  Transform xsl/xml-file to PDF-Format
> In the Part of my programm i have  a statemen, which generate a
> table-rows and fill it:
>
>
> <xsl:for-each select=\"/document/data/EKDATA\">
>
> <fo:table-row>
> <fo:table-cell>
> <fo:block><xsl:value-of select=\"/document/data/EKDATA/SPALTOBJ\"/>
> </fo:block> </fo:table-cell>
>
> <fo:table-cell number-columns-spanned=\"3\">
> <fo:block><xsl:value-of select=\"/document/data/EKDATA/SPALTTERM\"/>
> </fo:block> </fo:table-cell>
>
>
>
> <fo:table-cell>
> <fo:block><xsl:value-of select=\"/document/data/EKDATA/SPALT3\"/>
> </fo:block> </fo:table-cell>
>
> </fo:table-row>
> </xsl:for-each>
> even though i had 100 different \"EKDATA\"s, as a result  i get
> 100 rows with the same content!!
> f.example:
> row1   EKDATA1
> row2   EKDATA1
> .......
> row100 EKDATA1
>
> could somebody help?
> I thank at advance
>
> amad
>
>
> --
> SMS zu teuer? 50 SMS aus dem E-Mail Office versenden - und  das
> Monat fuer Monat!
> Dazu gibt es noch 100 MB Speicherplatz fuer die Mailbox, 700 MB
> virtuelle Festplatte
> und 50 Faxe pro Monat! Jetzt anmelden unter
http://www.freenet.de/tipp/premium/index.html