Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
This way of variable declaration is working fine:
<xsl:variable name="Brandsqlresult" select="jesper.sql:SQLXml($GetBrandPagewise)"/>
Here variable GetBrandPagewise variable get parsed and return a assign that value to Brandsqlresult.
and second way assigning values based on condition:
<xsl:variable name="Brandsqlresult"> <xsl:choose> <xsl:when test="$SqlSession=''"> <xsl:value-of select="jesper.sql:SQLXml($GetBrandPagewise)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="jesper.sql:SQLXml($SqlSession)"/> </xsl:otherwise> </xsl:choose> </xsl:variable>
but here, Brandsqlresult is assigned with empty when i checking for When condition is true.
I have no idea where i am commiting a mistake.
Hi Selvakumar, welcome to Umbraco.
Try changing the <xsl:value-of> tags to <xsl:copy-of> ... as "value-of" tries to give you the text value (e.g. the inner-text) of the XML nodes, whereas the "copy-of" will give you a copy of the XML itself.
Cheers, Lee.
Thank you so much....,
Its working as expected....
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
error in assigning value to variable base on condion.
Hi,
This way of variable declaration is working fine:
<xsl:variable name="Brandsqlresult" select="jesper.sql:SQLXml($GetBrandPagewise)"/>
Here variable GetBrandPagewise variable get parsed and return a assign that value to Brandsqlresult.
and second way assigning values based on condition:
<xsl:variable name="Brandsqlresult">
<xsl:choose>
<xsl:when test="$SqlSession=''">
<xsl:value-of select="jesper.sql:SQLXml($GetBrandPagewise)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="jesper.sql:SQLXml($SqlSession)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
but here, Brandsqlresult is assigned with empty when i checking for When condition is true.
I have no idea where i am commiting a mistake.
Hi Selvakumar, welcome to Umbraco.
Try changing the <xsl:value-of> tags to <xsl:copy-of> ... as "value-of" tries to give you the text value (e.g. the inner-text) of the XML nodes, whereas the "copy-of" will give you a copy of the XML itself.
Cheers, Lee.
Thank you so much....,
Its working as expected....
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.