Subject: Re: [xsl] less than zero From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Wed, 31 Jul 2002 13:00:55 +0200 |
I want to check if a value ( $leftmargin ) is less than 0 - check my example please.
"$wert" is ok, "$leftmargin" is ok too but the xsl:if does not work.:
<xsl:variable name="notesleftmargin"><xsl:value-of select="ancestor::dxl:richtext//dxl:pardef[@id=$pabid]/@leftmargin"/></xsl:v ariable>
<xsl:variable name="wert" select="substring-before($notesleftmargin,'in')"/> <xsl:variable name="leftmargin" select="$wert - 1"></xsl:variable>
<xsl:if test="number($leftmargin) < 0"><xsl:variable name="leftmargin" select="0"></xsl:variable></xsl:if>
<xsl:variable name="correct-leftmargin"> <xsl:choose> <xsl:when test="number($leftmargin) < 0">0</xsl:when> <xsl:otherwise><xsl:value-of select="$leftmargin"/></xsl:otherwise> </xsl:choose> </xsl:variable>
<xsl:attribute name="margin-left"><xsl:value-of select="concat($leftmargin,'in')"/></xsl:attribute>
but this does not work. why?
sascha
System Development VIRBUS AG Fon +49(0)341-979-7419 Fax +49(0)341-979-7409 joerg.heinicke@xxxxxxxxx www.virbus.de
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] less than zero, sascha | Thread | Re: [xsl] less than zero, sascha |
Re: [xsl] math get maximum and subt, sascha | Date | RE: [xsl] Space Between 2 consecuti, Michael Leditschke |
Month |