xsl-list
[Top] [All Lists]

RE: Start and end an anchor tag in 2 different if's?

2004-10-05 09:18:27
No, this is certainly not possible (and not neccessary either).

In your case both if-sentences are equal, but what if this was not the case? Then the output would not be wellformed.

I am actually not quite sure what you want to accomplish.

Try this out, and see if it works for you:

<xsl:variable name="Something">
     <xsl:choose>
       <xsl:when test="substring(full_name,1,6) = 'Vacant'">
         <xsl:value-of select="'Vacant'" />
       </xsl:when>
       <xsl:otherwise>
         <xsl:value-of select="full_name" />
       </xsl:otherwise>
     </xsl:choose>
</xsl:variable>

<xsl:choose>
 <xsl:when test="district_active='1'">
<a href="LegislatorEdit.asp?lid={legislator_id}&amp;lstat={$lstat}"&amp;dtype={$dtype}&amp;dno={$dno}">
     <xsl:value-of select="$Something"/>
   </a>
 </xsl:when>
 <xsl:otherwise>
   <xsl:value-of select="$Something"/>
 </xsl:otherwise>
</xsl:choose>

Regards,
Ragulf Pickaxe :-)

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail