Re: [xsl] If.. then OR xsl:choose question

Subject: Re: [xsl] If.. then OR xsl:choose question
From: Greg Faron <gfaron@xxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Jun 2002 13:25:14 -0600
At 11:02 AM 6/18/2002, you wrote:
Hello list
Tell me please if i like in xsl file
to make simple if ..then state
but to tell the xsl some thing like this :

<xsl:when test="@pos='First'">
 <div style="border:'1px solid green';padding-left:20">
</xsl:when>
<xsl:otherwise>
 <div style="border:'1px solid green'">
  </xsl:otherwise>
</xsl:choose>

as you see im trying to make the if based on ="@pos='First' But its giving me error that i have to include the closing <div> tag .. but i can't cos it will break the xsl proceeding order, so is there any way to make xsl to pick the right div?

Make one div, but with 2 attribute strings


<div>
<xsl:choose>
<xsl:when test="@pos='First'">
<xsl:attribute name="style" value="border:'1px solid green';padding-left:20;" />
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="style" value="border:'1px solid green';" />
<xsl:otherwise>
</xsl:choose>
<!-- contents of div here -->
</div>



Greg Faron Integre Technical Publishing Co.



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


Current Thread