Ok, I got a successful compile using...

ElementPath="/configuration/applicationSettings/RollCall.Properties.Settings
/setting[...@key='project'[\]]/value/"

I just figured it out when I got this last reply.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        ...
    </configSections>
    <applicationSettings>
        <Roll_Call.Properties.Settings>
            <setting name="project" serializeAs="String">
                <value>default</value>
            </setting>
        </Roll_Call.Properties.Settings>
    </applicationSettings>
</configuration>

Since my xml looks like the above and my goal is to change the text
"default" in the value tag, I was erroneously trying to alter an attribute
of an unspecified tag with an attribute called value (the
ElementPath="/configuration/applicationSettings/RollCall.Properties.Settings
/setting[...@key='project'[\]]/@value" I used earlier). 

Can the documentation of ElementPath in the XmlFile\XmlConfig include a
sample of the proper escape sequence...and maybe a link to a XPATH tutorial?

For now I need to test the msi and make sure the command line values are
being set. Thanks for the help, you're a real pro!

-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: Wednesday, October 14, 2009 11:16 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] help with error LGHT0204: ICE03:Invalid
formatstring

What do you want your XPath to look like when it reaches the XPath
processor? This attribute goes into a "formatted" field (to allow for
property references) so you have to work backwards from what XML/XPath wants
to give it something that will make it "through the system".

If you want
"/configuration/applicationSettings/RollCall.Properties.Settings/setti...@ke
y='project']/@value"
You must supply
"/configuration/applicationSettings/RollCall.Properties.Settings/setting[\[]
@key='project'[\]]/@value"

What you had in the original message had an extra [ in it.

Second I was asking if that really was the XPath you want. Given the XML
sample you supplied, I expect what you want would be more like
"/configuration/applicationSettings/RollCall.Properties.Settings/setti...@ke
y='project']/value" which would require supplying
"/configuration/applicationSettings/RollCall.Properties.Settings/setting[\[]
@key='project'[\]]/value".

Escaping anything in Windows Installer means
"[\<whatever-you-are-escaping>]", NOT "\<whatever-you-are-escaping>".

-----Original Message-----
From: Chris Jokinen [mailto:chr...@directron.us] 
Sent: Wednesday, October 14, 2009 8:03 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] help with error LGHT0204: ICE03: Invalid
formatstring

No good, I tried

"/configuration/applicationSettings/RollCall.Properties.Settings/setti...@ke
y='project']/@value"

...and below, due to the visual studio stating that the square brace HAD to
be escaped (it said this in the documentation as well)...

"/configuration/applicationSettings/RollCall.Properties.Settings/settin...@k
ey='project'\]/@value"

And I still get the error... C:\Documents and Settings\chrisj\My
Documents\Visual Studio 2005\Projects\Roll Call\setup\Product.wxs(16,0):
error LGHT0204: ICE03: Invalid format string; Table: XmlFile, Column:
ElementPath, Key(s): RollCall.exe.config.project

The documentation looks a little light in this subject...is there any source
I can use to read up on this format issue?

-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: Tuesday, October 13, 2009 6:22 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] help with error LGHT0204: ICE03: Invalid
formatstring

"/configuration/applicationSettings/RollCall.Properties.Settings/setting[\[]
[...@key='project'[\]]/@value"

Would become:

"/configuration/applicationSettings/RollCall.Properties.Settings/settin...@k
ey='project']/@value"

Except that the repeated "[" char is confusing the formatted syntax parser
since there are "]" chars that follow.

Remove the extraneous "[" in front of the "@key".

At that point, the XPath will look like:

"/configuration/applicationSettings/RollCall.Properties.Settings/setti...@ke
y='project']/@value"

Which means:

The "value" attribute of the "setting" element with an attribute "key" that
is set to the value "project" that is a child of
"RollCall.Properties.Settings" which itself is a child of
"applicationSettings" which itself is a child of the document element named
"configuration". Unless my XPath parsing skills have been temporarily
misguided.

-----Original Message-----
From: Chris Jokinen [mailto:chr...@directron.us] 
Sent: Tuesday, October 13, 2009 3:25 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] help with error LGHT0204: ICE03: Invalid format string

error LGHT0204: ICE03: Invalid format string; Table: XmlFile, Column:
ElementPath, Key(s): RollCall.exe.config.project

 

 

<util:XmlFile Id="RollCall.exe.config.project" Action="setValue"
ElementPath="/configuration/applicationSettings/RollCall.Properties.Settings
/setting[\...@key='project'[\]]/@value"
File="[INSTALLLOCATION]\RollCall.exe.config" Value="[PROJECT]"/>

 

I have tried setting the ElementPath a few different ways and I am still
missing something.sorry I do not have much experience with xpath.looks
simple enough.

 

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

    <configSections>

.

    </configSections>

    <applicationSettings>

        <RollCall.Properties.Settings>

            <setting name="ip_address" serializeAs="String">

                <value>192.168.0.10</value>

            </setting>

            <setting name="host" serializeAs="String">

                <value>www.yahoo.com</value>

            </setting>

            <setting name="project" serializeAs="String">

                <value>yahoo</value>

            </setting>

        </RollCall.Properties.Settings>

    </applicationSettings>

</configuration>

 

Chris

----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to