<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>

<book id="index">
<bookinfo>
  <title>CAMAS layouts authoring</title>
  <author>
    <firstname>Bertrand</firstname>
    <surname>LUPART</surname>
    <affiliation>
      <orgname>The Caudium Group</orgname>
      <address>
        <email>bertrand at caudium dot cnet</email>
      </address>
    </affiliation>
  </author>
  <copyright>
    <year>2003</year>
    <holder>The Caudium Group</holder>
  </copyright>
  <abstract>
		<para>
			This is the CAMAS layouts authoring guide. It will describe how to make a CAMAS layout yourself.
		</para>
  </abstract>
</bookinfo>

<toc></toc>

<chapter id="introduction">
	<title>
		Introduction
	</title>
	<para>
		CAMAS is a high performance and very versatile webmail written for professional use.
	</para>
	<para>
		CAMAS 1.2 comes with a new layout subsystem which has been designed with modularity in mind.
		In short, CAMAS modules provide a collection of tags, containers and entities processed on the server side. All these has to be embedded into a conventional web page and thus can benefit from any web-saavy technology. In addition, CAMAS layouts can be extended via conventional RXML, making their customization boundless via additional Caudium parser modules.
	</para>
</chapter>

<chapter id="prerequisites">
	<title>
		Prerequisites
	</title>
	<para>
		In order to make a CAMAS layout yourself, you'll need:
	</para>
		<itemizedlist>
			<listitem>
				<para>
					HTML and CSS knowledge, basics at least.
					See the World Wide Web consortium documentations: http://www.w3.org/
				</para>
			</listitem>
			<listitem>
				<para>
					A working CAMAS (which require a working Caudium Web server) is mandatory.
					See the Caudium HOW-TO: http://www.caudium.net/server/docs/howto.rxml
				</para>
			</listitem>
			<listitem>
				<para>
					Some knowledges of RXML can help, but since CAMAS layouts are RXML-driven, you'll learn RXML without even noticing it.
					RXML is just a server side tag-based languages, so understanding it is not a big deal.
					See: http://www.caudium.net/server/docs/rxml.rxml
				</para>
			</listitem>
		</itemizedlist>
</chapter>

<chapter id="filesystem">
	<title>
		Layout file organisation
	</title>
	<para>
		A CAMAS layout is a simple collection of files organized in subdirectories.
	</para>
	<para>
		A layout contains different set of files:
		<itemizedlist>
			<listitem>
				<para>
					A XML configuration file at the root containing the layout name, the authors, the license etc...
				</para>
			</listitem>
			<listitem>
				<para>
					RXML files defining the templates for the screens in the screens subdirectories.
				</para>
			</listitem>
			<listitem>
				<para>
					Any web-saavy file that can be used in the layout can be put in the "_www" subdirectory.
				</para>
			</listitem>
		</itemizedlist>
	</para>
	
	<sect1 id="filesystemrxml">
		<title>	
			Layout files
		</title>
		<para>
			The data to output are context-dependant. CAMAS handles the current context as screens, which are stored in the CAMAS session.
			For example, when the user sees the login page, he is on the "login" screen. When he sees the list of mails, he's on "mailindex" screen, and so on.
			The list of all available screens is available in the reference.
		</para>
		<para>
			Basically, each layout file is named like the frame it represents and is in a directory whose name is the screen it belongs to. Remember that top frame in HTML is called "_top", and that user agents should ignore frames whose name begins with an underscore. 
		</para>
		<para>
			For example, the following layout:
		</para>
		<programlisting>
			mylayout/
				config.xml
				login/
					_top.rxml
				mailindex/
					_top.rxml
					folders.rxml
					mails.rxml
		</programlisting>
		<para>
			This layout "mylayout" handles two screens: login and mailindex. The screen login has only one frame (which is _top, ie the top frame), while the screen mailindex handles three frames: _top, folders and mails.
		</para>
	</sect1>

</chapter>

</book>
