Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    I'm thinking the variable should be an XML string, i.e. 'SuperTag', including the single quotes, and that the use of $zgtag should be without single quotes in the expression. Commented Feb 7, 2024 at 10:19
  • @Kusalananda no. Chris gave the good way AFAIK Commented Feb 7, 2024 at 10:25
  • @Chris I tried out your version: --var zgtag="SuperTag" -t -m "/z:profile-extension" -i '//z:tag=$zgtag' -n -f, so I used double quotes for the variable definition and single quotes for the xpath expressions. I get this error: could not compile test expression '//z:tag=' Commented Feb 7, 2024 at 14:47
  • 1
    @chris-davis I added more info of my investigation into the question. Commented Feb 7, 2024 at 15:07
  • @basZero got it. The variable definition must include quotes, but the use point must not. Answer modified to reflect this Commented Feb 7, 2024 at 16:22