Thanks, although I have it working now without setting the SelectionLanguage, I did try that out when debugging. I assume they are very similar if my XPath pattern match works as expected even when parsed as XSLPattern.
On Sat, Jan 14, 2012 at 3:20 AM, Blair <os...@live.com> wrote: > In your XmlFile elements make sure you set @SelectionLanguage to XPath. The > obsolete XSLPattern default value uses a now obsolete predecessor to XPath > for the pattern matching. > > Blair > > -----Original Message----- > From: Dan Gough [mailto:goug...@gmail.com] > Sent: Wednesday, January 11, 2012 7:43 AM > To: General discussion for Windows Installer XML toolset. > Subject: [WiX-users] XmlFile element issues - any XPath experts out there? > > Hi, > > I've successfully set up a few xml file configuration items using the > XmlFile element, but I have an instance that is not working as expected, > hopefully somebody out there can help! > > This is a cut down sample of my xml file: > > <?xml version='1.0'?> > <evidence_gatherer> > <evidence> > <evidence_type type="notification"> > <xslt_sql>UPDATEME</xslt_sql> > </evidence_type> > <evidence_type type="ts_feature"> > <xslt_sql>UPDATEME</xslt_sql> > </evidence_type> > </evidence> > </evidence_gatherer> > > > And this is my WiX markup: > > > <util:XmlFile Id="Notif" Action="setValue" > > ElementPath="/evidence_gatherer/evidence/evidence_type[/[]@type='notificatio > n'[/]]/xslt_sql" > File="[#evidence_gatherer.xml]" Value="[#notification_sql.xsl]"/> > <util:XmlFile Id="Feat" Action="setValue" > > ElementPath="/evidence_gatherer/evidence/evidence_type[/[]@type='ts_feature' > [/]]/xslt_sql" > File="[#evidence_gatherer.xml]" Value="[#ts_feature_sql.xsl]"/> > > > The result I get is that both statements end up selecting the same first > node (where type='notification'), which ends up being left set to the value > of the last operation. > > I believe I am correctly escaping the square brackets above. If I try to > refer to them in order, e.g. > /evidence_gatherer/evidence/evidence_type[1]/xslt_sql, that does not work > either. Have I stumbled upon a bug (I'm using v3.6) or are my XPath > statements wrong? > > Thanks, > Dan > > ---------------------------------------------------------------------------- > -- > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Mar 27 - Feb 2 > Save $400 by Jan. 27 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev2 > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users