Hi Rob, Indeed, that's what I've now done. Took me a while because I was totally new to xslt. Just in case anyone else needs it, here it is.
-Nick --------------------------------------------- <?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" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi" exclude-result-prefixes="msxsl" > <xsl:output method="xml" indent="yes"/> <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> <xsl:template match="wix:DirectoryRef"> <xsl:copy> <xsl:attribute name="DiskId">10</xsl:attribute> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> ----------------------------- -----Original Message----- From: Rob Mensching [mailto:r...@wixtoolset.org] Sent: 06 July 2009 18:38 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] wixlib and media/diskid settings What about using an XSL transform to modify the heat output? Nick Ball wrote: > Hi, > > > > I'm creating a wixlib, and then using it in my main setup program, but > I'd like the lib to go into a separate cab file. Because the contents of > the lib have been generated by heat, I've put the disk ID on the > directory, rather than each component. This code, understandably, does > not work: > > > > <Fragment> > > <Media Id="2" Cabinet="file.cab" EmbedCab="no"/> > > > > <DirectoryRef Id="INSTALLFOLDER"> > > <Directory Id="Test" Name="Test" DiskId="2"> > > </Directory> > > </DirectoryRef> > > </Fragment> > > > > Heat output: > > > > <Fragment> > > <DirectoryRef Id="Test"> > > <Component Id="File" Guid="*"> > > <File Id="File" KeyPath="yes" > Source="$(var.Folder)\file" /> > > </Component> > > </DirectoryRef> > > </Fragment> > > > > If I edit the heat output directly and specify the diskid, it does work. > > <Fragment> > > <DirectoryRef Id="Test" DiskId="2"> > > <Component Id="File" Guid="*"> > > <File Id="File" KeyPath="yes" > Source="$(var.Folder)\file" /> > > </Component> > > </DirectoryRef> > > </Fragment> > > > > But I really want to be able to regenerate the file that heat produces > without any subsequent editing. Is there a way of doing this? One > solution that I keep wondering about is changing the output of heat to > an include file. This would get round a bunch of problems I've been > having. Could that be added as a feature request? > > > > Regards > > > > Nick > > ------------------------------------------------------------------------ ------ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users