1 <?xml version="1.0" encoding="UTF-8"?>
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
4 <xsl:import href="transform_base.xsl"/>
6 <xsl:output method="xml" indent="yes"/>
8 <xsl:param name="keyword.namespace" select="'Atmel.Language.C'"/>
10 <xsl:template name="generate.book.title">
11 <xsl:text>LUFA Library</xsl:text>
14 <xsl:template name="generate.book.id">
15 <xsl:param name="book.title"/>
18 <xsl:value-of select="@id"/>
21 <xsl:value-of select="translate($book.title, ' ','')"/>
26 <xsl:template match="doxygen">
27 <xsl:variable name="book.title">
28 <xsl:call-template name="generate.book.title"/>
30 <xsl:variable name="book.id">
31 <xsl:call-template name="generate.book.id">
32 <xsl:with-param name="book.title" select="$book.title"/>
36 <book name="{$book.id}">
38 <xsl:value-of select="$book.title"/>
41 <xsl:call-template name="generate.top.level.page">
42 <xsl:with-param name="top.level.page" select="compounddef[@kind = 'page' and contains(@id, 'index')]"/>
45 <xsl:for-each select="compounddef[@kind = 'page' and not(contains(@id, 'index'))]">
46 <xsl:if test="not(//innerpage[@refid = current()/@id])">
47 <xsl:call-template name="generate.top.level.page">
48 <xsl:with-param name="top.level.page" select="current()"/>
55 <xsl:template name="generate.top.level.page">
56 <xsl:param name="top.level.page"/>
58 <chapter id="{$top.level.page/@id}">
60 <xsl:value-of select="$top.level.page/title"/>
62 <xsl:apply-templates select="$top.level.page/detaileddescription"/>
64 <xsl:for-each select="$top.level.page/innerpage">
65 <xsl:apply-templates select="ancestor::*/compounddef[@kind = 'page' and @id = current()/@refid]"/>
70 <xsl:template match="compounddef[@kind = 'page']">
73 <xsl:value-of select="title"/>
75 <xsl:apply-templates select="detaileddescription"/>
77 <xsl:for-each select="innerpage">
78 <xsl:apply-templates select="ancestor::*/compounddef[@kind = 'page' and @id = current()/@refid]"/>
83 <xsl:template match="linebreak">
84 <xsl:text> </xsl:text>
87 <xsl:template match="image">
90 <xsl:value-of select="."/>
96 <xsl:attribute name="fileref">images/<xsl:value-of select="@name"/></xsl:attribute>
103 <xsl:template match="detaileddescription">
104 <xsl:apply-templates/>
107 <xsl:template match="sect1 | sect2 | sect3 | sect4 | sect5 | sect6 | sect7 | sect8 | sect9">
110 <xsl:attribute name="id">
111 <xsl:value-of select="@id"/>
116 <xsl:value-of select="title"/>
119 <xsl:apply-templates/>
123 <xsl:template match="anchor">
125 <indexterm id="{@id}"/>
129 <xsl:template match="compoundname"/>
131 <xsl:template match="title"/>
133 <xsl:template match="indexterm"/>
135 <xsl:template match="indexentry">
136 <xsl:variable name="prim">
138 <xsl:when test="contains(primaryie, ',')">
139 <xsl:value-of select="normalize-space(substring-before(primaryie, ','))"/>
142 <xsl:value-of select="primaryie"/>
147 <xsl:variable name="sec">
149 <xsl:when test="contains(primaryie, ',')">
150 <xsl:value-of select="normalize-space(substring-after(primaryie, ','))"/>
152 <xsl:when test="seondariye">
153 <xsl:value-of select="secondaryie"/>
159 <xsl:variable name="tert">
161 <xsl:when test="contains(primaryie, ',')">
163 <xsl:when test="secondaryie">
164 <xsl:value-of select="secondaryie"/>
168 <xsl:when test="tertiaryie">
169 <xsl:value-of select="tertiaryie"/>
177 <xsl:attribute name="id">
178 <xsl:value-of select="@id"/>
181 <xsl:if test="$prim">
183 <xsl:value-of select="$prim"/>
188 <xsl:value-of select="$sec"/>
191 <xsl:if test="$tert">
193 <xsl:value-of select="$tert"/>