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