Uploaded image for project: 'Santuario'
  1. Santuario
  2. SANTUARIO-353

ReferenceSubTreeData.iterator() does not return nodes in document order

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Java 1.5.3
    • Fix Version/s: Java 1.5.4
    • Component/s: Java
    • Security Level: Public (Public issues, viewable by everyone)
    • Labels:
      None

      Description

      I've been working on some signature validation code, and one approach I took led me to look at Reference.getReferenceData(). This is with 1.5.3 of the Java library.

      In my case, the reference URI is always a document-local reference, i.e., either "" or "#foo", and I look at getReferenceData() after calling Signature.checkSignatureValue. The result of this is both a ReferenceNodeSetData and a ReferenceSubTreeData.

      My current approach involves looking at the ReferenceSubTreeData, but I also looked at the node set returned from ReferenceNodeSetData.iterator() in this case. In the Javadoc, it specifies that the nodes are returned in document order, which I understand to mean that Element nodes appear before the Attribute nodes associated with them.

      What I actually found was that the Attribute nodes for an elemeent appeared in the iterator() sequence before the Element node itself.

      Comment on the list from Marc Giger:

      Yes it seems there is a discrepancy between the Javadoc and the actual
      implementation. Additionally the Javadoc states that an
      UnsupportetOperationException will be thrown when an element is removed
      via iterator which actually doesnt happen.

        Attachments

          Activity

            People

            • Assignee:
              coheigea Colm O hEigeartaigh
              Reporter:
              iay Ian Young
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: