Re: A few tweaks for ReSpec

The XSLT nazi in me is showing his ugly face. Feel free to ignore, 
though i do think it makse the stylesheet easier to read.

> +      <xsl:element name='a' namespace='http://www.w3.org/1999/xhtml'>
> +      <xsl:attribute name='class'>term</xsl:attribute> 

Why not simply

<a class="term">

(assuming the default namespace in the stylesheet is xhtml).

> +      <xsl:if test='@xml:id'>
> +        <xsl:attribute name='id'><xsl:value-of select='@xml:id'/></xsl:attribute>
> +      </xsl:if>
> +      <xsl:attribute name='href'>
> +        <xsl:value-of select='concat("#dfn-", translate(normalize-space(.), " ABCDEFGHIJKLMNOPQRSTUVWXYZ", "-abcdefghijklmnopqrstuvwxyz"))'/>
> +      </xsl:attribute>

You could even include the href attribute by doing

<a class="term"
    href="#dfn-{translate(normalize-space(.), 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ', '-abcdefghijklmnopqrstuvwxyz')}">

/ Jonas

Received on Sunday, 26 March 2006 10:13:11 UTC