hi mr jorgensen,
        thanx a lot...it worked....
now i have litte more complex thing to do....
how can i set TWO variables as a result of some tests?

hope u can help me once more
regards
        marco

> -----Original Message-----
> From: ext Morten Jorgensen [mailto:[EMAIL PROTECTED]]
> Sent: 29. May 2001 12:54
> To: [EMAIL PROTECTED]
> Subject: Re: little off-topic / setting value of a variable as
> consequence of some tests
> 
> 
> Marco,
> 
> Hello again! Put the if/otherwise elements inside the variable
> declaration:
> 
>   <xsl:variable name="myvariable> <!-- no 'select' -->
>     <xsl:if test="starts-with(./@name,'mar')">
>       <!-- assign value to variable here -->
>     </xsl:if>
>     <xsl:otherwise/> <!-- assign nothing to variable -->
>   </xsl:variable>
> 
> I am not sure this will work with all XSLT processors, but it
> should...
> 
> Morten
> 
> [EMAIL PROTECTED] wrote:
> > 
> > hi all,
> >         sorry that it's little off-topic, but i need urgent 
> help and i know
> > that this list is very active
> > 
> > i have a very little problem..as said in the subject
> > 
> > i must set the value of a variable as consequence of some tests
> > 
> > here is a sample code...
> > 
> >  <xsl:if test="starts-with(./@name,'mar')">
> > 
> >      <!-- here i must set the value of the variable...but i 
> don't know how..
> > -->
> >  </xsl:if>
> > 
> >  <xsl:otherwise>
> >      <!-- value of hte variable = null -->
> > 
> >  </xsl:otherwise>
> > 
> > so, i was thinking that i can write, before this xsl code
> > 
> >   <xsl:variable name="myvariable" select="" />
> > 
> > but then, i am missing how can i change the value of that 
> variable later on
> > 
> > can anyone give me a hint???
> > 
> > thanx in advance and regards
> >         marco
> 

Reply via email to