- From: Jonas Sicking <jonas@sicking.cc>
- Date: Sun, 26 Mar 2006 02:13:18 -0800
- To: Maciej Stachowiak <mjs@apple.com>
- Cc: "Web APIs WG (public)" <public-webapi@w3.org>
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