I want to create a bootstrap accordion menu using xslt and read data from xml file. I have this xslt
<xsl:template match="/Settings">
<xsl:for-each select="Area">
<div class="panel-group configuration-menu-style" id="Menu">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#Menu" href="#{@Caption}">
<xsl:value-of select="@Caption"/>
</a>
</h4>
</div>
<div id="{@Caption}" class="panel-collapse collapse in">
<div class="panel-body custom-padding">
<table class="table">
<xsl:for-each select="Category">
<tr>
<td class="configuration-submenu-style">
<xsl:value-of select="@Caption"/>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</div>
</div>
</div>
</xsl:for-each>
In this line
<div id="{@Caption}" class="panel-collapse collapse in">
i give id based to attribute and works. Using developer tools in browser i can see that has id="MENU OPTION2" The problem is in this line
<a data-toggle="collapse" data-parent="#Menu" href="#{@Caption}">
<xsl:value-of select="@Caption"/>
</a>
Using developer tools in browser i can see that this element has href="#MENU%20OPTION2
So... how can remove %20 from href?
SOLUTION
<a data-toggle="collapse" data-parent="#Menu" href="#{position()}">
<div id="{position()}" class="panel-collapse collapse in">
BECAUSE 'id="MENU OPTION2" is not valid as id should not contain space'