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

org.w3c.dom.Element.appendChild(Element) always adds child at end of parent node

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Not an Issue
    • Affects Version/s: 8.1ee
    • Fix Version/s: 1.1
    • Component/s: xml
    • Labels:

      Description

      During the transformation of elements from one domain.xml to another we noticed a problem in the past week regarding the order of children that are added to a element using appendChild.

      Given an element X which has child element types a,b,c and a DTD definition:

      <!ELEMENT X (a* , b*, c*)>

      and a target xml with an exsisting element X like:

      <X>
       <a> <a/>
       <b <b/>
       <c> <c/>
      <X/>

      calling X.appendChild(a) should (and previous to recent builds did) yield the following:

      <X>
       <a> <a/>
       <a> <a/>
       <b <b/>
       <c> <c/>
      <X/>

      but in the current JAXP we always get the added child appended to the end of the parent.

      <X>
       <a> <a/>
       <b <b/>
       <c> <c/>
       <a> <a/>
      <X/>

      this causes the XML to fail DTD conformance and in the case of domain.xml, causes appservDAS.exe to crash on startup.
      ###@###.### 7/22/04 15:38 GMT

        Attachments

          Activity

            People

            • Assignee:
              duke J. Duke (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: