upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

lufa_filelist_transform.xslt 1.3KB

1234567891011121314151617181920212223242526272829303132333435
  1. <!--
  2. LUFA Library
  3. Copyright (C) Dean Camera, 2013.
  4. dean [at] fourwalledcubicle [dot] com
  5. www.lufa-lib.org
  6. -->
  7. <!-- Atmel Studio framework Module XML transform file -->
  8. <!-- Outputs a flat file list of all source files referenced in all modules of
  9. the input manifest XML file, so that they can be checked for existence. -->
  10. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  11. <xsl:output method="xml" omit-xml-declaration="yes"/>
  12. <!-- Read manifest list, add a comment to indicate the source filename
  13. and then process all ASF nodes in the referenced document -->
  14. <xsl:template match="lufa-manifest">
  15. <xsl:for-each select="xml-source">
  16. <xsl:comment>Sourced from <xsl:value-of select="@filename"/></xsl:comment>
  17. <xsl:apply-templates select="document(@filename)/lufa/asf/*"/>
  18. </xsl:for-each>
  19. </xsl:template>
  20. <!-- Recursively match and process all nodes/attributes -->
  21. <xsl:template match="@*|node()">
  22. <xsl:apply-templates select="@*|node()"/>
  23. </xsl:template>
  24. <!-- Match source file nodes, output filename -->
  25. <xsl:template match="build[@type='c-source']|build[@type='header-file']|build[@type='distribute']">
  26. <xsl:value-of select="@value"/>
  27. <xsl:text>&#xA;</xsl:text>
  28. </xsl:template>
  29. </xsl:stylesheet>