[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Assigning values to variables

Subject: RE: Assigning values to variables
From: "Haque, Suraiya" <Suraiya.Haque@xxxxxxx>
Date: Mon, 20 Aug 2001 11:20:29 -0400
assigning values in xml
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.