#615 fixes inclusive c14n by tracking each in-scope prefix together with its namespace URI. C14nCanonicalization is exported, so renderNs() and processInner() are part of the published types, even though renderNs() is documented @api private. To stay within 6.x semver, #615 kept both signatures and added an optional last parameter, namespacesInScope. process() always passes it.
A caller or subclass that passes only the original arguments falls back to the old prefix-name check, prefixesInScope.indexOf(prefix) !== -1. That check is the #614 bug: it drops a declaration that rebinds an in-scope prefix. It stays only so that 6.x callers see no change.
In 7.0
- Make
renderNs() and processInner() private.
- Drop
prefixesInScope: string[] and the fallback check, so namespacesInScope is the only scope.
A search of public code while reviewing #615 found no callers or subclasses of either method, only forks and vendored copies. GitHub code search covers only the default branches of public repositories.
ExclusiveCanonicalization has the same public renderNs() and processInner(). Making them private at the same time would keep the two classes consistent.
#615 fixes inclusive c14n by tracking each in-scope prefix together with its namespace URI.
C14nCanonicalizationis exported, sorenderNs()andprocessInner()are part of the published types, even thoughrenderNs()is documented@api private. To stay within 6.x semver, #615 kept both signatures and added an optional last parameter,namespacesInScope.process()always passes it.A caller or subclass that passes only the original arguments falls back to the old prefix-name check,
prefixesInScope.indexOf(prefix) !== -1. That check is the #614 bug: it drops a declaration that rebinds an in-scope prefix. It stays only so that 6.x callers see no change.In 7.0
renderNs()andprocessInner()private.prefixesInScope: string[]and the fallback check, sonamespacesInScopeis the only scope.A search of public code while reviewing #615 found no callers or subclasses of either method, only forks and vendored copies. GitHub code search covers only the default branches of public repositories.
ExclusiveCanonicalizationhas the same publicrenderNs()andprocessInner(). Making them private at the same time would keep the two classes consistent.