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