Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.caucho.transform
Interface Transformer

All Known Subinterfaces:
  NodeTransformer, SAXTransformer, StreamTransformer, StringTransformer

All Known Implementing Classes:
  TransformerImpl

public interface Transformer

Transforms the input to an output. Instances of Transformer specify the output type.

- StreamTransformer transforms to a stream
- NodeTransformer transforms to a node
- StringTransformer transforms to a string
- SAXTransformer transforms to a SAX hander

`

     Stylesheet style;

     StreamTransformer transformer = style.newStreamTransformer();

     WriteStream os = Vfs.openWrite("test.html");
     transformer.transform("test.xml", os);
     os.close();

`

Since:
  Resin 1.2

Method Summary
`void` | `addFunction(java.lang.String name, XPathFun fun)` Adds a new XPath function for the stylesheet.
`boolean` | `getFeature(java.lang.String name)` Returns true if the Transformer implements the feature.
`java.lang.Object` | `getParameter(java.lang.String name)` Gets a transformer parameter.
`java.lang.Object` | `getProperty(java.lang.String name)` Gets a transformer/stylesheet property.
`void` | `setFeature(java.lang.String name, boolean value)` Sets a transformer feature.
`void` | `setParameter(java.lang.String name, java.lang.Object value)` Sets a transformer parameter.
`void` | `setProperty(java.lang.String name, java.lang.Object value)` Sets a transformer/stylesheet property.

Method Detail

### getFeature

    public boolean getFeature(java.lang.String name)

  Returns true if the Transformer implements the feature.
  Parameters:
    `name` - name of the feature

### setFeature

    public void setFeature(java.lang.String name,
                           boolean value)

  Sets a transformer feature.
  Parameters:
    `name` - name of the feature
    `value` - enable or disable the feature

### getProperty

    public java.lang.Object getProperty(java.lang.String name)

  Gets a transformer/stylesheet property.
  Parameters:
    `name` - name of the property

### setProperty

    public void setProperty(java.lang.String name,
                            java.lang.Object value)

  Sets a transformer/stylesheet property.
  Parameters:
    `name` - name of the property
    `value` - value of the property

### getParameter

    public java.lang.Object getParameter(java.lang.String name)

  Gets a transformer parameter. Parameters are used to set global `xsl:param` values.
  Parameters:
    `name` - name of the parameter
  Returns:
    value of the parameter

### setParameter

    public void setParameter(java.lang.String name,
                             java.lang.Object value)

  Sets a transformer parameter. Parameters are used to set global `xsl:param` values.

  XTP and XSL-filter uses setParameter to set query parameters for the stylesheet.

  Parameters:
    `name` - name of the parameter
    `value` - value of the parameter

### addFunction

    public void addFunction(java.lang.String name,
                            XPathFun fun)

  Adds a new XPath function for the stylesheet.
  Parameters:
    `name` - name of the function
    `fun` - XPathFun for the function

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD