1
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
4
<xsl:template match="*">
6
<xsl:copy-of select="@*" />
7
<xsl:apply-templates />
11
<xsl:template match="code">
12
<xsl:element name="c"><xsl:apply-templates /></xsl:element>
15
<xsl:template match="div">
17
<xsl:when test="@class = 'example'">
18
<example><xsl:apply-templates /></example>
20
<xsl:when test="@class = 'behavior'">
21
<block type="behavior"><xsl:apply-templates /></block>
23
<xsl:when test="@class = 'default'">
24
<block type="default"><xsl:apply-templates /></block>
26
<xsl:when test="@class = 'example-block'">
27
<block type="example"><xsl:apply-templates /></block>
29
<xsl:when test="@class = 'overrides'">
30
<block type="overrides"><xsl:apply-templates /></block>
32
<xsl:when test="@class = 'usage'">
33
<block type="usage"><xsl:apply-templates /></block>
36
<xsl:copy-of select="." />
41
<xsl:template match="table">
43
<xsl:if test="tr[1]/th">
46
<xsl:apply-templates select="tr[1]/th[1]" />
48
<xsl:for-each select="tr[1]/th[position() > 1]">
50
<xsl:apply-templates />
55
<xsl:for-each select="tr">
58
<xsl:apply-templates select="td[1]" />
60
<xsl:for-each select="td[position() > 1]">
62
<xsl:apply-templates />