<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -60,6 +60,7 @@
 &lt;!ENTITY WW &quot;Wellwell&quot;&gt;
 &lt;!ENTITY gcf &quot;&lt;filename&gt;interchange.cfg&lt;/filename&gt;&quot;&gt;
 &lt;!ENTITY ccf &quot;&lt;filename&gt;catalog.cfg&lt;/filename&gt;&quot;&gt;
+&lt;!ENTITY pcf &quot;&lt;filename&gt;plugin.cfg&lt;/filename&gt;&quot;&gt;
 &lt;!ENTITY gcfs &quot;&lt;filename&gt;interchange.cfg&lt;/filename&gt; or &lt;filename&gt;catalog.cfg&lt;/filename&gt;&quot;&gt;
 &lt;!ENTITY cgfs &quot;&lt;filename&gt;catalog.cfg&lt;/filename&gt; or &lt;filename&gt;interchange.cfg&lt;/filename&gt;&quot;&gt;
 &lt;!ENTITY ICROOT &quot;&lt;olink targetdoc='glossary' targetptr='ICROOT'&gt;ICROOT&lt;/olink&gt;&quot;&gt;</diff>
      <filename>docbook/literals.ent</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@
 &lt;article id='wellwell'&gt;
 
 &lt;articleinfo&gt;
-	&lt;title&gt;Interchange Guides: the &quot;Wellwell&quot; Catalog Tutorial&lt;/title&gt;
+	&lt;title&gt;Interchange Guides: the &quot;Wellwell&quot; Tutorial&lt;/title&gt;
 	&lt;titleabbrev&gt;wellwell&lt;/titleabbrev&gt;
 
 	&lt;copyright&gt;
@@ -17,13 +17,13 @@
 
 	&lt;authorgroup&gt;
 		&lt;author&gt;
-			&lt;firstname&gt;Davor&lt;/firstname&gt;&lt;surname&gt;Ocelic&lt;/surname&gt;
-			&lt;email&gt;docelic@spinlocksolutions.com&lt;/email&gt;
-		&lt;/author&gt;
-		&lt;author&gt;
 			&lt;firstname&gt;Stefan&lt;/firstname&gt;&lt;surname&gt;Hornburg&lt;/surname&gt;
 			&lt;email&gt;racke@linuxia.de&lt;/email&gt;
 		&lt;/author&gt;
+		&lt;author&gt;
+			&lt;firstname&gt;Davor&lt;/firstname&gt;&lt;surname&gt;Ocelic&lt;/surname&gt;
+			&lt;email&gt;docelic@spinlocksolutions.com&lt;/email&gt;
+		&lt;/author&gt;
 	&lt;/authorgroup&gt;
 
 	&lt;legalnotice&gt;
@@ -42,45 +42,702 @@
 	&lt;/legalnotice&gt;
 
 	&lt;abstract&gt;
