org.sixdml.excelon
Class xlnXsltTransformService
java.lang.Object
|
+--org.sixdml.excelon.xlnServiceBase
|
+--org.sixdml.excelon.xlnXsltTransformService
- All Implemented Interfaces:
- org.xmldb.api.base.Configurable, org.xmldb.api.base.Service, org.sixdml.SixdmlConstants, org.sixdml.transform.SixdmlTransformService
- public class xlnXsltTransformService
- extends xlnServiceBase
- implements org.sixdml.transform.SixdmlTransformService, org.sixdml.SixdmlConstants
xlnXsltTransformService.java
Performs XSLT ransformations on Nodes.
Created: Tue Jan 15 17:47:34 2002
| Fields inherited from interface org.sixdml.transform.SixdmlTransformService |
XPATH2, XQUERY, XSLT |
| Fields inherited from interface org.sixdml.SixdmlConstants |
SIXDML_NS, SIXDML_VERSION |
|
Method Summary |
static java.lang.String |
getContentsOfURL(java.net.URL source)
Obtains the contents at a particular URL and returns them as a string. |
java.lang.String |
getName()
Gets the name of the service. |
org.sixdml.transform.SixdmlTransformType |
getType()
Get the type of this object as a SixdmlTransformType. |
java.lang.String |
transformAndReturnString(java.lang.String transformCode,
org.sixdml.SixdmlResource resource)
Transforms a SixdmlResource from one XML document to another and returns the
results in a string. |
java.lang.String |
transformAndReturnString(java.lang.String transformCode,
java.lang.String sourceXML)
Transforms a string representation of a wellformed XML document to another and returns the
results in a string. |
java.lang.String |
transformAndReturnString(java.net.URL source,
org.sixdml.SixdmlResource resource)
Transforms a SixdmlResource from one XML document to another and returns the
results in a string. |
java.lang.String |
transformAndReturnString(java.net.URL source,
java.lang.String sourceXML)
Transforms a SixdmlResource from one XML document to another and returns the
results in a string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.sixdml.transform.SixdmlTransformService |
getSupportedTransformTypes, transformAndReturnString, transformAndReturnString |
| Methods inherited from interface org.xmldb.api.base.Service |
getVersion, setCollection |
| Methods inherited from interface org.xmldb.api.base.Configurable |
getProperty, setProperty |
getType
public org.sixdml.transform.SixdmlTransformType getType()
- Get the type of this object as a SixdmlTransformType.
- Specified by:
getType in interface org.sixdml.transform.SixdmlTransformService
- Returns:
- the type of this object.
transformAndReturnString
public java.lang.String transformAndReturnString(java.net.URL source,
org.sixdml.SixdmlResource resource)
throws java.io.IOException,
org.sixdml.exceptions.InvalidTransformException
- Transforms a SixdmlResource from one XML document to another and returns the
results in a string. If the results are not XML then the root node
will be a <transform-result< element from the http://www.25hoursaday.com/sixdml
namespace containing the actual results in a CDATA child node.
- 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:
java.io.IOException - if an error occurs while trying to retrieve the file.org.sixdml.exceptions.InvalidTransformException - if the transform specified is an invalid or non-well formed
query or document.
transformAndReturnString
public java.lang.String transformAndReturnString(java.lang.String transformCode,
org.sixdml.SixdmlResource resource)
throws org.sixdml.exceptions.InvalidTransformException
- Transforms a SixdmlResource from one XML document to another and returns the
results in a string. If the results are not XML then the root node
will be a <transform-result< element from the http://www.25hoursaday.com/sixdml
namespace containing the actual results in a CDATA child node.
- 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:
org.sixdml.exceptions.InvalidTransformException - if the transform specified is an invalid or non-well formed
query or document.
transformAndReturnString
public java.lang.String transformAndReturnString(java.lang.String transformCode,
java.lang.String sourceXML)
throws org.sixdml.exceptions.InvalidTransformException,
org.sixdml.exceptions.NonWellFormedXMLException
- Transforms a string representation of a wellformed XML document to another and returns the
results in a string.
- Specified by:
transformAndReturnString in interface org.sixdml.transform.SixdmlTransformService
- 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:
org.sixdml.exceptions.InvalidTransformException - if the transform specified is an invalid or
non-well formed query or document.org.sixdml.exceptions.NonWellFormedXMLException - if the data to transform is not a wellformed
XML document.
transformAndReturnString
public java.lang.String transformAndReturnString(java.net.URL source,
java.lang.String sourceXML)
throws java.io.IOException,
org.sixdml.exceptions.InvalidTransformException,
org.sixdml.exceptions.NonWellFormedXMLException
- Transforms a SixdmlResource from one XML document to another and returns the
results in a string.
- Specified by:
transformAndReturnString in interface org.sixdml.transform.SixdmlTransformService
- 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:
java.io.IOException - if an error occurs while trying to retrieve the file.org.sixdml.exceptions.InvalidTransformException - if the transform specified is an invalid or
non-well formed query or document.org.sixdml.exceptions.NonWellFormedXMLException - if the data to transform is not a wellformed
XML document.
getName
public java.lang.String getName()
- Gets the name of the service.
- Specified by:
getName in interface org.xmldb.api.base.Service- Overrides:
getName in class xlnServiceBase
- Returns:
- the name of the service.
getContentsOfURL
public static java.lang.String getContentsOfURL(java.net.URL source)
throws java.io.IOException
- Obtains the contents at a particular URL and returns them as a string.
- Parameters:
source - the URL to obtaion the data from.- Returns:
- the contents at the specified URL.
- Throws:
java.io.IOException - if an error occurs while trying to retrieve the file.