[docs] xmldocs - docelic modified 9 files

docs at icdevgroup.org docs at icdevgroup.org
Thu Sep 23 07:12:17 EDT 2004


User:      docelic
Date:      2004-09-23 11:12:16 GMT
Modified:  cache/4.6.0 .cache.bin
Modified:  cache/4.8.0 .cache.bin
Modified:  cache/5.0.0 .cache.bin
Modified:  cache/5.2.0 .cache.bin
Modified:  cache/cvs-head .cache.bin
Modified:  guides   xmldocs.xml
Modified:  howtos   howtos.xml
Added:     files/various tut-phase5-basket+quantity.html
Added:     howtos   quantity-in-basket.xml
Log:
- guides/xmldocs.xml: s/<command>/<emphasis role='bold'>/1
- howtos/howto.xml: added a howto
- howtos/quantity-in-basket.xml: howto add quantity to tutorial-phase5 basket page

Revision  Changes    Path
1.9       +753 -753  xmldocs/cache/4.6.0/.cache.bin


<<.cache.bin: data>>


1.9       +627 -627  xmldocs/cache/4.8.0/.cache.bin


rev 1.9, prev_rev 1.8
Index: .cache.bin
===================================================================
RCS file: /var/cvs/xmldocs/cache/4.8.0/.cache.bin,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
Binary files /tmp/cvsttL8s9 and /tmp/cvsk32tnk differ



1.9       +825 -825  xmldocs/cache/5.0.0/.cache.bin


rev 1.9, prev_rev 1.8
Index: .cache.bin
===================================================================
RCS file: /var/cvs/xmldocs/cache/5.0.0/.cache.bin,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
Binary files /tmp/cvsm9fY1z and /tmp/cvsJ3Su4L differ



1.9       +830 -830  xmldocs/cache/5.2.0/.cache.bin


rev 1.9, prev_rev 1.8
Index: .cache.bin
===================================================================
RCS file: /var/cvs/xmldocs/cache/5.2.0/.cache.bin,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
Binary files /tmp/cvsoAVNHk and /tmp/cvsJVGqUx differ



1.17      +753 -753  xmldocs/cache/cvs-head/.cache.bin


rev 1.17, prev_rev 1.16
Index: .cache.bin
===================================================================
RCS file: /var/cvs/xmldocs/cache/cvs-head/.cache.bin,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
Binary files /tmp/cvsDpRkQV and /tmp/cvsQur5ba differ



1.1                  xmldocs/files/various/tut-phase5-basket+quantity.html


rev 1.1, prev_rev 1.0
Index: tut-phase5-basket+quantity.html
===================================================================
__TOP__
__LEFT__

<h2>This is your shopping cart!</h2>

<form method='post' action='[process]'>

<table cellpadding="5">

<tr>
  <th>Qty.</th>
  <th>Description</th>
  <th>Cost</th>
  <th>Subtotal</th>
</tr>

[item-list]
<tr>
  <td align="right"><input type='text' size='2' name='[quantity-name]' value='[item-quantity]'/></td>
  <td>[item-field description]</td>
  <td align="right">[item-price]</td>
  <td align="right">[item-subtotal]</td>
</tr>
[/item-list]

<tr><td colspan="4"></td></tr>

<tr>
  <td colspan="3" align="right"><strong>Total:</strong></td>
  <td align="right">[subtotal]</td>
</tr>

<tr>
  <td colspan="4" align="right">
  [button text='Recalculate']
    mv_todo=refresh
  [/button]
  </td>
</tr>

</table>

</form>

<hr>

<p>
[page checkout]Purchase now</a><br>
[page index]Return to shopping</a>
</p>

__BOTTOM__



1.3       +3 -2      xmldocs/guides/xmldocs.xml


rev 1.3, prev_rev 1.2
Index: xmldocs.xml
===================================================================
RCS file: /var/cvs/xmldocs/guides/xmldocs.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xmldocs.xml	21 Sep 2004 21:18:25 -0000	1.2
+++ xmldocs.xml	23 Sep 2004 11:12:16 -0000	1.3
@@ -136,8 +136,9 @@
 		tags, ...).
 		</para>
 		<para>
-		<command>The source .xml files for the reference sets are autogenerated
-		</command>. The <command>bin/stattree</command> script collects all
+		<emphasis role='bold'>The source .xml files for the reference sets are
+		autogenerated
+		</emphasis>. The <command>bin/stattree</command> script collects all
 		needed information from Interchange sources and saves it to cache files.
 		<command>bin/refs-autogen</command> reads the cache files, supplements
 		that information with data from



1.2       +2 -0      xmldocs/howtos/howtos.xml


