From: Michael S. <xm...@us...> - 2005-09-27 04:38:04
|
Update of /cvsroot/docbook/xsl/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21385 Modified Files: inline.xsl Log Message: Added "wrapper-name" param to inline.charseq named template, enabling it to output inlines other than just "span". Acronym and Abbrev templates now use inline.charseq to output HTML "acronym" and "abbr" elements (instead of "span"). Closes #1305468. Thanks to Sam Steingold for suggesting the change. Index: inline.xsl =================================================================== RCS file: /cvsroot/docbook/xsl/html/inline.xsl,v retrieving revision 1.44 retrieving revision 1.45 diff -u -U2 -r1.44 -r1.45 --- inline.xsl 24 Aug 2005 14:04:55 -0000 1.44 +++ inline.xsl 27 Sep 2005 04:37:56 -0000 1.45 @@ -116,10 +116,17 @@ </xsl:call-template> </xsl:param> - <span class="{local-name(.)}"> + <!-- * if you want output from the inline.charseq template wrapped in --> + <!-- * something other than a Span, call the template with some value --> + <!-- * for the 'wrapper-name' param --> + <xsl:param name="wrapper-name">span</xsl:param> + <xsl:element name="{$wrapper-name}"> + <xsl:attribute name="class"> + <xsl:value-of select="local-name(.)"/> + </xsl:attribute> <xsl:call-template name="dir"/> <xsl:call-template name="generate.html.title"/> <xsl:copy-of select="$content"/> <xsl:call-template name="apply-annotations"/> - </span> + </xsl:element> </xsl:template> @@ -544,9 +551,13 @@ <xsl:template match="abbrev"> - <xsl:call-template name="inline.charseq"/> + <xsl:call-template name="inline.charseq"> + <xsl:with-param name="wrapper-name">abbr</xsl:with-param> + </xsl:call-template> </xsl:template> <xsl:template match="acronym"> - <xsl:call-template name="inline.charseq"/> + <xsl:call-template name="inline.charseq"> + <xsl:with-param name="wrapper-name">acronym</xsl:with-param> + </xsl:call-template> </xsl:template> |