Skip to content

Commit

Permalink
For #309: fix regression with NamespaceMapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Bruchez committed Mar 29, 2022
1 parent 919c145 commit beb6694
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,10 @@ trait ControlOps extends ResourcesOps {
def renameNodeContent(elemOrAtt: NodeInfo, avt: Boolean): Unit =
FormRunnerRename.replaceSingleVarReference(
xpathString = elemOrAtt.stringValue,
namespaceMapping = NamespaceMapping(elemOrAtt.namespaceMappings.toMap),
namespaceMapping = NamespaceMapping(elemOrAtt match {
case n if n.isAttribute => n.parentUnsafe.namespaceMappings.toMap
case n => n.namespaceMappings.toMap
}),
functionLibrary = inScopeContainingDocument.partAnalysis.functionLibrary,
avt = avt,
oldName = oldName,
Expand Down

0 comments on commit beb6694

Please sign in to comment.