xsl:processing-instruction, that's what I needed, thanks. - Gary > -----Original Message----- > From: Peter Shirtcliffe [mailto:pshirtcli...@sdl.com] > Sent: Monday, March 12, 2012 6:29 AM > To: g...@gocek.net; General discussion for Windows Installer > XML toolset. > Subject: Re: [WiX-users] Transform output of heat to insert > an includestatement > > > This should get you started. > > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"> > <xsl:output method="xml" version="1.0" encoding="UTF-8" > indent="yes"/> > > <xsl:template match="wix:Wix"> > <xsl:copy> > <xsl:processing-instruction > name="include">defines.wxi</xsl:processing-instruction> > <xsl:apply-templates/> > </xsl:copy> > </xsl:template> > > <!-- Identity transform. --> > <xsl:template match="@*|node()"> > <xsl:copy> > <xsl:apply-templates select="@*|node()" /> > </xsl:copy> > </xsl:template> > > </xsl:stylesheet> > > -----Original Message----- > From: Gary Gocek [mailto:g...@gocek.org] > Sent: 08 March 2012 17:41 > To: General discussion for Windows Installer XML toolset. > Subject: [WiX-users] Transform output of heat to insert an > include statement > > I use heat to generate a WXS file with Fragments. I used the > -var arg to > replace the path to the files with a preprocessor variable. I > can specify > the variable's value in the command line to candle with the > -d argument. > But, I have a wxi file that I would like to include. > > I can transform the output of heat with an XSLT file, and I > am successfully > removing some unwanted files. > > But I have not been able to figure out a transform that > inserts <?include > file.wxi ?> inside the Wix element and before the first fragment. > > Does anyone have an XSLT example? The end result should be > something like: > > <?xml version="1.0" encoding="utf-8"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> > <?include defines.wxi ?> > <Fragment> > <DirectoryRef Id="DirId"> > <Component Id="cmpDFB0B44999D95218F6BC4457C253DAB1" > Guid="{08038211-6E9B-4C75-9278-9B8FF1812BED}"> > <File Id="filF161DE2A55DA8301F09DDB1F0B9F185E" > KeyPath="yes" Source="$(var.MyPath)\myFile.exe" /> > </Component> > ... > > Any suggestions? > > Thanks, > Gary
------------------------------------------------------------------------------ Try before you buy = See our experts in action! 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-dev2 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users