Return-Path: Delivered-To: apmail-forrest-svn-archive@www.apache.org Received: (qmail 67263 invoked from network); 10 Apr 2007 03:50:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Apr 2007 03:50:19 -0000 Received: (qmail 14783 invoked by uid 500); 10 Apr 2007 03:50:26 -0000 Delivered-To: apmail-forrest-svn-archive@forrest.apache.org Received: (qmail 14743 invoked by uid 500); 10 Apr 2007 03:50:25 -0000 Mailing-List: contact svn-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Forrest Developers List" List-Id: Delivered-To: mailing list svn@forrest.apache.org Received: (qmail 14734 invoked by uid 99); 10 Apr 2007 03:50:25 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 20:50:25 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 20:50:15 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id E8CDD1A9877; Mon, 9 Apr 2007 20:49:05 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r527010 [16/26] - in /forrest/trunk/site-author/content: ./ skins/ xdocs/ xdocs/docs_0_70/ xdocs/docs_0_70/howto/ xdocs/docs_0_70/howto/bugzilla-patch/ xdocs/docs_0_70/howto/cvs-ssh/ xdocs/docs_0_70/howto/multi/ xdocs/docs_0_80/ xdocs/docs_... Date: Tue, 10 Apr 2007 03:48:57 -0000 To: svn@forrest.apache.org From: crossley@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070410034905.E8CDD1A9877@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: forrest/trunk/site-author/content/xdocs/docs_0_80/searching.xml URL: http://svn.apache.org/viewvc/forrest/trunk/site-author/content/xdocs/docs_0_80/searching.xml?view=diff&rev=527010&r1=527009&r2=527010 ============================================================================== --- forrest/trunk/site-author/content/xdocs/docs_0_80/searching.xml (original) +++ forrest/trunk/site-author/content/xdocs/docs_0_80/searching.xml Mon Apr 9 20:48:52 2007 @@ -21,106 +21,129 @@ Searching Forrest-built documentation -

Forrest provides you with two distinct options for making your - documentation available through full-text search:

+

+ Forrest provides you with two distinct options for making your + documentation available through full-text search: +

  • Google SiteSearch,
  • Built-in search using Apache Lucene.
-

Both options have their advantages and disadvantages. The - purpose of this document is to outline them, and to help you - make a choice. This document also tells you how to disable - full-text search completely, if you so choose.

+

+ Both options have their advantages and disadvantages. The purpose of this + document is to outline them, and to help you make a choice. This document + also tells you how to disable full-text search completely, if you so + choose. +

Google SiteSearch -

Forrest provides a simple interface to the Google search - engine. It invokes Google Advanced Search and limits the search - scope to the domain of your choice. Since the actual search - functionality is implemented on Google's end, you do not need - any additional capability on your Forrest server (which may - well be a simple static web server serving content generated - with forrest site).

-

To use Google SiteSearch in your Forrest application, open - your skinconf.xml file. By default this file is - in the src/documentation subdirectory of your - Forrest repository root. Find the <search> - element; it should be near the top of the file. If the element - does not exist, create it below the - <skinconfig> opening tag. If there is any - attribute named provider, remove it. The element - should look similar to this:

- ]]> -

Then, build your Forrest documentation and open it using your - favorite web browser. You are now invited to peruse the search - box (most skins render this in the top-right corner). Google's - search results will be displayed in a new browser window.

-

Needless to say, for this to work your content must be - accessible to Google's indexing robot. It can't be stored on a - server which is only locally accessible, or which requires - authentication. In addition, the content index is created and - updated at a time of Google's choosing. However, the search is fast - and search precision is usually excellent. So if your - Forrest content is placed on a busy, popular public web - server, Google search is probably the best choice.

+

+ Forrest provides a simple interface to the Google search engine. It + invokes Google Advanced Search and limits the search scope to the domain + of your choice. Since the actual search functionality is implemented on + Google's end, you do not need any additional capability on your Forrest + server (which may well be a simple static web server serving content + generated with forrest site). +

+

+ To use Google SiteSearch in your Forrest application, open your + skinconf.xml file. By default this file is in the + src/documentation subdirectory of your Forrest repository + root. Find the <search> element; it should be near + the top of the file. If the element does not exist, create it below the + <skinconfig> opening tag. If there is any attribute + named provider, remove it. The element should look similar + to this: +

+ +]]> + +

+ Then, build your Forrest documentation and open it using your favorite + web browser. You are now invited to peruse the search box (most skins + render this in the top-right corner). Google's search results will be + displayed in a new browser window. +

+

+ Needless to say, for this to work your content must be accessible to + Google's indexing robot. It can't be stored on a server which is only + locally accessible, or which requires authentication. In addition, the + content index is created and updated at a time of Google's choosing. + However, the search is fast and search precision is usually excellent. + So if your Forrest content is placed on a busy, popular public web + server, Google search is probably the best choice. +

Lucene search -

Lucene is a high-performance, full-text search engine built - entirely in Java. To use Lucene-based search with your Forrest - documentation, you will need to run Forrest in a Java servlet - environment (such as Tomcat or Jetty). Lucene-based searching - will not work in a static site generated with the 'forrest - site' command.

-

In order to enable Lucene-based full-text search in your - Forrest application, you must first edit your - skinconf.xml file. Locate the - <search> element. If the element does not - exist, insert it right underneath the - <skinconfig> opening tag. Add an attribute - named provider with a value of - lucene, so that the element looks similar to - this:

