DSpace
  1. DSpace
  2. DS-378

XMLUI Submission Interface messes up in IE7 after an empty <hint> in input_forms.xml

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.6.0
    • Component/s: XMLUI
    • Labels:
      None
    • Environment:
      Only happens in Internet Explorer (verified in 7.0 and 8.0)
    • Attachments:
      1
    • Comments:
      1

      Description

      If your input_forms.xml file includes at least one empty <hint> tag (either <hint/> or <hint></hint>), then the XMLUI will insert in an empty XHTML tag corresponding to that empty hint text:
      <span class="field-help"/>

      When Internet Explorer encounters one of those empty XHTML tags, it seems to mess up the CSS for all text following it. Normally, the default CSS for "field-help" includes "font-size: 80%". Unfortunately, IE will apply that style to *all text* which comes after that empty tag. If you end up having multiple empty "field-help" tags on one page, you end up with drastically decreasing text size as the text is decreased by 80% after each empty tag.

      Attached is an HTML dump of an example of this problem, provided by Alice Platt on dspace-tech mailing list.

        Activity

        Hide
        Tim Donohue added a comment -
        The fix is to override the default "dri:help" template in the XMLUI structural.xsl file. So, all you need to do is place the following template somewhere in your custom XMLUI Theme:

          <xsl:template match="dri:help" mode="help">
                <!--Only create the <span> if there is content in the <dri:help> node-->
                <xsl:if test="./text() or ./node()">
                    <span class="field-help">
                        <xsl:apply-templates />
                    </span>
                </xsl:if>
            </xsl:template>

        This basically just checks to see if the "dri:help" node has content within it, before it creates a corresponding <span class="field-help">

        I'll commit this simple fix to trunk so that it is fully resolved in DSpace 1.6. But, in the meantime, those on DSpace 1.5.x can just copy the above template into their own custom themes to fix the problem before 1.6.
        Show
        Tim Donohue added a comment - The fix is to override the default "dri:help" template in the XMLUI structural.xsl file. So, all you need to do is place the following template somewhere in your custom XMLUI Theme:   <xsl:template match="dri:help" mode="help">         <!--Only create the <span> if there is content in the <dri:help> node-->         <xsl:if test="./text() or ./node()">             <span class="field-help">                 <xsl:apply-templates />             </span>         </xsl:if>     </xsl:template> This basically just checks to see if the "dri:help" node has content within it, before it creates a corresponding <span class="field-help"> I'll commit this simple fix to trunk so that it is fully resolved in DSpace 1.6. But, in the meantime, those on DSpace 1.5.x can just copy the above template into their own custom themes to fix the problem before 1.6.

          People

          • Assignee:
            Tim Donohue
            Reporter:
            Tim Donohue
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: