Reputation: 1
i am trying to set a value in WIX XmlConfig which contains curly brackets
I want to set a value like this "IndexServer__%property{name}.zip"
<util:XmlFile
Id="AppConfigLocalFileDebugLogPath"
Action="setValue"
Permanent="yes"
ElementPath="//configuration/log4net/appender[\[]@name='LocalFileDebugLog'[\]]/file/@value"
Value="[LOGFILEROOTPATH]\IndexServer\Debug\IndexServer_DEBUG__%property[\{]index-name[\}].log"
File="[INSTALLFOLDER]Index.Webservice.exe.config"
SelectionLanguage="XPath"
Sequence="1"
/>
I thought it could work with [{] and [}] because [[] and []] works fine but it doesnt. I get following error from HEAT"HEAT5055: Error applying transform xxxxx to harvested Wix: unexpected token ']' in expression"
(or something like that, the original error message is in german ;-) )
If i simply try:
<util:XmlFile
Id="AppConfigLocalFileDebugLogPath"
Action="setValue"
Permanent="yes"
ElementPath="//configuration/log4net/appender[\[]@name='LocalFileDebugLog'[\]]/file/@value"
Value="[LOGFILEROOTPATH]\IndexServer\Debug\IndexServer_DEBUG__%property{index-name}.log"
File="[INSTALLFOLDER]Index.Webservice.exe.config"
SelectionLanguage="XPath"
Sequence="1"
/>
This results in a string like "E:\LogFiles\WSIndexServer\WSIndexServer__%property.log" as you can see the string "{index-name}" gets lost ;-(
Could you help me here? I need the part "{index-name}" including the curly brackets in the string.
Thanks a lot
Chris
Upvotes: 0
Views: 410
Reputation: 167696
As the question is tagged as XSLT and as you say that with Value="[LOGFILEROOTPATH]\IndexServer\Debug\IndexServer_DEBUG__%property{index-name}.log"
the {index-name}
is lost I suppose that value is evaluated in XSLT and you need to double the {}
to avoid being treated as an attribute value template, so try Value="[LOGFILEROOTPATH]\IndexServer\Debug\IndexServer_DEBUG__%property{{index-name}}.log"
.
Upvotes: 1