473,387 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Displaying items after a certain date

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

Jun 6 '07 #1
4 1734
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?)
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Jun 6 '07 #2
On Jun 6, 4:38 pm, Joe Kesselman <keshlam-nos...@comcast.netwrote:
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?)

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
XSLT 1.0

Jun 6 '07 #3
>>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.
XSLT 1.0
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.)

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Jun 7 '07 #4
On Jun 6, 5:49 pm, Joe Kesselman <keshlam-nos...@comcast.netwrote:
>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.
XSLT 1.0

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.)

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Yeah I'm thinking of going with the string-processing approach. Just
need some help in that department.

Cheers.

Jun 7 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Coco | last post by:
Hi! I managed to display chinese character in my web form (.aspx), in certain situation i need to to set the text of the label of my web form in chinese character programatically which is done in...
1
by: Mark ??;-\) | last post by:
I would like to display a listing of files on a web page as follows: If there is only one file: display the section name and then display the current file. If there is more than one file (for...
6
by: Matt K. | last post by:
Hi there, I have a form in an Access project that contains a subform which displays the results of a query of the style "select * from where = #a certain date#". In the main part of the form...
3
by: Coco | last post by:
Hi! I managed to display chinese character in my web form (.aspx), in certain situation i need to to set the text of the label of my web form in chinese character programatically which is done in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.