-		&lt;para&gt;
-		This guide provides installation and usage instructions for the new Interchange catalog called &quot;&amp;WW;&quot;.
-		&lt;/para&gt;&lt;para&gt;
-		The &amp;WW; catalog is intended to be used as a base for production websites in &amp;IC;, and places emphasis on usefulness out of the box, clarity, modern HTML &amp;amp; CSS, and ease of customization.
-		&lt;/para&gt;
+	&lt;para&gt;
+	&amp;WW; is a functional frame for building new &amp;IC; catalogs.
+	&lt;/para&gt;
+	&lt;para&gt;
+	Its main difference from previous template catalogs
+	(i.e. Foundation / Standard) is that it doesn't tend to be a demo,
+	but rather an officially-supported frame designed specifically for
+	new catalog deployments.
+	&lt;/para&gt;
+	&lt;para&gt;
+	The purpose of this Guide is to explain the concepts and show basic
+	working examples that should help you understand the WellWell design
+	decisions. You will then be able to read, understand and modify WellWell
+	code as needed.
+	&lt;/para&gt;
+	&lt;para&gt;
+	Some of the &amp;WW; design goals are:
+	&lt;itemizedlist&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		No stone left unturned if it can be improved
+		&lt;/para&gt;&lt;/listitem&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		KISS instead of convoluted ITL code in the Standard demo and its predecessors
+		&lt;/para&gt;&lt;/listitem&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		Replace all of &amp;tag-process; with &amp;glos-ActionMap;s
+		&lt;/para&gt;&lt;/listitem&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		Supersede Interchange's routes and profiles with a complete form framework
+		&lt;/para&gt;&lt;/listitem&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		Keep core of WellWell small, use plugins for extended functionality
+		&lt;/para&gt;&lt;/listitem&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		Deprecate bloated code and tags (i.e. &amp;tag-button;, &amp;tag-image;)
+		&lt;/para&gt;&lt;/listitem&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		Usefulness and clarity out of the box
+		&lt;/para&gt;&lt;/listitem&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		Modern HTML &amp;amp; CSS
+		&lt;/para&gt;&lt;/listitem&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		Ease of customization
+		&lt;/para&gt;&lt;/listitem&gt;
+	&lt;/itemizedlist&gt;
+	&lt;/para&gt;
+	&lt;caution&gt;
+	We don't pay any heed to backward compatibility for Wellwell until
+	it is announced as stable and mature enough.
+	&lt;/caution&gt;
 	&lt;/abstract&gt;
 
 &lt;/articleinfo&gt;
 
+&lt;section&gt;
+	&lt;title&gt;Pre-requisites&lt;/title&gt;
+	&lt;para&gt;
+	Minimum versions: &amp;IC; 5.7.1, Dispatch.pm 1.103, Order.pm 2.104.
+	&lt;/para&gt;
+	&lt;para&gt;
+	You should have all this if you checkout Git head of the Interchange tree.
+	&lt;/para&gt;
+&lt;/section&gt;
+
 
 &lt;section&gt;
 	&lt;title&gt;Introduction&lt;/title&gt;
+
+	&lt;para&gt;
+	By convention, WellWell pages use the suffix &lt;literal&gt;.itl&lt;/literal&gt; to
+	indicate they
+	contain &amp;glos-ITL; code. If a page with suffix &lt;literal&gt;.itl&lt;/literal&gt;
+	is not found, Interchange will look for &lt;literal&gt;.html&lt;/literal&gt;, but
+	you should not rely on this behavior.
+	&lt;/para&gt;
+	&lt;para&gt;
+	The basis of all WellWell-enabled pages is the &amp;tag-compose; tag.
+	Basically, it just elegantly loads the specified template and components,
+	and fits components' output into the appropriate slots within the template.
+	&lt;/para&gt;
+	&lt;para&gt;
+	Page body can, but doesn't have to be present. For example, the Login
+	functionality is implemented completely within the Login component (including
+	the supporting text and error any reporting), so an ITL page
+	&lt;literal&gt;login.itl&lt;/literal&gt; doesn't have anything to do but
+	call the component.
+	&lt;/para&gt;
 	&lt;para&gt;
+	Components rely heavily on CSS and try to avoid any hard-coded HTML.
+	This allows you to re-use the same components (i.e. the Login component)
+	in multiple contexts (i.e. small, boxed display and whole-page display).
+	You only need to adjust the CSS, and options exist to auto-wrap the
+	components in appropriate CSS &amp;lt;div&amp;gt;s that you can immediately use
+	them as selectors in your CSS files.
 	&lt;/para&gt;
+		
+	&lt;para&gt;
+	Here's an example of page &lt;filename&gt;index.itl&lt;/filename&gt; that fits
+	two components into container named &quot;RIGHT&quot;, and two components 
+	into container named &quot;BODY&quot;. Also, options are passed to
+	two of the components, product_info and products_list:
+	&lt;/para&gt;
+&lt;programlisting&gt;
+[compose
+  components.right=&quot;login create_account&quot;
+  components.body=&quot;product_list product_info&quot;
+  
+  attributes.product_info.sku=&quot;1&quot;
+  attributes.product_list.category=&quot;2&quot;
+]
+
+(Body text goes here, but none needed in this context.)
+
+[/compose]
+&lt;/programlisting&gt;
+
+&lt;para&gt;
+&amp;nbsp;
+&lt;/para&gt;
+
 &lt;/section&gt;
 
 &lt;section&gt;
 	&lt;title&gt;Templating system&lt;/title&gt;
 	&lt;para&gt;
