Subject: Re: [xsl] A Calendar Project... From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Sun, 15 Jun 2003 17:01:07 -0400 |
<day weekday="Tue" val="2003-07-01"/> <day weekday="Wed" val="2003-07-02"/> <day weekday="Thu" val="2003-07-03"/> <day weekday="Fri" val="2003-07-04"/> <day weekday="Sat" val="2003-07-05"/> <day weekday="Sun" val="2003-07-06"/> <day weekday="Mon" val="2003-07-07"/> <day weekday="Tue" val="2003-07-08"/> <day weekday="Wed" val="2003-07-09"/> <day weekday="Thu" val="2003-07-10"/> <day weekday="Fri" val="2003-07-11"/> ...etc.
Cheers, Wendell
Hello, I'm embarking on a calendar project... from the ground up. So, I have the luxuray of putting it together any way I like : ) I'm trying to determine the best XML data structure to suit XSLT processing.
Thinking in terms of the XSLT processor: 1) I need to be able to create standard 7 day week wide calendar by 30/31 day month view 2) I need to be able to create a week view in a vertical and horizontal display format 3) As well an assortment of calendar views...
With item # 1 above, the challenge is to create 7 TD's then a new TR... 7 TD's a new TR and so on... The challenge in general is the grouping of different calendar parts, and the discovery of first day of week, etc...
Has anyone else done such a project? I will be building my XML data source from ASP, so I will script it on the fly in a suitable structure to be processed by XSLT. I guess my real question is: what would be a good XML structure for XSLT processing of a calendar?
Here is a couple of ideas I had (very prelimary):
<CAL D="2003-06-04"> <DATE D="2003-05-29" DOW="1" WK="100"/> <DATE D="2003-05-30" DOW="2" WK="100"/> <DATE D="2003-05-31" DOW="3" WK="100"/> <DATE D="2003-06-01" DOW="4" WK="100"/> <DATE D="2003-06-02" DOW="5" WK="100"/> <DATE D="2003-06-03" DOW="6" WK="100"/> <DATE D="2003-06-04" DOW="7" WK="100"/> <DATE D="2003-06-05" DOW="1" WK="101"/> .... </CAL>
Where CAL/@D is the current date (not necessarily todays date but the selected date) Where CAL/DATE/@DOW is the day-of-week (sunday..monday..tuesday.. ..) Where CAL/DATE/@WK is the week of the year
Here is another format: <CAL D="2003-06-04"> <WEEK W="100"> <DATE D="2003-05-29" DOW="1" /> <DATE D="2003-05-30" DOW="2" /> <DATE D="2003-05-31" DOW="3" /> <DATE D="2003-06-01" DOW="4" /> <DATE D="2003-06-02" DOW="5" /> <DATE D="2003-06-03" DOW="6" /> <DATE D="2003-06-04" DOW="7" /> </WEEK> <WEEK W="101"> <DATE D="2003-06-05" DOW="1"> ... </CAL>
Again, the challeng (that I see) is grouping calendar dates into the different calendar views we are use to seeing. I've built a calendar before using ASP and recall the struggle I had of discovering first day of the month... what week day the first day of month fell on... I recall the "skipping" of non-current month dates, and so on...
Any ideas would be appreciated! I'm working on this all day today. Oh, and if anyone is interested in collaboriting on this project, let me know.
Karl
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Re: A Calendar Project..., Dimitre Novatchev | Thread | Re: [xsl] A Calendar Project..., Karl J. Stubsjoen |
Re: [xsl] [XSLT 2] base-uri of inpu, Tobias Reif | Date | Re: [xsl] [XSLT 2] rescue, Tobias Reif |
Month |