You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2010/07/03 03:09:14 UTC

svn commit: r960146 [4/4] - in /tcl/rivet/trunk: doc/html/ doc/xml/ rivet/packages/calendar/

Modified: tcl/rivet/trunk/doc/html/xml_calendar.html
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/html/xml_calendar.html?rev=960146&r1=960145&r2=960146&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/html/xml_calendar.html (original)
+++ tcl/rivet/trunk/doc/html/xml_calendar.html Sat Jul  3 01:09:12 2010
@@ -1,17 +1,28 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>XmlCalendar</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="calendar_package.html" title="Calendar Package"><link rel="prev" href="calendar.html" title="Calendar"><link rel="next" href="help.html" title="Resources - How to Get Help"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">XmlCalendar</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="calendar.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Calendar Package</th><td width="20%" align="right"> <a accesskey="n" href="help.html"><img src="images/next.png" alt="Next"></a></td></tr></
 table></div><div class="refentry" title="XmlCalendar"><div class="refentry.separator"><hr></div><a name="xml_calendar"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>XmlCalendar &#8212; XmlCalendar returns XML formatted calendar tables</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">XmlCalendar</span>   <span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>calendar_name</code></em></span>  ?<span style="font-family:monospace; font-weight: bold;">-option1 <em class="replaceable"><code>value_1</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;">-option2 <em class="replaceable"><code>value_2</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;">...</span>
 ?</div></div></div><div class="refsect1"><a name="id621844"></a><p style="width:90%">
-				An XmlCalendar object is created and returned. This command object accepts many 
-				customization options to specify the XML tags to be used in the structure of
-				the cal table. 
-			</p><div class="refsect2" title="Options"><a name="id621851"></a><h3>Options</h3><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-container options_list</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
-								Assigns the <span style="font-family:monospace"><span class="command"><strong>options_list</strong></span></span> to the XML root element that 
-								will encompass the whole table.   
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>XmlCalendar</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="calendar_package.html" title="Calendar Package"><link rel="prev" href="calendar.html" title="Calendar"><link rel="next" href="html_calendar.html" title="HtmlCalendar"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">XmlCalendar</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="calendar.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Calendar Package</th><td width="20%" align="right"> <a accesskey="n" href="html_calendar.html"><img src="images/next.png" alt="Next"></a></td></tr
 ></table></div><div class="refentry" title="XmlCalendar"><div class="refentry.separator"><hr></div><a name="xml_calendar"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>XmlCalendar &#8212; Prints XML formatted calendar tables</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">XmlCalendar</span>   <span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>calendar_name</code></em></span>  ?<span style="font-family:monospace; font-weight: bold;">-option1 <em class="replaceable"><code>option_list</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;">-option2 <em class="replaceable"><code>option_list</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;">...</span>?<
 /div></div></div><div class="refsect1"><a name="id363200"></a><p style="width:90%">
