On s'apprête à customiser le comportement aux requêtes PUT. Copie telle quelle du...
[Plinn.git] / _xsl / actionsMigration.xsl
1 <?xml version="1.0"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
4 version="1.0">
5
6 <xsl:output method="xml" indent="yes" />
7
8 <xsl:template match="/">
9 <object name="portal_actions"
10 meta_type="CMF Actions Tool"
11 xmlns:i18n="http://xml.zope.org/namespaces/i18n">
12
13 <xsl:for-each select="/actions-tool/action-provider/action">
14 <xsl:variable name="category" select="@category"/>
15 <xsl:if test="count((preceding-sibling::action|../preceding-sibling::action-provider/action)[@category=$category])=0">
16
17 <xsl:call-template name="action_category">
18 <xsl:with-param name="category" select="$category"/>
19 </xsl:call-template>
20
21 </xsl:if>
22 </xsl:for-each>
23 </object>
24 </xsl:template>
25
26 <xsl:template name="action_category">
27 <xsl:param name="category"/>
28
29 <object meta_type="CMF Action Category">
30 <xsl:attribute name="name">
31 <xsl:value-of select="$category"/>
32 </xsl:attribute>
33
34 <property name="title"></property>
35
36 <xsl:for-each select="//action[@category=$category]">
37
38 <object meta_type="CMF Action" i18n:domain="plinn">
39 <xsl:attribute name="name">
40 <xsl:value-of select="@action_id"/>
41 </xsl:attribute>
42
43 <property name="title" i18n:translate="">
44 <xsl:value-of select="@title"/>
45 </property>
46
47 <property name="description"></property>
48
49 <property name="url_expr">
50 <xsl:value-of select="@url_expr"/>
51 </property>
52
53 <property name="icon_expr"></property>
54
55 <property name="available_expr">
56 <xsl:value-of select="@condition_expr"/>
57 </property>
58
59 <property name="permissions">
60 <xsl:for-each select="permission">
61 <element>
62 <xsl:attribute name="value">
63 <xsl:value-of select="."/>
64 </xsl:attribute>
65 </element>
66 </xsl:for-each>
67 </property>
68
69 <property name="visible">
70 <xsl:value-of select="@visible"/>
71 </property>
72
73 </object>
74
75 </xsl:for-each>
76
77 </object>
78
79 </xsl:template>
80
81 </xsl:stylesheet>