xmlBlaster 2.1.0 API

org.xmlBlaster.util
Class XslTransformer

java.lang.Object
  extended by org.xmlBlaster.util.XslTransformer

public class XslTransformer
extends java.lang.Object

Holds Transformers cached.

Author:
Michele Laghi / Marcel Ruff

Field Summary
private  Global glob
           
private  javax.xml.transform.Transformer transformer
           
 
Constructor Summary
XslTransformer(Global glob, java.lang.String xslFilename, java.lang.String systemId, javax.xml.transform.URIResolver uriResolver, java.util.Map props)
          Constructs a transformer instance.
 
Method Summary
 byte[] doXSLTransformation(byte[] xmlLiteral)
           
private static javax.xml.transform.Transformer newTransformer(java.lang.String systemId, java.lang.String xslString, javax.xml.transform.URIResolver uriResolver, java.util.Map props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

glob

private Global glob

transformer

private javax.xml.transform.Transformer transformer
Constructor Detail

XslTransformer

public XslTransformer(Global glob,
                      java.lang.String xslFilename,
                      java.lang.String systemId,
                      javax.xml.transform.URIResolver uriResolver,
                      java.util.Map props)
               throws XmlBlasterException
Constructs a transformer instance. It is stateful since it holds an own transformer, i.e. it is dedicated to a single xsl (with parameters).

Parameters:
xslFilename - The mandatory relative name of the xsl file. It is searched in the Classpath. Can not be null.
systemId - The systemId to associate to the given xsl file. You can pass null here.
uriResolver - A custom uri resolver to be used to find included xsl stylesheets. If you pass null, the default uriResolver will be used.
props - A map containing parameters (or variables) to be passed to the stylesheet. These can be used inside the stylesheet.
Throws:
XmlBlasterException - If an exception occurs when creating the transformer object.
Method Detail

newTransformer

private static javax.xml.transform.Transformer newTransformer(java.lang.String systemId,
                                                              java.lang.String xslString,
                                                              javax.xml.transform.URIResolver uriResolver,
                                                              java.util.Map props)
                                                       throws java.lang.Exception
Parameters:
systemId -
xslString -
uriResolver -
props - Map
Returns:
Throws:
java.lang.Exception

doXSLTransformation

public byte[] doXSLTransformation(byte[] xmlLiteral)
                           throws XmlBlasterException
Throws:
XmlBlasterException

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.