Displaying items after a certain date

P

paul.boparai

Hi,

I have elements tagged with a date attribute in my XML files. The
attribute takes in text formatted like so:

2007 Jan 04
2006 Mar 22

Four numbers for the year
A space
Three letters for the month
A space
Two numbers for the day of the month

My question is, if I specify in a universal "revisiondate" element
another date, how can I make sure dates after the revision date are
shown. So for example, if I use "2006 Jul 21" in revision date, I
want to select all elements with date attributes that are later than
July 21st, 2006 and not have anything before this date.

Cheers,
Paul
 
J

Joe Kesselman

My question is, if I specify in a universal "revisiondate" element
another date, how can I make sure dates after the revision date are
shown.

Using what language to process the document? (XSLT 1.0 or 2.0? Java?
Javascript? Other?)
 
J

Joe Kesselman

My question is, if I specify in a universal "revisiondate" element

XSLT 1.0 has no date-compare capability built in. Two possible
approaches are to write string-processing/math/table logic to convert
dates to integers, or to use an extension function to perform that
operation. (A bit of hand-coded Java -- I've seen folks just invoke Java
library objects directly for this purpose -- or the EXSLT date
operations if your processor support them.)
 
P

paul.boparai

XSLT 1.0 has no date-compare capability built in. Two possible
approaches are to write string-processing/math/table logic to convert
dates to integers, or to use an extension function to perform that
operation. (A bit of hand-coded Java -- I've seen folks just invoke Java
library objects directly for this purpose -- or the EXSLT date
operations if your processor support them.)

Yeah I'm thinking of going with the string-processing approach. Just
need some help in that department.

Cheers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,000
Messages
2,570,252
Members
46,848
Latest member
CristineKo

Latest Threads

Top