3      Copyright (C) Dean Camera, 2013.
 
   5   dean [at] fourwalledcubicle [dot] com
 
   9 <!-- Atmel Studio framework Module XML transform file -->
 
  11 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
  12         <xsl:output method="xml" omit-xml-declaration="yes"/>
 
  14         <!-- Store the LUFA Doxygen tag filename mentioned in the root node for later use -->
 
  15         <xsl:param name="lufa-doxygen-tagfile" select="lufa-manifest/@tagfile"/>
 
  17         <!-- Read manifest list, add a comment to indicate the source filename
 
  18              and then copy/process all ASF nodes in the referenced document -->
 
  19         <xsl:template match="lufa-manifest">
 
  20                 <xsl:comment>This file has been automatically generated from the LUFA Atmel Studio integration XML files.</xsl:comment>
 
  22                 <asf xmlversion="1.0">
 
  23                         <xsl:for-each select="xml-source">
 
  25                                 <xsl:text>

</xsl:text>
 
  26                                 <xsl:comment>Sourced from <xsl:value-of select="@filename"/></xsl:comment>
 
  27                                 <xsl:text>
</xsl:text>
 
  29                                 <xsl:apply-templates select="document(@filename)/lufa/asf/*"/>
 
  31                                 <xsl:if test="position()=last()">
 
  32                                         <xsl:text>

</xsl:text>
 
  39         <!-- Recursively match and copy/process all nodes/attributes -->
 
  40         <xsl:template match="@*|node()">
 
  42                         <xsl:apply-templates select="@*|node()"/>
 
  46         <!-- For Doxygen entry point nodes we need to convert them to add additional
 
  47                 help link nodes so that they show up as links in Studio correctly -->
 
  48         <xsl:template match="build[@type='doxygen-entry-point']">
 
  49                 <xsl:copy-of select="current()"/>
 
  51                 <xsl:call-template name="add_help_nodes">
 
  52                     <xsl:with-param name="filename" select="document($lufa-doxygen-tagfile)//compound[name=current()/@value]/filename"/>
 
  56         <!-- Generate additional help nodes from the given help filename -->
 
  57         <xsl:template name="add_help_nodes">
 
  58                 <xsl:param name="filename"/>
 
  60                 <build type="online-help" subtype="module-help-page-append">
 
  61                         <xsl:attribute name="value">
 
  62                             <xsl:value-of select="$filename"/>
 
  66                 <build type="offline-help" subtype="module-help-page-append">
 
  67                         <xsl:attribute name="value">
 
  68                                 <xsl:value-of select="$filename"/>