blue.css
[cxml-rng.git] / doc / macros.xsl
blob3b66b9730fe4a546de30d302de66f30de03392af
1 <!--
2 This file is used to transform XSLT stylesheets using "macros" into
3 real XSLT stylesheets.
4 -->
5 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns:macro="http://lichteblau.com/macro"
7 xmlns:extra="http://lichteblau.com/extra"
8 version="1.0">
9 <xsl:output method="xml" indent="no"/>
11 <xsl:namespace-alias stylesheet-prefix="extra" result-prefix="xsl"/>
13 <xsl:template match="@*|node()">
14 <xsl:copy>
15 <xsl:apply-templates select="@*|node()"/>
16 </xsl:copy>
17 </xsl:template>
19 <xsl:template match="macro:maybe-columns">
20 <extra:choose>
21 <extra:when test="{@test}">
22 <columns width="100%">
23 <column width="60%">
24 <xsl:apply-templates/>
25 </column>
26 <column width="5%">
27 &#160;
28 </column>
29 <column width="35%">
30 <extra:call-template name="main-right"/>
31 </column>
32 </columns>
33 </extra:when>
34 <extra:otherwise>
35 <xsl:apply-templates/>
36 </extra:otherwise>
37 </extra:choose>
38 </xsl:template>
40 <xsl:template match="macro:copy-attribute">
41 <extra:if test="{@path}/@{@name}">
42 <extra:attribute name="{@name}">
43 <extra:value-of select="{@path}/@{@name}"/>
44 </extra:attribute>
45 </extra:if>
46 </xsl:template>
47 </xsl:stylesheet>