I am trying to create a mapping between two different elements(Element1 & Element2) from source schema to the same record on Destination Schema along with an element in it as shown in the following format.
<coverages>
//If Element1(Source Schema element) has data
<coverage>
<CoverageTypeCd>Data1</CoverageTypeCd>
</coverage>
//If Element2(Source Schema element) has data
<coverage>
<CoverageTypeCd>Data2</CoverageTypeCd>
</coverage>
</coverages>
I am now trying to check the presence of value on Elements(Source Schema) and then trying to feed it to the scripting functoid. I don’t know how I should produce the entire<coverage> node and still send the respective <coverageTypeCd> of that record as shown above. I believe it should be done with Inline XSLT. I really need someone’s help on this.
Thanks in advance.
Please let me know if you need additional details on something.
Update
Hi folks, I found the answer myself. I used Inline XSLT Call template as Script Type and it did the job. I applied this script for different elements on Source Schema to map the Coverage record
<xsl:template name="CoverageTemplate1">
<xsl:param name="Element1" />
<xsl:element name="Coverage">
<xsl:element name="CoverageTypeCd">
<xsl:value-of select="$Element1" />
</xsl:element>
</xsl:element>
</xsl:template>
Thanks