Use generated titlepage xsl to generea

16 views
Skip to first unread message

Jeroen Bruinink

unread,
Sep 18, 2014, 8:44:31 AM9/18/14
to docbkx-to...@googlegroups.com
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'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
                xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                xmlns:exsl="http://exslt.org/common"
                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?

Reply all
Reply to author
Forward
0 new messages