filter.xslt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0"
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns="http://schemas.microsoft.com/wix/2006/wi"
  5. xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
  6. <!-- <xsl:key name="unusedcomponent-search" match="wix:Component[not (contains(wix:File/@Source, '.dll')) or contains(wix:File/@Source, 'mod')]" use="@Id"/> -->
  7. <xsl:key name="unusedcomponent-search" match="wix:Component[not (contains(wix:File/@Source, '.dll'))]" use="@Id"/>
  8. <!-- strip all extraneous whitespace -->
  9. <xsl:strip-space elements="*"/>
  10. <!-- Copy all attributes and elements to the output. -->
  11. <xsl:template match="@*|*">
  12. <xsl:copy>
  13. <xsl:apply-templates select="@*" />
  14. <xsl:apply-templates select="*" />
  15. </xsl:copy>
  16. </xsl:template>
  17. <!-- Exclude all File elements that are not a .dll file -->
  18. <xsl:template match="wix:Component[not(contains(wix:File/@Source,
  19. '.dll'))]" />
  20. <!-- Exclude Directory elements -->
  21. <!--<xsl:template match="wix:Directory[not(contains(*/@Source, '.pdb'))]"/>-->
  22. <xsl:template match="wix:Directory[@Name='conf']"/>
  23. <xsl:template match="wix:Directory[@Name='sounds']"/>
  24. <xsl:template match="wix:Directory[@Name='grammar']"/>
  25. <!-- Remove ComponentRefs. -->
  26. <xsl:template match="wix:ComponentRef[key('unusedcomponent-search', @Id)]"/>
  27. </xsl:stylesheet>