Add missing indexterm entries to the Atmel Studio help transform.
[pub/USBasp.git] / LUFA / StudioIntegration / HV1 / lufa_helpcontentsetup_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 HV1 Setup XHTML transform file -->
10
11 <!-- Updates a helpcontentsetup.msha document to add appropriate version
12 information. -->
13 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0">
14 <xsl:output method="xml" omit-xml-declaration="yes"/>
15
16 <!-- Need to input the LUFA extension version for later use -->
17 <xsl:param name="extension-version"/>
18
19 <!-- Recursively match and copy/process all nodes/attributes -->
20 <xsl:template match="node()">
21 <xsl:copy>
22 <xsl:copy-of select="@*"/>
23 <xsl:apply-templates select="node()"/>
24 </xsl:copy>
25 </xsl:template>
26
27 <!-- Update the LUFA version to the version passed as a parameter -->
28 <xsl:template match="xhtml:title | xhtml:div[@class='details']/xhtml:span[@class='name']">
29 <xsl:copy>
30 <xsl:copy-of select="@*"/>
31
32 <xsl:value-of select="."/>
33 <xsl:text> (</xsl:text>
34 <xsl:value-of select="$extension-version"/>
35 <xsl:text>)</xsl:text>
36 </xsl:copy>
37 </xsl:template>
38
39 <xsl:template match="xhtml:div[@class='package']/xhtml:a">
40 <xsl:copy>
41 <xsl:copy-of select="@class"/>
42
43 <xsl:attribute name="href">
44 <xsl:text>lufa_help_</xsl:text>
45 <xsl:value-of select="$extension-version"/>
46 <xsl:text>.mshc</xsl:text>
47 </xsl:attribute>
48
49 <xsl:text>lufa_help_</xsl:text>
50 <xsl:value-of select="$extension-version"/>
51 <xsl:text>.mshc</xsl:text>
52 </xsl:copy>
53 </xsl:template>
54 </xsl:stylesheet>