You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that there is no way to pass namespaces to xpath. And that no default namespace resolver is used.
The error I get:
Error: Cannot resolve QName wsu
at Function.NodeTest.nameSpaceMatches (c:\programming\web\gitlab\xml\node_modules\xpath\xpath.js:2311:15)
at Object.matches (c:\programming\web\gitlab\xml\node_modules\xpath\xpath.js:2337:16)
at Function.PathExpr.applyStep (c:\programming\web\gitlab\xml\node_modules\xpath\xpath.js:1855:27)
at c:\programming\web\gitlab\xml\node_modules\xpath\xpath.js:2046:67
...
The text was updated successfully, but these errors were encountered:
A workaround is to use xpath //*[@*[local-name()='Id' and namespace-uri()='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd']] instead of //*[@wsu:Id].
But it would be better imo to create an uri resolver instance inside of xml-crypto code and to use selectWithResolver method instead of select.
here is xml:
I want to sign all nodes with
wsu:Id
attribute.The code to sign is:
The problem is that there is no way to pass namespaces to xpath. And that no default namespace resolver is used.
The error I get:
The text was updated successfully, but these errors were encountered: