|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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@xxxxxxxxxxx]
Sent: Monday, August 20, 2001 10:40 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: Re: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








