comparison webapp/src/main/webapp/jquery/img/gen_fullscreen_icons.xsl @ 1080:dbd1cf7cd86a

first version of improved icons.
author robcast
date Fri, 25 May 2012 12:15:13 +0200
parents webapp/src/main/webapp/jquery/img/fullscreen_icons.xsl@d296bfc87949
children
comparison
equal deleted inserted replaced
1079:9c2abceb05c5 1080:dbd1cf7cd86a
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="2.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns:xlink="http://www.w3.org/1999/xlink"
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11 >
12
13 <!--
14 Create icons from a single SVG file.
15 In the SVG the icons reside in labelled groups.
16 The visible layers will be present in all SVG files,
17 the hidden layers just once per SVG file. -->
18
19 <xsl:output method="xml"/>
20
21 <xsl:template match="/">
22 <!-- select all layers -->
23 <xsl:apply-templates select="//svg:g[@inkscape:groupmode='layer']" />
24 </xsl:template>
25
26 <xsl:template match="svg:g">
27 <xsl:variable name="name" select="@inkscape:label"/>
28 <xsl:variable name="file" select="concat('fullscreen/svg_gen/',$name,'.svg')"/>
29 <xsl:result-document href="{$file}">
30 <svg:svg>
31 <xsl:copy-of select="/svg:svg/@*"/>
32 <xsl:copy-of select="/svg:svg/*[not(@style='display:none')]"/>
33 <svg:g>
34 <xsl:copy-of select="@*"/>
35 <!-- replace the "style" attribute -->
36 <xsl:attribute name="style">display:inline</xsl:attribute>
37 <xsl:copy-of select="*"/>
38 </svg:g>
39 </svg:svg>
40 </xsl:result-document>
41 </xsl:template>
42
43
44 </xsl:stylesheet>
45