The generated HTML page contains reference links that sometimes doesn't exist in my page. I should display this link as a simple label. Currently this is done:
<xsl:choose>
 <xsl:when test="$nb_action != 0">
  <a href="#action">Action (offensive, defensive, reconnaissance)</a>
 </xsl:when>
 <xsl:otherwise>
  Action (offensive, defensive, reconnaissance)
 </xsl:otherwise>
</xsl:choose>
I'm wondering how to simplify my code, how to deactivate node <a></a> ?
My first idea was to delegate a special css class :
<a href="#action">
 <xsl:if test="$nb_action = 0">
  <xsl:attribute name="class">inactive</xsl:attribute>
 </xsl:if>Action (offensive, defensive, reconnaissance)
</a>
But it remains a link...
A workaround that follows:
<a><xsl:if test="$nb_action != 0">
  <xsl:attribute name="href">#action</xsl:attribute>
 </xsl:if>Action (offensive, defensive, reconnaissance)</a>
It is correct to write an html <a> tag without href ?