Hi Brian,

It worked! Thank you so much!

I have no idea why that worked--there's nothing in the XPath that takes
into account the namespace, it's just ignored. How did you come across
this fantastic knowledge, trial and error?

Thanks again,
Zach

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Brian
Rogers
Sent: Wednesday, August 20, 2008 4:17 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] XPath or XSLPattern for XmlConfig?

Hey Zach,

Just curious, could you use the below XPath instead?

/hibernate-configuration/session-factory/[EMAIL PROTECTED]'connection.c
onnection_string'[\]]

Thanks,

-- 
Brian Rogers
"Intelligence removes complexity." - Me
http://icumove.spaces.live.com

On Wed, Aug 20, 2008 at 2:14 AM, Zachary Young
<[EMAIL PROTECTED]>wrote:

> Hi,
>
>
>
> Can someone please verify that XmlConfig uses XPath (and not
XSLPattern)
> for its query language?
>
>
>
> When I run this:
>
>
>
> <util:XmlConfig
>
>   Id="Hibernate.Config"
>
>   Action="create"
>
>   ElementPath="//*[\[]local-name()='property' and
>
namespace-uri()='urn:nhibernate-configuration-2.2'[EMAIL PROTECTED]'connect
> ion.connection_string'[\]]"
>
>   File="[INSTALLDIR]Configuration\Hibernate.Config.xml"
>
>   On="install"
>
>   Node="value"
>
>   Value="Server=[SERVER];Database=[DBNAME];User
> Id=[USERID];Password=[PASSWORD]"
>
>   />
>
>
>
> against this:
>
>
>
> <?xml version='1.0' encoding='utf-8'?>
>
> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
>
>  <session-factory>
>
>    <property name="connection.connection_string"></property>
>
>  </session-factory>
>
> </hibernate-configuration>
>
>
>
> I get the following error in my installation log:
>
>
>
> ExecXmlConfig:  Error 0x80004005: failed to find node: //* in XML
file:
> D:\Inetpub\services\console\Configuration\Hibernate.Config.xml
>
> MSI (s) (8C!98) [01:55:10:115]: Product: ConsoleWS.Setup -- Error
25542.
> Failed to find node: //*[local-name()='property' and
>
namespace-uri()='urn:nhibernate-configuration-2.2'[EMAIL 
PROTECTED]'connection.co
> nnection_string'] in XML file:
> D:\Inetpub\services\console\Configuration\Hibernate.Config.xml, system
> error: -2147467259
>
>
>
> Error 25542. Failed to find node: //*[local-name()='property' and
>
namespace-uri()='urn:nhibernate-configuration-2.2'[EMAIL 
PROTECTED]'connection.co
> nnection_string'] in XML file:
> D:\Inetpub\services\console\Configuration\Hibernate.Config.xml, system
> error: -2147467259
>
>
>
> The above error seems very reminiscent of another problem I was having
a
> couple of days ago where I was trying this same XPath with the XmlFile
> Element. I kept getting the 'failed to find node: //*...' error until
I
> realized that XmlFile Element was defaulting to XSLPattern. Changing
the
> ' SelectionLanguage' attribute to 'XPath' fixed the problem
immediately.
>
>
>
> If I take the XPath from the error message above, I can turn right
back
> around, load the Hibernate.config file in Chris Lovett's XML Notepad
> 2007 and <oXygen/> (using Saxon6.5.4 for XPath 1.0 and Saxon8B for
XPath
> 2.0) and find the connection 'property' element. I am fairly certain
> that it is valid XPath:
>
>
>
> //*[local-name()='property' and
>
namespace-uri()='urn:nhibernate-configuration-2.2'[EMAIL 
PROTECTED]'connection.co
> nnection_string']
>
>
>
> Is my XmlConfig configured incorrectly? I'm using WiX 3.0.4415.0.
>
>
>
> Thank you,
>
> Zach
>
------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to