net.sf.xsltmp
Class ManyToOneMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.sf.xsltmp.XsltGeneratorBase
net.sf.xsltmp.FromManyBase
net.sf.xsltmp.ManyToOneMojo
- All Implemented Interfaces:
- XsltGeneratorConstants, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public class ManyToOneMojo
- extends FromManyBase
Perform XSL transformation of multiple source files into a single destination
file.
The names of the multiple source files are passed into the template as a
comma-separated list in a parameter named 'source-file-names'. In the
template, define a global template parameter as follows:
<xsl:param name="source-file-names" />. Then the content of
the files can be loaded as follows:
<xsl:variable name="source-files" select="document(tokenize($source-file-names,','))" />.
From the XSL engine point of view, it is then in fact a single, 1:1
transformation: a single source file is transformed into a single destination
file.
The content of the single source file can then be enriched in the template by
the multiple source files.
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
| Methods inherited from class net.sf.xsltmp.FromManyBase |
ensureDestFileDirExists, getResolver, getSourceFile, getSourceFiles, getSrcDir, getSrcExcludes, getSrcIncludes, logExecution, setSrcDir, setSrcExcludes, setSrcIncludes, verifySrcDirExist |
| Methods inherited from class net.sf.xsltmp.XsltGeneratorBase |
getArchiverManager, getForce, getHelper, getLogPrefix, getParameters, getProject, getTimestamp, getTransformer, getXslFile, getXslTemplate, isUpToDate, setArchiverManager, setForce, setParameters, setProject, setXslTemplate, verifyXsltFileExist |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManyToOneMojo
public ManyToOneMojo()
getSrcFile
public java.io.File getSrcFile()
setSrcFile
public void setSrcFile(java.io.File srcFile)
getDestFile
public java.io.File getDestFile()
setDestFile
public void setDestFile(java.io.File destFile)
getMojoName
protected java.lang.String getMojoName()
- Description copied from class:
XsltGeneratorBase
- Return the name of the mojo.
For logging purposes.
- Specified by:
getMojoName in class XsltGeneratorBase
- Returns:
- String
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
Copyright © 2008-2010 SEAF. All Rights Reserved.