+				An XmlCalendar object is created and returned. XmlCalendar objects
+				print XML formatted calendar tables. The markup can be customized
+				using the configuration options. 
+			</p><p style="width:90%">
+				Configuration option are odd-length list of options. 
+			</p><p style="width:90%">
+				</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%;       padding: 1ex; border: dashed black 1px ; white-space: pre;      font-family: monospace; font-size: 90%;" class="programlisting">tag_name attr11 val1 attr2 val2 ...</pre><p style="width:90%">			
+			</p><p style="width:90%">
+				The first element of an option list is a tag name, the remaining terms (if specified) are
+				a even-length sublist which is interpreted as attribute-value pairs that
+				will be copied into the opening tag of an element			
+			</p></div><div class="refsect1" title="Methods"><a name="id363226"></a><h2>Methods</h2><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex ">
+		      			cal_obj <span style="font-weight:bold ; font-family:monospace">emit</span> -opt1 val1 -opt2 val2</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex ">
+		      			cal_obj <span style="font-weight:bold ; font-family:monospace">emit</span>  ?<span style="font-family:monospace; font-weight: bold;">month</span>? ?<span style="font-family:monospace; font-weight: bold;">year</span>?-opt1 val1 -opt2 val2</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex ">
+							cal_obj <span style="font-weight:bold ; font-family:monospace">emit</span>  ?<span style="font-family:monospace; font-weight: bold;">
+							<em class="replaceable"><code>month | year</code></em></span>?-opt1 val1 -opt2 val2</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+							The method 'emit' if invoked without arguments returns an 
+							ASCII formatted calendar of the current month
+		      		</div></div></dd></dl></div></div><div class="refsect1"><a name="id363318"></a><div class="refsect2" title="Options"><a name="id363320"></a><h3>Options</h3><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-container  (tag_name 
+								attr11 val1 attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								Assigns an options list to the XML element that 
+								will hold the whole table.   
 							</div><div style="margin-bottom:1.5ex ; padding .5ex">
-								An option list is organized as an odd-sized list of option:
-<pre style="background:#ccc; margin: 2ex; margin-right: 10%;       padding: 1ex; border: dashed black 1px ; white-space: pre;      font-family: monospace; font-size: 90%;" class="programlisting">tag_name attr11 val1 attr2 val2 ...</pre>
-							</div><div style="margin-bottom:1.5ex ; padding .5ex">
-								The first element of the list is the tag name that will assigned to the container
-								(default: calendar, no attributes). The remaining terms must be an even number and are
-								interpreted as attribute-value pairs	
+								The default tag for the container is 'calendar', with no attributes.
 							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-header  (tag_name attr11 val1 
 								attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
 								Assigns tag name and attributes to the XML header element (default: calheader) 						
@@ -26,7 +37,49 @@
 								of a weekdays bar. 							
 							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-foot  (tag_name attr11 val1 
 								attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
-								Assigns tag name and attributes to the XML foot element of the table (default: calfoot). 						
+								Assigns tag name and attributes to the XML foot element 
+								of the table (default: calfoot). 						
 							</div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top">
 								This option was added for completeness, but it's not implemented yet							
-							</td></tr></table></div></div></dd></dl></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="calendar.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="calendar_package.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="help.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Calendar </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> Resources - How to Get Help</td></tr></table></div></body></html>
+							</td></tr></table></div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-banner_month  (tag_name attr11 val1 
+								attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								Tag name and attributes for the XML element holding the 
+								month name (default:month)					
+							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-banner_year  (tag_name attr11 val1 
+								attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								Tag name and attributes for the XML element holding the 
+								month name (default: year)					
+							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-weekdays  (tag_name attr11 val1 
+								attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								Tag name and attributes for the XML element holding the 
+								weekday header (default: weekdays)					
+							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-weekdays_cell  (tag_name attr11 val1 
+								attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								Tag name and attributes for the XML element holding the 
+								each single weekday (default: wkdays)					
+							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-days_row  (tag_name attr11 val1 
+								attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								Tag name and attributes for the XML element holding the 
+								each row of the calendar table (default: week)					
+							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-days_cell  (tag_name attr11 val1 
+								attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								Tag name and attributes for the XML element representing
+								a cell in the calendar table (default: day)					
+							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-cell_function proc</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								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. 
+							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-current_day day</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								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"
+							</div></div></dd><dt></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex;   word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-current_weekday 0-6 | today</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+								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"
+							</div></div></dd></dl></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="calendar.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="calendar_package.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="html_calendar.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Calendar </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> HtmlCalendar</td></tr></table></div></body></html>

Modified: tcl/rivet/trunk/doc/xml/calendar.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/calendar.xml?rev=960146&r1=960145&r2=960146&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/calendar.xml (original)
+++ tcl/rivet/trunk/doc/xml/calendar.xml Sat Jul  3 01:09:12 2010
@@ -3,19 +3,21 @@
    <section>
    	<title>Introduction</title>
       <para>
-      	The Calendar package is a set of three classes that produce 
-      	calendar tables in 2 different forms: Ascii calendar and XML
-      	Calendar. The third class HtmlCalendar is a concrete descendant
-      	of XmlCalendar that prints a calendar in xhtml form. 
-      	The ascii output from Calendar is formatted in the same form
-      	the typical Unix <command>cal</command> command does. The internal
-      	code is based on Tcl only therefore doesn't rely on the existance 
-      	of the 'cal' command on the system. 
-      	This is also a base class from which the XmlCalendar
-      	class inherits the basic methods that generate the table.
-      	XmlCalendar prints an XML calendar table whose header, weekdays banner
-      	and week rows tags are configurable. Also specific days or
-      	specific weeks can be given arbitrary attributes.
+      	The package is based on the Calendar class, a class capable
+      	of printing an ascii calendar table that closely resembles the output 
+      	of the typical Unix <command>cal</command> command. The internal
+      	code is written entirely in Tcl, therefore doesn't rely on the 
+      	existance of <command>cal</command> on the system. 
+      	XmlCalendar inherits the basic methods and adds XML tagging to the
+      	table. XmlCalendar prints an XML calendar table whose header, 
+      	weekdays banner and days rows tags are configurable. 
+      	Also specific days or specific weeks can be given arbitrary attributes.
+      </para>
+      <para>
+      	Calendar core methods are based on the 
+      	<ulink url="http://wiki.tcl.tk/17964">cal</ulink> procedure
+      	written by Richard Suchenwirth and published on the 
+      	<ulink url="http://wiki.tcl.tk">Tcl Wiki</ulink>
       </para>
    </section>
    <refentry id="calendar">
@@ -32,7 +34,8 @@
 		<refsect1>
 			<title>Calendar object subcommands</title>
 			<para>
-				The main public command for a calendar object is <command>emit</command> that returns a calendar table
+				The main public command for a calendar object is 
+				<command>emit</command> that returns a calendar table
 			</para>
 		</refsect1>
 		<refsect1>
@@ -40,13 +43,13 @@
 		  		<varlistentry>
 		    		<listitem>
 		      		<cmdsynopsis>
-		      			<command>calendar_obj</command>
+		      			calendar_obj <command>emit</command> 
 		      		</cmdsynopsis>
 						<cmdsynopsis>
-		      			<command>calendar_obj</command> <arg>month</arg> <arg>year</arg>
+		      			calendar_obj <command>emit</command> <arg>month</arg> <arg>year</arg>
 		      		</cmdsynopsis>
 		      		<cmdsynopsis>
-							<command>calendar_obj</command> <arg><replaceable>month | year</replaceable></arg>
+							calendar_obj <command>emit</command> <arg><replaceable>month | year</replaceable></arg>
 		      		</cmdsynopsis>
 						<para>
 							The method 'emit' if invoked without arguments returns an 
@@ -67,9 +70,9 @@ puts $current_month
 		  		</varlistentry>
 	    		<para>
 	    			The method <command>emit</command> when invoked with a single argument
-	    			interprets this vale as a year number and prints the whole calendar of
-	    			that year. When invoked with 2 arguments takes the first as month, either
-	    			expressed in its shortened form ('Jan','Feb',...) or as number in the 
+	    			takes it as an year number and prints the whole calendar of
+	    			that year. When invoked with 2 arguments takes the first as a month, either
+	    			expressed in its shortened form ('Jan','Feb',...) or as a number in the 
 	    			range 1-12. The second argument is a year number.
 	    		</para>
 			</variablelist>
@@ -78,43 +81,73 @@ puts $current_month
 	<refentry id="xml_calendar">
 	   <refnamediv>
 			<refname>XmlCalendar</refname>
-			<refpurpose>XmlCalendar returns XML formatted calendar tables</refpurpose>
+			<refpurpose>Prints XML formatted calendar tables</refpurpose>
 		</refnamediv>
 		<refsynopsisdiv>
 			<cmdsynopsis>
 			  	<command>XmlCalendar</command>
 			  	<arg choice="plain"><replaceable>calendar_name</replaceable></arg>
-			   <arg>-option1 <replaceable>value_1</replaceable></arg>
-			   <arg>-option2 <replaceable>value_2</replaceable></arg>
+			   <arg>-option1 <replaceable>option_list</replaceable></arg>
+			   <arg>-option2 <replaceable>option_list</replaceable></arg>
 			   <arg>...</arg>
 			</cmdsynopsis>
 		</refsynopsisdiv>
 		<refsect1>
 			<para>
-				An XmlCalendar object is created and returned. This command object accepts many 
-				customization options to specify the XML tags to be used in the structure of
-				the cal table. 
+				An XmlCalendar object is created and returned. XmlCalendar objects
+				print XML formatted calendar tables. The markup can be customized
+				using the configuration options. 
+			</para>
+			<para>
+				Configuration option are odd-length list of options. 
+			<para>
+				<programlisting>tag_name <option>attr11 val1 attr2 val2 ...</option></programlisting>			
+			</para>
+				The first element of an option list is a tag name, the remaining terms (if specified) are
+				a even-length sublist which is interpreted as attribute-value pairs that
+				will be copied into the opening tag of an element			
 			</para>
+		</refsect1>
+		<refsect1>
+			<title>Methods</title>
+	    	<variablelist>
+		  		<varlistentry>
+		    		<listitem>
+		      		<cmdsynopsis>
+		      			cal_obj <command>emit</command> <option>-opt1 val1 -opt2 val2</option>
+		      		</cmdsynopsis>
+						<cmdsynopsis>
+		      			cal_obj <command>emit</command> <arg>month</arg> <arg>year</arg> 
+		      			 <option>-opt1 val1 -opt2 val2</option>
+		      		</cmdsynopsis>
+		      		<cmdsynopsis>
+							cal_obj <command>emit</command> <arg>
+							<replaceable>month | year</replaceable></arg> <option>-opt1 val1 -opt2 val2</option>
+		      		</cmdsynopsis>
+						<para>
+							The method 'emit' if invoked without arguments returns an 
+							ASCII formatted calendar of the current month
+		      		</para>
+					</listitem>
+				</varlistentry>
+			</variablelist>
+		</refsect1>
+		<refsect1>
 			<refsect2>
 				<title>Options</title>			
 				<variablelist>
 					<varlistentry>
 						<listitem>
 							<cmdsynopsis>
-								<command>-container options_list</command>
+								<command>-container <group>tag_name 
+								<option>attr11 val1 attr2 val2 ...</option></group></command>
 							</cmdsynopsis>
 							<para>
-								Assigns the <command>options_list</command> to the XML root element that 
-								will encompass the whole table.   
-							</para>
-							<para>
-								An option list is organized as an odd-sized list of option:
-<programlisting>tag_name <option>attr11 val1 attr2 val2 ...</option></programlisting>
+								Assigns an options list to the XML element that 
+								will hold the whole table.   
 							</para>
 							<para>
-								The first element of the list is the tag name that will assigned to the container
-								(default: calendar, no attributes). The remaining terms must be an even number and are
-								interpreted as attribute-value pairs	
+								The default tag for the container is 'calendar', with no attributes.
 							</para>
 						</listitem>					
 					</varlistentry>
@@ -159,7 +192,6 @@ puts $current_month
 						</listitem>					
 					</varlistentry>
 
-
 					<varlistentry>
 						<listitem>
 							<cmdsynopsis>
@@ -167,7 +199,8 @@ puts $current_month
 								attr2 val2 ...</option></group></command>
 							</cmdsynopsis>
 							<para>
-								Assigns tag name and attributes to the XML foot element of the table (default: calfoot). 						
+								Assigns tag name and attributes to the XML foot element 
+								of the table (default: calfoot). 						
 							</para>
 							<note>
 								This option was added for completeness, but it's not implemented yet							
@@ -175,11 +208,176 @@ puts $current_month
 						</listitem>					
 					</varlistentry>
 
+					<varlistentry>
+						<listitem>
+							<cmdsynopsis>
+								<command>-banner_month <group>tag_name <option>attr11 val1 
+								attr2 val2 ...</option></group></command>							
+							</cmdsynopsis>
+							<para>
+								Tag name and attributes for the XML element holding the 
+								month name (default:month)					
+							</para>
+						</listitem>										
+					</varlistentry>
+
+					<varlistentry>
+						<listitem>
+							<cmdsynopsis>
+								<command>-banner_year <group>tag_name <option>attr11 val1 
+								attr2 val2 ...</option></group></command>							
+							</cmdsynopsis>
+							<para>
+								Tag name and attributes for the XML element holding the 
+								month name (default: year)					
+							</para>
+						</listitem>										
+					</varlistentry>
+
+					<varlistentry>
+						<listitem>
+							<cmdsynopsis>
+								<command>-weekdays <group>tag_name <option>attr11 val1 
+								attr2 val2 ...</option></group></command>							
+							</cmdsynopsis>
+							<para>
+								Tag name and attributes for the XML element holding the 
+								weekday header (default: weekdays)					
+							</para>
+						</listitem>					
+					</varlistentry>
+
+					<varlistentry>
+						<listitem>
+							<cmdsynopsis>
+								<command>-weekdays_cell <group>tag_name <option>attr11 val1 
+								attr2 val2 ...</option></group></command>							
+							</cmdsynopsis>
+							<para>
+								Tag name and attributes for the XML element holding the 
+								each single weekday (default: wkdays)					
+							</para>
+						</listitem>	
+					</varlistentry>
+
+					<varlistentry>
+						<listitem>
+							<cmdsynopsis>
+								<command>-days_row <group>tag_name <option>attr11 val1 
+								attr2 val2 ...</option></group></command>							
+							</cmdsynopsis>
+							<para>
+								Tag name and attributes for the XML element holding the 
+								each row of the calendar table (default: week)					
+							</para>
+						</listitem>	
+					</varlistentry>
 
+					<varlistentry>
+						<listitem>
+							<cmdsynopsis>
+								<command>-days_cell <group>tag_name <option>attr11 val1 
+								attr2 val2 ...</option></group></command>							
+							</cmdsynopsis>
+							<para>
+								Tag name and attributes for the XML element representing
+								a cell in the calendar table (default: day)					
+							</para>
+						</listitem>	
+					</varlistentry>
+
+					<varlistentry>
+						<listitem>
+							<cmdsynopsis>
+								<command>-cell_function <option>proc</option></command>							
+							</cmdsynopsis>
+							<para>
+								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. 
+							</para>
+						</listitem>	
+					</varlistentry>
+
+					<varlistentry>
+						<listitem>
+							<cmdsynopsis>
+								<command>-current_day <option>day</option></command>							
+							</cmdsynopsis>
+							<para>
+								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"
+							</para>
+						</listitem>	
+					</varlistentry>
 					
+					<varlistentry>
+						<listitem>
+							<cmdsynopsis>
+								<command>-current_weekday <option>0-6 | today</option></command>							
+							</cmdsynopsis>
+							<para>
+								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"
+							</para>
+						</listitem>	
+					</varlistentry>
 				</variablelist>
 			</refsect2>
-			
 		</refsect1>	
 	</refentry>
+	<refentry id="html_calendar">
+	   <refnamediv>
+			<refname>HtmlCalendar</refname>
+			<refpurpose>Concrete class derived from XmlCalendar</refpurpose>
+		</refnamediv>
+		<refsynopsisdiv>
+			<cmdsynopsis>
+			  	<command>XmlCalendar</command>
+			  	<arg choice="plain"><replaceable>calendar_name</replaceable></arg>
+			   <arg>-option1 <replaceable>option_list</replaceable></arg>
+			   <arg>-option2 <replaceable>option_list</replaceable></arg>
+			   <arg>...</arg>
+			</cmdsynopsis>
+		</refsynopsisdiv>	
+		<refsect1>
+			<para>
+				Concrete XmlCalendar class for printing html calendar tables. The markup of the class
+				is xhtml compliant and prints a code fragment for inclusion in a webpage.
+				The following is the class definition.
+			</para>
+			<programlisting>
+::itcl::class HtmlCalendar {
+    inherit XmlCalendar
+    
+    constructor {args} {XmlCalendar::constructor $args} {
+    $this configure -container	 table   	\
+                    -header	    thead   	\
+                    -body         tbody   	\
+                    -banner	    tr	    	\
+                    -banner_month {th colspan 3 style "text-align: right;"} \
+                    -banner_year  {th colspan 4 style "text-align: left;"}  \
+                    -weekdays	    tr	   \
+                    -weekday_cell th	   \
+                    -days_row	    tr	   \
+                    -days_cell	 td 
+    }
+}</programlisting>
+		</refsect1>
+		<refsect1>
+			<para>
+				A sample output from HtmlCalendar			
+			</para>
+			<para>
+				<graphic fileref="calendar.png"/>			
+			</para>
+		</refsect1>
+	</refentry>
 </section>
\ No newline at end of file

Modified: tcl/rivet/trunk/doc/xml/examples.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/examples.xml?rev=960146&r1=960145&r2=960146&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/examples.xml (original)
+++ tcl/rivet/trunk/doc/xml/examples.xml Sat Jul  3 01:09:12 2010
@@ -4,8 +4,8 @@
       Some examples of Rivet usage follow.  Some prior Tcl knowledge
       is assumed.  If you don't know much Tcl, don't worry, it's easy,
       and there are some good resources available on the web that will
-      get you up to speed quickly.  Go to the <link
-	linkend="websites">web sites</link> section and have a look.
+      get you up to speed quickly.  Go to the 
+      <link linkend="websites">web sites</link> section and have a look.
     </para>
 
     <example id="hello world">

Modified: tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl?rev=960146&r1=960145&r2=960146&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl Sat Jul  3 01:09:12 2010
@@ -15,7 +15,7 @@
 #
 #
 #
-# $Id: calendar.tcl 915 2010-07-02 14:15:00Z massimo.manghi $
+# $Id: calendar.tcl 916 2010-07-03 00:37:44Z massimo.manghi $
 #
 
 package provide Calendar 1.0
@@ -101,7 +101,7 @@ catch {::itcl::delete class Calendar}
 }
 
 ::itcl::body Calendar::weekdays {} {
-    return "  $day_names($language)\n"
+    return "$day_names($language)\n"
 }
 
 # header <month_idx> <year>
@@ -364,8 +364,8 @@ catch {::itcl::delete class Calendar}
 				    body	{tag "calbody"	    attr "" } \
 				    foot	{tag "calfoot"	    attr "" } \
 				    banner	{tag "monthyear"    attr "" } \
-				    banner_month {tag "span"	    attr "" } \
-				    banner_year  {tag "span"	    attr "" } \
+				    banner_month {tag "month"	    attr "" } \
+				    banner_year  {tag "year"	    attr "" } \
 				    wkdays_bar	{tag "weekdays"	    attr "" } \
 				    wkday_cell	{tag "wkday"	    attr "" } \
 				    days_row	{tag "week"	    attr "" } \
@@ -430,22 +430,20 @@ catch {::itcl::delete class Calendar}
 
 ::itcl::body XmlCalendar::weekdays { } {
     set rowtag	[getParameters wkdays_bar tag]
-    set html	[mkOpenTag $rowtag]    
+    set xml	[mkOpenTag $rowtag]    
 
     set tagname [getParameters wkday_cell tag]
     set wdn	0
     foreach dn $day_names($language) {
 	if {$wdn == $current_weekday} {
-	    append html "[mkOpenTag $tagname {class current_wkday}]$dn[mkCloseTag $tagname]"
+	    append xml "[mkOpenTag $tagname {class current_wkday}]$dn[mkCloseTag $tagname]"
 	} else {
-	    append html "[mkOpenTag $tagname]$dn[mkCloseTag $tagname]"
+	    append xml "[mkOpenTag $tagname]$dn[mkCloseTag $tagname]"
 	}
 	incr wdn
     }
-    append html [mkCloseTag $rowtag]
-    append html "\n"
-    return $html
-
+    append xml [mkCloseTag $rowtag]
+    return $xml
 }
 
 ::itcl::body XmlCalendar::banner {month_idx yr} {



---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org