HI
 
I am aware of escaping square brackets and I have done it. My query looked
exactly like /redirections/redirection[\[]last()[\]] and when error was
displayed it had the proper XPATH format. I still wonder if there was some
bug in WIX not handling XPATH right.
 
Daniel

________________________________

From: Mike Dimmick [mailto:[EMAIL PROTECTED] 
Sent: 22 January 2008 22:13
To: Daniel Hatala; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] WIX XML manipulation



From the documentation:

 

"ElementPath : String : The XPath of the element to be modified. Note that
this is a formatted field and therefore, square brackets in the XPath must
be escaped."

 

To escape square brackets, use [\[] and [\]], so your XPath needs to be

 

/redirections/redirection[\[]last()[\]]

 

Otherwise Windows Installer thinks [last()] is a property and tries to
evaluate it, and an error occurs as () aren't valid in a property name.

 

This feature is present to allow properties to be used to control the XPath.

 

-- 

Mike Dimmick

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 22 January 2008 17:40
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] WIX XML manipulation

 

 

Hi 

I need to modify an XML file and create several nodes with the same name 

<redirections xmlns="msmq-queue-redirections.xml"> 
        <redirection> 
                <from>https://external_host/*</from> 
                <to>http://internal_host/msmq/internal_queue</to> 
        </redirection> 
        <redirection> 
                <from>https://external_host/*</from> 
                <to>http://internal_host/msmq/internal_queue</to> 
        </redirection> 
        <redirection> 
        ... 
        </redirection> 
</redirections> 

Does anyone know how to add new <redirection> node and then 'from' and 'to'
nodes and set their values? I know that the script below can create a new
node but I can not get to it then. When I try to modify the 'to' and'from'
values it changes them in the first <redirection> node. If I use
/redirections/redirection[last()] I get an error. Seems like WIX doesn't
fully support XPATH 

 

========================================================================================================================
The information contained in this email is intended only
for the individual to whom it is addressed. It may contain 
privileged and/or confidential information. If you have 
received this message in error please notify the sender 
immediately and delete the message from your computer. The 
unauthorised use, disclosure, copying or alteration of this 
message is forbidden. Neither Vertex Data Science Limited 
nor any of its subsidiaries will be liable for direct, 
special, indirect or consequential damage as a result of 
any virus being passed on, or arising from alteration of 
the contents of this message by a third party. 
The following Vertex companies are registered in England 
and Wales and are authorised and regulated by the Financial 
Services Authority: Vertex Data Science Limited 
(company number 3153391); Exchange FS Limited 
(company number 2596452) trading as The Exchange; Vertex 
Mortgage Services Limited (company number 2042968); Vertex 
Administration Limited (company number 2138853); Jessop 
Fund Managers Limited (company number 5768993). All the 
above companies have their registered office at Pegasus 
House, Kings Business Park, Liverpool Road, Prescot, 
Merseyside, L34 1PJ.
www.vertex.co.uk 

========================================================================================================================
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to