rendered paste body <xsl:template match="trait_group"> <xsl:param name="idpath"/> <xsl:param name="parentId"/> <xsl:param name="folded"/> <xsl:param name="level"/> <xsl:variable name="myId"><xsl:value-of select="$parentId"/>.<xsl:number level="single" count="trait|trait_group" format="1"/></xsl:variable> <xsl:variable name="open" select="@open="yes""/> <xsl:comment> Start Group: <xsl:value-of select="name"/> </xsl:comment> <xsl:variable name="className"><xsl:choose><xsl:when test="$open">open</xsl:when><xsl:otherwise>closed</xsl:otherwise></xsl:choose> <xsl:if test="$folded">folded</xsl:if> sub<xsl:value-of select="$level"/></xsl:variable> <html:tbody onclick="toggleGroup('{$myId}')" class="{normalize-space($className)}"> <html:tr> <html:td scope="rowgroup" id="{$myId}" headers="{normalize-space(concat($idpath," traittable1.hname"))}"><xsl:value-of select="name"/></html:td> <html:td headers="{normalize-space(concat($idpath," ",$myId," traittable1.hpts"))}"><xsl:if test="points">[<xsl:value-of select="points"/>]</xsl:if></html:td> <html:td headers="{normalize-space(concat($idpath," ",$myId," traittable1.href"))}"><xsl:value-of select="reference"/></html:td> <xsl:if test="notes"> <html:tr> <html:td class="note" headers="{normalize-space(concat($idpath," ",$myId))}" axis="notes"><xsl:value-of select="reference"/></html:td> </html:tr> </xsl:if> </html:tr> </html:tbody> <xsl:apply-templates select="trait | trait_group"> <xsl:with-param name="idpath" select="normalize-space(concat($idpath," ",$myId))"/> <xsl:with-param name="folded" select="$open=false or $folded"/> <xsl:with-param name="parentId" select="$myId"/> <xsl:with-param name="level" select="$level+1"/> </xsl:apply-templates> <xsl:comment> End Group: <xsl:value-of select="name"/> </xsl:comment> </xsl:template>