Activity - xslTransform
Activity Type: Transformation
Description
Apply an XSL transform to data output from another activity.
Examples
<xslTransform name="transform">
<inputXSLT from="deliverXSLTOutput"/>
<inputXML from="statementOutput"/>
<output name="transformedOutput"/>
</xslTransform>
<xslTransform name="transformInLine">
<inputXSLT>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text" indent="yes" />
<xsl:template match="/">
<xsl:value-of select="RowSet/data/row/col[1]"/>
</xsl:template>
</xsl:stylesheet>
</inputXSLT>
<inputXML from="statementOutput"/>
<output name="transformedOutput"/>
</xslTransform>
Specification
Element xslTransform:
-
Attribute name - unique name for the
activity within the scope of a request.
-
Element inputXSLT (required) - the XSLT to
apply:
-
The XSLT XML is contained within the element e.g. the second example
above. In this case the XSL Transform namespace must be used (http://www.w3.org/1999/XSL/Transform).
-
OR
-
Attribute from - name of an input stream providing
the XSLT XML e.g. the first example above.
-
inputXML (required) - the XML to be transformed:
-
Attribute from - name of an input stream providing
the XML data to be transformed.
-
output (required) - output stream for the
transformed data (characters).
-
Attribute name - name of this output
stream.
Input and Output Types
- Input: inputXSLT:
-
java.lang.String containing an XSL document.
-
byte[] - which, when converted to a
java.lang.String, contains an XSL document.
-
org.w3c.dom.Node containing an XSL document.
- Input: inputXML:
-
java.lang.String containing an XML document.
-
byte[] - which, when converted to a
java.lang.String, contains an XML document.
-
org.w3c.dom.Node containing an XML document.
- Output: output - java.lang.String
Data Resource Accessor
This activity can operate with any data resource accessor.
XML Schema
OGSA-DAI/schema/ogsadai/xsd/activities/xsl_transform.xsd
Class
uk.org.ogsadai.activity.transform.XSLTransformActivity
Client Toolkit Class
uk.org.ogsadai.client.toolkit.activity.transform.XSLTransform