xhtml generation

4 views
Skip to first unread message

andreas

unread,
Mar 20, 2009, 3:20:04 PM3/20/09
to Docbkx Tools Users
Hi,

How can I generate xhtml instead of html? Or how can I override the
"type" that's used to pick the stylesheet?

Thanks,
Andreas

Wilfred Springer

unread,
Mar 20, 2009, 8:32:09 PM3/20/09
to docbkx-to...@googlegroups.com
Hi Andreas,

The docbkx-maven-plugin has a specific goal for each targeted output
type. Unfortunately, xhtml is not among it yet. However, getting a
Maven plugin supporting docbkx:generate-xhtml is easy. You just have
add a few lines to the pom.xml file of the docbkx-maven-plugin module:

<execution>
<id>generate-xhtml</id>
<goals>
<goal>build</goal>
</goals>
<configuration>
<type>xhtml</type>

<superClassName>com.agilejava.docbkx.maven.AbstractHtmlMojo</
superClassName>
<excludedProperties>$
{excluded.properties},root.filename,base.dir</excludedProperties>
</configuration>
</execution>

I just gave it a try, and it seems to work just fine. There is no
reason why this should not be included in a next release. It would be
good if you would open up an issue for it though. ;-)

xhtml.patch

andreas

unread,
Mar 23, 2009, 9:19:08 AM3/23/09
to Docbkx Tools Users
Hi Wilfred,

Thanks for the fast response and the fancy plugin generation
mechanism.

The xhtml generation works fine except for chunked output which
generates
plain html again. I'll take a look myself, but you can probably
explain this
behavior.

Thanks again,
Andreas

On Mar 20, 8:32 pm, Wilfred Springer <wilfredsprin...@gmail.com>
wrote:
> xhtml.patch
> < 1KViewDownload

andreas

unread,
Mar 23, 2009, 9:28:38 AM3/23/09
to Docbkx Tools Users
OK, this was easy to fix. To enable xhtml chunking, the
getNonDefaultStylesheetLocation method in AbstractHtmlMojo needs to
take the type into account:

protected String getNonDefaultStylesheetLocation() {
if (chunkedOutput) {
return "META-INF/docbkx/" + getType() + "/chunk.xsl";
} else {
return null;
}
}

Andreas

Mimil

unread,
May 2, 2009, 4:37:40 AM5/2/09
to Docbkx Tools Users
Hello,

Thank you for the support, I have committed the modification, the
generate-xhtml goal will be available in next docbkx-tools release.
(http://code.google.com/p/docbkx-tools/issues/detail?id=30)

Regards,
Cédric

andreas

unread,
May 4, 2009, 9:34:24 PM5/4/09
to Docbkx Tools Users
Thanks a lot!

Andreas
Reply all
Reply to author
Forward
0 new messages