On Fri, Sep 07, 2001 at 09:05:18AM +0200, Ceki G?lc? wrote:
> At 15:07 07.09.2001 +1000, Jeff Turner wrote:
> >On Thu, Sep 06, 2001 at 10:28:15PM +0200, Bernard D'Have wrote:
> >> I think that jakarta Avalon project use cocoon dor Html generation from
> >> Docbook
> >
> >Avalon does this. But it's not as simple as "hooray, let's use docbook",
> >because it needs to generate a *jakarta* site, not any random HTML.
> >
> >Avalon converts docbook to the existing "stylebook" XML, and then uses
> >the standard XSLs to render that into a jakarta website.
> 
> Hi Jeff,
> 
> The problem we are facing is different. We would like to generate printable
> user documentation. The output does not need to resemble the jakarta site.

So if I've understood the current system..

-  You've got quite a bit of plain ungenerated HTML in docs/
-  .. and some more XML in src/xdocs/ which is rendered to HTML via Anakia to docs/
-  .. and now you want to add some more Docbook in src/sgml/, which will be
   rendered via something (Jade, let's say) to docs/

By "printable user documentation", I take it you mean PDF?

If so, you're right; I don't know of any existing project that does the full
Docbook -> PDF thing. Avalon is *very* close, but not there yet. I'll let you
know when it happens ;)

Do you want Docbook -> HTML as well as Docbook -> PDF? Might be nice.. I see
docs/manual.html is the same as src/sgml/intro.sgml. Avalon has a
docbook2body.xsl stylesheet, which effectively goes from src/sgml to src/xdocs.
There's a stylesheet to go the other way (to Docbook) too.

Here's a portion of Avalon's site generated from Docbook. As you can see, the
Docbook -> Jakarta-branded HTML is pretty good:)

http://jakarta.apache.org/avalon/developing/index.html

> would be nice to have a Java based tool to generate printable user
> documentation from Docbook. However, the unavailability of a such a tool
> written in java is not IMO a show stopper.

Indeed.

> If anyone wants to play around with Cocoon or any other java baased tool to
> parse Docbook input is welcome to do so. I have been using jade (written C)
> to generate documentation from Docbook SGML so far with reasonable results. 

It's probably better (and more politically correct;) to use the XML flavour of
Docbook. XML is a subset of SGML, so your existing Jade and DSSSL tools will
work, but in addition you can use XSLT stylesheets. This opens the field for
Java processing; there will likely never be a DSSSL Java engine, but there are
plenty of Java XSLT engines.

> >It actually uses Cocoon 2 in "offline mode" to do the rendering. This
> >allows the whole "website" to be planned in the sitemap, which is
> >wonderfully flexible. The problem with using Cocoon is that it's an
> >addition 2.4mb of jars to download, and it's probably using a
> >sledgehammer to crack a nut.
> >
> >I have a self-contained example of Cocoon-generated, Docbook-based docs
> >if anyone wants.
> 
> Yes, please.

Oh bugger... ;) Okay, let me dust it off and I'll post a link.

> I would be very interested. If I understand correctly 
> you still need jade to render the Docbook generated by Coocon right?

If it's SGML, no. If it's XML, yes. That's what the FOP project
(http://xml.apache.org/fop/index.html) is for: generating PDF.

Cocoon is the most common framework which uses FOP. Cocoon can convert Docbook
to XSL:FO (vaguely similar to jade's .fot files), and from XSL:FO to PDF.
Here's a demo of Cocoon 1 generating PDF dynamically (not from Docbook,
unfortunately):

http://ulim.cocoonhost.com/taglibs/soap/samples/xml/index.xml

Cocoon 2 is much more general. It does the following: 
 - generates XML from any source (currently filesystem, JSP, servlet, PHP,
   Python, Velocity, DBXML database).
 - processes XML, mostly via stylesheets, but also via code ("transformers").
 - Serializes the transformed XML, mainly to HTML and PDF, but potentially to
   any weird format you want. There's a very effective PNG generator.

Er.. way off topic there. Anyway, yes, it's possible to do PDF from Docbook ;)

--Jeff

> Regards, Ceki
> 
[snip]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to