------ Custom XSLT ------ Steve Ebersole ------ 2 July 2007 ------ ~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved. ~~ ~~ This copyrighted material is made available to anyone wishing to use, modify, ~~ copy, or redistribute it subject to the terms and conditions of the GNU ~~ Lesser General Public License, v. 2.1. This program is distributed in the ~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied ~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~~ Lesser General Public License for more details. You should have received a ~~ copy of the GNU Lesser General Public License, v.2.1 along with this ~~ distribution; if not, write to the Free Software Foundation, Inc., ~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ~~ ~~ Red Hat Author(s): Steve Ebersole Custom XSLT The {{{../usage.html}usage}} page describes the formats understood by the . Each of those formats map to a format understood by DocBook itself, in terms of its provided XSLT. Thus, by default each format is processed by the standard DocBook XSLT for the specified format. It is possible for a user to redefine how transformations occur for a given format by specifying that a custom XSLT be used instead of the standard DocBook XSLT for that particular format in the configuration. There are two main ways to define the custom xslt that should be used... * file: URL The first approach is to specify a style URL. This URL could point to any valid file. For example, referring to a project-local file for XSLT processing might look like: +----+ ... ... ... file:${basedir}/src/custom/xslt/mycustom.xsl +----+ * classpath: URL The second approach is to specify a URL. These will be resolved against the current classpath when the plugin executes. Typically, these resources would come from a dependency (see {{{../docbook-support.html}}} for example). Referring to a classpath resource for XSLT processing might look like: +----+ ... ... ... classpath:/myproject/mycustom.xsl +----+ * jdocbook-style classpath: URL See {{{../style.html}here}} for background discussion. As a specific example of using an XSLT defined in a package, consider the following jdocbook-style package distributed by the venerable Acme Corporation: +----+ acmeskin.docbook-support/ xslt/ com/ acme/ fo.xsl +----+ Using that would be as simple as: +----+ org.jboss.maven.plugins maven-jdocbook-plugin true com.acme acmeskin jdocbook-style pdf classpath:/xslt/com/acme/fo.xsl +----+