+	Templates are complete HTML files with no &amp;glos-ITL; code.
+	&lt;/para&gt;
+	&lt;para&gt;
+	They cannot contain ITL as they're not parsed for Interchange tags.
+	&lt;/para&gt;
+	&lt;para&gt;
+	The HTML in the templates should be complete, that means including the 
+	whole page, from the opening &amp;lt;html&amp;gt; to closing &amp;lt;/html&amp;gt;.
 	&lt;/para&gt;
+	&lt;para&gt;
+	The only and intended way to populate the templates with real data is
+	via placeholders. Placeholders are uppercase words in curly braces,
+	such as {LEFT}, {RIGHT} and {BODY}.
+	&lt;/para&gt;
+	&lt;para&gt;
+	A very simple template saved in file &lt;filename&gt;templates/simple&lt;/filename&gt;
+	could look like this:
+	&lt;/para&gt;
+&lt;programlisting&gt;&lt;![CDATA[
+&lt;html&gt;
+
+  &lt;head&gt;
+  &lt;/head&gt;
+  
+  &lt;body&gt;
+  {BODY}
+  &lt;/body&gt;
+
+&lt;/html&gt;
+]]&gt;&lt;/programlisting&gt;
+
+&lt;para&gt;
+As the contained HTML is complete and the {PLACEHOLDER} marks
+do not interfere with HTML parsing, you can create or edit templates
+in graphical HTML editors.
+&lt;/para&gt;
 &lt;/section&gt;
 
 &lt;section&gt;
 	&lt;title&gt;Components&lt;/title&gt;
 	&lt;para&gt;
+	Components are combined ITL/HTML/CSS blocks that produce certain output.
+	That output is then fitted into template placeholders. Note
+	that one placeholder can contain output of multiple components (including
+	the same component multiple times), and that this work of loading,
+	evaluating and fitting components into the template is carried out by
+	the &amp;tag-compose; tag.
+	&lt;/para&gt;
+	&lt;para&gt;
+	Here's an example of a component &lt;literal&gt;hello_world&lt;/literal&gt; and
+	a page that uses it, based on the above template:
+	&lt;/para&gt;
+	&lt;para&gt;
+	Component saved in file &lt;filename&gt;components/hello_world&lt;/filename&gt;:
 	&lt;/para&gt;
+&lt;programlisting&gt;
+Hello, World! The time is [time]
+&lt;/programlisting&gt;
+	&lt;para&gt;
+	WellWell page saved in &lt;filename&gt;pages/test.itl&lt;/filename&gt;:
+	&lt;/para&gt;
+&lt;programlisting&gt;
+[compose
+  template=simple
+  components.body=&quot;hello_world&quot;
+  skip_auto_components=1
+/]
+&lt;/programlisting&gt;
+	&lt;para&gt;
+	Final HTML output:
+	&lt;/para&gt;
+&lt;programlisting&gt;&lt;![CDATA[
+&lt;html&gt;
+
+  &lt;head&gt;
+  &lt;/head&gt;
+  
+  &lt;body&gt;
+  Hello, World! The time is Wed Oct  7 12:12:25 2009.
+
+  &lt;/body&gt;
+
+&lt;/html&gt;
+]]&gt;&lt;/programlisting&gt;
+&lt;para&gt;
+&amp;nbsp;
+&lt;/para&gt;
+
+&lt;!-- 
+	XXX document local_body, COMPOSE_CONTAINER, container= --&gt;
+
+	&lt;section&gt;
+		&lt;title&gt;Default components and attributes&lt;/title&gt;
+		&lt;para&gt;
+		As said, it is possible to specify default components that will be
+		placed in containers, along with their corresponding options.
+		The definitions are passed via &lt;varname&gt;MV_COMPONENT_AUTO&lt;/varname&gt;
+		and &lt;varname&gt;MV_ATTRIBUTE_AUTO&lt;/varname&gt;. Example:
+		&lt;/para&gt;
+&lt;programlisting&gt;&lt;![CDATA[
+Variable MV_COMPONENT_AUTO &lt;&lt;EOD
+  htmlhead:htmlhead
+  left:menu,categorynav
+  body:infobox
+EOD
+
+Variable MV_ATTRIBUTE_AUTO &lt;&lt;EOD
+  menu.name=main
+EOD
+]]&gt;&lt;/programlisting&gt;
+
+	&lt;para&gt;
+	The default components are always inserted, because a manual setting of
+&lt;code&gt;components.&lt;replaceable&gt;PLACEHOLDER&lt;/replaceable&gt;=...&lt;/code&gt;
+within pages only appends the list.
+So to skip insertion of some of the default components, you can use
+&amp;tag-compose; attribute &lt;code&gt;skip_auto_components=&lt;/code&gt;. It can contain
+names of the components to skip, or &quot;1&quot; to skip all default components.
+	&lt;/para&gt;
+	&lt;para&gt;
+	Many more options are supported &amp;mdash; for a full reference, see tag
+	&amp;tag-compose;.
+	&lt;/para&gt;
+	&lt;/section&gt;
+
 &lt;/section&gt;
 
 &lt;section&gt;
