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

RE: Conditional display of dates

Subject: RE: Conditional display of dates
From: Jeff Beadle <Jbeadle@xxxxxxxx>
Date: Wed, 19 Dec 2001 15:16:26 -0500
display date in xsl
you could try this:

<xsl:if test="( not( //Record[Name='ORIGINAL'] ) )
		   or
		  ( //Record[Name='ORIGINAL']//Date[.=''] )">

Copy Date: <xsl:value-of select="//Record[Name='COPY']//Date"/>;

</xsl:if>




-----Original Message-----
From: Katie McNally [mailto:kmcnally9@xxxxxxxxxxx]
Sent: Wednesday, December 19, 2001 2:40 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Conditional display of dates


I am trying to display a date.  I need to display the "Original Date" if it 
is returned.  If a Record with Name = ORIGINAL does not exist or the record 
with Name = ORIGINAL exists but a date for that record does not, I need to 
display the "Copy Date" (Name = COPY).  I am having difficulty doing this.  
When I try to write the XSL, I either end up displaying no date or two 
dates, so I know that it is not correct.  Any suggestions?

Here is my xml:

<RecordSet>
    <Record>
	<Name>ORIGINAL</Name>
	<RecordHistorySet>
		<RecordHistory>
			<Date>14-Apr-2001</Date>
		</RecordHistory>
	</RecordHistorySet>
    </Record>
    <Record>
	<Name>COPY</Name>
	<RecordHistorySet>
		<RecordHistory>
			<Date>17-Apr-2001</Date>
		</RecordHistory>
	</RecordHistorySet>
    </Record>
    <Record>
	<Name>HARDCOPY</Name>
	<RecordHistorySet>
		<RecordHistory>
			<Date>15-Apr-2001</Date>
		</RecordHistory>
	</RecordHistorySet>
    </Record>
</RecordSet>

Thanks,
Katie

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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

 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.