forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: Todo/Nullpointer problems
Date Thu, 12 Jun 2003 12:23:24 GMT
On Thu, Jun 12, 2003 at 12:40:12PM +0100, Ramsay Domloge wrote:
> Hey all,
> I am currently experiencing 2 problems when i build my forrest doc site,
> which may be interrelated.
> (1) When I build I get:
> 	 * [29] template/reqspec.html
> 	 * [26] template/diagrams/index.html
> 	java.lang.RuntimeException: java.lang.NullPointerException
> 	        at 	
> 	        at
> 	 * [29] template/faq.html
> 	 * [27] template/todo.html

The command-line error messages are really useless :/

When you encounter something like this, it's always best to fire up the
webapp ('forrest run'), then try some of the pages in the vicinity of the
errors, here faq.html and todo.html.  Then when you find the broken page,
you can start debugging.  Each stage of the page's development can be
queried in the webapp, which is invaluable for debugging.  Say todo.html
is broken.  You'd first test 'todo.xml' to test the raw todo2document.xsl
conversion; then 'body-todo.html' (latest CVS) or 'body-todo.xml' (0.4)
to check the document2html rendering.  The menu-todo.html and
tabs-todo.html pipes can also be queried.

> 2 points during the build. The majority of the site seems to be
> built, but ...
> (2) ...the todo page is blank. I realise that a todo page can be built
> from the site.xml file, but this creates a todo list for the entire
> site. However, we are creating a documentation site for the suite of
> products that the company is making and each has its own section and
> each should have its own todo list. I assume that I am able to create a
> file named todo.xml in a subdir and make the appropriate entry in the
> book.xml file..?

In the default sitemap ($FORREST_HOME/context/sitemap.xmap unless you're
overridden it in $PROJ/src/documentation/), there is a matcher generating
todo.xml from status.xml:

      <map:match pattern="todo.xml">
        <map:mount uri-prefix="" src="status.xmap" check-reload="yes" />

However as it doesn't begin with '**', this only applies to the root
todo.html file.  todo files in subdirectories are passed down to the
forrest.xmap subsitemap:

      <map:match pattern="**.xml">
        <map:mount uri-prefix="" src="forrest.xmap" check-reload="yes" />

Which *is* able to automatically convert TODO XML into the intermediate
document-v11 format.  So template/todo.html should be rendered, if you've
got the <!DOCTYPE declaration at the start of the file correct.

> Any pointers would be very helpful - I am completely new to forrest and
> really like it, but the documentation/FAQs is really detracting from my
> learning experience!

Forrest is a badly documented black box until you discover and grok the
sitemap files :)


> Ramsay

View raw message