Name
XmlCalendar — Prints XML formatted calendar tables
Synopsis
XmlCalendar calendar_name
?-option1 option_list
? ?-option2 option_list
? ?...?
An XmlCalendar object is created and returned. XmlCalendar objects
print XML formatted calendar tables. The markup can be customized
using the configuration options.
Configuration options accept odd-length lists as values. An option_list has the following
structure
tag_name attr11 val1 attr2 val2 ...
The first element of an option list is a tag name, the remaining terms are therefore
an even-length sublist which is interpreted as a sequence of attribute-value pairs that
will in turn become attributes of the tag.
Methods
cal_obj emit -opt1 val1 -opt2 val2
cal_obj emit ?month? ?year? -opt1 val1 -opt2 val2
cal_obj emit ?
month | year
? -opt1 val1
-opt2 val2
The method 'emit' if invoked without arguments returns an
XML calendar table of the current month
Options
-container (tag_name
attr11 val1 attr2 val2 ...)
Assigns an options list to the XML element that
will hold the whole table.
The default tag for the container is 'calendar', with no attributes.
-header (tag_name attr11 val1
attr2 val2 ...)
Assigns tag name and attributes to the XML header element (default: calheader)
-body (tag_name attr11 val1
attr2 val2 ...)
Assigns tag name and attributes to the XML body element of the table (default: calbody)
-banner (tag_name attr11 val1
attr2 val2 ...)
Assigns tag name and attributes to the XML banner element of the table (default: monthyear)
The header of a calendar table is made of a banner, showing the Month and Year number, and
of a weekdays bar.
-foot (tag_name attr11 val1
attr2 val2 ...)
Assigns tag name and attributes to the XML foot element
of the table (default: calfoot).
| Note |
---|
This option was added for completeness, but it's not implemented yet
|
-banner_month (tag_name attr11 val1
attr2 val2 ...)
Tag name and attributes for the XML element holding the
month name (default:month)
-banner_year (tag_name attr11 val1
attr2 val2 ...)
Tag name and attributes for the XML element holding the
month name (default: year)
-weekdays (tag_name attr11 val1
attr2 val2 ...)
Tag name and attributes for the XML element holding the
weekday header (default: weekdays)
-weekdays_cell (tag_name attr11 val1
attr2 val2 ...)
Tag name and attributes for the XML element holding the
each single weekday (default: wkdays)
-days_row (tag_name attr11 val1
attr2 val2 ...)
Tag name and attributes for the XML element holding the
each row of the calendar table (default: week)
-days_cell (tag_name attr11 val1
attr2 val2 ...)
Tag name and attributes for the XML element representing
a cell in the calendar table (default: day)
If set this option is the name of a procedure that gets
called for every day of the month. The procedure must
accept 4 argument representing day, month, year and weekday
and must return an odd-length list interpreted in the same
way as options lists.
This option works as a simple method for pointing out
a specific day of the month. If set with a day number
that day will get the class attribute automatically
set as "current"
-current_weekday 0-6 | today
This option works as a simple method for pointing out
a specific weekday of the month. If set with a weekday
index (0: Sunday, 6: Saturday) the corresponding cell in
the weekdays header will get the class attribute automatically
set as "current_wkday"