From: SourceForge.net <no...@so...> - 2006-04-07 01:08:42
|
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: Open Resolution: None Priority: 5 Submitted By: Ian Barnes (ian_barnes) >Assigned to: Robert Stayton (bobstayton) 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-07 10:08 Message: Logged In: YES user_id=118135 Bob, I looked at this but not sure what to do. So, I'm taking the liberty of re-assigning it to you because it relates to a change you made some time back. Please see the dialogs. --mike ---------------------------------------------------------------------- Comment By: Michael Smith (xmldoc) Date: 2006-04-06 23:52 Message: Logged In: YES user_id=118135 Ian, Yeah, an example would be great. Please attach/upload it here. But ultimately, I think I need to ask Bob to look at this. He's the one who made the change, so hopefully he still remembers the rationale behind it. ---------------------------------------------------------------------- Comment By: Ian Barnes (ian_barnes) Date: 2006-04-06 22:55 Message: Logged In: YES user_id=1475446 I do think it's plain wrong. I thought the whole idea of a bridgehead was to look like a section heading. So <bridgehead renderas="sect1"> should be formatted the same as <sect1><title>. In XHTML, that means they should both become <h2>. If you like, I'll cook up an example file so you can see what I mean. ---------------------------------------------------------------------- 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 |