Package org.fa.tei.xslt
Class XslTransformer
- java.lang.Object
-
- org.fa.tei.xslt.XslTransformer
-
@NotThreadSafe public class XslTransformer extends Object
-
-
Constructor Summary
Constructors Constructor Description XslTransformer(File stylesheet)XslTransformer(InputStream stylesheet)XslTransformer(Reader stylesheet)XslTransformer(String stylesheet)stylesheet is assumed to be a resource URIXslTransformer(String stylesheet, Reader sheet)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(String key, String value)static booleanclear(String id)clear Templates for id from cachevoidclearParameters()static Transformerget(String id)returns Transformer from cached Templates or null<W extends Writer>
WstreamTransform(Reader source, W result)Stringtransform(String source)
-
-
-
Constructor Detail
-
XslTransformer
public XslTransformer(File stylesheet) throws TransformerConfigurationException, FileNotFoundException
-
XslTransformer
public XslTransformer(InputStream stylesheet) throws TransformerConfigurationException
-
XslTransformer
public XslTransformer(Reader stylesheet) throws TransformerConfigurationException
-
XslTransformer
public XslTransformer(String stylesheet) throws TransformerConfigurationException
stylesheet is assumed to be a resource URI- Parameters:
stylesheet-- Throws:
TransformerConfigurationException
-
XslTransformer
public XslTransformer(String stylesheet, Reader sheet) throws TransformerConfigurationException
-
-
Method Detail
-
get
public static Transformer get(String id) throws TransformerConfigurationException
returns Transformer from cached Templates or null- Parameters:
id-- Returns:
- Throws:
TransformerConfigurationException
-
clear
public static boolean clear(String id)
clear Templates for id from cache- Parameters:
id-- Returns:
- true when id was found and removed
-
transform
public String transform(String source) throws TransformerException
- Throws:
TransformerException
-
streamTransform
public <W extends Writer> W streamTransform(Reader source, W result) throws TransformerException
- Throws:
TransformerException
-
clearParameters
public void clearParameters()
-
-