posted 15 years ago
I need to map secondry elements with its matching primary elements if they both have same id.
How can this be achieved in xslt.
If ids are not matching then not a single element of secondry sholud be shown.
If ids matching, then other fields of secondry elements, should be mapped to similar fields of primary elements.
Eg: Its like some program running and in between some add on programs started (may be trailor or advertisement).
the add on program is not always shown (optional), and whenever shown it has its own data information etc etc.
Please provide me some input, how to map and proceed.
Not sure what this code is really doing.
<xsl:template match="SECONDARY_EVENT_LIST">
<xsl:variable name="secondaryElements" select="ancestor::SCHEDULE/SECONDARY_ELEMENT_LIST"/>
<xsl:for-each select="SCHEDULE_ELEMENT_ID">
<xsl:variable name="id" select="."/>
<xsl:apply-templates select="$secondaryElements/SCHEDULE_ELEMENT[(@ID=$id)]"/>
</xsl:for-each>
</xsl:template>
Is this having any relation with what my requirement is all about?