- ]]> -

Next, create and run your Forrest webapp. This may mean - simply invoking forrest run, or building and - bundling a servlet webapp (with forrest webapp), - and then deploying it to your servlet container.

-

You can now build a Lucene search index by pointing your web - browser at - http://localhost:8888/lucene-update.html. This - generates the search index and provides some information about - the index generation process.

- You may have to substitute a different hostname, port, or - path, depending on your configuration. The path mentioned here - reflects Forrest's default settings when invoked as - forrest run. -

Now you can utilize the full-text search box, located in the - top-right corner of the rendered Forrest pages. Search results - will be displayed in the same browser window and will look - remarkably similar to the rest of your Forrest documents.

-

Unlike with Google SiteSearch, the indexing information - retrieved by Lucene is stored on your own server, access to - which you may limit to users in your own organization. - Likewise, you may update or recreate the Lucene index at any - time and at your own discretion. So if you aren't making your - Forrest-built documentation publicly available, and you're - able to run Forrest on a Java-enabled web server, Lucene - search is probably right for you.

+

+ Lucene is a high-performance, full-text search engine built entirely in + Java. To use Lucene-based search with your Forrest documentation, you + will need to run Forrest in a Java servlet environment (such as Tomcat + or Jetty). Lucene-based searching will not work in a static site + generated with the 'forrest site' command. +

+

+ In order to enable Lucene-based full-text search in your Forrest + application, you must first edit your skinconf.xml file. + Locate the <search> element. If the element does not + exist, insert it right underneath the <skinconfig> + opening tag. Add an attribute named provider with a value + of lucene, so that the element looks similar to this: +

+ +]]> + +

+ Next, create and run your Forrest webapp. This may mean simply invoking + forrest run, or building and bundling a servlet webapp + (with forrest webapp), and then deploying it to your + servlet container. +

+

+ You can now build a Lucene search index by pointing your web browser at + http://localhost:8888/lucene-update.html. This generates + the search index and provides some information about the index + generation process. +

+ + You may have to substitute a different hostname, port, or path, + depending on your configuration. The path mentioned here reflects + Forrest's default settings when invoked as forrest run. + +

+ Now you can utilize the full-text search box, located in the top-right + corner of the rendered Forrest pages. Search results will be displayed + in the same browser window and will look remarkably similar to the rest + of your Forrest documents. +

+

+ Unlike with Google SiteSearch, the indexing information retrieved by + Lucene is stored on your own server, access to which you may limit to + users in your own organization. Likewise, you may update or recreate the + Lucene index at any time and at your own discretion. So if you aren't + making your Forrest-built documentation publicly available, and you're + able to run Forrest on a Java-enabled web server, Lucene search is + probably right for you. +

Disabling full-text search -

If you are convinced your users don't need any full-text - search capability whatsoever, you may disallow displaying the - search box entirely. You may also wish to do so if you're - keeping Forrest-built content on a restricted server (meaning - you can't use Google), while at the same time not having any - usable servlet-capable web server at your disposal (meaning - you can't use Lucene, either).

-

To disable full-text search completely, open the - skinconf.xml file and remove (or comment out) the - entire <search> element.

+

+ If you are convinced your users don't need any full-text search + capability whatsoever, you may disallow displaying the search box + entirely. You may also wish to do so if you're keeping Forrest-built + content on a restricted server (meaning you can't use Google), while at + the same time not having any usable servlet-capable web server at your + disposal (meaning you can't use Lucene, either). +

+

+ To disable full-text search completely, open the + skinconf.xml file and remove (or comment out) the entire + <search> element. +

Modified: forrest/trunk/site-author/content/xdocs/docs_0_80/sitemap-ref.xml URL: http://svn.apache.org/viewvc/forrest/trunk/site-author/content/xdocs/docs_0_80/sitemap-ref.xml?view=diff&rev=527010&r1=527009&r2=527010 ============================================================================== --- forrest/trunk/site-author/content/xdocs/docs_0_80/sitemap-ref.xml (original) +++ forrest/trunk/site-author/content/xdocs/docs_0_80/sitemap-ref.xml Mon Apr 9 20:48:52 2007 @@ -19,81 +19,77 @@ site.xml'> linkrewriter'> ]> -
Forrest Sitemap Reference

- Technically, Forrest can be thought of as a - Cocoon distribution that has been stripped down - and optimized for people with simple site publishing needs. Central to - Cocoon, and hence Forrest, is the sitemap. The sitemap + Technically, Forrest can be thought of as a + Cocoon distribution that has been stripped + down and optimized for people with simple site publishing needs. Central + to Cocoon, and hence Forrest, is the sitemap. The sitemap defines the site's URI space (what pages are available), and how each page - is constructed. Understanding the sitemap is the key to understanding + is constructed. Understanding the sitemap is the key to understanding Forrest.

- We advise you to spend time to understand the Apache Cocoon sitemap. - See Cocoon sitemap - and Cocoon concepts - and related component documentation. It is also necessary to understand - the "**" and "*" pattern matching and replacements. See the email thread: - "Re: explain sitemap matches and pass parameters to transformers" + We advise you to spend time to understand the Apache Cocoon sitemap. See + Cocoon sitemap and + Cocoon concepts and related + component documentation. It is also necessary to understand the "**" and + "*" pattern matching and replacements. See the email thread: "Re: explain + sitemap matches and pass parameters to transformers" FOR-874.

