You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Ian Young <ia...@iay.org.uk> on 2013/03/06 19:28:41 UTC
"document order" of node set from ReferenceNodeSetData
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.
So my question is: have I misunderstood something either in DSIG in general or the ReferenceNodeSetData API in particular, or does this sound like a bug?
-- Ian
Re: "document order" of node set from ReferenceNodeSetData
Posted by Ian Young <ia...@iay.org.uk>.
On 6 Mar 2013, at 19:09, Marc Giger <gi...@apache.org> wrote:
> 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.
>
> Could you open a JIRA (https://issues.apache.org/jira)?
Sure. Thanks for the sanity check.
-- Ian
Re: "document order" of node set from ReferenceNodeSetData
Posted by Ian Young <ia...@iay.org.uk>.
On 6 Mar 2013, at 19:09, Marc Giger <gi...@apache.org> wrote:
> Could you open a JIRA (https://issues.apache.org/jira)?
Now at https://issues.apache.org/jira/browse/SANTUARIO-353
-- Ian