Re: [WiX-users] XmlFile element issues - any XPath experts out there?

2012-01-19 Thread Blair
XSLPattern was the draft standard for XPath who's largest implementation
was released as part of IE (either 5 or 6, I'd have to go look it up). By
the time standardization of XPath 1.0 was complete (including separating the
XSLT and XPath languages, which were not separate at the time of the draft),
several changes had occurred altering the syntax on many (but not all)
queries. The only processor still in production implementing the obsolete
draft is MSXML3, which XmlFile and XmlConfig use.

Unfortunately when XmlFile was added to WiX, that history must not have been
known/understood or I believe they would have simply hardcoded the pattern
to use. MSXML3 couldn't default to the current standard because of legacy
code in use. All newer MSXML releases use XPath exclusively, as does the
.NET implementation.

I wrote a little tool to MSI-format-ify strings that I can use to
convert my tested XPath into what I need to place into my WiX. One of
these years I'll clean up that code and contribute it to the OSS universe...

Blair

-Original Message-
From: Dan Gough [mailto:goug...@gmail.com] 
Sent: Tuesday, January 17, 2012 6:44 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] XmlFile element issues - any XPath experts out
there?

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_sqlUPDATEME/xslt_sql
/evidence_type
evidence_type type=ts_feature
xslt_sqlUPDATEME/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='notif
 icatio
 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

Re: [WiX-users] XmlFile element issues - any XPath experts out there?

2012-01-17 Thread Dan Gough
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_sqlUPDATEME/xslt_sql
/evidence_type
evidence_type type=ts_feature
xslt_sqlUPDATEME/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


Re: [WiX-users] XmlFile element issues - any XPath experts out there?

2012-01-13 Thread Blair
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_sqlUPDATEME/xslt_sql
/evidence_type
evidence_type type=ts_feature
xslt_sqlUPDATEME/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


[WiX-users] XmlFile element issues - any XPath experts out there?

2012-01-11 Thread Dan Gough
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_sqlUPDATEME/xslt_sql
/evidence_type
evidence_type type=ts_feature
xslt_sqlUPDATEME/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='notification'[/]]/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


Re: [WiX-users] XmlFile element issues - any XPath experts out there?

2012-01-11 Thread Dan Gough
D'oh - solved.  I was incorrectly escaping the square brackets, using a
forward slash instead of a backslash!  All working great now.

Dan

On Wed, Jan 11, 2012 at 3:43 PM, Dan Gough goug...@gmail.com wrote:

 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_sqlUPDATEME/xslt_sql
 /evidence_type
 evidence_type type=ts_feature
 xslt_sqlUPDATEME/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='notification'[/]]/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


Re: [WiX-users] XmlFile element issues - any XPath experts out there?

2012-01-11 Thread Rob Mensching
Yeah, XPath is horrid in those attributes given the escaping necessary to
pass through to MSI. Sadly, two languages designed in completely
different silos whose special characters collided really badly. sigh/

On Wed, Jan 11, 2012 at 8:20 AM, Dan Gough goug...@gmail.com wrote:

 D'oh - solved.  I was incorrectly escaping the square brackets, using a
 forward slash instead of a backslash!  All working great now.

 Dan

 On Wed, Jan 11, 2012 at 3:43 PM, Dan Gough goug...@gmail.com wrote:

  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_sqlUPDATEME/xslt_sql
  /evidence_type
  evidence_type type=ts_feature
  xslt_sqlUPDATEME/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='notification'[/]]/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




-- 
virtually, Rob Mensching - http://RobMensching.com LLC
--
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