<xsl:variable name="Status"> <xsl:for-each select="//ParticipantStatus/Status[EffectiveDate <= current-date()]"> <xsl:sort select="EffectiveDate" data-type="text" order="descending"/> <xsl:if test=" "> <xsl:value-of select="Value"/> <xsl:value-of select="$Status" />
<xsl:template name="GetParticipantCurrentStatus"> <xsl:param name="PartStatus"/> <xsl:param name="CreateDate"/> <xsl:param name="PartUniqueId"/> <xsl:attribute name="ParticipantStatus"> <xsl:value-of select="string-length($PartStatus)" /> <xsl:for-each select="ParticipantStatus/Status[@EffectiveDate <= $CreateDate]"> <xsl:sort select="@EffectiveDate" data-type="text" order="descending"/> <xsl:if test="position() = 1" > <xsl:value-of select="@Value"/>
<xsl:template name="MyXsltConcatTemplate" > <xsl:param name="PartId" /> <xsl:param name="param1" /> <xsl:variable name="PartStatus" select="/LH1DemographicExport/Participant[ParticipantDetails/@LH1ParticipantUnique Id=$PartId]/EmploymentDetails/ParticipantStatus" /> <xsl:attribute name="ParticipantStatus"> <xsl:value-of select="count($PartStatus/Status[@EffectiveDate <= $param1])" /> <xsl:for-each select="$PartStatus/Status[@EffectiveDate <= $param1]" > <xsl:sort select="@EffectiveDate" data-type="text" order="descending" /> <xsl:if test="position() = 1"> <xsl:value-of select="@Value" /> ============= <xsl:variable name="CreateDate"> <xsl:choose>
<xsl:when test="../@CreatedDatetime"> <xsl:value-of select="userCSharp:StringLeft(string(../@CreatedDatetime),10)" /> <xsl:otherwise> <xsl:value-of select="userCSharp:DateCurrentDate()" /> ----------<xsl:variable name="CreateDate"> <xsl:choose> <xsl:when test="../@CreatedDatetime"> <xsl:value-of select="userCSharp:StringLeft(string(../@CreatedDatetime),10)" /> <xsl:otherwise> <xsl:value-of select="userCSharp:DateCurrentDate()" /> <xsl:attribute name="ParticipantStatus"> <xsl:if test="EmploymentDetails/ParticipantStatus/Status"> <xsl:for-each select="EmploymentDetails/ParticipantStatus/Status[userCSharp:LogicalLte(@Effectiv eDate, $CreateDate)]" > <xsl:sort select="@EffectiveDate" data-type="text" order="descending" /> <xsl:if test="position() = 1" > <xsl:value-of select="@Value" />