|
Subject: Re: [xsl] Conditional display of dates From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 19 Dec 2001 15:12:11 -0500 |
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).
<xsl:template match="RecordSet">
<xsl:variable name="originalDate"
select="Record/Name[.='ORIGINAL']/RecordHistorySet/RecordHistroy/Date"/>
<!-- bind the node to the variable --><!-- we want its value (which is nothing if it doesn't exist) --> <xsl:value-of select="$originalDate"/>
<!-- if it does not exist, we get the other value -->
<xsl:if test="not($originalDate)">
<xsl:value-of
select="Record/Name[.='COPY']/RecordHistorySet/RecordHistroy/Date"/>
</xsl:if>Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Conditional display of dates, Katie McNally | Thread | RE: [xsl] Conditional display of da, Jeff Beadle |
| Re: [xsl] One nodeset, multiple bra, Eric Vitiello | Date | RE: [xsl] Conditional display of da, Jeff Beadle |
| Month |