forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: Docbook skinning and public identifiers
Date Wed, 13 Aug 2003 00:58:32 GMT
On Tue, Aug 12, 2003 at 02:49:42PM -0700, mjb wrote:
> Dear people
> I would like to transform my Docbook documents using the Norm Walsh style
> sheets rather than using the docbook2document.xsl style sheet

Norm Walsh's stylesheets emit HTML, so you'd have to munge them
slightly to be able to merge in the Forrest header/menu.  PDFs
certainly wouldn't work.  Also, I think Norm Walsh's stylesheets use a
Saxon extension.  Forrest uses Xalan, so you'd have to change that.

Might be easiest to stick with just Norm Walsh's stylesheets in the
beginning, and later decide if you really need Forrest.

> But my docbook documents dont have public identifiers in them
> (I cant change this)

You should; otherwise they're not Docbook documents, just some random

> How do I let Forrest know what sort of document it is dealing with?

Have a look in forrest.xmap to see how it's done:

  <map:action logger="sitemap.action.sourcetype" name="sourcetype" src="org.apache.cocoon.acting.sourcetype.SourceTypeAction">
    <sourcetype name="docbook-v4.2">
      <document-declaration public-id="-//OASIS//DTD DocBook XML V4.2//EN" />
    <sourcetype name="sdocbook-v1.0">
      <document-declaration public-id="-//OASIS//DTD Simplified DocBook XML V1.0//EN" />

So the SourceTypeAction looks at the DOCTYPE declaration by default.
I believe it can also look at the root node, and possibly other
things; have a look at the source.

> Also:
> Mr Crossley, in his FAQ gives the following xml as the way to transform
> DocBook using the Norm walsh sheets.
> ...
>   <map:match pattern="**/resolver-*.html">
>     <map:generate src="content/xdocs/{1}/resolver-{2}.xml"/>
>     <map:transform
>       src="file:///usr/share/sgml/docbook/xsl/xhtml/docbook.xsl"/>
>     <map:serialize/>
>   </map:match>
> ...
> Which sitemap file does this go in? (the main sitemap.xmap?).

Yes, just above the default *.html matcher.

> Also, does it matter where abouts in the sitemap.xmap file it goes?

Yes, order matters.  Stuff at the top matches first.

>  Also, does this handle the 'skinning' process as well? In other words, will
> the Docbook documents appear
>   within the HTML framework of Forrest?

Not unless you strip the outer elements (<html> etc) and replace with
the tag Forrest uses to identify mergeable content.  Have a look at
http://localhost:8888/body-index.html for an example.

>  Also: is the text 'resolver' significant?

I think that's just an example XML filename.

> Also: I downloaded a source copy of Forrest from the
> download directory (tar.gz) but the structure of the
> sitemap.xmap files seems very different to that described
> in the documentation (for example: I cant find a 'forrest.xmap' any where on
> my system)

The docs describe CVS Forrest.  No great loss as we didn't have much
sitemap doco for 0.4, but some can be found in primer.html

>   Is this version very out of date?

About 6 months.  CVS Forrest is stable and we'll be doing a 0.5
release soonish.

>   Do I need to use cvs to get a recent copy?



> thanks for your help
> matthew bishop

View raw message