xml - How to select/create multiple variable to return a data -
here code extract active status of value, in case, have set $vartaskstatus='a'.
<xsl:output method="text"/> <xsl:strip-space elements="*" /> <!--<xsl:param name="xslpath" select="base-uri()"/>--> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="mtlsm/title"> <xsl:text>mtlsm task~title~ck type~effect~task card~lc </xsl:text> </xsl:template> <xsl:template match="loei"/> <xsl:template match="highlights"/> <xsl:template match="section/title"/> <xsl:template match="g4-mtlsm-item"> <xsl:variable name="vartaskstatus"> <xsl:value-of select="mtlsm-item-status/@status"/> </xsl:variable> <xsl:choose> <xsl:when test="$vartaskstatus='a'">
but there vartaskstatus= a, d, i, na. in case, how able call if wanted bring status? i've tried following weren't luck yet.
<xsl:variable name="vartaskstatus"> <xsl:value-of select="mtlsm-item-status/@status"/> </xsl:variable> <xsl:choose> <xsl:when test="$vartaskstatus='a'"> <xsl:variable name="vartaskstatus_i"> <xsl:value-of select="mtlsm-item-status/@status"/> </xsl:variable> <xsl:choose> <xsl:when test="$vartaskstatus_i='i'"> <xsl:variable name="vartaskstatus_d"> <xsl:value-of select="mtlsm-item-status/@status"/> </xsl:variable> <xsl:choose> <xsl:when test="$vartaskstatus_d='d'">
and didn't work either
<xsl:variable name="vartaskstatus"> <xsl:value-of select="mtlsm-item-status/@status"/> </xsl:variable> <xsl:choose> <xsl:when test="$vartaskstatus='a','d','i', 'na'">
your attention , appreciated, thanks!
Comments
Post a Comment