I'm a very beginner in XSLT. I use heat.exe
from Wix toolset
to generate payloads.
Here is example 1 of generated xml:
<PayloadGroup Id="ALC_272_662_888">
<Payload SourceFile="$(var.SourceDir4)\VISTA\WAVESGUILIB.DLL" Name="$(var.SourceDir4)\VISTA\WAVESGUILIB.DLL" />
<Payload SourceFile="$(var.SourceDir4)\VISTA\WAVESLIB.DLL" Name="$(var.SourceDir4)\VISTA\WAVESLIB.DLL" />
</PayloadGroup>
This is example 2:
<PayloadGroup Id="CS_H81_Q87">
<Payload SourceFile="$(var.SourceDir1)\CSVER.DLL" Name="$(var.SourceDir1)\CSVER.DLL" />
<Payload SourceFile="$(var.SourceDir1)\DIFXAPI.DLL" Name="$(var.SourceDir1)\DIFXAPI.DLL" />
<Payload SourceFile="$(var.SourceDir1)\HELP.TXT" Name="$(var.SourceDir1)\HELP.TXT" />
<Payload SourceFile="$(var.SourceDir1)\IIF2.INI" Name="$(var.SourceDir1)\IIF2.INI" />
</PayloadGroup>
I would like to create ONE transformation which will replace in attribute Name
text $(var.SourceDir1)
or $(var.SourceDir4)
with empty string depending on which one will be present.
I tried multiple things - but xslt has it's own logic. Thank you in advance!