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

Re: calendar generation

Subject: Re: calendar generation
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 11 May 2010 09:06:48 -0700
Re:  calendar generation
This:

http://www.topxml.com/code/cod-422_9868_a-calendar-using-the-xselerators-date
time-library.aspx

is 6-7 years old and is an XSLT 1.0 calendar application that has
almost exactly the functionality described.

Understandably, XSLT 1.0 and XPath 1.0 don't have the XPath 2.0
date-time functions. Instead a stylesheet module by Martin Rowlinson
(the developer of XSelerator) was used at the time.

Anyone interested may just adapt this to XSLT 2.0, replacing the calls
to Martin's templates with corresponding XPath 2.0 date-time
functions.

Or just use the code as it is?


--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play



On Tue, May 11, 2010 at 8:35 AM, James Cummings
<james+xsl@xxxxxxxxxxxxxxxxx> wrote:
> Hi there,
>
> I'm sure I'm treading over well-trodden ground, but my glance through
> the FAQ and googling doesn't turn up an easy XSLT2-based solution.
>
> What I want to do is for any given year (well, they will be between
> 1788 and 1837 in this case) generate a tabular calendar of months and
> days, with some of the days predictably being links to a resource for
> that date. B (Type: cal 1788 B in any linux system to get an idea of
> what I mean.) B  I have a list of what years/days/months the resource
> has content for in a format like:
>
> <year xml:id="g1789">
> B  B <month xml:id="g1789-01">
> B  B  B  <day xml:id="g1789-01-01"/>
> B  B  B  <day xml:id="g1789-01-02"/>
> B  B  B  <day xml:id="g1789-01-03"/>
> B  B  B  <day xml:id="g1789-01-04"/>
> B  B  B  <day xml:id="g1789-01-05"/>
> B  B  B  <day xml:id="g1789-01-06"/>
> etc.
>
> And I know I can lookup these ids to test whether there is a
> corresponding link in the resource. B That isn't really the problem.
> What I want to know is whether someone has already done the code to
> generate a year-view calendar in some sensible manner so I don't have
> to figure out the date calculation of any individual date? Obviously
> the intent of this is that it will be used for navigation on a
> date-oriented historical resource.
>
> Thanks for any suggestions!
>
> -James

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.