[xsl] xpath based on condition

Subject: [xsl] xpath based on condition
From: aruniima.chakrabarti@xxxxxxxxxxxxxxxxxx
Date: Wed, 14 Aug 2002 18:43:14 +0530
Hi,

How can I achieve the following of choosing a set of nodes based to
conditions....
Something like this but which allows me to have a set of nodes & not a
single value??? Kindly help as I am really stuck on this.

<xsl:param name="Path" select="'p_ptr_str_ln_txn_inq_com'"/>
<xsl:variable name="xpath">
<xsl:choose>
<xsl:when test="string-length($Path) != 0">
<xsl:value-of select="//Header/*[name()=$Path]"/>
</xsl:when>				
<xsl:otherwise>
<xsl:value-of select="//Header"/>				
</xsl:otherwise>				
</xsl:choose>			
</xsl:variable>


Regards,
aruniima

--------------------------------------------------------------------------


----------------------------------------------------------------------------

This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--------------------------------------------------------------------------

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


Current Thread