diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-01-03 16:16:45 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-01-03 16:16:45 +0000 |
commit | 56f03a793c8f6d63b3ce70bfdb1f4c4f05e1934a (patch) | |
tree | 023f9b967991af7269befde633ce254eddc86ca2 /LUFA/StudioIntegration/XSLT/lufa_filelist_transform.xslt | |
parent | 5386a5a7ffd4a2b739ce6f41d918378a6f70da15 (diff) | |
download | lufa-56f03a793c8f6d63b3ce70bfdb1f4c4f05e1934a.tar.gz lufa-56f03a793c8f6d63b3ce70bfdb1f4c4f05e1934a.tar.bz2 lufa-56f03a793c8f6d63b3ce70bfdb1f4c4f05e1934a.zip |
Move out Studio Integration XML transform files to their own directory for neatness.
Diffstat (limited to 'LUFA/StudioIntegration/XSLT/lufa_filelist_transform.xslt')
-rw-r--r-- | LUFA/StudioIntegration/XSLT/lufa_filelist_transform.xslt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/LUFA/StudioIntegration/XSLT/lufa_filelist_transform.xslt b/LUFA/StudioIntegration/XSLT/lufa_filelist_transform.xslt new file mode 100644 index 000000000..103ff51a9 --- /dev/null +++ b/LUFA/StudioIntegration/XSLT/lufa_filelist_transform.xslt @@ -0,0 +1,35 @@ +<!-- + LUFA Library + Copyright (C) Dean Camera, 2013. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +--> + +<!-- Atmel Studio framework Module XML transform file --> + +<!-- Outputs a flat file list of all source files referenced in all modules of + the input manifest XML file, so that they can be checked for existence. --> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="xml" omit-xml-declaration="yes"/> + + <!-- Read manifest list, add a comment to indicate the source filename + and then process all ASF nodes in the referenced document --> + <xsl:template match="lufa-manifest"> + <xsl:for-each select="xml-source"> + <xsl:comment>Sourced from <xsl:value-of select="@filename"/></xsl:comment> + <xsl:apply-templates select="document(@filename)/lufa/asf/*"/> + </xsl:for-each> + </xsl:template> + + <!-- Recursively match and process all nodes/attributes --> + <xsl:template match="@*|node()"> + <xsl:apply-templates select="@*|node()"/> + </xsl:template> + + <!-- Match source file nodes, output filename --> + <xsl:template match="build[@type='c-source']|build[@type='header-file']"> + <xsl:value-of select="@value"/> + <xsl:text>
</xsl:text> + </xsl:template> +</xsl:stylesheet> |