This is a plug-in that transform a xml stream by using XSL code from the rpl file. The output is a stream. In order to use it a number properties has to be set in the rpl file.
The required layout properties for the xsl plug-in:
Name | Value |
---|---|
plugin-type | XSL |
plugin-class | ifs.application.printagentservice.impl.extendedformatter.xslplugin.XSLPlugin |
output-extension | xml |
Name | Type | Description |
---|---|---|
Encoding | {UTF-8,UTF-18,ISO-8859-1...} | Use any encoding type supported by java. See list here. Default value is UTF-8. |
The XSL code is written inside the <data> tag of the rpl. The expected format is:
<data> <![CDATA[Write your xsl code here!]]> </data>
This plug-in does not use the variable tag of the report plug-in layout.
An example of a rpl file with xsl code that transforms a xml file into a csv file.
<?xml version="1.0" encoding="UTF-8"?> <report-layout> <properties> <version>0.1</version> <layout-type>XSL</layout-type> <!--SCRIPT,XSL,XML,EXCEL--> <plugin-class>ifs.application.printagentservice.impl.extendedformatter.xslplugin.XSLPlugin</plugin-class> <output-method>FILE</output-method> <!-- BINARY,FILE,E-MAIL--> <output-extension>xml</output-extension> <default-output-reference> <binary>\\user\ZebraGX4</binary> <file>\\user\TEMPOUT</file> <e-mail>firstname.lastname@something.com</e-mail> <e-mail-sender>firstname.lastname@something.com</e-mail-sender> <e-mail-cc></e-mail-cc> <e-mail-subject>Email Subject</e-mail-subject> <e-mail-body> <![CDATA[ Email Body Content from the RPL ]]> </e-mail-body> </default-output-reference> <full-xml>TRUE</full-xml> <flattened-xml> <enabled>TRUE</enabled> <strongtyping>TRUE</strongtyping> </flattened-xml> <report-id>MODULE_REP</report-id> <report-title>RPL LAYOUT</report-title> </properties> <plugin> <properties> <Encoding>UTF-8</Encoding> </properties> <data> <![CDATA[ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" encoding="UTF-8"/> <xsl:param name="delim" select="string(';')" /> <xsl:param name="quote" select="string('"')" /> <xsl:param name="break" select="string('
')" /> <xsl:template match="/"> <xsl:apply-templates select="*/Row" /> </xsl:template> <xsl:template match="Row"> <xsl:apply-templates /> <xsl:if test="following-sibling::*"> <xsl:value-of select="$break" /> </xsl:if> </xsl:template> <xsl:template match="*"> <xsl:value-of select="concat($quote, normalize-space(.), $quote)" /> <xsl:if test="following-sibling::*"> <xsl:value-of select="$delim" /> </xsl:if> </xsl:template> <xsl:template match="text()" /> </xsl:stylesheet> ]]> </data> <variables> <!-- not used by this plugin --> </variables> </plugin> </report-layout>