xsl-list
[Top] [All Lists]

Re: problen comparing node with one variable in xslt

2004-03-04 06:23:06

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