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

Re: Calling exslt date function

Subject: Re: Calling exslt date function
From: Maik Stührenberg <Maik.Stuehrenberg@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Aug 2003 09:21:17 +0200
xsl date function
Hi Tom,

just a guess, but I think you've chosen the wrong delimiter for your URL in <xsl:import href="functions\date\date.date.template.xsl" />. Did you try it with forward slashes? To call the date function, everything you need is something like this:
<xsl:value-of select="date:date-time()"/>


Regards,

Maik Stührenberg


Date: Tue, 12 Aug 2003 16:33:33 -0700
From: "Tom Froehlich" <Tom@xxxxxxxxx>
Subject:  Calling exslt date function

Well,

I got a plain xml file of events that needs to be transformed to html
via an xsl stylesheet. The transformation should only include events
with a begin date equal to or greater than the current date (system
date), all past events in the xml file are ignored. We upload a fresh
xml file once per month or so.

Our server runs msxml4 and I got the exslt date functions installed.
Somehow, I cannot figure how to get the dynamic, current date to work in
my stylesheet. I get no error message, just no events and no current
date value.... It works fine when I use the enterdate variable instead.

The xml:
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata">
<tblCurrentEvents>
<EventID>1</EventID>
<EventName>The Financial Cruncher Demo</EventName>
<EventDescription>Two hour demo of the new features in FC
4.2.</EventDescription>
<EventType>Demo</EventType>
<EventAudience>For current users of FC only.</EventAudience>
<EventBeginDate>2003-06-04T00:00:00</EventBeginDate>
<EventEndDate>2003-06-04T00:00:00</EventEndDate>
<EventBeginTime>09:30 AM</EventBeginTime>
<EventEndTime>11:30 AM</EventEndTime>
<FeeStatus>FREE</FeeStatus>
<Fee>0</Fee>
<Discount>10% for each additional attendee per organization.</Discount>
<EventLocation>San Francisco Training Center</EventLocation>
<EventStatus>open</EventStatus>
<EventSchedule>recurring-monthly</EventSchedule>
<EventRegistration>Event registration required.</EventRegistration>
</tblCurrentEvents>
<tblCurrentEvents>
.
.
.

The xsl:
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:date="http://exslt.org/dates-and-times"
    extension-element-prefixes="date">
    <xsl:import href="functions\date\date.date.template.xsl" />

    <xsl:variable name="enterdate" select="'2003-08-01T00:00:00Z'"/>
<!-- just in case -->



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.