første xml update
[virt-orchestrator.git] / vFLOWER / getProperties.xsl
1 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2
3         <xsl:output method="text"/>
4         <xsl:strip-space elements="*"/>
5
6         <xsl:template match="/properties">
7                 <!-- Package meta info -->
8                 <xsl:apply-templates select="entry[@key = 'pkg-id']"/>
9                 <xsl:apply-templates select="entry[@key = 'pkg-description']"/>
10
11                 <!-- Element meta info -->
12                 <xsl:apply-templates select="entry[@key = 'id']"/>
13                 <xsl:apply-templates select="entry[@key = 'type']"/>
14         </xsl:template>
15
16         <xsl:template match="entry">
17                 <xsl:text>entry.</xsl:text>
18                 <xsl:value-of select="@key"/>
19                 <xsl:text> = </xsl:text>
20                 <xsl:value-of select="."/>
21                 <xsl:text>&#xa;</xsl:text>
22         </xsl:template>
23
24         <xsl:template match="/categories">
25                 <xsl:text>element.category = </xsl:text>
26                 <xsl:variable name="path">
27                         <xsl:for-each select="category">
28                                 <xsl:value-of select="name"/>
29                                 <xsl:text>/</xsl:text>
30                         </xsl:for-each>
31                 </xsl:variable>
32                 <xsl:value-of select="$path"/>
33                 <xsl:text>&#xa;</xsl:text>
34         </xsl:template>
35
36 </xsl:stylesheet>