-	&lt;title&gt;Plugins&lt;/title&gt;
+	&lt;title&gt;Users, Roles and Permissions&lt;/title&gt;
+	&lt;para&gt;
+	&lt;emphasis role='bold'&gt;Users&lt;/emphasis&gt; are stored in the 
+	&lt;database&gt;users&lt;/database&gt; table.
+	The non-modifiable primary key is &lt;database class='field'&gt;uid&lt;/database&gt;,
+	quite like
+	an Unix user id, which is used to identify the user through the system.
+	Other settings like username and email can be changed by the user.
+	&lt;/para&gt;
 	&lt;para&gt;
+	&lt;emphasis role='bold'&gt;Roles&lt;/emphasis&gt; allow to group users and grant
+	them permissions. Users are allowed
+	to be in multiple roles.
+	Roles are stored in the &lt;database&gt;roles&lt;/database&gt; table. The primary key
+	is &lt;database class='field'&gt;rid&lt;/database&gt;, quite like
+	an Unix group id, with two default roles
+	(&lt;literal&gt;anonymous&lt;/literal&gt; and &lt;literal&gt;authenticated&lt;/literal&gt;).
 	&lt;/para&gt;
+	&lt;para&gt;
+	The default user roles are:
+	&lt;/para&gt;
+	&lt;itemizedlist&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		Anonymous user (rid 1): this role is used for users that don't have a user account or that are not authenticated
+		&lt;/para&gt;&lt;/listitem&gt;
+		&lt;listitem&gt;&lt;para&gt;
+		Authenticated user (rid 2): this role is automatically granted to all logged in users
+		&lt;/para&gt;&lt;/listitem&gt;
+	&lt;/itemizedlist&gt;
+	&lt;para&gt;
+	The relationship between users and roles is kept in the
+	&lt;database&gt;user_roles&lt;/database&gt; table.
+	&lt;/para&gt;
+	&lt;para&gt;
+	&lt;emphasis role='bold'&gt;Permissions&lt;/emphasis&gt; can be assigned to a role or to an user. The tag to use in
+	checking the appropriate permissions is &amp;tag-acl;.
+	&lt;/para&gt;
+	&lt;para&gt;
+	The following example produces a link only if the current user
+	has the &quot;&lt;literal&gt;create_content&lt;/literal&gt;&quot; permission:
+	&lt;/para&gt;
+&lt;programlisting&gt;&lt;![CDATA[
+  [acl check create_content]
+	  &lt;a href=&quot;[area new_content]&quot;&gt;Create content&lt;/a&gt;
+  [/acl]
+]]&gt;&lt;/programlisting&gt;
+
+&lt;para&gt;
+&amp;tag-acl; returns its body on success, or the permission value if body is
+	empty. Please note that &lt;code&gt;[acl check]&lt;/code&gt; without a permission
+	is always successful.
+	&lt;!-- XXX clarify? --&gt;
+&lt;/para&gt;
+
+	&lt;section&gt;
+		&lt;title&gt;Per-page permissions in [compose] calls&lt;/title&gt;
+		&lt;para&gt;
+		Permissions can be checked for a complete page:
+		&lt;/para&gt;
+&lt;programlisting&gt;
+[compose
+  acl.check=&quot;view_titles&quot;
+  acl.bounce=&quot;index&quot;
+
+  components.body=&quot;title_info&quot;
+]
+&lt;/programlisting&gt;
+&lt;para&gt;
+&amp;nbsp;
+&lt;/para&gt;
+&lt;note&gt;
+Forms created and submitted via &amp;tag-form; bypass this permission
+check because they are evaluated earlier, during autoload routine.
+&lt;/note&gt;
+	&lt;/section&gt;
+
+	&lt;section&gt;
+		&lt;title&gt;Menu permissions&lt;/title&gt;
+		&lt;para&gt;
+		It is possible to only show menu entries for which users have
+		corresponding permissions, using the field
+		&lt;database class='field'&gt;permission&lt;/database&gt; in
+		the &lt;database&gt;menus&lt;/database&gt; table.
+		&lt;/para&gt;
+	&lt;/section&gt;
+
 &lt;/section&gt;
 
