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