3 Copyright (C) Dean Camera, 2019.
5 dean [at] fourwalledcubicle [dot] com
9 <!-- Atmel Studio framework Extension XML transform file -->
11 <!-- Creates an extension.xml document from a given manifest list of XML files,
12 and adds appropriate documentation base URI entries and version
14 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
15 <xsl:output method="xml" omit-xml-declaration="yes"/>
17 <!-- Store the LUFA version mentioned in the root node for later use -->
18 <xsl:param name="lufa-version" select="lufa-manifest/@version"/>
20 <!-- Read manifest list and then process all FDK nodes in the referenced
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>
25 <extension-container xmlversion="2.0">
26 <xsl:for-each select="xml-source">
27 <xsl:apply-templates select="document(@filename)/lufa/extension-container/*"/>
29 </extension-container>
32 <!-- Recursively match and copy/process all nodes/attributes -->
33 <xsl:template match="@*|node()">
35 <xsl:apply-templates select="@*|node()"/>
39 <!-- Update the extension version to the version of LUFA being used -->
40 <xsl:template match="extension/@version">
41 <xsl:attribute name="version">
42 <xsl:value-of select="substring($lufa-version, 1, 2)"/>
43 <xsl:text>.</xsl:text>
44 <xsl:value-of select="substring($lufa-version, 3, 2)"/>
45 <xsl:text>.</xsl:text>
46 <xsl:value-of select="substring($lufa-version, 5, 2)"/>
50 <!-- Update the extension online help URLs to the version of LUFA being
52 <xsl:template match="online-help/*/@baseurl">
53 <xsl:attribute name="baseurl">
54 <xsl:value-of select="current()"/>
55 <xsl:value-of select="$lufa-version"/>
56 <xsl:text>/html/</xsl:text>
60 <xsl:template match="online-help/index-page/@url">
61 <xsl:attribute name="url">
62 <xsl:value-of select="current()"/>
63 <xsl:value-of select="$lufa-version"/>
64 <xsl:text>/html/</xsl:text>