+
 &lt;section&gt;
-	&lt;title&gt;Code&lt;/title&gt;
+	&lt;title&gt;Forms&lt;/title&gt;
 	&lt;para&gt;
+	Forms are displayed using the &amp;tag-form; tag.
+	&lt;/para&gt;
+	&lt;para&gt;
+	The recommended way to call them is within the &amp;tag-compose; tag:
+	&lt;/para&gt;
+&lt;programlisting&gt;
+[compose
+  components.body=&quot;product_info wishlist_add&quot;
+  forms.wishlist_add.name=&quot;wishlist_add&quot;
+/]
+&lt;/programlisting&gt;
+&lt;para&gt;
+&amp;nbsp;
+&lt;/para&gt;
+
+
+	&lt;section&gt;
+		&lt;title&gt;Form parts&lt;/title&gt;
+		&lt;para&gt;
+		Each form consists of one or multiple subforms, called parts.
+		The parts are stored in the table &lt;database&gt;form_series&lt;/database&gt;
+		with the following fields:
+		&lt;/para&gt;
+		&lt;itemizedlist&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;name&lt;/database&gt;:     Form name
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;part&lt;/database&gt;:     Part name
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;label&lt;/database&gt;:    Label displayed on top of the form (optional)
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;template&lt;/database&gt;: Template (optional)
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;profile&lt;/database&gt;:  Profile to check input in this part (optional)
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;position&lt;/database&gt;: Position of part (1,2,3,...)
+			&lt;/para&gt;&lt;/listitem&gt;
+		&lt;/itemizedlist&gt;
+	&lt;/section&gt;
+
+
+	&lt;section&gt;
+		&lt;title&gt;Form templates&lt;/title&gt;
+		&lt;para&gt;
+		Forms too are built from templates. The default template is located
+		in &lt;filename&gt;templates/form&lt;/filename&gt;. Alternative templates can be
+		specified through &lt;database&gt;form_series&lt;/database&gt; field as shown
+		above.
+		&lt;/para&gt;
+		&lt;para&gt;
+		The default template is:
+		&lt;/para&gt;
+&lt;programlisting&gt;&lt;![CDATA[
+{PREPEND}
+{TOP}
+&lt;fieldset&gt;
+&lt;legend&gt;{TITLE}&lt;/legend&gt;
+{FIELDS}
+{SUBMIT}
+&lt;/fieldset&gt;
+{BOTTOM}
+]]&gt;&lt;/programlisting&gt;
+	&lt;para&gt;
+	Explanations:
+	&lt;/para&gt;
+		&lt;itemizedlist&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			{PREPEND}: placeholder for form components &lt;!-- XXX explain --&gt;
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			{TOP}: starts HTML form
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			{TITLE}: shows the label field from the form_series table
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			{FIELDS}: contains the regular form elements
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			{SUBMIT} contains the button form elements (as specified in form_elements
+			table or default submit button)
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			{BOTTOM} ends the HTML form.
+			&lt;/para&gt;&lt;/listitem&gt;
+		&lt;/itemizedlist&gt;
+	&lt;/section&gt;
+
+	&lt;section&gt;
+		&lt;title&gt;Form elements&lt;/title&gt;
+		&lt;para&gt;
+The elements of a form (part) are stored in the
+&lt;database&gt;form_elements&lt;/database&gt; table with the following fields:
+	&lt;/para&gt;
+		&lt;itemizedlist&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;code&lt;/database&gt;: Unique serial number
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;name&lt;/database&gt;: Name of form element
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;label&lt;/database&gt;: Label for form element
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;component&lt;/database&gt;: Part name
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;priority&lt;/database&gt;: Sort order (descending)
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+			&lt;database class='field'&gt;widget&lt;/database&gt;: Widget to display
+			&lt;/para&gt;&lt;/listitem&gt;
+		&lt;/itemizedlist&gt;
+		&lt;para&gt;
+The widget is passed by the form_element_field theme function to the
+&amp;tag-display; tag.  One exception to that is the widget named
+&quot;&lt;literal&gt;legend&lt;/literal&gt;&quot; just displays the label of the form_element.
+	&lt;/para&gt;
+	&lt;/section&gt;
+
+	&lt;section&gt;
+		&lt;title&gt;Form attributes&lt;/title&gt;
+		&lt;para&gt;
+Every form element can have a set of attributes, stored in the
+&lt;database&gt;form_attributes&lt;/database&gt;
+table. They are working pretty much the same as the
+&lt;database&gt;metadata&lt;/database&gt; table for the Interchange UI.
+	&lt;/para&gt;
+	&lt;para&gt;
+Attributes can be applied for every form element with a certain name
+or only for a certain from:
+		&lt;/para&gt;
+&lt;screen&gt;
+wellwell=&gt; select * from form_attributes where name = 'country';
+ code |  name   | component |  attribute   |                           value                            
+------+---------+-----------+--------------+------------------------------------------------------------
+   32 | country |           | lookup_query | SELECT code,name FROM country ORDER BY priority DESC, name
+
+
+
+wellwell=&gt; select * from form_attributes where component = 'content_edit';
+ code | name |  component   | attribute | value 
+------+------+--------------+-----------+-------
+   30 | uri  | content_edit | width     | 200
+   31 | body | content_edit | height    | 400
+&lt;/screen&gt;
+	&lt;para&gt;
+	&amp;nbsp;
 	&lt;/para&gt;
 &lt;/section&gt;
 
