Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4546071

DocumentBuilderFactory.setCoalescing() is not working properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: xml
    • Labels:
    • Subcomponent:
    • Introduced In Build:
      1.2.0
    • Introduced In Version:
    • Resolved In Build:
      1.2.0
    • CPU:
      sparc
    • OS:
      solaris_8
    • Verification:
      Verified

      Description

      If I have
      <?xml version="1.0"?>
      <html>
      <![CDATA[ <xml>This is not parsed</xml>]]> yet
      </html>

      and setCoalescing(true). I expect to get
      <html>
      <xml>This is not parsed</xml> yet
      </html>
      after DocumentBuilder.parser() is called.

      Using crimson, it returns 1 ChildNode:<xml>This is not parsed</xml> yet
      Using xerces2, it returns 3 childnode. node0: <cr>, node1: <xml>This is not parsed</xml>, node2: yet

      According to setCoalescing definition, seems that crimson is doing the right thing.

      To reproduce, execute torun in attched file.

        Attachments

          Activity

            People

            Assignee:
            egoei Edwin Goei (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: