I am using the maven docbook plugin (com.agilejava.docbkx), and I am using a custom xsl file to override some properties, and it looks like:
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:attribute-set name="section.title.properties">
<xsl:attribute name="font-family">Times</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
And I when I run the maven plugin, I get the following error
Embedded error: org.xml.sax.SAXParseException: Content is not allowed in prolog.
I’m running on windows and I have tried creating the file in Notepad, Notepad++, Eclipse and Cygwin all with the error. Does anyone know why?
Once I imported the main docbook stylesheet:
Everything worked fine.
urn:docbkx:stylesheetcan be considered as a symbolic link. Whaturn:docbkx:stylesheetactually will import depends on what customization (html, xhtml, etc.) you specify in yourpom.xml. If you want to usexhtml/chunk.xslcustomization then first specify the configuration<xhtmlCustomization>in thepom.xml. Then specify it in your XSL by,In this case, the plugin will pick up the
chunk.xslsheet of xhtml stylesheets. Further details, and the complete configurations needed are explained in the How to Use docbkx-tools as Maven DocBook plugin blog post.