Hi,
I'm trying to use customize title pages by using the generate-template goal and then using the resulting xsl file in my generate-pdf goal. My plugin configuration looks like this:
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>2.0.15</version>
<dependencies>
<dependency>
<groupId>net.sf.docbook</groupId>
<artifactId>docbook-xml</artifactId>
<version>5.0-all</version>
<classifier>resources</classifier>
<type>zip</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<executions>
<execution>
<id>Generate Docbook title template</id>
<goals>
<goal>generate-template</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sourceDirectory>${basedir}/src/docbkx/titlepage/</sourceDirectory>
<includes>rws.titlepage.templates.xml</includes>
</configuration>
</execution>
<execution>
<goals>
<goal>generate-pdf</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<sectionAutolabel>true</sectionAutolabel>
<sectionLabelIncludesComponentLabel>true</sectionLabelIncludesComponentLabel>
<formalTitlePlacement>figure after
example after
equation after
table after
procedure after
task after
</formalTitlePlacement>
<foCustomization>src/docbkx/titlepage/rws-titlepage.xsl</foCustomization>
</configuration>
</execution>
</executions>
</plugin>
The file docbkx/titlepage/rws.titlepage.templates.xml is a copy of the file docbook/fo/titlepage.templates.xml from docbook-xsl-1.78.1-ns-resources.zip. The contents of src/docbkx/titlepage/rws-titlepage.xsl is as follows:
<?xml version='1.0'?>
exclude-result-prefixes="doc t param exsl"
version='1.0'>
<xsl:import href="../../../target/docbkx/template/rws.titlepage.templates.xsl"/>
</xsl:stylesheet>
Now when I run mvn generate-sources, the file target/docbkx/template/rws.titlepage.templates.xsl will be generated. If I then run mvn generate-resources, I will see the following error:
[INFO] Processing input file: hwn-geo-lokatie-app-IDD.xml
Error at fo:block on line 88 of file:/var/home/bruininkj/svn/nl.rws.hwn/applicaties/hwn-geo-lokatie-app/trunk/target/docbkx/template/rws.titlepage.templates.xsl:
Variable title.fontset has not been declared
Error at fo:block on line 136 of file:/var/home/bruininkj/svn/nl.rws.hwn/applicaties/hwn-geo-lokatie-app/trunk/target/docbkx/template/rws.titlepage.templates.xsl:
No attribute-set exists named article.titlepage.recto.style
Error at xsl:call-template on line 137 of file:/var/home/bruininkj/svn/nl.rws.hwn/applicaties/hwn-geo-lokatie-app/trunk/target/docbkx/template/rws.titlepage.templates.xsl:
No template exists named component.title
Error at fo:block on line 144 of file:/var/home/bruininkj/svn/nl.rws.hwn/applicaties/hwn-geo-lokatie-app/trunk/target/docbkx/template/rws.titlepage.templates.xsl:
No attribute-set exists named article.titlepage.recto.style
The list goes on, but you get the idea.
Can someone tell me what I'm doing wrong here?