Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2120

HTML serialization of empty/unclosed tags should not be affected by content

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.7.1
    • None
    • Serialization
    • None
    • fp4

    Description

      We don't (yet) have a test case, but I observed that when the source document has:
      <a><BR>text INSIDE a br</BR></a>
      then an <xsl:copy-of select="a"/> should produce:
      <a><BR>text INSIDE a br</a>
      but XalanJ drops the <BR> entirely, at least in the copy-of case. Suggested rules of thumb:
      1. Self-closing <BR/> becomes <BR>, which we already do
      2. Starting <BR> becomes <BR>
      3. Ending </BR> becomes nothing
      and of course, likewise for the other tags listed in part 16.2 of the XSLT 1.0 spec. Notice that rules 2 and 3 work whether or not there is content between the <BR> and </BR>.

      Attachments

        Activity

          People

            joannet@ca.ibm.com Joanne Tong
            david_marston@us.ibm.com David Marston
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: