dbXML API

## com.dbxml.db.client.xmldb
Class XSLTransformServiceImpl

    java.lang.Object
      com.dbxml.db.client.xmldb.QueryServiceImpl
          com.dbxml.db.client.xmldb.XSLTransformServiceImpl

All Implemented Interfaces:
  org.xmldb.api.base.Configurable, org.xmldb.api.base.Service, XSLTransformService

public final class XSLTransformServiceImpl
extends QueryServiceImpl
implements XSLTransformService

XSLTransformServiceImpl

Constructor Summary
`XSLTransformServiceImpl(CollectionImpl col)`

Method Summary
`void` `clearParameters()` Removes or un-binds *all* bound paramters.
`java.lang.String` `getName()`
`java.lang.String` `getParameter(java.lang.String name)` Retrieves the value of a bound parameter, or null if the parameter has not already been bound.
`java.lang.String` `getVersion()`
`void` `removeParameter(java.lang.String name)` Removes or un-binds a bound parameter.
`void` `setParameter(java.lang.String name, java.lang.String value)` Sets a bound parameter.
`void` `setTemplates(org.xmldb.api.modules.XMLResource templates)` Sets the templates that will be used to transform this document.
`org.xmldb.api.base.Resource` `transform(java.lang.String xpath)` Uses the defined templates to trasform the results of the XPath query against the `Collection`.
`org.xmldb.api.base.Resource` `transformResource(java.lang.String id)` Uses the defined templates to transform the XML resource stored in the `Collection` associated with this service.

Methods inherited from class com.dbxml.db.client.xmldb.QueryServiceImpl
`clearNamespaces, getNamespace, getProperty, removeNamespace, setCollection, setNamespace, setProperty`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.dbxml.db.client.xmldb.XSLTransformService
`clearNamespaces, getNamespace, removeNamespace, setNamespace`

Methods inherited from interface org.xmldb.api.base.Service
`setCollection`

Methods inherited from interface org.xmldb.api.base.Configurable
`getProperty, setProperty`

Constructor Detail

### XSLTransformServiceImpl

    public XSLTransformServiceImpl(CollectionImpl col)

Method Detail

### getName

    public java.lang.String getName()
                             throws org.xmldb.api.base.XMLDBException

  Specified by:
    `getName` in interface `org.xmldb.api.base.Service`
  Throws:
    `org.xmldb.api.base.XMLDBException`

### getVersion

    public java.lang.String getVersion()
                                throws org.xmldb.api.base.XMLDBException

  Specified by:
    `getVersion` in interface `org.xmldb.api.base.Service`
  Throws:
    `org.xmldb.api.base.XMLDBException`

### setTemplates

    public void setTemplates(org.xmldb.api.modules.XMLResource templates)
                      throws org.xmldb.api.base.XMLDBException

  Description copied from interface: `XSLTransformService`
  Sets the templates that will be used to transform this document. The templates are retrieved from the XSL stylesheet document that the templates XMLResource represents.

  Specified by:
    `setTemplates` in interface `XSLTransformService`
  Parameters:
    `templates` - The XSL stylesheet that will be used for the transformation.
  Throws:
    `org.xmldb.api.base.XMLDBException` - with expected error codes.
    `ErrorCodes.VENDOR_ERROR` for any vendor specific errors that occur.

### setParameter

    public void setParameter(java.lang.String name,
                             java.lang.String value)
                      throws org.xmldb.api.base.XMLDBException

  Description copied from interface: `XSLTransformService`
  Sets a bound parameter. The value of this parameter will be passed into the XSL processor and bound to the variable name for processing. XSL parameters are declared with the param element.

  Specified by:
    `setParameter` in interface `XSLTransformService`
  Parameters:
    `name` - The bound parameter name
    `value` - The bound parameter value
  Throws:
    `org.xmldb.api.base.XMLDBException` - with expected error codes.
    `ErrorCodes.VENDOR_ERROR` for any vendor specific errors that occur.

### getParameter

    public java.lang.String getParameter(java.lang.String name)
                                  throws org.xmldb.api.base.XMLDBException

  Description copied from interface: `XSLTransformService`
  Retrieves the value of a bound parameter, or null if the parameter has not already been bound.

  Specified by:
    `getParameter` in interface `XSLTransformService`
  Parameters:
    `name` - The bound parameter value to retrieve
  Throws:
    `org.xmldb.api.base.XMLDBException` - with expected error codes.
    `ErrorCodes.VENDOR_ERROR` for any vendor specific errors that occur.

### removeParameter

    public void removeParameter(java.lang.String name)
                         throws org.xmldb.api.base.XMLDBException

  Description copied from interface: `XSLTransformService`
  Removes or un-binds a bound parameter.

  Specified by:
    `removeParameter` in interface `XSLTransformService`
  Parameters:
    `name` - The bound paramter name to remove.
  Throws:
    `org.xmldb.api.base.XMLDBException` - with expected error codes.
    `ErrorCodes.VENDOR_ERROR` for any vendor specific errors that occur.

### clearParameters

    public void clearParameters()
                         throws org.xmldb.api.base.XMLDBException

  Description copied from interface: `XSLTransformService`
  Removes or un-binds *all* bound paramters.

  Specified by:
    `clearParameters` in interface `XSLTransformService`
  Throws:
    `org.xmldb.api.base.XMLDBException` - with expected error codes.
    `ErrorCodes.VENDOR_ERROR` for any vendor specific errors that occur.

### transform

    public org.xmldb.api.base.Resource transform(java.lang.String xpath)
                                          throws org.xmldb.api.base.XMLDBException

  Description copied from interface: `XSLTransformService`
  Uses the defined templates to trasform the results of the XPath query against the `Collection`. The XPath will be applied to all XML resources stored in the `Collection`. The result is a `ResourceSet` containing the results of the query. Any namespaces used in the `query` string will be evaluated using the mappings setup using `setNamespace`.

  Specified by:
    `transform` in interface `XSLTransformService`
  Returns:
    A `ResourceSet` containing the results of the query.
  Throws:
    `org.xmldb.api.base.XMLDBException` - with expected error codes.
    `ErrorCodes.VENDOR_ERROR` for any vendor specific errors that occur.

### transformResource

    public org.xmldb.api.base.Resource transformResource(java.lang.String id)
                                                  throws org.xmldb.api.base.XMLDBException

  Description copied from interface: `XSLTransformService`
  Uses the defined templates to transform the XML resource stored in the `Collection` associated with this service. The result is a `ResourceSet` containing the results of the query. Any namespaces used in the `query` string will be evaluated using the mappings setup using `setNamespace`.

  Specified by:
    `transformResource` in interface `XSLTransformService`
  Parameters:
    `id` - The id of the document to run the query against.
  Returns:
    A `ResourceSet` containing the results of the query.
  Throws:
    `org.xmldb.api.base.XMLDBException` - with expected error codes.
    `ErrorCodes.VENDOR_ERROR` for any vendor specific errors that occur.

dbXML API

Copyright (c) 2004 The dbXML Group