xsl-list
[Top] [All Lists]

RE: Number error with XALAN

2003-01-21 01:11:18
It is actually much very easy. Use position()

<xsl:for-each 
select="Grafikauswertungen/MeilensteinTrendAnalyse/Meilensteine/Meilenstein[not(MeilensteinBezeichnung
 = '')]">
        <fo:block font-size="10pt" font-family="sans-serif">
        <xsl:value-of select="position()"/>  ) <xsl:apply-templates 
select="MeilensteinBezeichnung"/>
        </fo:block>
</xsl:for-each>

Edward Middleton

-----Original Message-----
From: sascha [mailto:sascha(_at_)assbach(_dot_)de]
Sent: Tuesday, January 21, 2003 5:39 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Number error with XALAN


Well, i am running through an xsl:for-each "loop"
and all i want is to have an increasing number starting from 1 
just at the start of every line.

like an <ol> in HTML 
1)..
2)..
3)..

my code is actually 

<xsl:variable name="c" select="1"/>

<xsl:for-each
select="Grafikauswertungen/MeilensteinTrendAnalyse/Meilensteine/Meilenstei
n[not(MeilensteinBezeichnung = '')]">
                                <fo:block font-size="10pt" 
font-family="sans-serif"> <xsl:value-of
select="$c" />  ) <xsl:apply-templates select="MeilensteinBezeichnung"
/></fo:block>
                                <xsl:variable name="c" select="$c+1"/> 
</xsl:for-each> 

but i know now that this is wrong, cause you can't apply a value to a
variable a second time. ( although i dont understand why it is called a
"variable" then... nevermind.)

can you help me please?

sascha

On Mon, 20 Jan 2003 19:44:34 -0000 "Michael Kay" wrote:


Thanks for your answers, i understand.
but what is a solution for this? 
can anybody please advice? 


It's very hard to guess what the problem is by reverse-engineering
incorrect code. Tell us the problem, and we can tell you the answer.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




:::::::::::::::::::::::::::................
NEU** Partnerschaft mit 
notenbuch.de (Deutschlands umfangreicher Musiknotenversand)

notenbuch - http://www.zanox-affiliate.de/ppc/?297008C1412642575


powered by EMUMAIL. -- http://www.EMUMAIL.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>