Re: [xsl] problen comparing node with one variable in xslt

Subject: Re: [xsl] problen comparing node with one variable in xslt
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 4 Mar 2004 13:23:06 GMT
You posted your xml but still haven't shown whatyour stylesheet looks
like. In particular what is teh current node at teh pouint that tyou
define the variable

you have this

<xsl:for-each select="masterinformacion_padre">

So I assume that that is executed on a template matching
sn_masterinformacion
but if that is the current node at the point you define

"var_masterinformacion_id"> <xsl:value-of select= "sn_servicioproyecto/masterinformacion_sel"/>

The variabkle will have string value "" as sn_masterinformacion does not
have a sn_servicioproyecto child.

You probably don't need a variable at all you can just test

<xsl:when
  test=".=/sn_servicioproyecto/masterinformacion_sel">ok</xsl:when>

David

-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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


Current Thread