[OT?] Maven Docbook to Powerpoint or DocBook Slides?

132 views
Skip to first unread message

Grant Ingersoll

unread,
Feb 16, 2009, 5:02:52 PM2/16/09
to docbkx-to...@googlegroups.com
Sorry if this is off topic...

Anyone have any experience generating either power point of PDF
"slides" from Docbook?

Here's what I'm thinking:
Each section is a slide with a title and then a list of bullet points
and/or images, etc.

Can the Maven plugin help me do this? Or is it just a matter of
getting PDF generation right?

Thanks,
Grant

Wilfred Springer

unread,
Feb 16, 2009, 5:15:34 PM2/16/09
to docbkx-to...@googlegroups.com
Interesting question. I never actually gave it a try. In fact, whenever I used the slides scheme, I used it for my browser only. (And I don't recall Norman ever using it for anything else.) Is there actually a FO output generating version of the stylesheets for DocBook? [....checking....] 

It turns out there is something like that. By the looks of that, I would say there's gotta be a way to make it work. It would however require extending the current scheme of goals with something like docbkx:generate-slides-pdf - which sounds way too long - or something similar.

Tempted to give it a try....

2009/2/16 Grant Ingersoll <grant.i...@gmail.com>

Mimil Mimil

unread,
Feb 17, 2009, 5:11:15 AM2/17/09
to docbkx-to...@googlegroups.com
Hello,

did you have a look at docbook slide format which is an extension of regular docbook xsl stylesheets? (http://me.in-berlin.de/~miwie/presentations/html/dbslides.html ?)

Wilfred, this way it would be easy to define a new goal? And it is up to the user to write an xslt to transform its docbook sources (article, book ...) to slide sources.

Regards,
Cédric,

Grant Ingersoll

unread,
Feb 18, 2009, 11:05:57 AM2/18/09
to docbkx-to...@googlegroups.com
I notice there is a XSLT put out by someone generating Apple Keynote.  I'd love to see one for PowerPoint too.

Grant Ingersoll

unread,
Mar 2, 2009, 5:58:00 PM3/2/09
to docbkx-to...@googlegroups.com
Following up a bit late...

In looking at the DB Slides stuff, it doesn't really seem to be all that active, plus it makes it sound like it is a "simplified" version of DB, but in reality, it introduces new tags, so it requires stuff beyond just DB.  What I decided to do, instead, was just create a regular DB file with simple itemized lists in a para tag, such as:
<sect2 id="my.id">
      <title id="my.id.title">Title</title>
      <para>
        <itemizedlist>
          <listitem>
            <para>Blah</para>
          </listitem>
          <listitem>
            <para>Blah</para>
          </listitem>
          <listitem>
            <para>Blah</para>
          </listitem>
        </itemizedlist>
      </para>
    </sect2>


This works pretty well, and will also let me generate both a (training) manual and slides, I think.  Both in HTML and in PDF.  Then, it is trivial to style.

The main sticking point I have right now is that I want to generate one PDF page per section.  Anyone have experience with doing something like this?  Is that possible through a FO customization?  I realize this might be off topic, but it seems like people here may have experience doing something like this.  Of course, the answer may be I'm going down a path that leads to me recreating the slides stuff, but I hope not.

WDYT?

Thanks,
Grant

On Feb 17, 2009, at 5:11 AM, Mimil Mimil wrote:

Grant Ingersoll

unread,
Mar 2, 2009, 6:35:42 PM3/2/09
to Grant Ingersoll, docbkx-to...@googlegroups.com
Attempting to answer my own question, it seems like I could create a foCustomization containing:
<?xml version='1.0'?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:import href="urn:docbkx:stylesheet"/>
  <xsl:template match="sect1">
   <fo:block break-after='page'/>
 </xsl:template>

  <xsl:template match="sect2">
   <fo:block break-after='page'/>
 </xsl:template>


</xsl:stylesheet>


However, when I do this, the plugin says:
Error on line 23 column 34 of file:[PATH TO FILE]/maven/fo-customization.xslt:
  Error reported by XML parser: The prefix "fo" for element "fo:block" is not bound.


Do I need to escape it?  I arrived at this potential solution via: http://sagehill.net/docbookxsl/PageBreaking.html and it seems like it should work for my needs, except the error above.

-Grant

Grant Ingersoll

unread,
Mar 2, 2009, 6:38:02 PM3/2/09
to Grant Ingersoll, docbkx-to...@googlegroups.com
And, to further answer my question, escaping the <fo:block seems to work, now just need to fine tune it.

Grant Ingersoll

unread,
Mar 2, 2009, 7:03:34 PM3/2/09
to Grant Ingersoll, docbkx-to...@googlegroups.com
Alas, though, it still doesn't produce what I want.  

Ultimately, I want a docbook file that I can do the following:
1. Easily produce an outline of a training course - This really just means the titles of all the sections, as generated by the TOC part of the stylesheets
2. Easily produce a slide deck from class.  (Ideally, Powerpoint, but PDF is good enough).  In my case, the content of a sect1 or sect2 represents a single slide.  See [1] below.
3. Easily produce a manual (slides + notes)
4. HTML for online viewing
5. PDF for distribution


[1] For sect1 and sect2, some sect1 will have content in a <para> tag, so I may have:
<sect1>
<title>Title</title>
<para>
<itemizedList>...</itemizedList>
</para>
<sect2>
  <title>Sect 2 Title</title>
  <para>
<itemizedList>...</itemizedList>
</para>
</sect2>
</sect1>

Does this seem doable?

Grant Ingersoll

unread,
Mar 11, 2009, 3:58:40 PM3/11/09
to docbkx-to...@googlegroups.com
OK, just to follow up with how I solved this:

On Mar 2, 2009, at 7:03 PM, Grant Ingersoll wrote:

> Alas, though, it still doesn't produce what I want.
>
> Ultimately, I want a docbook file that I can do the following:
> 1. Easily produce an outline of a training course - This really just
> means the titles of all the sections, as generated by the TOC part
> of the stylesheets

This is easy using traditional <book> sections, etc. and then I have
an XSLT that just outputs the TOC. Easy-peasy.

> 2. Easily produce a slide deck from class. (Ideally, Powerpoint,
> but PDF is good enough). In my case, the content of a sect1 or
> sect2 represents a single slide. See [1] below.

OK, this was a bit trickier, esp. when it came to PDF generation. I
did as in [1] below, but I had to add in hard page break processing
instructions and handle them in my fo-customization. See http://www.sagehill.net/docbookxsl/PageBreaking.html#HardPageBreaks

This works great, and I can now make a "slide" anywhere I want while
still maintaining the hierarchy, etc..


> 3. Easily produce a manual (slides + notes)

This is handled through a fo-customization

> 4. HTML for online viewing

This is handled through a html-customization

> 5. PDF for distribution

See #2 & #3

>
>
> [1] For sect1 and sect2, some sect1 will have content in a <para>
> tag, so I may have:
> <sect1>
> <title>Title</title>
> <para>
> <itemizedList>...</itemizedList>
> </para>
> <sect2>
> <title>Sect 2 Title</title>
> <para>
> <itemizedList>...</itemizedList>
> </para>
> </sect2>
> </sect1>
>

I'm now pretty darn happy with it all. I'd still love to be able to
output PPT, but I can live w/ PDF.

I think the added benefit of all this is I also have the flexibility
to output more in depth manuals, too, all from the same source.

Cheers,
Grant

Mimil Mimil

unread,
Mar 11, 2009, 5:08:56 PM3/11/09
to docbkx-to...@googlegroups.com
Hello,

Did you have a look at http://open.comsultia.com/docbook2odf/ stylesheets? I never (yet) found the time to test them and why not include them in our tool.
Is OpenOffice an acceptable output for you?

Cedric,

Grant Ingersoll

unread,
Mar 11, 2009, 5:47:24 PM3/11/09
to docbkx-to...@googlegroups.com
On Mar 11, 2009, at 5:08 PM, Mimil Mimil wrote:

Hello,

Did you have a look at http://open.comsultia.com/docbook2odf/ stylesheets? I never (yet) found the time to test them and why not include them in our tool.
Is OpenOffice an acceptable output for you?

I did, recently, come across that and it would be cool to support in the tool.  It even looks like it is maintained, which is seems to be a feat in and of itself in DB land these days (most websites appear to be circa 2005).

Having generic ways of plugging in any XSLT of this nature would be a great addition to the tool.  The tool is pretty much a black box to me at this point, but if someone can point at how to go about this, then maybe someone will pick it up and contribute it.

-Grant

Mimil Mimil

unread,
Mar 18, 2009, 5:16:05 PM3/18/09
to docbkx-to...@googlegroups.com
Hello,

The plugin is working very well, we just need to refactor a little the way we depends on XSL stylesheets, I think it will be done in further releases because it is the last thing that need to be done in my point of view.
As for now I don't know how to do it well but thank you for your support, I hope the light will come =)
Follow the mailing and do not hesitate to ask questions.

Regards,
Cédric,
Reply all
Reply to author
Forward
0 new messages