forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Uber Document Splitting
Date Sat, 02 Nov 2002 04:13:12 GMT
On Sat, Nov 02, 2002 at 03:32:52PM +1100, Peter Donald wrote:
> Hi,
> 
> Just say I wanted to develope a complete guide to MyMagic as one large 
> document. Then different presentation forms would arrange it differently 
> according to their specific requirements. 
> 
> For example, lets say I adopt docbook that has chapters and sections. I would 
> potentially want the following generated...
> 
> For PDF:
> /MyMagic.pdf
> 
> For Html:
> /toc.html
> /intro.html
> /chapter1.html
> /chapter2.html
> ...
> 
> or potentially
> /toc.html
> /intro.html
> /chapter1/section1.html
> /chapter1/section2.html
> /chapter1/section3.html
> /chapter2/section1.html
> ...
> 
> or whatever. For an example of this in action see the following which I is 
> generated from docbook via cocoon.

That is exactly what I needed for a user manual: the ability to render as
one large HTML or PDF, or as individual chapters.

I developed a custom Cocoon XPathTransformer[1], which returns a
subsection of the XML doc based on an XPath expression.  To obtain the
XML for a single chapter, I have a sitemap rule:

<map:match pattern="manual/*.xml">
   <map:generate src="content/xdocs/Anteater.xml"/>
   <map:transform src="library/xslt/docv10todocv11.xsl"/>
    ...
   <map:transform type="xpath">
     <map:parameter name="include" value="document/header | document/body/section[title='{1}']"/>
   </map:transform>
    ...
   <map:serialize type="xml"/>
 </map:match>

The end result can be seen at http://aft.sourceforge.net/.

If you want to look at the full sitemap, try:

export CVSROOT=:pserver:anonymous@cvs.aft.sourceforge.net:/cvsroot/aft
cvs -z3 co Anteater
...
ant site   # Builds the Forrest site

I could create a template project that demonstrates doc splitting if you like.

> http://jakarta.apache.org/avalon/developing/index.html
> 
> I guess my question is, will Forrest support this kind of behaviour? If so 
> what DTD for the uber guide would you recomend. Docbook seems to crush most 
> xml editors that I know of so there may be a lighter version that I could 
> use?

I used the older documentv10 format with extensions.  Kevin Ross just emailed
me a document2forrest.xsl stylesheet which "enable[s] an easier conversion from
docbook to forrest xdoc content model".  So with this it should be possible to
author in Docbook and convert+split on the fly.


--Jeff


[1] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12235
> -- 
> Cheers,
> 
> Peter Donald
> --------------------------------
>  These aren't the droids you're 
>  looking for. Move along. 
> -------------------------------- 
> 
> 

Mime
View raw message