buried more whitesapce
[torrus-plus.git] / src / scripts / xml / extract-skeleton.xsl
blob524d1ede784a400ca24937802d536de6fc157ac2
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2002 Stanislav Sinyagin
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
19 $Id$
20 Stanislav Sinyagin <ssinyagin@yahoo.com>
22 XSLT Template to transform Torrus configuration into a skeleton of
23 subtrees and leaves only.
25 -->
27 <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
29 <xsl:output method="xml" encoding="UTF-8" indent="yes" />
30 <xsl:strip-space elements="*" />
32 <xsl:template match="/configuration">
33 <configuration>
34 <creator-info>
35 This file is a result of extract-skeleton.xsl template
36 </creator-info>
37 <xsl:text>
38 </xsl:text>
39 <xsl:apply-templates />
40 </configuration>
41 </xsl:template>
44 <xsl:template match="creator-info">
45 <creator-info>
46 <xsl:value-of select="." />
47 </creator-info>
48 <xsl:text>
49 </xsl:text>
50 </xsl:template>
53 <xsl:template match="datasources">
54 <datasources>
55 <xsl:apply-templates />
56 </datasources>
57 <xsl:text>
58 </xsl:text>
59 </xsl:template>
62 <xsl:template match="subtree">
63 <xsl:text>
64 </xsl:text>
65 <subtree name="{@name}">
66 <xsl:text> </xsl:text>
67 <xsl:apply-templates />
68 </subtree>
69 <xsl:text>
70 </xsl:text>
71 </xsl:template>
74 <xsl:template match="leaf">
75 <xsl:text>
76 </xsl:text>
77 <leaf name="{@name}">
78 <xsl:text> </xsl:text>
79 <xsl:apply-templates />
80 </leaf>
81 <xsl:text>
82 </xsl:text>
83 </xsl:template>
86 </xsl:transform>