Problems getting Maven docbkx plugin to work
I have been experimenting with generating DocBook output using Maven
running within Eclipse. I found the Maven plugin called docbkx, and it
almost gets me there.
In the DocBook world, the way that you change some of the default behavior
of the XSL transformations is by defining your own XSL file as a
"customization layer." This file imports the standard XSL file and then
any templates, etc. that you want to change are put in this file. Thereby,
they are parsed after the standard templates, and your altered version is
what is used.
To make this happen using the docbkx plugin, you have to tell it that you
are using a custom XSL file in the configuration, with lines like
<foCustomization>src/docbkx/xsl/custom_print.xsl</foCustomization>
Then, in the custom XSL file, instead of needing to specify the location
of the standard XSL file in the import statement at the top, you put in a
symbolic path that the plug-in resolves:
<xsl:import href="urn:docbkx:stylesheet"/>
This all works very well. But I have been banging my head against the wall
trying to understand how the plugin can be told to look for other things
you might want to import. Two examples:
my customization layers import not just the regular stylesheet, but also a
custom titlepages XSL file I generated by the usual process.
I have a template to write a chunk of additional code into the HTML
output's head element. Specifically, it's the code to hook up to
Google Analytics. The code is in an external file.
In both cases the files being imported are sitting in the same directory
as the customization layer, but best as I can tell the plugin can't find
them. I don't know how to get the plugin to include these as it does its
work.
Any ideas?
Thanks, Alan
No comments:
Post a Comment