public class XSLTransformer extends Object
| Constructor and Description |
|---|
XSLTransformer() |
| Modifier and Type | Method and Description |
|---|---|
static Result |
getResult(String[] argv) |
static void |
main(String[] argv)
Invocation of the class from the commandline for testing/building
|
static void |
transform(File xmlDir,
File xslFile,
File resultDir,
boolean recurse,
Map<String,Object> params,
boolean considerDir)
Can be used to transform a directory of XML-files.
|
static void |
transform(File xmlFile,
File xslFile,
Result result,
Map<String,Object> params,
boolean considerDir)
Perfoms XSL Transformation on XML-file which is parsed MMBase
specificly (useing MMBasse EntityResolver and Errorhandler).
|
static void |
transform(Source xml,
File xslFile,
Result result,
Map<String,Object> params)
This is the base function which calls the actual XSL
transformations.
|
static void |
transform(Source xml,
File xslFile,
Result result,
Map<String,Object> params,
boolean considerDir)
This is the base function which calls the actual XSL
transformations.
|
static void |
transform(Source xml,
URL xslFile,
Result result,
Map<String,Object> params) |
static void |
transform(Source xml,
URL xslFile,
Result result,
Map<String,Object> params,
boolean considerDir) |
static String |
transform(String xmlPath,
String xslPath)
Transform an XML document using a certain XSL document.
|
static String |
transform(String xmlPath,
String xslPath,
boolean cutXML)
Transform an XML document using a certain XSL document, on
MMBase specic way (error handling, entitity resolving, uri
resolving, logging), and write it to string, which optionally can be
'cut'.
|
public static final String NS_AWARE
public static String transform(String xmlPath, String xslPath)
xmlPath - Path to XML filexslPath - Path to XSL filepublic static String transform(String xmlPath, String xslPath, boolean cutXML)
xmlPath - Path to XML filexslPath - Path to XSL filecutXML - if true, cuts the <?xml> line that normally starts an
xml documentpublic static void transform(Source xml, File xslFile, Result result, Map<String,Object> params) throws TransformerException
TransformerExceptionpublic static void transform(Source xml, File xslFile, Result result, Map<String,Object> params, boolean considerDir) throws TransformerException
xml - The source XMLxslFile - The XSL which must be used for the transformationresult - The XSL out will be written to thisparams - null or a Map to XSL transformations parametersconsiderDir - If true, an URIResolver will be instantiated which can resolve entities relative to the XSL file.TransformerExceptionpublic static void transform(Source xml, URL xslFile, Result result, Map<String,Object> params) throws TransformerException
TransformerExceptionpublic static void transform(Source xml, URL xslFile, Result result, Map<String,Object> params, boolean considerDir) throws TransformerException
TransformerExceptionpublic static void transform(File xmlFile, File xslFile, Result result, Map<String,Object> params, boolean considerDir) throws TransformerException, ParserConfigurationException, IOException, SAXException
TransformerExceptionParserConfigurationExceptionIOExceptionSAXExceptionpublic static void transform(File xmlDir, File xslFile, File resultDir, boolean recurse, Map<String,Object> params, boolean considerDir) throws TransformerException, ParserConfigurationException, IOException, SAXException
TransformerExceptionParserConfigurationExceptionIOExceptionSAXExceptionpublic static void main(String[] argv)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}