org.sixdml.transform
Interface SixdmlTransformService

All Superinterfaces:
Configurable, Service
All Known Implementing Classes:
xlnXsltTransformService

public interface SixdmlTransformService
extends Service

 SixdmlTransformService.java
 
 This is a Service that enables the execution of transformations within the context of a 
 Collection, against the documents stored in the Collection or XML nodes.

 Created: Fri Jan 11 11:55:20 2002
 

Version:
1.0
Author:
Dare Obasanjo

Field Summary
static org.sixdml.transform.SixdmlTransformType XPATH2
          Represents a service that uses XPath 2.0 to perform transforms.
static org.sixdml.transform.SixdmlTransformType XQUERY
          Represents a service that uses XQuery to perform transforms.
static org.sixdml.transform.SixdmlTransformType XSLT
          Represents a service that uses XSLT to perform transforms.
 
Method Summary
 org.sixdml.transform.SixdmlTransformType getType()
          Get the type of this object as a SixdmlTransformType.
 String transformAndReturnString(String transformCode, org.sixdml.SixdmlResource resource)
          Transforms a SixdmlResource from one XML document to another and returns the results in a string.
 String transformAndReturnString(String transformCode, String sourceXML)
          Transforms a string representation of a wellformed XML document to another and returns the results in a string.
 String transformAndReturnString(URL source, org.sixdml.SixdmlResource resource)
          Transforms a SixdmlResource from one XML document to another and returns the results in a string.
 String transformAndReturnString(URL source, String sourceXML)
          Transforms a SixdmlResource from one XML document to another and returns the results in a string.
 
Methods inherited from interface org.xmldb.api.base.Service
getName, getVersion, setCollection
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Field Detail

XSLT

public static final org.sixdml.transform.SixdmlTransformType XSLT
Represents a service that uses XSLT to perform transforms.


XPATH2

public static final org.sixdml.transform.SixdmlTransformType XPATH2
Represents a service that uses XPath 2.0 to perform transforms.


XQUERY

public static final org.sixdml.transform.SixdmlTransformType XQUERY
Represents a service that uses XQuery to perform transforms.

Method Detail

getType

public org.sixdml.transform.SixdmlTransformType getType()
Get the type of this object as a SixdmlTransformType.

Returns:
the type of this object.

transformAndReturnString

public String transformAndReturnString(URL source,
                                       org.sixdml.SixdmlResource resource)
                                throws IOException,
                                       InvalidTransformException
Transforms a SixdmlResource from one XML document to another and returns the results in a string.

Parameters:
source - the URL to the location of the file containing the transform.
resource - the resource to transform
Returns:
the results of the transform in a string.
Throws:
IOException - if an error occurs while trying to retrieve the file.
InvalidTransformException - if the transform specified is an invalid or non-well formed query or document.

transformAndReturnString

public String transformAndReturnString(String transformCode,
                                       org.sixdml.SixdmlResource resource)
                                throws InvalidTransformException
Transforms a SixdmlResource from one XML document to another and returns the results in a string.

Parameters:
transformCode - the actual code for the stylesheet or query.
resource - the resource to transform
Returns:
the results of the transform in a string.
Throws:
InvalidTransformException - if the transform specified is an invalid or non-well formed query or document.

transformAndReturnString

public String transformAndReturnString(String transformCode,
                                       String sourceXML)
                                throws InvalidTransformException,
                                       NonWellFormedXMLException
Transforms a string representation of a wellformed XML document to another and returns the results in a string.

Parameters:
transformCode - the actual code for the stylesheet or query.
sourceXML - the XML to transform
Returns:
the results of the transform in a string.
Throws:
InvalidTransformException - if the transform specified is an invalid or non-well formed query or document.
NonWellFormedXMLException - if the data to transform is not a wellformed XML document.

transformAndReturnString

public String transformAndReturnString(URL source,
                                       String sourceXML)
                                throws IOException,
                                       InvalidTransformException,
                                       NonWellFormedXMLException
Transforms a SixdmlResource from one XML document to another and returns the results in a string.

Parameters:
source - the URL to the location of the file containing the transform.
sourceXML - the XML to transform
Returns:
the results of the transform in a string.
Throws:
IOException - if an error occurs while trying to retrieve the file.
InvalidTransformException - if the transform specified is an invalid or non-well formed query or document.
NonWellFormedXMLException - if the data to transform is not a wellformed XML document.