Re: [xsl] Release Date vs. Highlight Until Date

Subject: Re: [xsl] Release Date vs. Highlight Until Date
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Mon, 20 Sep 2004 18:17:30 -0700
Hi John,

Welcome to the list! You will find a lot of great people here with a lot of talent who are willing to help you get where you want to be. But there is one thing you should quickly do and that is to change the name you are using as your senders name. On a busy day at work and a list this busy you can only allow yourself to read the ones that seem to be in some sort of offical capacity. (or the ones that come in at rapid fire rate -- especially when Michael Kay gets invovled -- those can be really entertaining :D )

My point is simply that using xsl-list as your user name causes you to immediatelly think Tommie (the list master/owner/uber sgml god etc...) is cracking out the whip and those can be fun to read to find out why the need for the smackdown crackdown from the Mulberry police. When two come in during a fairly short time span it can be way to tempting not to take a peek and in this case this is exactly why I chose to read your thread.

Anyway, don't want to sound like I'm chastizing you in any way. It's a pretty logical name to use for your account if you are setting it up just for the list emails and with so many email clients automatically setting the default username to the your email account name I'm sure this is probably what happened and you didn't even realize it.

None-the-less, if you could just quickly pop open the hood and scratch out xsl-list and cover it up with something like xsl-John (who knows, you may very well be the next Michael Kay -- he's already mentioned he plans to long be retired before XSLT 3.0 comes out so if you study day and night you never know what could happen :) it would probably help save some other busy folks from giving into the same temptation I did :)

Again, welcome to the list and welcome to XSLT. You'll love it, I promise!

Best regards,

<M:D/>

xsl-list wrote:

Hi,

I am new to the list and XSL in general, so I apologize if this is the wrong
forum for this question.  I am also simplifying my problem as much as
possible.  I am also still at a pretty high level, looking more into the
concepts than the code.  While I would appreciate code examples, simple
suggestions of what tokens I should research or URLs with further information
would also be appreciated.  I am working with a CMS that stores both the
information architecture (like a directory structure) and content (like XML
files inside the directories) as XML which is transformed using XSL to HTML
for distribution to browsers.  If what I'm trying to do becomes too
complicated for XML I can use pure .NET code, but I'm wondering what XSL
solutions might be possible.

Each news record has a "release date" value.  I am not sure of the format but
hopefully my code could handle multiple formats, or if there is a standard for
date formatting in XML maybe the CMS uses that.  On a main page I need to list
the latest 5 article titles based on this "release date", with links to the
article content.  That would seem like a simple sort with some kind of break
condition after 5 loops (though I'm not even sure how to do that), but the
complication is that each record also has a "highlight until" date; if the
current system date is before the "highlight until" date, those highlighted
records need to appear at the top of the list, which should still be
constrained to 5 articles.

It seems that XSL doesn't inherently know what date it is, so either my CMS
vendor should already be passing that or I need to figure out how to pass this
as a parameter to my XSL.  I'm also not finding many web references to this
specific kind of date logic.  Based on these I'm wondering if a .NET component
is the right way to go, but since the data is already in XML I think I would
prefer XSL if possible/not too complicated.

Any assistance would be greatly appreciated.

Thanks,

-John

Current Thread