From: SourceForge.net <no...@so...> - 2006-04-05 10:29:40
|
Bugs item #1449319, was opened at 2006-03-14 11:42 Message generated for change (Comment added) made by xmldoc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1449319&group_id=21935 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: XSL Group: output: HTML >Status: Pending Resolution: None Priority: 5 Submitted By: Ian Barnes (ian_barnes) >Assigned to: Michael Smith (xmldoc) Summary: Wrong levels for bridgeheads in XHTML Initial Comment: In XHTML output, bridgeheads come out too large. I checked the generated XHTML code, and sure enough, <bridgehead renderas="sect1"> gets rendered as <h1>, while <sect1><title> gets rendered as <h2>. In xhtml/sections.xsl I found the following code. <!-- HTML H level is one higher than section level --> <xsl:variable name="hlevel"> <xsl:choose> <xsl:when test="@renderas = 'sect1'">1</xsl:when> <xsl:when test="@renderas = 'sect2'">2</xsl:when> <xsl:when test="@renderas = 'sect3'">3</xsl:when> <xsl:when test="@renderas = 'sect4'">4</xsl:when> <xsl:when test="@renderas = 'sect5'">5</xsl:when> <xsl:otherwise> <xsl:value-of select="$clevel + 1"/> </xsl:otherwise> </xsl:choose> </xsl:variable> Looks to me like the comment is correct but the code is wrong. Should read: <!-- HTML H level is one higher than section level --> <xsl:variable name="hlevel"> <xsl:choose> <xsl:when test="@renderas = 'sect1'">2</xsl:when> <xsl:when test="@renderas = 'sect2'">3</xsl:when> <xsl:when test="@renderas = 'sect3'">4</xsl:when> <xsl:when test="@renderas = 'sect4'">5</xsl:when> <xsl:when test="@renderas = 'sect5'">6</xsl:when> <xsl:otherwise> <xsl:value-of select="$clevel + 1"/> </xsl:otherwise> </xsl:choose> </xsl:variable> I haven't checked whether the same error exists in plain HTML. A quick look at PDF output generated by the FO stylesheets & FOP suggests that the FO stylesheets might be OK. ---------------------------------------------------------------------- >Comment By: Michael Smith (xmldoc) Date: 2006-04-05 19:29 Message: Logged In: YES user_id=118135 Actually, it looks like the comment is out of date. <xsl:when test="@renderas = 'sect1'">2</xsl:when> etc. is the way it was originally in the code. Bob explicitly changed it to the way it is now about three years ago. So it is that way be design. If you think it is plain wrong to have it that way, please reply and I will try to discuss with Bob and find out that rationale. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1449319&group_id=21935 |