Luminophore
New Member
I would like to use xslt to edit .wxs file which was generated from \[code\]heat\[/code\] in wixthis is components_en_us.wxs\[code\]<?xml version="1.0" encoding="utf-8"?><Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <DirectoryRef Id="CLASSES"> <Directory Id="dirAB609E465A12655D740B32B2BA26C468" Name="alfresco"> <Directory Id="dir68A1A3CC25353B021B1D7D979B520AF0" Name="extension"> <Component Id="cmp0FAE663628DD6BAE53501BB26264259B" Guid="1CBE6568-96E5-4844-BF02-99AF0DE1719D"> <File Id="fil867FDB2D2761B5912BA54F92F5E928D1" KeyPath="yes" Source="SourceDir\alfresco\extension\web-client-config-custom.xml" /> </Component> </Directory> </Directory> </DirectoryRef> </Fragment></Wix>\[/code\]but the problem is I have others .wxs files (components_xx_yy.wxs for other languages) and the Component/File Id are the same. If I compile using this method I will get an error\[code\]error LGHT0091 : Duplicate symbol 'Component:cmp0FAE663628DD6BAE53501BB26264259B' found. This typically me ans that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique.\[/code\]I googled and found that I may use the xslt to change the Component/File id in components_en_us.wxsSo, I expect something like\[code\]<?xml version="1.0" encoding="utf-8"?><Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <DirectoryRef Id="CLASSES"> <Directory Id="dirAB609E465A12655D740B32B2BA26C468" Name="alfresco"> <Directory Id="dir68A1A3CC25353B021B1D7D979B520AF0" Name="extension"> <Component Id="en_US_cmp0FAE663628DD6BAE53501BB26264259B" Guid="1CBE6568-96E5-4844-BF02-99AF0DE1719D"> <File Id="fil867FDB2D2761B5912BA54F92F5E928D1" KeyPath="yes" Source="SourceDir\alfresco\extension\web-client-config-custom.xml" /> </Component> </Directory> </Directory> </DirectoryRef> </Fragment></Wix>\[/code\]right now, I have this xslt from another question but I have no idea how to implement it like I want.\[code\]<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"> <xslutput method="xml" indent="yes"/> <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template></xsl:stylesheet>\[/code\]So, please, correct me if my understanding is wrong and please help me with .xslt tooThanks in advanceedit : Is this way a best practice, or should I do something else to solve this duplication error.