-&lt;/article&gt;
+	&lt;section&gt;
+		&lt;title&gt;Form hooks&lt;/title&gt;
+		&lt;para&gt;
+		There are two hooks for forms:
+
+		&lt;literal&gt;form_&lt;replaceable&gt;NAME&lt;/replaceable&gt;_load&lt;/literal&gt; (e.g.
+		form_checkout_load) and
+		&lt;literal&gt;form_&lt;replaceable&gt;NAME&lt;/replaceable&gt;_save&lt;/literal&gt; (e.g.
+		form_checkout_save)
+			&lt;/para&gt;
+			&lt;para&gt;
+		The first parameter for both hook subs is the part name.
+			&lt;/para&gt;
+			&lt;para&gt;
+		&lt;emphasis role='bold'&gt;The load hook&lt;/emphasis&gt; is called for the setup of
+		a form part. It is not
+		called if the profile check for the form part has failed.
+		The return value of the load hook is either a false value or
+		a hash reference which can contain the following members:
+		&lt;/para&gt;
+		&lt;itemizedlist&gt;
+			&lt;listitem&gt;&lt;para&gt;
+				page  &amp;mdash; triggers a bounce to that page instead of displaying the form
+			&lt;/para&gt;&lt;/listitem&gt;
+			&lt;listitem&gt;&lt;para&gt;
+				attributes  &amp;mdash; hash reference providing defaults for form attributes
+			&lt;/para&gt;&lt;/listitem&gt;
+		&lt;/itemizedlist&gt;
 
