How to use input Xsl_Params in translate activity?
book
Article ID: KB0091906
calendar_today
Updated On:
TIBCO Collaborative Information Manager
|
-
|
Not Applicable
|
-
|
Description
Resolution:
The input parameter should be defined in the translate activity like,
<Parameter direction="in" eval="constant" type="string" name="Xsl_Param_1">TRANS</Parameter>
in the following translate activity:
<Activity Name="MyTranslate">
<Description>Translate to remove DBID.</Description>
<Action>Translate</Action>
<Parameter direction="in" name="Derived" type="string" eval="constant">false</Parameter>
<Parameter direction="in" type="string" eval="constant" name="eventState">TRANSLATE</Parameter>
<Parameter direction="in" eval="constant" type="string" name="Translator">XSLT</Parameter>
<Parameter direction="in" eval="constant" type="string" name="Map">standard/maps/translate_Exclude_DBID1</Parameter>
<Parameter direction="in" eval="constant" type="string" name="OutputFormat">mlXML</Parameter>
<Parameter direction="in" eval="constant" type="string" name="Normalize">None</Parameter>
<Parameter direction="in" eval="constant" type="string" name="Xsl_Param_1">TRANS</Parameter>
<Parameter direction="in" eval="variable" type="document" name="InDocument">workDoc</Parameter>
<Parameter direction="out" eval="variable" type="document" name="OutDocument">workDoc</Parameter>
</Activity>
The input parameter value can be referenced in the XSL as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="Xsl_Param_1"/>
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:for-each select="@*">
<xsl:copy />
</xsl:for-each>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="//MasterCatalog/RevisionID/BaseName">
<DBID>
<xsl:value-of select="$Xsl_Param_1"/>
</DBID>
</xsl:template>
</xsl:transform>
Issue/Introduction
How to use input Xsl_Params in translate activity?
Feedback
thumb_up
Yes
thumb_down
No