A document has been updated:
http://cocoon.zones.apache.org/daisy/cocooninaction/679.html
Document ID: 679
Branch: main
Language: default
Name: Design considerations (unchanged)
Document Type: Simple Document (unchanged)
Updated on: 8/22/05 1:36:45 PM
Updated by: Helma van der Linden
A new version has been created, state: publish
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 7129 bytes (previous version: 11619 bytes)
Content diff:
<html>
<body>
--- <h1>Website Revision 1</h1>
---
<p>Before we can actually start coding, it is good to make some decisions
first,
to avoid having to redo everything because you forgot to take some
essentials
into account.</p>
(136 equal lines skipped)
/forms -- Cocoon forms (if necessary)
/xsl -- XSLT files that transform your content into
XHTML pages</pre>
--- <h2>Let's get to work</h2>
---
--- <p>Now that decisions are made, it is time to put it all to work. First,
fire up
--- Eclipse, open your <em>HealthyCocoon </em>project and create the directory
--- structure as outlined above under <em>/src/cocoon/webapp/healthycocoon</em>
of
--- your project. Note that <em>healthycocoon </em>is the "root" directory under
--- <em>webapp</em> and thus <em>webapproot </em>in the description above. This
--- makes your project a subproject of the Cocoon webapp. This way, the project
--- sitemap can remain small. The "root" sitemap (i.e. the default sitemap
installed
--- during the installation of Cocoon) remains untouched and provides a default
--- setup for most definitions and URLs.</p>
---
--- <h3>Create the home page</h3>
---
--- <p>The home page will contain the information about HealthyCocoon. It will
be
--- the first page to be shown when the domainname is entered and where all
--- non-existing pages will be directed to.<br/>
--- Create a new XML file in <em>src/cocoon/webapp/healthycocoon/content</em>
and
--- name it <em>home.xml</em>. Copy or type the page template, explained above
and
--- set the <tt>title </tt>and <tt>banner </tt>to 'HealthyCocoon welcomes you'.
Copy
--- or type the text about HealthyCocoon between the <tt>text </tt>tags. Save
the
--- file.<br/>
--- It looks like this:</p>
---
--- <pre><page>
--- <header>
--- <title>HealthyCocoon Welcomes You</title>
--- </header>
--- <content>
--- <banner>HealthyCocoon Welcomes You</banner>
--- <text>
--- <p>
--- HealthyCocoon is a hip restaurant located in the centre of
Maastricht, The
--- Netherlands. Maastricht is practically on the Belgian border and
only some 30 km
--- from the German border, which explains our international clientele.
--- </p>
--- <p>
--- We intend to spoil our customers by serving them fresh, healthy
and nutritional
--- food served in eye-pleasing and tongue-caressing dishes. Not only
do we have ample
--- seating inside, but we also have tables and comfortable chairs set
up outside for
--- those nice days in spring, summer and autumn.
--- </p>
--- <p>If you are in a rush, you will find that our dishes are also
great for takeaway.</p>
--- </text>
--- </content>
--- </page></pre>
---
--- <h3>Create the contact page</h3>
---
--- <p>Repeat the steps above to create <em>contact.xml</em> which contains the
--- addres of HealthyCocoon. Choose an appropriate title and banner. It looks
like
--- this:</p>
---
--- <pre><page>
--- <header>
--- <title>HealthyCocoon - Contact</title>
--- </header>
--- <content>
--- <banner>Where to find us</banner>
--- <text>
--- <p>
--- HealthyCocoon is located at:
--- </p>
--- <p>
--- Webappstreet 25<br/>
--- 1234 AB Maastricht<br/>
--- The Netherlands<br/>
--- </p>
--- <p>
--- You can reach us:<br/>
--- By phone: +31 43 1234567<br/>
--- By fax: +31 43 1234568<br/>
--- By email: [EMAIL PROTECTED]<br/>
--- </p>
--- </text>
--- </content>
--- </page></pre>
---
--- <p class="note">Since these files are XML, you are required to write valid
XML.
--- This means that using HTML tags also requires you to conform to valid XML,
hence
--- the <tt><br/></tt> and the closing <em></p></em>.</p>
---
--- <h3>Putting it to screen</h3>
---
--- <p>Now that you have written the content to start with, it is time to focus
on
--- how to get it to display on screen. For that we need two things:</p>
---
--- <ul>
--- <li>Something, an XSLT stylesheet, that transforms your pages into
XHTML.</li>
--- <li>Something, a sitemap, that does the directory-to-URL mapping as
discussed
--- before.</li>
--- </ul>
---
--- <h3>ToXHTML.xslt</h3>
---
--- <p>The XSLT stylesheet that transforms the internal markup to XHTML is
--- conveniently named <em>ToXHTML.xslt</em>. Create an XSL document in
--- <em>src/cocoon/webapp/healthycocoon/system/xsl</em>. For now we will create
the
--- simplest stylesheet possible. Enhancements will be added later.<br/>
--- Create the stylesheet yourself and check if it matches the one below or
simply
--- copy and paste.</p>
---
--- <p>[TODO:<br/>
--- - create xsl files that transform the xml<br/>
--- - explain about pipelines (enough to understand why there are different xsl
--- files)<br/>
--- - create a minor sitemap.xmap<br/>
--- - run cocoon -> test (only 2 pages, no menu, no language switch, only
through
--- URL modification)<br/>
--- ]</p>
---
</body>
</html>
Fields
======
no changes
Links
=====
no changes
Custom Fields
=============
no changes
Collections
===========
no changes