+			&lt;para&gt;
+		&lt;emphasis role='bold'&gt;The save hook&lt;/emphasis&gt; is called if the form part has
+		been successfully submitted (e.g. profile check successful).
+			&lt;/para&gt;
+		&lt;/section&gt;	
+
+		&lt;section&gt;
+			&lt;title&gt;Form theming&lt;/title&gt;
+			&lt;para&gt;
+			Most aspects of a form can be 'themed': the title, elements
+			(complete, label and field) and the submit button.
+			&lt;/para&gt;
+			&lt;para&gt;
+Currently, you can modify one of the existing theme functions:
+	&lt;/para&gt;
+	&lt;screen&gt;
+theme_form_title
+theme_form_element
+theme_form_element_label
+theme_form_element_field
+theme_form_submit
+&lt;/screen&gt;
+		&lt;/section&gt;
+
+		&lt;section&gt;
+			&lt;title&gt;Form components&lt;/title&gt;
+			&lt;para&gt;
+			Regular components can also included in forms. Examples are 
+			dynamic form parts and supplementary content.
+			&lt;/para&gt;
+			&lt;para&gt;
+			They are stored in &lt;database&gt;form_components&lt;/database&gt; table
+			with the following fields:
+			&lt;/para&gt;
+			&lt;itemizedlist&gt;
+				&lt;listitem&gt;&lt;para&gt;
+				&lt;database class='field'&gt;name&lt;/database&gt;: Form name
+				&lt;/para&gt;&lt;/listitem&gt;
+				&lt;listitem&gt;&lt;para&gt;
+				&lt;database class='field'&gt;part&lt;/database&gt;: Form part (empty if component applies to all parts of the form)
+				&lt;/para&gt;&lt;/listitem&gt;
+				&lt;listitem&gt;&lt;para&gt;
+				&lt;database class='field'&gt;component&lt;/database&gt;: Component name
+				&lt;/para&gt;&lt;/listitem&gt;
+				&lt;listitem&gt;&lt;para&gt;
+				&lt;database class='field'&gt;location&lt;/database&gt;: Placeholder used to place the component, e.g prepend for {PREPEND} placeholder
+				&lt;/para&gt;&lt;/listitem&gt;
+				&lt;listitem&gt;&lt;para&gt;
+				&lt;database class='field'&gt;priority&lt;/database&gt;: Sort order in placeholder (descending)
+				&lt;/para&gt;&lt;/listitem&gt;
+			&lt;/itemizedlist&gt;
+
+	&lt;/section&gt;
+	&lt;/section&gt;
+
+	&lt;section&gt;
+		&lt;title&gt;Plugins&lt;/title&gt;
+		&lt;para&gt;
+	Plugins are living in the &lt;filename class='directory'&gt;plugins/&lt;/filename&gt;
+	subdirectory.
+		&lt;/para&gt;
+		&lt;para&gt;
+	They are activated by adding them to variable &lt;literal&gt;PLUGINS&lt;/literal&gt;
+	(comma separated list of plugins).
+		&lt;/para&gt;
+		&lt;para&gt;
+	Please read the README for the plugin first and follow the
+	instructions before activating the plugin.
+		&lt;/para&gt;
+		 &lt;section&gt;
+		     &lt;title&gt;Authoring plugins&lt;/title&gt;
+				 &lt;para&gt;
+	Plugins are basically a small WellWell catalog on its own.
+	The configuration file is called &amp;pcf;. The basic &amp;pcf; configuration
+	can be as follows:
+	&lt;/para&gt;
+&lt;programlisting&gt;
+  Message Loading helloworld plugin.
+  
+  Variable CURPLUGIN helloworld
+  include plugins/default.cfg
+&lt;/programlisting&gt;
+
+	&lt;para&gt;
+	Each plugin should have an info file &lt;filename&gt;&lt;replaceable&gt;NAME&lt;/replaceable&gt;.info&lt;/filename&gt; that contains basic information about the plugin, such as:
+	&lt;/para&gt;
+&lt;programlisting&gt;&lt;![CDATA[
+  name = Hello world!
+  version = 0.1
+  author = Stefan Hornburg (Racke) &lt;racke@linuxia.de&gt;
+  
+  Directory structure
+  
+  NAME.info  - info file (see Info file)
+  plugin.cfg - configuration file (see Configuration)
+  code       - directory for custom code (tags, functions, ...)
+  pages/NAME - directory for pages
+  components - directory for components
+]]&gt;&lt;/programlisting&gt;
+&lt;para&gt;
+&amp;nbsp;
+&lt;/para&gt;
+
+	&lt;/section&gt;
+&lt;/section&gt;
+
+
+	&lt;section&gt;
+		&lt;title&gt;Product images&lt;/title&gt;
+		&lt;para&gt;
+		Originals for product images are kept in &lt;database&gt;images&lt;/database&gt; table.
+		&lt;/para&gt;
+	&lt;/section&gt;
+
+	&lt;section&gt;
+		&lt;title&gt;Paging&lt;/title&gt;
+		&lt;para&gt;
+		Paging can be controlled by passing parameters to
+		&amp;tag-searchcontainer;:
+		&lt;/para&gt;
+&lt;screen&gt;
+paging_startlinks =&gt; always show # links at the beginning
+paging_endlinks =&gt; always show # links at the end
+paging_slidelength =&gt; length of sliding window
+
+Example:
+96 pages, startlinks 3, endlinks 1, slidelength 5
+
+page 1 shows: 1,2,3,4,5,..,96
+page 8 shows: 1,2,3,..,6,7,8,9,10,..,96
+&lt;/screen&gt;
+	&lt;/section&gt;
+
+&lt;section&gt;
+	&lt;title&gt;Processing&lt;/title&gt;
+&lt;para&gt;
+1. Autoload
+Autoload checks for form submissions so we can reroute the request based on
+certain conditions.
+&lt;/para&gt;
+&lt;/section&gt;
+
+&lt;section&gt;
+	&lt;title&gt;Routes&lt;/title&gt;
+&lt;para&gt;
+More flexible routes needs modifications to Interchange itself, but here we go:
+- complementing record files with record macros
+&lt;/para&gt;
+&lt;/section&gt;
+
+&lt;section&gt;
+	&lt;title&gt;Modules for Composition Framework&lt;/title&gt;
+&lt;screen&gt;
+Vend::Compose::Address =&gt; addresses, [address]
+Vend::Compose::Taxonomy
+&lt;/screen&gt;
+	&lt;/section&gt;
+
+&lt;section&gt;
+	&lt;title&gt;Features&lt;/title&gt;
+	&lt;para&gt;
+- deal gracefully with discontinued items (through order_missing SpecialSub)
+	&lt;/para&gt;
+	&lt;/section&gt;
+
+
+&lt;/article&gt;</diff>
      <filename>guides/wellwell.xml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a70540086d6c96240afd08b8e4ff8b86f34b5765</id>
    </parent>
  </parents>
  <author>
    <name>Davor Ocelic</name>
    <email>docelic@spinlocksolutions.com</email>
  </author>
  <url>http://github.com/interchange/xmldocs/commit/9c13da76d673a9f0224d8cfbc70e7dc74abc5dca</url>
  <id>9c13da76d673a9f0224d8cfbc70e7dc74abc5dca</id>
  <committed-date>2009-10-07T04:42:03-07:00</committed-date>
  <authored-date>2009-10-07T04:42:03-07:00</authored-date>
  <message>Ported wellwell docs</message>
  <tree>e6332a1c7860f7d593d5d3667476da8569fb503e</tree>
  <committer>
    <name>Davor Ocelic</name>
    <email>docelic@spinlocksolutions.com</email>
  </committer>
</commit>
