Case sensitivity in namespace prefix affects XML Signature Operation

We were diagnosing an exception thrown in XML signature validation.


<Cannot check signature - Current Node: [#document: null]>



After digging around, we noticed that the XML in process is referencing an element with the name space value in different letter case.

The name space is declared as follows,


<SOAP-ENV:Envelope xmlns:SOAP-ENV=" ... >



But in the transform, we reference the element like this and turns out to be failed


<ds:Transform Algorithm="http://www.w3.org/...>

  <ds:XPath>
    not(ancestor-or-self::node()[@soap-env:actor=\"urn:oasis:names:tc:ebxml- ...

  </ds:XPath>

</ds:Transform>



Did you spot the difference? Yes, it's the case of "SOAP-ENV" declared in the Envelope to be upper case but the one referenced in the transform is in lower case.

Once it is fixed, all works.