Skip to content

Commit

Permalink
feat: replace variable in namespace import (AnWeber#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnWeber committed Jul 20, 2023
1 parent 6563c9d commit 57371e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/xml/xpathNamespaceHttpRegionParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as models from '../../models';
import * as utils from '../../utils';
import { XPathProcessorContext } from './xpathProcessorContext';

export async function parseXpathNamespace(
Expand All @@ -19,7 +20,10 @@ export async function parseXpathNamespace(
if (!context.options.xpath_namespaces) {
context.options.xpath_namespaces = {};
}
context.options.xpath_namespaces[key] = value;
const namespace = await utils.replaceVariables(value, models.VariableType.variable, context);
if (utils.isString(namespace)) {
context.options.xpath_namespaces[key] = namespace;
}
return true;
});

Expand Down

0 comments on commit 57371e8

Please sign in to comment.