Thanks, what you provided didn't work, but I was able to modify it as below and get it to work. Your modification helped get me in the right direction.
<xsl:template match="wix:Component[*/@Source='$(var.GacFiles)\BizObjects.dll']"> <xsl:copy> <xsl:attribute name="Permanent">yes</xsl:attribute> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> On Fri, Jul 1, 2011 at 6:27 AM, Peter Shirtcliffe <pshirtcli...@sdl.com>wrote: > > Your template matches any node, including attribute nodes, which is > excessive. When it matches the Source attribute node, it copies the > attribute > and then tries to add an attribute under the attribute, which isn't valid. > It > needs to match the component node, so it can add the attribute to that. > > <xsl:template match="Component[ @Source = '$(var.GacFiles)\BizObjects.dll' > ]"> > <xsl:copy> > <xsl:attribute name="Permanent">Yes</xsl:attribute> > <xsl:apply-templates select=="@*|node()"/> > </xsl:copy> > </xsl:template> > > > You might need to add the namespace prefix for Wix to your Component match, > depending on how you're handling the Wix namespace. > > I'd avoid permanent components if at all possible - they are troublesome - > but I have come across a case before where it couldn't be helped. > > -----Original Message----- > From: CoolBreeze [mailto:coolbreeze...@googlemail.com] > Sent: 01 July 2011 11:10 > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Need help with transform > > Can someone help? > > On Thu, Jun 30, 2011 at 10:48 AM, CoolBreeze > <coolbreeze...@googlemail.com>wrote: > > > I have a component that gets installed into the GAC and I need to prevent > > it from being removed during an uninstall. I've created an XSLT that get > > applied during harvest. I need to add 'permanent' to the component, but > it's > > not working. Can anyone tell me what the problem might be with what I > have? > > > > <xsl:template match="@*|node()"> > > <xsl:if test="@Source='$(var.GacFiles)\BizObjects.dll'"> > > <xsl:copy> > > <xsl:attribute name="Permanent">Yes</xsl:attribute> > > <xsl:apply-templates select="@*|node()"/> > > </xsl:copy> > > </xsl:if> > > </xsl:template> > > > > Thanks. > > > > ----------------------------------------------------------------------------- > - > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > SDL PLC confidential, all rights reserved. > If you are not the intended recipient of this mail SDL requests and > requires that you delete it without acting upon or copying any of its > contents, and we further request that you advise us. > SDL PLC is a public limited company registered in England and Wales. > Registered number: 02675207. > Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 > 7DY, UK. > > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users