using XSL 2.0, you can do this
<article class="banner-hero banner-hero--blocks" data-nav-title="{if (//Devices//SideMenu//NavTitleCheckBox='SideMenu') then //Devices//SideMenu//NavTitle else ()}">
</article>
题
I am trying to write an if condition inside my data attribute... right now I am receiving the xsml vaue but dont know how to put if there... when i use if outside html it works fine.. providing my code below...
http://xsltransform.net/bFukv8i/16
<xsl:if test="//Devices//SideMenu//NavTitleCheckBox='SideMenu'">
Data_Nav_Title="<xsl:value-of select='//Devices//SideMenu//NavTitle'/>"
</xsl:if>
<article class="banner-hero banner-hero--blocks" data-nav-title="{//Devices//SideMenu//NavTitle}"></article>
<script>
没有正确的解决方案
其他提示
using XSL 2.0, you can do this
<article class="banner-hero banner-hero--blocks" data-nav-title="{if (//Devices//SideMenu//NavTitleCheckBox='SideMenu') then //Devices//SideMenu//NavTitle else ()}">
</article>