#1065 HTML: Validity error for callout bugs

output: HTML
closed-fixed
XSL (1066)
5
2010-09-29
2009-08-26
No

When outputting callout bugs for programlisting, screen etc. the bugs are output as IMG elements within a PRE element. IMG elements are disallowed within PRE by the html DTD (even the 'loose' one).

Discussion

  • Mauritz Jeanson

    Mauritz Jeanson - 2009-10-22

    Using <div> instead of <pre> would make the callouts valid. A possible solution is to use the make.valid.html parameter to decide whether <div> or <pre> should be emitted (in verbatim.xsl). Something like this:

    <xsl:choose>
    <xsl:when test="$make.valid.html !=0 and $callout.graphics !=0 and
    (parent::programlistingco or parent::screenco or child::co)">div</xsl:when>
    <xsl:otherwise>pre</xsl:otherwise>
    </xsl:choose>

    When <div> is used, additional CSS is required to format the content properly:

    div.programlisting {white-space: pre;
    font-family: monospace; }

     
  • Mauritz Jeanson

    Mauritz Jeanson - 2009-10-22
    • assigned_to: nobody --> mzjn
     
  • Mauritz Jeanson

    Mauritz Jeanson - 2009-11-20

    Feel free to comment. Is my suggested solution OK?

     
  • Robert Stayton

    Robert Stayton - 2009-11-28

    This solution sounds ok to me. I'm wondering if the CSS style for the div solution should be included in the output, though. If we don't, then the listing will be scrambled by default. Putting it on the div itself with a style attribute is one option, and another is putting the style with selector in the head element.

    This item touches on the bigger subject of modernizing DocBook's HTML output. I envision an option that generates clean HTML and a default CSS stylesheet, unless a param specifies the user's own stylesheet. Then the programlisting style could go there.

     
  • Robert Stayton

    Robert Stayton - 2010-08-09

    A fix for this issue has been added to the current codebase.
    Please test the fix with the latest snapshot from:

    http://docbook.sourceforge.net/snapshots/

     
  • Robert Stayton

    Robert Stayton - 2010-08-09
    • assigned_to: mzjn --> bobstayton
    • status: open --> pending-fixed
     
  • Robert Stayton

    Robert Stayton - 2010-08-09

    I changed verbatim output such that if $make.clean.html is nonzero, then <pre> is replaced with a <div> with class attribute, and default styles are added in docbook.css. So if someone wants valid callout bugs, they need to set $make.clean.html.

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks