Clean repository before packaging into VSIX extensions.
[pub/USBasp.git] / LUFA / StudioIntegration / XSLT / lufa_module_transform.xslt
1 <!--
2 LUFA Library
3 Copyright (C) Dean Camera, 2013.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.lufa-lib.org
7 -->
8
9 <!-- Atmel Studio framework Module XML transform file -->
10
11 <!-- Creates an asf.xml module document from a given manifest list of XML files,
12 and adds appropriate documentation links by cross-referencing the Doxygen
13 tag output file to map Doxygen group names to generated filenames. -->
14 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
15 <xsl:output method="xml" omit-xml-declaration="yes"/>
16
17 <!-- Store the LUFA Doxygen tag filename mentioned in the root node for later use -->
18 <xsl:param name="lufa-doxygen-tagfile" select="lufa-manifest/@tagfile"/>
19
20 <!-- Read manifest list, add a comment to indicate the source filename
21 and then copy/process all ASF nodes in the referenced document -->
22 <xsl:template match="lufa-manifest">
23 <xsl:comment>This file has been automatically generated from the LUFA Atmel Studio integration XML files.</xsl:comment>
24
25 <asf xmlversion="1.0">
26 <xsl:for-each select="xml-source">
27 <xsl:comment>Sourced from <xsl:value-of select="@filename"/></xsl:comment>
28 <xsl:apply-templates select="document(@filename)/lufa/asf/*"/>
29 </xsl:for-each>
30 </asf>
31 </xsl:template>
32
33 <!-- Recursively match and copy/process all nodes/attributes -->
34 <xsl:template match="@*|node()">
35 <xsl:copy>
36 <xsl:apply-templates select="@*|node()"/>
37 </xsl:copy>
38 </xsl:template>
39
40 <!-- For Doxygen entry point nodes we need to convert them into help link
41 nodes instead, so that they show up as links in Studio correctly -->
42 <xsl:template match="build[@type='doxygen-entry-point']">
43 <xsl:call-template name="add_help_nodes">
44 <xsl:with-param name="filename" select="document($lufa-doxygen-tagfile)//compound[name=current()/@value]/filename"/>
45 </xsl:call-template>
46 </xsl:template>
47
48 <!-- Generate additional help nodes from the given help filename -->
49 <xsl:template name="add_help_nodes">
50 <xsl:param name="filename"/>
51
52 <build type="online-help" subtype="module-help-page-append">
53 <xsl:attribute name="value">
54 <xsl:value-of select="$filename"/>
55 </xsl:attribute>
56 </build>
57 </xsl:template>
58
59 </xsl:stylesheet>