This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Assigning values to variables


I'm trying to print the the unique date/time label just once for rows that
have duplicate date/time. For the the first row, I want None/DateTime label.


My XML looks like this:

  <Structure StructId="PLB" rowCount="3">
            <Row ACTIONCODE="`" CONTROL="````````````" BULLETDATE="19940829"
BULLETTIME="074100" BULLETTEXT="When a participant attempts to make a   " />
            <Row ACTIONCODE="`" CONTROL="````````````" BULLETDATE="19940829"
BULLETTIME="074100" BULLETTEXT="transaction from the GIC fund, or has   " />
            <Row ACTIONCODE="`" CONTROL="````````````" BULLETDATE="19940829"
BULLETTIME="074100" BULLETTEXT="questions about Confederation Life,     " />
                      </Structure>


So far, I've done this:

<xsl:template match="Row">
    <tr  CLASS="row">
  
    <xsl:choose>
		<xsl:when test="not(preceding-sibling::Row)">
			<td>None:<xsl:value-of
select="@BULLETDATE"/>:<xsl:value-of select="@BULLETTIME"/></td>
		</xsl:when>
		<xsl:when test="not(preceding-sibling::Row/@BULLETDATE =
@BULLETDATE)">
			<td><xsl:value-of
select="@BULLETDATE"/>:<xsl:value-of select="@BULLETTIME"/></td>
		</xsl:when>
		<xsl:when test="not(preceding-sibling::Row/@BULLETDATE =
@BULLETDATE)">
			<td><xsl:value-of
select="@BULLETDATE"/>:<xsl:value-of select="@BULLETTIME"/></td>
		</xsl:when>
		<xsl:otherwise>
			<td>..</td>
		</xsl:otherwise>
	</xsl:choose>

    <td><xsl:value-of select="@BULLETTEXT"/></td>
    
    </tr>
</xsl:template>



-----Original Message-----
From: Goetz Bock [mailto:bock@blacknet.de]
Sent: Monday, August 20, 2001 10:40 AM
To: 'xsl-list@lists.mulberrytech.com'
Subject: Re: [xsl] Assigning values to variables



On Mon, Aug 20 '01 at 10:15, Haque, Suraiya wrote:
> Sorry, I had deleted the line where I was trying to do the assignment.
> [ ... ]
As we told you, it does not work this way. If you tell us what you're up
to, we might be able to help you further (It looks like you want to do
some sort of recursion ... possibly)
-- 
Goetz Bock                                              IT Consultant
Dipl.-Inf. Univ.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]