public final class XsltUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
transform(Node xsltNode,
Node inputNode,
Writer output)
Runs an XSLT transformation writing the results out to a character stream.
|
static void |
transform(Node xsltNode,
Node inputNode,
Writer output,
Map<String,String> parameters)
Runs an XSLT transformation writing the results out to a character stream.
|
static void |
transform(Node xsltNode,
Node inputNode,
Writer output,
Map<String,String> parameters,
URIResolver uriResolver)
Runs an XSLT transformation writing the results out to a character stream.
|
static void |
transform(Source xsltSource,
Source inputSource,
Result outputResult,
Map<String,String> parameters,
URIResolver uriResolver)
Runs XSLT transformation that takes in XSLT Source and Result objects as
parameters.
|
static Document |
transformToDom(Node xsltNode,
Node inputNode)
Runs an XSLT transformation returning the result as a DOM document.
|
static Document |
transformToDom(Node xsltNode,
Node inputNode,
Map<String,String> parameters)
Runs an XSLT transformation returning the result as a DOM document.
|
static Document |
transformToDom(Node xsltNode,
Node inputNode,
Map<String,String> parameters,
URIResolver uriResolver)
Runs an XSLT transformation returning the result as a DOM document.
|
static String |
transformToString(Node xsltNode,
Node inputNode)
Runs an XSLT transformation returning the result as a DOM document.
|
static String |
transformToString(Node xsltNode,
Node inputNode,
Map<String,String> parameters)
Runs an XSLT transformation returning the result as a DOM document.
|
static String |
transformToString(Node xsltNode,
Node inputNode,
Map<String,String> parameters,
URIResolver uriResolver)
Runs an XSLT transformation returning the result as a DOM document.
|
public static Document transformToDom(Node xsltNode, Node inputNode) throws TransformerException
javax.xml.transform.Transformer#transform(Source, Result).xsltNode - DOM node representing the XSLT stylesheet. Cannot be null.inputNode - DOM node containing the input XML to be transformed. Cannot be
null.TransformerException - Thrown when there are errors running the XSLT transformation.public static Document transformToDom(Node xsltNode, Node inputNode, Map<String,String> parameters) throws TransformerException
javax.xml.transform.Transformer#transform(Source, Result).xsltNode - DOM node representing the XSLT stylesheet. Cannot be null.inputNode - DOM node containing the input XML to be transformed. Cannot be
null.parameters - Map of parameter names to values to be passed to the XSLT
stylesheet.TransformerException - Thrown when there are errors running the XSLT transformation.public static Document transformToDom(Node xsltNode, Node inputNode, Map<String,String> parameters, URIResolver uriResolver) throws TransformerException
javax.xml.transform.Transformer#transform(Source, Result).xsltNode - DOM node representing the XSLT stylesheet. Cannot be null.inputNode - DOM node containing the input XML to be transformed. Cannot be
null.parameters - Map of parameter names to values to be passed to the XSLT
stylesheet.uriResolver - Resolves imports, include and other references in the XSLT
stylesheet.TransformerException - Thrown when there are errors running the XSLT transformation.public static String transformToString(Node xsltNode, Node inputNode) throws TransformerException
javax.xml.transform.Transformer#transform(Source, Result).xsltNode - DOM node representing the XSLT stylesheet. Cannot be null.inputNode - DOM node containing the input XML to be transformed. Cannot be
null.TransformerException - Thrown when there are errors running the XSLT transformation.public static String transformToString(Node xsltNode, Node inputNode, Map<String,String> parameters) throws TransformerException
javax.xml.transform.Transformer#transform(Source, Result).xsltNode - DOM node representing the XSLT stylesheet. Cannot be null.inputNode - DOM node containing the input XML to be transformed. Cannot be
null.parameters - Map of parameter names to values to be passed to the XSLT
stylesheet.TransformerException - Thrown when there are errors running the XSLT transformation.public static String transformToString(Node xsltNode, Node inputNode, Map<String,String> parameters, URIResolver uriResolver) throws TransformerException
javax.xml.transform.Transformer#transform(Source, Result).xsltNode - DOM node representing the XSLT stylesheet. Cannot be null.inputNode - DOM node containing the input XML to be transformed. Cannot be
null.parameters - Map of parameter names to values to be passed to the XSLT
stylesheet.uriResolver - Resolves imports, include and other references in the XSLT
stylesheet.TransformerException - Thrown when there are errors running the XSLT transformation.public static void transform(Node xsltNode, Node inputNode, Writer output) throws TransformerException, IOException
javax.xml.transform.Transformer#transform(Source, Result).xsltNode - DOM node representing the XSLT stylesheet. Cannot be null.inputNode - DOM node containing the input XML to be transformed. Cannot be
null.output - Character stream to write to. Cannot be null.TransformerException - Thrown when there are errors running the XSLT transformation.IOException - Thrown when there are errors writing to the output character
stream.public static void transform(Node xsltNode, Node inputNode, Writer output, Map<String,String> parameters) throws TransformerException, IOException
javax.xml.transform.Transformer#transform(Source, Result).xsltNode - DOM node representing the XSLT stylesheet. Cannot be null.inputNode - DOM node containing the input XML to be transformed. Cannot be
null.output - Character stream to write to. Cannot be null.parameters - Map of parameter names to values to be passed to the XSLT
stylesheet.TransformerException - Thrown when there are errors running the XSLT transformation.IOException - Thrown when there are errors writing to the output character
stream.public static void transform(Node xsltNode, Node inputNode, Writer output, Map<String,String> parameters, URIResolver uriResolver) throws TransformerException, IOException
javax.xml.transform.Transformer#transform(Source, Result).xsltNode - DOM node representing the XSLT stylesheet. Cannot be null.inputNode - DOM node containing the input XML to be transformed. Cannot be
null.output - Character stream to write to. Cannot be null.parameters - Map of parameter names to values to be passed to the XSLT
stylesheet.uriResolver - Resolves imports, include and other references in the XSLT
stylesheet.TransformerException - Thrown when there are errors running the XSLT transformation.IOException - Thrown when there are errors writing to the output character
stream.public static void transform(Source xsltSource, Source inputSource, Result outputResult, Map<String,String> parameters, URIResolver uriResolver) throws TransformerException
javax.xml.transform.Transformer#transform(Source, Result).xsltSource - Source object containing the XSLT stylesheet. Cannot be null.inputSource - Source object containing the XML data to be transformed. Cannot be
null.outputResult - Result object to write the results of the XSLT transformation to.
Cannot be null.parameters - Map of parameter names to values to be passed to the XSLT
stylesheet.uriResolver - Resolves imports, include and other references in the XSLT
stylesheet.TransformerException - Thrown when there are errors running the XSLT transformation.Copyright © 2021. All rights reserved.