rev 1.2, prev_rev 1.1
Index: howtos.xml
===================================================================
RCS file: /var/cvs/xmldocs/howtos/howtos.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- howtos.xml	9 Aug 2004 15:53:57 -0000	1.1
+++ howtos.xml	23 Sep 2004 11:12:16 -0000	1.2
@@ -4,6 +4,7 @@
   "../docbook/docbookxi.dtd" [
 
 	<!ENTITY custom-sendmail-routine SYSTEM "custom-sendmail-routine.xml">
+	<!ENTITY quantity-in-basket      SYSTEM "quantity-in-basket.xml">
 ]>
 
 <book id="howtos">
@@ -53,5 +54,6 @@
 	-->
 
 &custom-sendmail-routine;
+&quantity-in-basket;
 
 </book>



1.1                  xmldocs/howtos/quantity-in-basket.xml


rev 1.1, prev_rev 1.0
Index: quantity-in-basket.xml
===================================================================
<chapter id="Provide Item Quantity Fields in the Basket Page">

	<chapterinfo>
		<title>Provide Item Quantity Fields in the Basket Page</title>
		<titleabbrev>quantityfields</titleabbrev>

		<keywordset>
			<keyword>quantity</keyword>
			<keyword>checkout</keyword>
			<keyword>basket</keyword>
			<keyword>item</keyword>
			<keyword>recalculate</keyword>
			<keyword>add</keyword>
			<keyword>remove</keyword>
			<keyword>total</keyword>
			<keyword>number</keyword>
			<keyword>client</keyword>
			<keyword>form</keyword>
			<keyword>data</keyword>
			<keyword>return</keyword>
			<keyword>todo</keyword>
			<keyword>action</keyword>
			<keyword>post</keyword>
		</keywordset>

		<authorgroup>
			<author>
				<firstname>Davor</firstname>
				<surname>Ocelic</surname>
				<affiliation>
					<email>docelic at icdevgroup.org</email>
				</affiliation>
			</author>
		</authorgroup>


	</chapterinfo>

	<sect1 id='introduction'>
		<title>Introduction</title>
		<para>
		On your Interchange pages, you must provide some kind of a HTML form
		if you want to receive any data from the client. We will use the 
		<filename>pages/ord/basket.html</filename> page from the
		<!-- XXX LINK IT -->
		tutorial catalog to demonstrate this.
		</para>
		<para>
		This particular HOWTO deals with the <emphasis>Item Quantity</emphasis>
		field, but you can take it as a general Interchange HTML form submission
		example. I hope you would recognize the enormous power of the
		Interchange server running behind the scene.
		</para>
		<para>
		The page we're starting with only displays a table of the products found
		in your shopping cart.
		The <database class='field'>Quantity</database> field is provided but
		the only way to increase the number is to click the appropriate 
		<guibutton>Order Now</guibutton> button multiple times. Reducing the
		quantity
		is not supported. Just to remind ourselves, here's how this initial
		page looks like:
		</para>
		<screen>
<xi:include parse='text' href='../files/tutorial-phase5/pages/ord/basket.html'/>
		</screen>
	</sect1>

	<sect1 id='solution'>
		<title>Solution</title>
		<para>
		What we need to do is:
		<itemizedlist>
			<listitem><para>
			Create an HTML form which is neccesary to submit any client information
			back to Interchange:<sbr/>
			<code><![CDATA[<form method='post' action='[process]'>]]></code>
			</para></listitem>
			<listitem><para>
			Replace the <database class='field'>Quantity</database> label 
			(<code>[item-quantity]</code>) with
			an HTML text field where quantity can be edited:<sbr/>
			<code><![CDATA[<input type='text' size='2' name='[quantity-name]' value='[item-quantity]'/>]]></code>
			</para>
			<para>
			What we have introduced here is the <tag>quantity-name</tag> tag.
			Interchange
			will expand it to the appropriate field name for each item in the
			cart (<literal>quantity0</literal>, <literal>quantity1</literal>,
			<literal>quantity2</literal>, ...). This all happens automatically and
			you have nothing to worry about.
			</para></listitem>
			<listitem><para>
			Provide the submit button that triggers an action and sends information
			back to Interchange:<sbr/>
			<screen><![CDATA[
[button text='Recalculate']
  mv_todo=refresh
[/button]
			]]>
			</screen>
			</para></listitem>
			<listitem><para>
			Close the HTML form with <code><![CDATA[</form>]]></code>.
			</para></listitem>
		</itemizedlist>
		</para>

		<para>
		Here's a copy of the finished <filename>pages/ord/basket.html</filename>.
		</para>

		<screen>
<xi:include parse='text' href='../files/various/tut-phase5-basket+quantity.html'/>
		</screen>

		<para>
		Test the <filename>ord/basket</filename> page in your browser. Try
		adjusting the quantity and pressing <guibutton>Recalculate</guibutton>.
		Note that setting <database class='field'>Quantity</database> to 
		<literal>0</literal> effectively removes the item from your shopping
		cart.
		</para>

		<para>
		Have a great time and enjoy hacking Interchange :-)
		</para>
	</sect1>

</chapter>









More information about the docs mailing list