-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
I have doubts about this code:
Lines 544 to 573 in 71e66d3
| protected ApplyTransforms(transforms: XmlTransforms, input: Element): any { | |
| let output: any = null; | |
| transforms.Sort((a, b) => { | |
| const c14nTransforms = [Transforms.XmlDsigC14NTransform, XmlDsigC14NWithCommentsTransform, | |
| Transforms.XmlDsigExcC14NTransform, XmlDsigExcC14NWithCommentsTransform]; | |
| if (c14nTransforms.some((t) => a instanceof t)) { | |
| return 1; | |
| } | |
| if (c14nTransforms.some((t) => b instanceof t)) { | |
| return -1; | |
| } | |
| return 0; | |
| }).ForEach((transform) => { | |
| transform.LoadInnerXml(input); | |
| if (transform instanceof Transforms.XmlDsigXPathTransform) { | |
| transform.GetOutput(); | |
| } else { | |
| output = transform.GetOutput(); | |
| } | |
| }); | |
| // Apply C14N transform if Reference has only one transform EnvelopedSignature | |
| if (transforms.Count === 1 && transforms.Item(0) instanceof Transforms.XmlDsigEnvelopedSignatureTransform) { | |
| const c14n = new Transforms.XmlDsigC14NTransform(); | |
| c14n.LoadInnerXml(input); | |
| output = c14n.GetOutput(); | |
| } | |
| return output; | |
| } |
- Why there is "dummy"
GetOutputcall at 560? - Why every transformer load initial xml (line 585) instead of the result returned by the predecessor? It look like only last transformer works.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels