[docs] xmldocs - docelic modified 9 files

docs at icdevgroup.org docs at icdevgroup.org
Fri Oct 1 12:28:38 EDT 2004


User:      docelic
Date:      2004-10-01 16:28:38 GMT
Modified:  .        Makefile TODO
Modified:  bin      generic-autogen refs-autogen
Modified:  docbook  olinkdb-c.xml olinkdb-nc.xml
Modified:  guides   iccattut.xml
Modified:  howtos   custom-sendmail-routine quantity-in-basket
Log:
- Makefile:
 - Add chunked olink DB targets (incredibly but olink DBs actually work,
   I thought the hard time they'd give me was yet to come)

- TODO:
  - items

- bin/generic-autogen:
 - s/docbookix/docbookxi/ !! damnit I messed this up a few times until I
   got used to the name 'docbookxi'.
 - Don't do s/^\n// in context reports. The extra "\n" was never added by
   us (as I thought before), so no need to remove it either.
 - Fix some wrong field name that I used for comparison in context reports
 - Fix problem with incorrect display of second-title-line (it should have
   been no-second-line for contexts that show the complete file)
 - Fix all problems with incorrect numbers in context reports !
 - Make 3 versions be enough for "compression". Say, '5.0.1, 5.2.0, 5.3.0'
   would now become '5.0.1-5.3.0'

- docbook/olinkdb-?c.xml:
 - Add glossary as olink-db target so we can interlink to glossary

- guides/iccattut.xml:
 - Various updates (cleaning TODO list)
 - Added few <olink>s to the *tags and glossary

- howtos/*:
 - Each id='' inside HOWTO collection must be unique!! So you must say
   id="<DOC ID>_introduction" instead of id="introduction"

Revision  Changes    Path
1.24      +11 -22    xmldocs/Makefile


rev 1.24, prev_rev 1.23
Index: Makefile
===================================================================
RCS file: /var/cvs/xmldocs/Makefile,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- Makefile	1 Oct 2004 15:07:24 -0000	1.23
+++ Makefile	1 Oct 2004 16:28:37 -0000	1.24
@@ -59,7 +59,7 @@
 
 
 #############################################################
-# OLINK DBs
+# OLINK DBs (interlinking between documents)
 $T/%-nc.db: %.xml $T
 	$(PSR) $(PSR_FLAGS)                                               \
 	  --stringparam collect.xref.targets only                         \
@@ -67,6 +67,13 @@
 	  docbook/html-nochunks.xsl $<
 	  tail +2 [email protected] > $T/tail
 	  mv $T/tail [email protected]
+$T/%-c.db: %.xml $T
+	$(PSR) $(PSR_FLAGS)                                               \
+	  --stringparam collect.xref.targets only                         \
+	  --stringparam targets.filename [email protected]                               \
+	  docbook/html-chunks.xsl $<
+	  tail +2 [email protected] > $T/tail
+	  mv $T/tail [email protected]
 
 
 #############################################################
@@ -140,7 +147,8 @@
 
 #############################################################
 # Reference .xmls
-# Silly, rewrite this, I forgot about $*
+# Silly, rewrite this, I forgot about $*. Or $* wouldn't help? I'm not 
+# willing to think about it right now.
 refxmls: BOTH = --both
 refxmls: bin/refs-autogen $(foreach stype,$(SYMBOL_TYPES),refs/$(stype).xml)
 	:
@@ -149,6 +157,7 @@
 $T/%.list: FNAME = $(subst .list,,$(BNAME))
 refs/%.xml: FNAME = $(subst .xml,,$(BNAME))
 $T/%.list refs/%.xml: bin/refs-autogen $(foreach icver,$(IC_VERSIONS),cache/$(icver)/.cache.bin)
+	# PEH, -g is useless since tags migrate between tag groups
 	#bin/refs-autogen -g $(FNAME) -o [email protected] $(BOTH) $(IC_VERSIONS)
 	bin/refs-autogen -o [email protected] $(BOTH) $(IC_VERSIONS)
 
@@ -169,9 +178,6 @@
 #	-o $(OUTPUT)/man/                                              \
 #	man $<
 ##
-## OlinkDBs
-##
-## OlinkDB information for unchunked parts
 ##tmp/olinkdbs: $(LTMPDIR) \
 ##  $(patsubst guides/%.xml,$(LTMPDIR)/%-c.db,$(wildcard guides/*.xml))  \
 ##  $(patsubst guides/%.xml,$(LTMPDIR)/%-nc.db,$(wildcard guides/*.xml)) \
@@ -184,23 +190,6 @@
 #	make $(patsubst refs/%.xml,$(LTMPDIR)/%-c.db,$(wildcard refs/*.xml))
 #	make $(patsubst refs/%.xml,$(LTMPDIR)/%-nc.db,$(wildcard refs/*.xml))
 #	touch $(LTMPDIR)/olinkdbs
-#
-#$(LTMPDIR)/%-nc.db: %.xml $(LTMPDIR)
-#	$(XSLT) $(XSLT_FLAGS)                                          \
-#	--stringparam collect.xref.targets only                        \
-#	--stringparam targets.filename [email protected]                              \
-#	docbook/html-nochunks.xsl $<
-#	tail +2 [email protected] > $(LTMPDIR)/tail
-#	mv $(LTMPDIR)/tail [email protected]
-#
-## OlinkDB information for chunked parts
-#$(LTMPDIR)/%-c.db: %.xml $(TMPDIR)
-#	$(XSLT) $(XSLT_FLAGS)                                          \
-#	--stringparam collect.xref.targets only                        \
-#	--stringparam targets.filename [email protected]                              \
-#	docbook/html-chunks.xsl $<
-#	tail +2 [email protected] > $(LTMPDIR)/tail
-#	mv $(LTMPDIR)/tail [email protected]
 #
 #	TODO:
 #	- make cache



1.27      +5 -17     xmldocs/TODO


rev 1.27, prev_rev 1.26
Index: TODO
===================================================================
RCS file: /var/cvs/xmldocs/TODO,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- TODO	26 Sep 2004 20:01:52 -0000	1.26
+++ TODO	1 Oct 2004 16:28:37 -0000	1.27
@@ -3,25 +3,19 @@
 - Stinky manpage stylesheets are a disaster. This time it's that
   <cmdsynopsis> is verbatim and <screen> still renders comments without
   newlines! I mean, what the... (And &copy; is translated to crap instead
-  of plain "C").
+  of plain "C"). Will need to write XSLT to fix that, and support tables.
 - See why the autogenerated navigation links are so retarded (just home/up,
   no next/prev)
 - not to forget, fix cases where context goes to negative values
-- Source contexts get some weird values reported in header information
 - Contexts: in situation like "symbol \n symbol" where the symbol appears
   multiple times within +- of first occurence, we treat it like one context.
   but the header says 'displaying 2/2 contexts', it doesn't remove
   'duplicates'. fix that.
-- why crypt tag recognized as user when it's in UI_Tag
 
 - In iccattut:
-  - under important file and directories, mention default username,
-    And rename the section appropriately.
   - make a "translation map" of /etc/interchange/* to RPM-equivs.
   - item for package names, like interchange-cat-foundation, wenglish, etc..
     ( This is ok, docbook 4.4 will have <package> element )
-  - at the top where describing IC, mention it's built on Perl and ITL
-  - replace <tag> with <code> where putting tag alone in the source would work.
   - explain syntax accepted in profile files
   - Fix ImageDir and include one picture for example
 
@@ -68,20 +62,16 @@
   generating the template they get stringified.
 - Visually mark obsolete items (those not present in cvs-head)
 - Visually mark undocumented items
-- leaf nodes
+- Generate leaf nodes (put bin/mkreport back in action)
 - Make script which would be like: vim `our.script usertags synopsis`.
   our.script would find all usertags and where their synopsis is defined,
   somewhere in refs/.
+- In howtos, include CVS date of items
 
  Long-term:
 - filenames in Source contexts should also be clickable. this is longterm
   because it'll involve perltidy and other stuff I have in mind ...
 
-- rebuild the make system:
-  - isolate build steps and make it possible to build specific "pages"
-    without the rest
-  - better dependencies 
-
 DOCUMENTATION ITSELF:
 - Resolve items from tmp/missing file. (You need to run 'make' in your tree
   first, to get that file generated). I did what I could, now the list only
@@ -108,10 +98,6 @@
 
 ######################################################################
 
-add a note that copypasting iccattut will first not teach you anything,
-and second, you'll end up with a problem that you won't know where to
-look for, because you'll be unfamiliar with the copypasted thing...
-
 Tags:
   parameters
   positional list
@@ -132,3 +118,5 @@
 action, form,  unix inet socket, low, high, rpc, prefork, values,
 
 style: leave newline at end of file
+explain version naming.. stable/unstable and how 5.3.0 implies next stable
+



1.4       +1 -1      xmldocs/bin/generic-autogen


rev 1.4, prev_rev 1.3
Index: generic-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/generic-autogen,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- generic-autogen	1 Oct 2004 15:07:24 -0000	1.3
+++ generic-autogen	1 Oct 2004 16:28:38 -0000	1.4
@@ -20,7 +20,7 @@
 <?xml version="1.0" standalone="no"?>
 
 <!DOCTYPE glossary PUBLIC "-//OASIS//DTD DocBook-Interchange XML V4.2//EN"
-  "docbook/docbookix.dtd">
+  "../docbook/docbookxi.dtd">
 
 <glossary>
 	<title>Interchange Documentation: Glossary</title>



1.39      +7 -7      xmldocs/bin/refs-autogen


rev 1.39, prev_rev 1.38
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- refs-autogen	1 Oct 2004 15:07:24 -0000	1.38
+++ refs-autogen	1 Oct 2004 16:28:38 -0000	1.39
@@ -226,7 +226,7 @@
 				# We 'shift' here because we unshifted 1 row to match line
 				# numbers with array indexes
 				my $ctxsdata = join "\n", @{ $$ctx{ctx} };
-				$ctxsdata =~ s/^\n//;
+				#$ctxsdata =~ s/^\n//;
 				if ( length $ctxsdata ) {
 					my $ls = $$ctx{ctxs}; # line start nr.
 					( my $plf = $$ctx{file} ) =~ s#.+?/##;
@@ -235,16 +235,16 @@
 					
 					my ( $cstart, $cend, $ctxmeta ) = ("", "", "");
 					#if (0) { use Data::Dumper; print Dumper $ctx; sleep 10; }
-					if ( $$ctx{fsubtype} !~ /tag$/ ) {
+					if ( $gkey !~ /tag$/ ) {
 						# WE SHOW ONLY PART OF CONTEXT FOR THOSE
-						$cstart = 1;
-						$cend = scalar @{$$ctx{ctx}}-1;
+						$cstart = $$ctx{lnum}-$$ctx{ctxpre};
+						$cend = $$ctx{lnum}+$$ctx{ctxpost};
 						$ctxmeta = "<sbr/>Line $$ctx{lnum} (context shows lines " .
 							( $cstart . "-" .  $cend );
 					} else {
 						# WE SHOW ALL FOR THOSE
-						$cstart = $$ctx{lnum}-$$ctx{ctxpre};
-						$cend = $$ctx{lnum}+$$ctx{ctxpost}-1;
+						$cstart = 1;
+						$cend = scalar @{$$ctx{ctx}}-1;
 					}
 					# XXX - eliminate negative numbers in source context spans
 					# ( 0-6 == OK, -4-6 != OK )
@@ -412,7 +412,7 @@
 		}
 	}
 	local $" = ", ";
-	if ( $cl > 2 ) {
+	if ( $cl > 1 ) {
 		unshift @avails, "$start-$end";
 		return "@avails"
 	} else {



1.3       +7 -0      xmldocs/docbook/olinkdb-c.xml


rev 1.3, prev_rev 1.2
Index: olinkdb-c.xml
===================================================================
RCS file: /var/cvs/xmldocs/docbook/olinkdb-c.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- olinkdb-c.xml	30 Sep 2004 10:49:05 -0000	1.2
+++ olinkdb-c.xml	1 Oct 2004 16:28:38 -0000	1.3
@@ -4,6 +4,7 @@
 	<!ENTITY iccattut SYSTEM "../tmp/iccattut-c.db"> 
 	<!ENTITY xmldocs SYSTEM "../tmp/xmldocs-c.db"> 
 	<!ENTITY howtos SYSTEM "../tmp/howtos-c.db"> 
+	<!ENTITY glossary SYSTEM "../tmp/glossary-c.db"> 
 	<!ENTITY pragmas SYSTEM "../tmp/pragmas-c.db"> 
 	<!ENTITY globvars SYSTEM "../tmp/globvars-c.db"> 
 	<!ENTITY uitags SYSTEM "../tmp/uitags-c.db"> 
@@ -34,6 +35,12 @@
 			<dir name='howtos'>
 				<document targetdoc="howtos">
 				&howtos;
+				</document>
+			</dir>
+			
+			<dir name='glossary'>
+				<document targetdoc="glossary">
+				&glossary;
 				</document>
 			</dir>
 			



1.3       +2 -0      xmldocs/docbook/olinkdb-nc.xml


rev 1.3, prev_rev 1.2
Index: olinkdb-nc.xml
===================================================================
RCS file: /var/cvs/xmldocs/docbook/olinkdb-nc.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- olinkdb-nc.xml	30 Sep 2004 10:49:05 -0000	1.2
+++ olinkdb-nc.xml	1 Oct 2004 16:28:38 -0000	1.3
@@ -4,6 +4,7 @@
 	<!ENTITY iccattut SYSTEM "../tmp/iccattut-nc.db"> 
 	<!ENTITY xmldocs SYSTEM "../tmp/xmldocs-nc.db"> 
 	<!ENTITY howtos SYSTEM "../tmp/howtos-nc.db"> 
+	<!ENTITY glossary SYSTEM "../tmp/glossary-nc.db"> 
 	<!ENTITY pragmas SYSTEM "../tmp/pragmas-nc.db"> 
 	<!ENTITY globvars SYSTEM "../tmp/globvars-nc.db"> 
 	<!ENTITY usertags SYSTEM "../tmp/usertags-nc.db"> 
@@ -21,6 +22,7 @@
 			<document targetdoc="iccattut" baseuri="iccattut.html"> &iccattut; </document>
 			<document targetdoc="xmldocs" baseuri="xmldocs.html"> &xmldocs; </document>
 			<document targetdoc="howtos" baseuri="howtos.html"> &howtos; </document>
+			<document targetdoc="glossary" baseuri="glossary.html"> &glossary; </document>
 			<document targetdoc="pragmas" baseuri="pragmas.html"> &pragmas; </document>
 			<document targetdoc="globvars" baseuri="globvars.html"> &globvars; </document>
 			<document targetdoc="usertags" baseuri="usertags.html"> &usertags; </document>



1.24      +39 -13    xmldocs/guides/iccattut.xml


rev 1.24, prev_rev 1.23
Index: iccattut.xml
===================================================================
RCS file: /var/cvs/xmldocs/guides/iccattut.xml,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- iccattut.xml	30 Sep 2004 10:49:05 -0000	1.23
+++ iccattut.xml	1 Oct 2004 16:28:38 -0000	1.24
@@ -63,6 +63,9 @@
 				XML conversion,
 				proofreading and expansion,
 				download link for tutorial files.
+				more proofreading and expansion,
+				more proofreading and expansion,
+				....
 			</revremark>
 		</revision>
 	</revhistory>
@@ -86,6 +89,13 @@
 	<abstract>
 		<para>
 		The purpose of this document is to guide you through constructing a simple &IC; catalog <emphasis role='bold'>from scratch</emphasis>. The standard catalogs that ship with Interchange are quite complex since they are ready to be used for business and highlight many of the capabilities that Interchange offers. Those catalogs can be too intimidating<footnote><para>Intimidate: to make timid or fearful; to frighten into submission.</para></footnote> places to start the journey if you're interested in learning the basic Interchange building blocks.
+		</para> <para>
+		Although this tutorial provides ready-to-use examples, please <emphasis role='bold'>think</emphasis>
+		about them (and ideally, retype them instead of copy-pasting to your test catalog). From personal
+		experience, I can tell you <emphasis role='bold'>re-implementing the catalog manually on your system
+		is the only proper way to read this tutorial</emphasis>. All the examples serve only to quickly 
+		clarify all your doubts and save the time you'd spend wondering about which style is right
+		and officially encouraged.
 		</para>
 	</abstract>
 
@@ -99,13 +109,18 @@
 	<sect2 id='Introduction'>
 		<title>Introduction</title>
 		<para>
-		Welcome to the &IC; Catalog Building Tutorial. Interchange originally started as an electronic cart and database display system, but over time it developed into a general application server.
+		Welcome to the &IC; Catalog Building Tutorial. Interchange originally started as an electronic cart and database display system, but over time it developed into a general application server. Interchange
+		is written in Perl programming language, and it gives you the full power of Perl in Interchange pages.
+		While being familiar with Perl (or programming languages in general) is definitely an advantage, 
+		you do not have to be a programmer to use Interchange. Interchange offers elegant and
+		convenient <olink targetdoc='glossary' targetptr='itl'>Interchange tags</olink> (generally called
+		<firstterm>ITL</firstterm> - Interchange Tag Language) to access its features.
 		</para> <para>
 		The simple Interchange <firstterm>catalog</firstterm> you will create during this tutorial should give you a feel of the basic Interchange system. The catalog should also be considered a stepping stone to a more complete and functional Interchange-enabled website. We will rely on default settings as much as possible, to accentuate ideas instead of implementation. We will use a small number of Interchange features and still create a usable website (an on-line store in our example). <emphasis>The resulting site will be simple but usable</emphasis>. The value of this tutorial is in the explanations of the general Interchange ideas and small <emphasis>ready to use</emphasis> examples to get you up to speed.
 		</para> <para>
 		We recommend that you create the files used in this tutorial yourself. You will learn more by creating the directory structure and using your favorite text editor to create files in the proper places on your own system as they are discussed.
 		</para> <para>
-		Writing a complete tutorial without the feedback from the audience is hard. Please jot down your notes and remarks as you digest this tutorial and e-mail docs at icdevgroup.org with your thoughts; which sections need clarification or examples, which parts were useful to you, or what was the weather like over there yesterday afternoon :).
+		Writing a complete tutorial without the feedback from the audience is hard. Please jot down your notes and remarks as you digest this tutorial and e-mail docelic at icdevgroup.org with your thoughts; which sections need clarification or examples, which parts were useful to you, or what was the weather like over there yesterday afternoon :).
 		</para>
 	</sect2>
 
@@ -147,11 +162,22 @@
 	<sect2 id='ImportantSettingsandPaths'>
 		<title>Important Settings and Paths</title>
 		<para>
-		In order to follow this tutorial you will need to know the locations of the following directories, and have write permissions on them:
+		In order to follow this tutorial, you will need to know the following values:
 		</para>
 		<itemizedlist>
 			<listitem><para>
-				The Interchange software directory (<firstterm>ICROOT</firstterm>): 
+				Default Interchange username:
+				<itemizedlist>
+					<listitem><para>
+					<systemitem class='username'>interchange</systemitem> (Debian GNU and tarballs)
+					</para></listitem>
+					<listitem><para>
+					<systemitem class='username'>interch</systemitem> (Red Hat)
+					</para></listitem>
+				</itemizedlist>
+				</para></listitem>
+			<listitem><para>
+				Interchange software directory (<firstterm>ICROOT</firstterm>): 
 				<itemizedlist>
 					<listitem><para>
 					<filename class='directory'>/usr/lib/interchange/</filename> (Debian GNU and Red Hat)
@@ -422,7 +448,7 @@
 			You can't use positional parameters if the values contain whitespace. For example, <code>[tagname "[data session mv_arg]"]</code> is invalid; the only way to specify that is <code>[tagname optionname="[data session mv_arg]"]</code>. Also, if the first parameter is positional, all must be positional (and vice versa, if the first parameter is named - all must be named).
 		</para></important>
 		<para>
-		Tags can span multiple lines which helps readability when the tags have a large number of (long) options. There's a whole lot of tags available (around 200 in Interchange 5.2), but in this tutorial very few will be addressed. For a complete listing of the ITL tags, see the <!--<olink targetdoc='ictags' targetptr='ictags'>-->Interchange Tags Reference<!--</olink>-->.
+		Tags can span multiple lines which helps readability when the tags have a large number of (long) options. There's a whole lot of tags available (around 200 in Interchange 5.2), but in this tutorial very few will be addressed. For a complete listing of the ITL tags, see the <olink targetdoc='systemtags' targetptr='systemtags'>SystemTags</olink>, <olink targetdoc='usertags' targetptr='usertags'>UserTags</olink> and <olink targetdoc='uitags' targetptr='uitags'>UITags</olink>. <!-- TODO: refer to all-in-one page -->
 		</para> <para>
 		The first tag we'll use is going to be the <tag>include</tag> tag; it reads the specified file (relative to the catalog directory - CATROOT), reparses it for any Interchange tags, and puts the final result in place of the tag. We'll demonstrate that now on the next page you'll need to create.
 	</para>
@@ -566,7 +592,7 @@
   </tr>
     ]]></programlisting>
 		</para> <para>
-		The <tag>loop-code</tag> tag refers to the primary key (unique identifier) for the current row of the database table in question. In this case, it will produce the same output as the <tag>loop-field sku</tag> tag, because the 'sku' field is the primary key for products table. In each case, the tag is replaced by the appropriate element. When put together, Interchange generates a page with your products table on it.
+		The <code>loop-code</code> tag refers to the primary key (unique identifier) for the current row of the database table in question. In this case, it will produce the same output as the <code>loop-field sku</code> tag, because the 'sku' field is the primary key for products table. In each case, the tag is replaced by the appropriate element. When put together, Interchange generates a page with your products table on it.
 		</para> <para>
 		Your finished <filename>pages/index.html</filename> page should look like this:
 		<programlisting>
@@ -647,14 +673,14 @@
 		</para> <para>
 		For the <tag>order</tag> tag, Interchange expects a default page called <filename>pages/ord/basket.html</filename>. This page displays the contents of the shopping basket and contains other shopping basket functionality.
 		</para> <para>
-		The standard demo catalog has a full-featured shopping basket available for use, but this tutorial teaches you to build your own simple one. The shopping basket items can be accessed using a set of tags that have an <tag>item</tag> prefix. Put the following code in the new <filename>pages/ord/basket.html</filename> file. The section that follows explains the tags used.
+		The standard demo catalog has a full-featured shopping basket available for use, but this tutorial teaches you to build your own simple one. The shopping basket items can be accessed using a set of tags that have prefix of "item". Put the following code in the new <filename>pages/ord/basket.html</filename> file. The section that follows explains the tags used.
 		<programlisting>
 <xi:include parse='text'  href='../files/tutorial-phase3/pages/ord/basket.html'/>
 		</programlisting>
 		</para> <para>
-		The basket items can be accessed one at a time by using the <tag>item-list</tag> tag. So we will create a table by iterating through the basket items. The text within the <tag>item-list</tag> <tag>item-list</tag> tags is created for each item in the list.
+		The basket items can be accessed one at a time by using the <tag>item-list</tag> tag. So we will create a table by iterating through the basket items. The text within the <tag>item-list</tag> <tag>/item-list</tag> tags is created for each item in the list.
 		</para> <para>
-		<tag>item-quantity</tag> shows the quantity of the item ordered. If the same item is ordered multiple times, the quantity increases.
+		<code>item-quantity</code> shows the quantity of the item ordered. If the same item is ordered multiple times, the quantity increases.
 		</para> <para>
 		<code>[item-field description]</code> shows the description from the product database table. Any field that is not special to Interchange can be accessed from the shopping cart this way.
 		</para> <para>
@@ -843,9 +869,9 @@
 Locale en_US currency_symbol $
 		</programlisting>
 		</para> <para>
-		Restart Interchange and view your catalog. You will notice little has changed on the welcome page or the flypages, <emphasis role='bold'>but in the shopping cart</emphasis> (<filename>pages/ord/basket.html</filename>) all your prices should be formatted as U.S. dollars ("1347.3" has become "$1,347.30"). Why the currency is only displayed on the basket page is easy to understand; we use the <tag>item-price</tag> tag there. That tag is equivalent to <code>[item-field price]</code> used elsewhere, but it has that extra logic associated with it that automatically displays the currency format. To use <tag>item-price</tag> without the auto-format, you'd have to change the <tag>item-price</tag> tag to <code>[item-price noformat]</code>.
+		Restart Interchange and view your catalog. You will notice little has changed on the welcome page or the flypages, <emphasis role='bold'>but in the shopping cart</emphasis> (<filename>pages/ord/basket.html</filename>) all your prices should be formatted as U.S. dollars ("1347.3" has become "$1,347.30"). Why the currency is only displayed on the basket page is easy to understand; we use the <tag>item-price</tag> tag there. That tag is equivalent to <code>[item-field price]</code> used elsewhere, but it has that extra logic associated with it that automatically displays the currency format. To use <tag>item-price</tag> without the auto-format, you'd have to change the <code>item-price</code> tag to <code>[item-price noformat]</code>.
 		</para> <para>
-		But that's probably not what you want to do. You're probably more interested in formatting your other prices (such as those on the Welcome page) as currency. To do that, you could obviously replace <code>[item-field price]</code> with <tag>item-price</tag>, but we'll take on more general approach here. Simply use the <tag>currency</tag><tag>/currency</tag> tag pair for all price values. Make the following change to <filename>pages/index.html</filename>:
+		But that's probably not what you want to do. You're probably more interested in formatting your other prices (such as those on the Welcome page) as currency. To do that, you could obviously replace <code>[item-field price]</code> with <code>item-price</code>, but we'll take on more general approach here. Simply use the <tag>currency</tag><tag>/currency</tag> tag pair for all price values. Make the following change to <filename>pages/index.html</filename>:
 		<programlisting><![CDATA[
   [loop search="ra=yes/fi=products"]
   <tr>
@@ -1012,7 +1038,7 @@
   </table>
     ]]></programlisting>
 		</para> <para>
-		In the first set of &lt;select&gt; &lt;/select&gt; HTML tags a list is generated of the months to choose from. This is accomplished by using a <tag>loop</tag> tag. In this case we are looping over an explicit list. The list is provided in the list parameter. Use caution when typing this, as it is sensitive to formatting (which may not be reflected in this document). Make sure that the numbers are the first characters on each new line and that the single tab separates them from the rest of the line text. Since the columns in this list are not named, the first element can be accessed using <tag>loop-code</tag> or <code>[loop-pos 0]</code> with subsequent elements being accessed by <code>[loop-pos N]</code> where N is the number of the column you want. Notice that the elements are zero-indexed. Each time through this loop Interchange generates a select &lt;option&gt; with a number as the value and the name of the month as the text for the select menu.
+		In the first set of &lt;select&gt; &lt;/select&gt; HTML tags a list is generated of the months to choose from. This is accomplished by using a <tag>loop</tag> tag. In this case we are looping over an explicit list. The list is provided in the list parameter. Use caution when typing this, as it is sensitive to formatting (which may not be reflected in this document). Make sure that the numbers are the first characters on each new line and that the single tab separates them from the rest of the line text. Since the columns in this list are not named, the first element can be accessed using <code>loop-code</code> or <code>[loop-pos 0]</code> with subsequent elements being accessed by <code>[loop-pos N]</code> where N is the number of the column you want. Notice that the elements are zero-indexed. Each time through this loop Interchange generates a select &lt;option&gt; with a number as the value and the name of the month as the text for the select menu.
 		</para> <para>
 		For the next set of &lt;select&gt; &lt;/select&gt; tags embedded Perl is used to generate the list which is iterated over. Perl code can be embedded in Interchange pages in order to extend the abilities of the system. Make sure you type back-ticks (grave accents) after "list=" and before the closing bracket (and <emphasis role='bold'>not apostrophes</emphasis>). This code generates an entry for seven years in addition to the current year. It is not necessary at this point for you to understand this Perl code.
 		</para>
@@ -1189,7 +1215,7 @@
 	First and foremost - <emphasis role='bold'>congratulations</emphasis> for completing this tutorial (and scrolling down the page to see this message doesn't count!).
 	</para>
 	<para>
-	Every good tutorial includes a set of exercises for the readers, and we won't make an exception here. If you don't know any more Interchange than we presented in this tutorial, the following tasks might seem too difficult, but we will also give you some hints... Or wait.. No, we won't :).
+	Every good tutorial includes a set of exercises for the readers, and we won't make an exception here. If you don't know any more Interchange than we presented in this tutorial, the following tasks might seem too difficult, but you can take a look at the excellent collection of <olink targetdoc='howtos' targetptr='howtos'>Interchange HOWTOs</olink> :).
 	</para>
 	<itemizedlist>
 		<listitem><para>



1.2       +2 -2      xmldocs/howtos/custom-sendmail-routine


rev 1.2, prev_rev 1.1
Index: custom-sendmail-routine
===================================================================
RCS file: /var/cvs/xmldocs/howtos/custom-sendmail-routine,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- custom-sendmail-routine	26 Sep 2004 19:51:44 -0000	1.1
+++ custom-sendmail-routine	1 Oct 2004 16:28:38 -0000	1.2
@@ -25,7 +25,7 @@
 
 	</chapterinfo>
 
-	<sect1 id='introduction'>
+	<sect1 id='customsendmail_introduction'>
 		<title>Introduction</title>
 		<para>
 		Someone <ulink url="http://www.icdevgroup.org/pipermail/interchange-users/2004-July/039811.html">was wondering</ulink> how to optimize the order processing on a busy site. It was observed that about once in every ten times, the <filename>etc/mail_receipt</filename> takes a few <emphasis>extra</emphasis> seconds before it's mailed out.
@@ -47,7 +47,7 @@
 		</screen>
 	</sect1>
 
-	<sect1 id='solution'>
+	<sect1 id='customsendmail_solution'>
 		<title>Solution</title>
 		<para>
 		To eliminate this "delay", you could use a custom script that accepts the message on standard input (STDIN), and then calls <application>Sendmail</application> in the background.



1.2       +2 -2      xmldocs/howtos/quantity-in-basket


rev 1.2, prev_rev 1.1
Index: quantity-in-basket
===================================================================
RCS file: /var/cvs/xmldocs/howtos/quantity-in-basket,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- quantity-in-basket	26 Sep 2004 19:51:44 -0000	1.1
+++ quantity-in-basket	1 Oct 2004 16:28:38 -0000	1.2
@@ -36,7 +36,7 @@
 
 	</chapterinfo>
 
-	<sect1 id='introduction'>
+	<sect1 id='quantityfields_introduction'>
 		<title>Introduction</title>
 		<para>
 		On your Interchange pages, you must provide some kind of a HTML form
@@ -66,7 +66,7 @@
 		</screen>
 	</sect1>
 
-	<sect1 id='solution'>
+	<sect1 id='quantityfields_solution'>
 		<title>Solution</title>
 		<para>
 		What we need to do is:








More information about the docs mailing list