[xsl] Different templates for same set of nodes

Subject: [xsl] Different templates for same set of nodes
From: "SHEIKH Sajjad" <Sajjad.SHEIKH@xxxxxxxxxxx>
Date: Thu, 11 Dec 2003 14:38:55 +0100
Hi all,

I am having a little issue in using the same template for two different

Following sheet produces first the header of the page as following

You are here Entropresse >>> KFC >>> 1. Question Dossiers >>> E -
110803GTO nama LK213 environmental chick (2001 18)

2nd template produces the HREF as following

<a href="http://localhost?value1=Entorpresse&value2=KFC&value3=1.
Questions Dossiers&value4=E - 110803GTO nama LK213 environmental chick
(2001 18)"> click here </a>

I don't know how can I differentiate between two to use them in
different locations.

Any suggestion?

----------------------------- my.xsl ------------------------------

<xsl:template match="link">
  <td>You are here:&#160;&#160;</td>

  <xsl:for-each select="location">
   	  <xsl:attribute name="href">
    		<xsl:value-of select="."/>

<xsl:template match="link">
<xsl:attribute name="href">
 <xsl:for-each select="location">
  <xsl:value-of select="position()"/>
  <xsl:value-of select="."/>
  <xsl:if test="position()!=last()">&amp;</xsl:if>
<xsl:value-of select="."/>

----------------------------- my.xml------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?> 
  <location path="..\..\..\">Entorpresse</location> 
  <location path="..\..\">KFC</location> 
  <location path="..\">1. Questions Dossiers</location> 
  <location last="true" path="">E - 110803GTO nama LK213 environmental
chick (2001 18)</location> 

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

Current Thread