- This document provides an overview of the special sitemap which - is used at the core of Apache Forrest. + This document provides an overview of the special sitemap which is used at + the core of Apache Forrest.

- The example sitemap fragments might be out-of-date because since this document was written, the core sitemaps in main/webapp/ have changed and - some of the specialised processing has moved to plugins. - View your source sitemaps when reading this document. - (See FOR-922.) + some of the specialised processing has moved to plugins. View your source + sitemaps when reading this document. (See + FOR-922.) -
Getting started

- Forrest's sitemap comprises the multiple $FORREST_HOME/main/webapp/*.xmap files. - The main one is sitemap.xmap which delegates to others, - including to sitemaps in the various plugins. + Forrest's sitemap comprises the multiple + $FORREST_HOME/main/webapp/*.xmap files. The main one is + sitemap.xmap which delegates to others, including to + sitemaps in the various + plugins.

-

You can add pre-processing sitemaps to your project src/documentation directory (or wherever - ${project.sitemap-dir} points to). Any match that - is not handled, passes through to be handled by the default Forrest - sitemaps - obviously extremely powerful. The capability is described - in + ${project.sitemap-dir} points to). Any match that is not + handled, passes through to be handled by the default Forrest sitemaps - + obviously extremely powerful. The capability is described in "Using project sitemaps".

-

Another way to experiment with the sitemap is to do 'forrest run' on a Forrest-using site. Making changes to the core - *.xmap files will now be immediately effective - at http://localhost:8888/ + *.xmap files will now be immediately effective at + http://localhost:8888/

-
Sitemap Overview

- Forrest's sitemap is divided both physically and logically. The most - obvious is the physical separation. There are a number of separate - *.xmap files, each defining pipelines for a functional area. Each *.xmap - file has its purpose documented in comments at the top. Here is a brief + Forrest's sitemap is divided both physically and logically. The most + obvious is the physical separation. There are a number of separate + *.xmap files, each defining pipelines for a functional area. Each *.xmap + file has its purpose documented in comments at the top. Here is a brief overview of the files, in order of importance.

- + @@ -171,8 +167,7 @@
sitemap.xmapsitemap.xmap + Primary sitemap file, which delegates responsibility for serving certain URIs to the others (technically called sub-sitemaps). More about the structure of this file later.
- - -
Source pipelines (**.xml)

Most *.xmap files (forrest, aggregate, faq, status, issues, revisions, - dtd) define Source pipelines. Source pipelines define the content - (body) XML for site pages. The input XML format can be any format + dtd) define Source pipelines. Source pipelines define the content (body) + XML for site pages. The input XML format can be any format (document-v13, Docbook, RSS, FAQ, Howto) and from any source (local or - remote). The output format is always Forrest's intermediate "document-v13" - format. + remote). The output format is always Forrest's intermediate + "document-v13" format.

- Source pipelines always have a ".xml" extension. - Thus, + Source pipelines always have a ".xml" extension. Thus, index.xml gives you the XML source for the - index page. Likewise, faq.xml gives you XML - for the FAQ (transformed from FAQ syntax), and - changes.xml returns XML from the status.xml file. - Take any page, and replace its extension (.html or - .pdf) with .xml and you'll have the Source - XML. + index page. Likewise, faq.xml gives you XML + for the FAQ (transformed from FAQ syntax), and + changes.xml returns XML from the + status.xml file. Take any page, and replace its extension + (.html or .pdf) with .xml and + you'll have the Source XML.

This is quite powerful, because we now have an abstraction layer, or "virtual filesystem", on which the rest of Forrest's sitemap can build. Subsequent layers don't need to care whether the XML was obtained - locally or remotely, or from what format. Wikis, RSS, FAQs and Docbook + locally or remotely, or from what format. Wikis, RSS, FAQs and Docbook files are all processed identically from here on.

@@ -228,24 +221,30 @@

Most of the usual Source pipelines are defined in forrest.xmap which is the default (fallback) handler for - **.xml pages. The forrest.xmap uses the - SourceTypeAction to determine the type of XML - it is processing, and converts it to document-v13 if necessary. -

-

For instance, say we are rendering a - Howto document called "howto-howto.xml". It contains this DOCTYPE - declaration:

+ **.xml pages. The forrest.xmap uses the + SourceTypeAction to determine the type of + XML it is processing, and converts it to document-v13 if necessary. +

+

+ For instance, say we are rendering a + Howto document called "howto-howto.xml". It contains this + DOCTYPE declaration: +

<!DOCTYPE howto PUBLIC "-//APACHE//DTD How-to V1.3//EN" "http://forrest.apache.org/dtd/howto-v13.dtd"> -

The SourceTypeAction sees this, and applies this transform to get it - to document-v13:

- + The SourceTypeAction sees this, and applies this transform to get it + to document-v13: +

+ + - ]]> - @@ -289,36 +291,43 @@ .... - ....]]> + ....]]> +
Late-binding pipelines

One point of interest here is that the sub-sitemap is often not specific about which URLs it handles, and relies on the caller (the - section listed above) to only pass relevant requests to it. We term - this "binding a URL" to a pipeline.

-

For instance, the main pipeline in faq.xmap matches + section listed above) to only pass relevant requests to it. We term + this "binding a URL" to a pipeline. +

+

+ For instance, the main pipeline in faq.xmap matches **.xml, but only **faq.xml requests are - sent to it.

-

This "late binding" is useful, because the whole URL space is + sent to it. +

+

+ This "late binding" is useful, because the whole URL space is managed in sitemap.xmap and not spread over lots of - *.xmap files. For instance, say you wish all *.xml - inside a "faq/" directory to be processed as FAQs. Just + *.xmap files. For instance, say you wish all *.xml + inside a "faq/" directory to be processed as FAQs. Just override sitemap.xmap and redefine the relevant source - matcher:

- + + - ]]> + ]]> +
-
Output pipelines

To recap, we now have a *.xml pipeline defined for each - page in the site, emitting standardized XML. These pipeline definitions + page in the site, emitting standardized XML. These pipeline definitions are located in various *.xmap files, notably forrest.xmap

@@ -328,15 +337,17 @@

PDF output - PDF is now generated via the org.apache.forrest.plugin.output.pdf plugin. + PDF is now generated via the org.apache.forrest.plugin.output.pdf + plugin.

Easiest case first; PDFs don't require menus or headers, so we can simply transform our intermediate format into XSL:FO, and from there - to PDF. This is done by the following matcher in + to PDF. This is done by the following matcher in output.xmap from the pdf plugin ...

- + 2 3 @@ -347,7 +358,8 @@ 8 9 10 - ]]> + ]]> +
  1. The first line uses a matching regexp to break the URL into directory (.*?) and filename @@ -359,14 +371,18 @@
  2. and finally apply the document-to-fo.xsl stylesheet, to generate XSL:FO XML.
-

Lastly, we generate a PDF using the fo2pdf serializer.

+

+ Lastly, we generate a PDF using the fo2pdf serializer. +

HTML output -

Generating HTML pages is more complicated, because we have to merge +

+ Generating HTML pages is more complicated, because we have to merge the page body with a menu and tabs, and then add a header and footer. - Here is the *.html matcher in - sitemap.xmap ...

+ Here is the *.html matcher in sitemap.xmap + ... +

<map:match pattern="*.html"> <map:aggregate element="site"> @@ -383,9 +399,9 @@

So index.html is formed from aggregating body-index.html and - menu-index.html and - tab-index.html and then applying the - site-to-xhtml.xsl stylesheet to the result. + menu-index.html and + tab-index.html and then applying + the site-to-xhtml.xsl stylesheet to the result.

There is a nearly identical matcher for HTML files in subdirectories: @@ -414,8 +430,11 @@ Intermediate pipelines

Page body -

Here is the matcher which generates the page body:

- + Here is the matcher which generates the page body: +

+ + 2 3 @@ -427,32 +446,38 @@ 9 10 11 - ]]> + ]]> +
  1. In our matcher pattern, {1} will be the directory (if any) and {2} will be the filename.
  2. First, we obtain XML content from a source pipeline
  3. -
  4. -

    We then apply a custom-written +

  5. + We then apply a custom-written IdGeneratorTransformer, which ensures that every - <section> has an "id" attribute if one is not supplied, by generating one from the - <title> if necessary. For example, <idgen> will - transform:

    + <section> has an "id" attribute if one is not supplied, by + generating one from the <title> if necessary. For example, + <idgen> will transform: +

    <section> <title>How to boil eggs</title> ... -

    into:

    +

    + into: +

    <section id="How+to+boil+eggs"> <title>How to boil eggs</title> ... -

    Later, the document-to-html.xsl stylesheet will create - an <a name> element for every section, allowing this section to - be referred to as index.html#How+to+boil+eggs.

    -
  6. +

    + Later, the document-to-html.xsl stylesheet will + create an <a name> element for every section, allowing this + section to be referred to as + index.html#How+to+boil+eggs. +

  7. We then expand XInclude elements.
  8. and rewrite links..
  9. and then finally apply the stylesheet that generates a fragment of @@ -462,8 +487,12 @@
-
Page tabs -

Tab generation is quite tame compared to menus:

- + Tab generation is quite tame compared to menus: +

+ + @@ -493,48 +529,57 @@ - ]]> -

All the smarts are in the tab-to-menu.xsl stylesheet, which - needs to choose the correct tab based on the current path. Currently, - a "longest matching path" algorithm is implemented. See the - tab-to-menu.xsl stylesheet for details.

+ ]]> + +

+ All the smarts are in the tab-to-menu.xsl stylesheet, + which needs to choose the correct tab based on the current path. + Currently, a "longest matching path" algorithm is implemented. See the + tab-to-menu.xsl stylesheet for details. +

-
Resolving Resources - -

Many resources are resolved by the locationmap. This allow us to provide - many alternative locations for a file without cluttering up the - sitemap with multiple processing paths. We use a strict naming convention - to help make the sitemaps more readable. This is described in the - Locationmap - documentation.

+

+ Many resources are resolved by the locationmap. This allow us to provide + many alternative locations for a file without cluttering up the sitemap + with multiple processing paths. We use a strict naming convention to + help make the sitemaps more readable. This is described in the + Locationmap + documentation. +

- -
Link rewriting -

In numerous places in sitemap.xmap you will see the - "linkrewriter" transformer in action. For example:

- ]]> -

This statement is Cocoon's linking system in action. A full - description is provided in Menus and - Linking. Here we describe the implementation of linking.

+

+ In numerous places in sitemap.xmap you will see the + "linkrewriter" transformer in action. For example: +

+ +]]> + +

+ This statement is Cocoon's linking system in action. A full description + is provided in Menus and Linking. Here + we describe the implementation of linking. +

Cocoon foundations: Input Modules

The implementation of site: linking is heavily based on Cocoon Input Modules, a - little-known but quite powerful aspect of Cocoon. Input Modules are + little-known but quite powerful aspect of Cocoon. Input Modules are generic Components which simply allow you to look up a value with a - key. The value is generally dynamically generated, or obtained by + key. The value is generally dynamically generated, or obtained by querying an underlying data source.

In particular, Cocoon contains an XMLFileModule, which lets one look up the value of an XML node, by interpreting the key as - an XPath expression. Cocoon also has a + an XPath expression. Cocoon also has a SimpleMappingMetaModule, which allows the key to be rewritten before it is used to look up a value.

The idea for putting these together to rewrite "site:" links was described in this - thread. The idea is to write a Cocoon Transformer that - triggers on encountering <link - href="scheme:address">, and interprets the - scheme:address internal URI as - inputmodule:key. The transformer then uses the named + thread. The idea is to write a Cocoon Transformer that triggers + on encountering <link href="scheme:address">, and + interprets the scheme:address internal URI as + inputmodule:key. The transformer then uses the named InputModule to look up the key value. The scheme:address - URI is then rewritten with the found value. This transformer was - implemented as + URI is then rewritten with the found value. This transformer was + implemented as LinkRewriterTransformer, currently distributed as a "block" in Cocoon 2.1

-
Implementing "<code>site:</code>" rewriting

@@ -639,8 +691,11 @@

cocoon.xconf -

First, we declare all the input modules we will be needing:

- + First, we declare all the input modules we will be needing: +

+ + -]]> +]]> +
  • linkmap will provide access to the contents of &s;; for example, linkmap:/site/about/index/@href would return the value "index.html".
  • site provides a "mask" over linkmap such that site:index expands - to linkmap:/site//index/@href -
  • + to linkmap:/site//index/@href
  • ext provides another "mask" over linkmap, such that ext:ant would - expand to linkmap:/site/external-refs//ant/@href -
  • + expand to linkmap:/site/external-refs//ant/@href
-

However at the moment, we have only declared the input modules. - They will be configured in sitemap.xmap as described in - the next section.

+

+ However at the moment, we have only declared the input modules. They + will be configured in sitemap.xmap as described in the + next section. +

-
sitemap.xmap

@@ -681,7 +736,8 @@ insert it into any pipelines which deal with user-editable XML content:

- + ... -]]> -

As you can see, our three input modules are configured as part of - the LinkRewriterTransformer's configuration.

+]]> + +

+ As you can see, our three input modules are configured as part of + the LinkRewriterTransformer's configuration. +

    -
  • -

    Most deeply nested, we have:

    -

    + Most deeply nested, we have: +

    + + - ]]> -

    The "{src}" text is expanded to the value of the + ]]> + +

    + The "{src}" text is expanded to the value of the "src" attribute in the "linkrewriter" - instance, namely "cocoon:/{1}linkmap-{2}.html" - Thus the linkmap module reads dynamically - generated XML specific to the current request.

    -
  • -
  • -

    One level out, we configure the "site" and + instance, namely "cocoon:/{1}linkmap-{2}.html" Thus + the linkmap module reads dynamically generated XML + specific to the current request. +

  • +
  • + One level out, we configure the "site" and "ext" input modules, to map onto our dynamically - configured "linkmap" module.

    -
  • -
  • -

    Then at the outermost level, we configure the - "linkrewriter" transformer. First we tell it which - attributes to consider rewriting:

    - linkmap" module. +

  • +
  • + Then at the outermost level, we configure the + "linkrewriter" transformer. First we tell it which + attributes to consider rewriting: +

    + +href src - site ext]]> -

    So, "href" and "src" attributes starting - with "site:" or "ext:" are rewritten.

    - -

    By nesting the "site" and "ext" input - modules in the "linkrewriter" configuration, we tell - "linkrewriter" to use these two input modules when - rewriting links.

    -
  • + site ext]]> + +

    + So, "href" and "src" attributes + starting with "site:" or "ext:" are + rewritten. +

    +

    + By nesting the "site" and "ext" input + modules in the "linkrewriter" configuration, we + tell "linkrewriter" to use these two input modules + when rewriting links. +

-

The end result is that, for example, the source XML for the community/body-index.html page has its links rewritten @@ -764,13 +832,14 @@ Dynamically generating a linkmap

Why do we need this "linkmap" pipeline generating dynamic XML from - &s;, instead of just using &s; directly? The reasons are described + &s;, instead of just using &s; directly? The reasons are described in the linkmap RT: we need to concatenate @hrefs and add dot-dots to the paths, depending on which - directory the linkee is in. This is done with the following + directory the linkee is in. This is done with the following pipelines in linkmap.xmap ...

- + @@ -787,9 +856,11 @@
- ]]> -

You can try these URIs out directly on a live Forrest to see what - is going on (for example, Forrest's own + ]]> + +

+ You can try these URIs out directly on a live Forrest to see what is + going on (for example, Forrest's own abs-linkmap).

Modified: forrest/trunk/site-author/content/xdocs/docs_0_80/skin-package.xml URL: http://svn.apache.org/viewvc/forrest/trunk/site-author/content/xdocs/docs_0_80/skin-package.xml?view=diff&rev=527010&r1=527009&r2=527010 ============================================================================== --- forrest/trunk/site-author/content/xdocs/docs_0_80/skin-package.xml (original) +++ forrest/trunk/site-author/content/xdocs/docs_0_80/skin-package.xml Mon Apr 9 20:48:52 2007 @@ -18,61 +18,50 @@ -
Skin packaging, provision, and use Automated distributed skin packages
-
Overview

-Skins are standard zip archives with a *.zip extension. -This enables them to be unpacked and installed automatically. + Skins are standard zip archives with a *.zip extension. This enables + them to be unpacked and installed automatically.

-

-To publish a skin: + To publish a skin:

- - + 1 - forrest package-skin The skin package will be made in the skin dir, next to the custom skin. 2 - place the file in a directory on a web server 3 - ask forrest-dev to add the url and the skin name to the list of skins - -

-To use a custom skin with automatic download: + To use a custom skin with automatic download:

- - + 1 - set the skin property in forrest.properties to the name of the skin 2 - forrest install-skin 3 - forrest -

-Currently there are two test skins: "testskin" and "testskin2" + Currently there are two test skins: "testskin" and "testskin2"

-

-To see the names of the remote skins: + To see the names of the remote skins:

- -forrest available-skins + forrest available-skins
-
Notes

-The skin will get blown away by the next 'build clean' in forrest. -But that is okay because it is so quick to go get another copy. Also it -may be preferable to get a fresh copy. If the user wanted to keep -the skin and perhaps enhance it, then they can copy it to their project. + The skin will get blown away by the next 'build clean' in forrest. But + that is okay because it is so quick to go get another copy. Also it may + be preferable to get a fresh copy. If the user wanted to keep the skin + and perhaps enhance it, then they can copy it to their project.

Modified: forrest/trunk/site-author/content/xdocs/docs_0_80/skins.xml URL: http://svn.apache.org/viewvc/forrest/trunk/site-author/content/xdocs/docs_0_80/skins.xml?view=diff&rev=527010&r1=527009&r2=527010 ============================================================================== --- forrest/trunk/site-author/content/xdocs/docs_0_80/skins.xml (original) +++ forrest/trunk/site-author/content/xdocs/docs_0_80/skins.xml Mon Apr 9 20:48:52 2007 @@ -29,91 +29,82 @@ many capabilities so that extra skins are not needed.

- Note that the new Dispatcher capability will be a better solution. - See Status of Themes: Skins and Dispatcher. + Note that the new Dispatcher capability will be a better solution. See + Status of Themes: Skins and Dispatcher.

-
Convention for choosing skin names

The skin names are based on playing with the word "skin". See our technique for - choosing skin names. - A name with "-dev" extension signifies that it is under development. - There is no concept of versions of default skins. - New skins have new names. + choosing + skin names. A name with "-dev" extension signifies that it is under + development. There is no concept of versions of default skins. New skins + have new names.

-
Skin descriptions and examples -
pelt

Uses CSS "div" and no HTML tables.

-

Examples: - Apache Forrest | +

+ Examples: Apache Forrest | Apache Lenya

-
tigris

- This skin is based on version 1.1 of the - style.tigris.org project. - (It deliberately contravenes our skin naming convention.) + This skin is based on version 1.1 of the + style.tigris.org project. (It + deliberately contravenes our skin naming convention.)

-

Examples: - Core Computer Security Group +

+ Examples: Core Computer Security + Group

-
plain-dev

- This is a very minimal skin to produce plain HTML documents. - Such capability might be useful to generate a collection of - documents for some off-line product's user help system. -

- -

Examples: - snapshot + This is a very minimal skin to produce plain HTML documents. Such + capability might be useful to generate a collection of documents for + some off-line product's user help system. +

+

+ Examples: snapshot

-
Old and deprecated skins

The following skins are retained for a little while longer, but are deprecated, so please move to one of the other skins.

-
forrest-site

This is the old skin that we have been dragging around since early days. Uses HTML tables.

-

Examples: - Apache XML +

+ Examples: Apache XML

-
krysalis-site

Uses HTML tables.

- -

Examples: +

+ Examples:

-
Modified: forrest/trunk/site-author/content/xdocs/docs_0_80/status-themes.xml URL: http://svn.apache.org/viewvc/forrest/trunk/site-author/content/xdocs/docs_0_80/status-themes.xml?view=diff&rev=527010&r1=527009&r2=527010 ============================================================================== --- forrest/trunk/site-author/content/xdocs/docs_0_80/status-themes.xml (original) +++ forrest/trunk/site-author/content/xdocs/docs_0_80/status-themes.xml Mon Apr 9 20:48:52 2007 @@ -24,39 +24,50 @@
Skins -

"Skins" is the term used to describe the current method for adding - navigation and menu information to the content of a page and applying a - consistent theme for layout, colours, etc. The "pelt" skin is the only one that the Forrest - project is maintaining. It is configurable enough to meet many - purposes. The main configuration file for skins is the skinconf.xml - file. There is - an ability for users to create their own skins, although we have not - encouraged that.

-

For the Forrest-0.8 release, skins are still available and are still the main mechanism. - No effort has been made to enhance skins.

+

+ "Skins" is the term used to describe the current method for adding + navigation and menu information to the content of a page and applying a + consistent theme for layout, colours, etc. The + "pelt" skin is the only one that the + Forrest project is maintaining. It is configurable enough to meet many + purposes. The main configuration file for skins is the skinconf.xml + file. There is an ability for users to create their own skins, although + we have not encouraged that. +

+

+ For the Forrest-0.8 release, skins are still available and are still the + main mechanism. No effort has been made to enhance skins. +

Dispatcher -

"Dispatcher" is the term used to describe a new method which aims to - be a more flexible and complete solution to build a reliable common - structure for documents, incorporate other content, and provide hooks - for applying themes. Themes get configured by structurer definitions - (a wee bit like the skinconf.xml). Although strong progress has been - made, it is still under development. We encourage developers to use - Dispatcher and contribute to its development. See the + "Dispatcher" is the term used to describe a new method which aims to be + a more flexible and complete solution to build a reliable common + structure for documents, incorporate other content, and provide hooks + for applying themes. Themes get configured by structurer definitions (a + wee bit like the skinconf.xml). Although strong progress has been made, + it is still under development. We encourage developers to use Dispatcher + and contribute to its development. See the + - plugin documentation for more information.

+ plugin documentation for more information. +

Plan for future framework -

The desired direction is to use xhtml2 as the internal format, move the current "skins" - into a plugin, and develop input plugins for xdoc and html sources. This would enable - any theme engine to be used, whether that be Skins or Dispatcher or some other. +

+ The desired direction is to use xhtml2 as the internal format, move the + current "skins" into a plugin, and develop input plugins for xdoc and + html sources. This would enable any theme engine to be used, whether + that be Skins or Dispatcher or some other.

-

See the development discussion: - Re: status of skins and dispatcher. - This is planned for immediately following the 0.8 release. New developers please help. +

+ See the development discussion: + Re: + status of skins and dispatcher. This is planned for immediately + following the 0.8 release. New developers please help.

Modified: forrest/trunk/site-author/content/xdocs/docs_0_80/tab-index.fv URL: http://svn.apache.org/viewvc/forrest/trunk/site-author/content/xdocs/docs_0_80/tab-index.fv?view=diff&rev=527010&r1=527009&r2=527010 ============================================================================== --- forrest/trunk/site-author/content/xdocs/docs_0_80/tab-index.fv (original) +++ forrest/trunk/site-author/content/xdocs/docs_0_80/tab-index.fv Mon Apr 9 20:48:52 2007 @@ -17,7 +17,7 @@ --> - + @@ -27,4 +27,4 @@ - \ No newline at end of file + Modified: forrest/trunk/site-author/content/xdocs/docs_0_80/upgrading_08.xml URL: http://svn.apache.org/viewvc/forrest/trunk/site-author/content/xdocs/docs_0_80/upgrading_08.xml?view=diff&rev=527010&r1=527009&r2=527010 ============================================================================== --- forrest/trunk/site-author/content/xdocs/docs_0_80/upgrading_08.xml (original) +++ forrest/trunk/site-author/content/xdocs/docs_0_80/upgrading_08.xml Mon Apr 9 20:48:52 2007 @@ -16,78 +16,85 @@ limitations under the License. --> - -
- Upgrading to Apache Forrest 0.8-dev -
- + +
+ Upgrading to Apache Forrest 0.8-dev +
+
Introduction - -This is the development version of Apache Forrest which can -be obtained from the Subversion repository or from a code snapshot. -See the notes for obtaining and Building Forrest. - -

- This page describes some changes to Apache Forrest that affect people who are - upgrading to the 0.8 version. - If you have other issues, then please discuss on either the - dev or - user - mailing lists. - As more experience is gained, this document will be updated. + + This is the development version of Apache Forrest which + can be obtained from the Subversion repository or from a code snapshot. + See the notes for obtaining and Building + Forrest. + +

+ This page describes some changes to Apache Forrest that affect people + who are upgrading to the 0.8 version. If you have other issues, then + please discuss on either the + dev or + user mailing lists. As more + experience is gained, this document will be updated.

- (If you are upgrading from a version prior to 0.7 then you will need - to see the notes for the previous upgrade.) + (If you are upgrading from a version prior to 0.7 then you will need to + see the notes for the previous upgrade.)

-
New Features

- The following list shows some of the key new features. - For the full list of changes, see the main - change log and also for each plugin. + The following list shows some of the key new features. For the full list + of changes, see the main change log and also + for each plugin.

-

Many new initial plugins are in the "whiteboard". See the entries in the - change log and see each plugin's documentation and changes log. - This includes the new Dispatcher. - See Status of Themes: Skins and Dispatcher. +

+ Many new initial plugins are in the "whiteboard". See the entries in the + change log and see each plugin's + documentation and changes log. This includes the new Dispatcher. See + Status of Themes: Skins and Dispatcher.

-
Locationmaps -

The Locationmaps define the mapping from requests to locations - which enables content and resources to be located at various different sources. -

-

Adding a default locationmap to your project is not required, but is advisable. - Sooner or later you will use it. Having a default one also reduces the verbosity - of the log files. Copy one from a fresh 'forrest seed' to - PROJECT_HOME/src/documentation/content/locationmap.xml -

- If you do use locationmaps and an entry for a specific request is - missing Forrest generates a confusing error message. Please ask on our - mailing lists for help in debugging your problem (hint, turn on locationmap - debugging in [FORREST_HOME]/main/webapp/WEB-INF/logkit.xconf, restart Forrest, - request the broken pages and visit [SITE_HOM]/build/webapp/logs/locationmap.xml). - This issue will be fixed in the next version of Forrest. +

+ The Locationmaps define the mapping from + requests to locations which enables content and resources to be located + at various different sources. +

+

+ Adding a default locationmap to your project is not required, but is + advisable. Sooner or later you will use it. Having a default one also + reduces the verbosity of the log files. Copy one from a fresh 'forrest + seed' to + PROJECT_HOME/src/documentation/content/locationmap.xml +

+ + If you do use locationmaps and an entry for a specific request is + missing Forrest generates a confusing error message. Please ask on our + mailing lists for help in debugging your problem (hint, turn on + locationmap debugging in + [FORREST_HOME]/main/webapp/WEB-INF/logkit.xconf, restart Forrest, + request the broken pages and visit + [SITE_HOM]/build/webapp/logs/locationmap.xml). This issue will be fixed + in the next version of Forrest. +
-
Forrest configuration simplification

- FOR-920 Merging the - defaults and - project modules to the new - properties module. You can use it like {properties:forrest.home} -

-

In all custom code (e.g. project sitemaps or plugins) you need to do the following:

- + FOR-920 Merging the defaults and + project modules to the new properties module. + You can use it like {properties:forrest.home} +

+

+ In all custom code (e.g. project sitemaps or plugins) you need to do the + following: +

  • find: {defaults: and replace with @@ -102,92 +109,89 @@ {properties:
-
Run a clean target after upgrade

- Do 'forrest clean-work' in each of your projects. This also removes - the old Cocoon disk cache. + Do 'forrest clean-work' in each of your projects. This also removes the + old Cocoon disk cache.

-
New filename convention for stylesheets

- There is now a filenaming convention for stylesheets (e.g. document-to-html.xsl). - This assists with automating the location of such resources. - See Locationmap. -

-

For the default use of Forrest, this makes no difference. However, if - you have developed your own skin then you will need to do some filename changes, e.g. - 'cd skins/my-skin/xslt/html; mv tab2menu.xsl tab-to-menu.xsl' (do each of book2menu.xsl document2html.xsl site2xhtml.xsl tab2menu.xsl). - It is advisable to follow this naming convention for your other resources, - which will mean that you can utilise the locationmap. + There is now a filenaming convention for stylesheets (e.g. + document-to-html.xsl). This assists with automating the location of such + resources. See Locationmap. +

+

+ For the default use of Forrest, this makes no difference. However, if + you have developed your own skin then you will need to do some filename + changes, e.g. 'cd skins/my-skin/xslt/html; mv tab2menu.xsl + tab-to-menu.xsl' (do each of book2menu.xsl document2html.xsl + site2xhtml.xsl tab2menu.xsl). It is advisable to follow this naming + convention for your other resources, which will mean that you can + utilise the locationmap.

-
Notes about documentation -

After each release, the "Versioned Docs" are copied to form the new "dev" set. - Ideally the docs are then upgraded in readiness for the new release. - This has not been completed for the 0.8 release. In particular there are - example snippets of sitemaps which have not yet been upgraded to reflect the changes to the sitemaps and the separation of some core stuff into plugins. - See issues - FOR-546 - and - FOR-922 - and others. +

+ After each release, the "Versioned Docs" are copied to form the new + "dev" set. Ideally the docs are then upgraded in readiness for the new + release. This has not been completed for the 0.8 release. In particular + there are example snippets of sitemaps which have not yet been upgraded + to reflect the changes to the sitemaps and the separation of some core + stuff into plugins. See issues + FOR-546 and + FOR-922 and + others.

-
Notes about Cocoon version

- The last time that we upgraded our packaged version of Cocoon trunk - was using their SVN r351990 on 2005-12-08. Since then a number of things + The last time that we upgraded our packaged version of Cocoon trunk was + using their SVN r351990 on 2005-12-08. Since then a number of things have happened to cause us to fall out of synchronisation with Cocoon. - There is various discussion about this in the Forrest and Cocoon dev mail archives. + There is various discussion about this in the Forrest and Cocoon dev + mail archives.

If you use your own version of Cocoon, then you will know about the - upgrade notes in the $FORREST_HOME/etc/cocoon_upgrade directory. - You might be able to advance a bit beyond the SVN revision, but not much. + upgrade notes in the $FORREST_HOME/etc/cocoon_upgrade directory. You + might be able to advance a bit beyond the SVN revision, but not much. Please help to rectify this situation.

-
Whitespace and indenting of xml files with xmlformat

All xml type files have been formatted using xmlformat. You can apply - this to your own work if necessary by using the same configuration - as the Forrest project. - See notes at FOR-644. + this to your own work if necessary by using the same configuration as + the Forrest project. See notes at + FOR-644.

-
General upgrade tips

- Synchronise your project's skinconf.xml and forrest.properties files. + Synchronise your project's skinconf.xml and forrest.properties files.

- Take advantage of the separation of concerns. In a new workspace, - create a fresh - 'forrest seed' site, then tweak its forrest.properties - and skinconf.xml until it reflects your old site. - When it is ready, replace your project's skinconf.xml and - forrest.properties files. - Any remaining issues would concern other aspects of your configuration, - such as site.xml and your actual content. + Take advantage of the separation of concerns. In a new workspace, create + a fresh 'forrest seed' site, then tweak its + forrest.properties and skinconf.xml until it reflects your old site. + When it is ready, replace your project's skinconf.xml and + forrest.properties files. Any remaining issues would concern other + aspects of your configuration, such as site.xml and your actual content.

-
To be continued... -

...as more issues are discovered/remembered :) Please send feedback - to the - mailing list.

+

+ ...as more issues are discovered/remembered :) Please send feedback to + the mailing list. +