mirror of
https://github.com/moparisthebest/xeps
synced 2024-10-31 15:35:07 -04:00
1 line
6.9 KiB
XML
1 line
6.9 KiB
XML
|
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:svg='http://xsltsl.org/svg'
xmlns:doc="http://xsltsl.org/xsl/documentation/1.0"
exclude-result-prefixes="doc">
<xsl:variable name='svg-public-id' select='"-//W3C//DTD SVG 20010904//EN"'/>
<xsl:variable name='svg-system-id' select='"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"'/>
<doc:reference xmlns="">
<referenceinfo>
<releaseinfo role="meta">
$Id$
</releaseinfo>
<author>
<surname>Ball</surname>
<firstname>Steve</firstname>
</author>
<copyright>
<year>2002</year>
<holder>Steve Ball</holder>
</copyright>
</referenceinfo>
<title>SVG Stylesheet</title>
<partintro>
<section>
<title>Introduction</title>
<para>This module provides templates for creating SVG images.</para>
</section>
</partintro>
</doc:reference>
<doc:template name="svg:aqua-button-defs" xmlns="">
<refpurpose>Aqua-style Button</refpurpose>
<refdescription>
<para>Part of the mechanism to create an Aqua-style button. Include a call to this template in your SVG document's <sgmltag>defs</sgmltag> element. This template only needs to be included once. Use this in conjunction with <sgmltag>svg:aqua-button</sgmltag>.</para>
<para>The default values for color1, color2 and color3 result in a grey button.</para>
</refdescription>
<refparameter>
<variablelist>
<varlistentry>
<term>prefix</term>
<listitem>
<para>A prefix to append to the identifiers used, so that they don't clash with other identifiers. Default: "aqua-".</para>
</listitem>
</varlistentry>
<varlistentry>
<term>color1</term>
<listitem>
<para>The base colour of the button. Default: "#d9d9d9".</para>
</listitem>
</varlistentry>
<varlistentry>
<term>color2</term>
<listitem>
<para>A "background" colour for the button. Should be a darker colour than color1. Default: "#a9a9a9".</para>
</listitem>
</varlistentry>
<varlistentry>
<term>color3</term>
<listitem>
<para>A highlight colour for the button. Should be a lighter colour than color1. Default: "#f9f9f9".</para>
</listitem>
</varlistentry>
</variablelist>
</refparameter>
<refreturn>
<para>Returns SVG result-tree-fragment.</para>
</refreturn>
</doc:template>
<xsl:template name="svg:aqua-button-defs">
<xsl:param name="prefix" select='"aqua-"'/>
<xsl:param name="color1" select='"#d9d9d9"'/>
<xsl:param name="color2" select='"#a9a9a9"'/>
<xsl:param name="color3" select='"#f9f9f9"'/>
<linearGradient id='{$prefix}gradient' x1='0%' y1='0%' x2='0%' y2='100%'>
<stop offset='0%' stop-color='{$color2}'/>
<stop offset='100%' stop-color='{$color1}'/>
</linearGradient>
<linearGradient id='{$prefix}highlight-gradient' x1='0%' y1='0%' x2='0%' y2='100%'>
<stop offset='0%' stop-color='#ffffff'/>
<stop offset='75%' stop-color='{$color3}' stop-opacity='0'/>
<stop offset='100%' stop-color='{$color3}' stop-opacity='0'/>
</linearGradient>
<linearGradient id='{$prefix}revhighlight-gradient' x1='0%' y1='100%' x2='0%' y2='0%'>
<stop offset='0%' stop-color='#ffffff'/>
<stop offset='50%' stop-color='{$color3}' stop-opacity='0'/>
<stop offset='100%' stop-color='{$color3}' stop-opacity='0'/>
</linearGradient>
<linearGradient id='{$prefix}corner-left-gradient' x1='0%' y1='0%' x2='100%' y2='100%'>
<stop offset='0%' stop-color='#000000'/>
<stop offset='100%' stop-color='{$color3}' stop-opacity='0'/>
</linearGradient>
<linearGradient id='{$prefix}corner-right-gradient' x1='100%' y1='0%' x2='0%' y2='100%'>
<stop offset='0%' stop-color='#000000'/>
<stop offset='100%' stop-color='{$color3}' stop-opacity='0'/>
</linearGradient>
|