org.jboss.shrinkwrap.descriptor.metadata.xslt
Class XsltTransformer

java.lang.Object
  extended by org.jboss.shrinkwrap.descriptor.metadata.xslt.XsltTransformer

public class XsltTransformer
extends Object

Executes a xslt transformation process.

Author:
Ralf Battenfeld

Constructor Summary
XsltTransformer()
           
 
Method Summary
static void simpleTransform(String contextFile, InputStream xsltSource, File result, Map<String,String> parameters)
          Simple transformation method.
static void simpleTransform(String sourcePath, StreamSource xsltSource, String resultDir, Map<String,String> parameters)
          Simple transformation method.
static void simpleTransform(String sourcePath, String xsltPath, String resultDir, Map<String,String> parameters)
          Simple transformation method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XsltTransformer

public XsltTransformer()
Method Detail

simpleTransform

public static void simpleTransform(String sourcePath,
                                   String xsltPath,
                                   String resultDir,
                                   Map<String,String> parameters)
                            throws TransformerException
Simple transformation method.

Parameters:
sourcePath - - Absolute path to source xml file.
xsltPath - - Absolute path to xslt file.
resultDir - - Directory where you want to put resulting files.
parameters - - Map defining global XSLT parameters based via tranformer to the XSLT file.
Throws:
TransformerException

simpleTransform

public static void simpleTransform(String sourcePath,
                                   StreamSource xsltSource,
                                   String resultDir,
                                   Map<String,String> parameters)
                            throws TransformerException
Simple transformation method.

Parameters:
sourcePath - - Absolute path to source xml file.
StreamSource - - the xslt file.
resultDir - - Directory where you want to put resulting files.
parameters - - Map defining global XSLT parameters based via tranformer to the XSLT file.
Throws:
TransformerException

simpleTransform

public static void simpleTransform(String contextFile,
                                   InputStream xsltSource,
                                   File result,
                                   Map<String,String> parameters)
                            throws TransformerException
Simple transformation method.

Parameters:
contextFile - - Absolute path to source xml file.
StreamSource - - the xslt file.
resultDir - - Directory where you want to put resulting files.
parameters - - Map defining global XSLT parameters based via transformer to the XSLT file.
Throws:
TransformerException


Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.