annotate bug-list.xsl @ 5:d2efec56373f

working buglist transform and bugs fetching
author cin
date Tue, 01 Sep 2015 19:47:30 +0300
parents f8f966388b68
children 2a5f38eb25a9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
2 <xsl:stylesheet version="1.0"
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common"
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
4 extension-element-prefixes="exsl">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
5 <xsl:output method="text" indent="yes" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
6
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
7 <!-- PARAMETERS -->
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
8
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
9 <!-- chargeset - название аккаунта, на который вести расходы -->
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
10 <xsl:param name="chargeset" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
11
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
12 <!-- root_task_id - id корневой задачи, в которую будут организованы все
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
13 задачи -->
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
14 <xsl:param name="root_task_id" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
15
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
16 <!-- root_task - описание корневой задачи -->
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
17 <xsl:param name="root_task" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
18
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
19 <!-- GLOBAL VARIABLES -->
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
20 <xsl:variable name="resources"
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
21 select="document('resources.xml')/resources/resource" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
22
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
23 <xsl:variable name="bugs" select="/bugzilla/bug" />
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
24
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
25 <xsl:key name="bugid" match="/bugzilla/bug" use="string(bug_id)" />
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
26
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
27 <xsl:variable name="roots" select="$bugs[not(blocked[key('bugid',.)])]" />
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
28
d1400de5832b improved xsl
cin
parents: 0
diff changeset
29 <!-- BUILD BUG TREE -->
d1400de5832b improved xsl
cin
parents: 0
diff changeset
30 <xsl:variable name="tree">
d1400de5832b improved xsl
cin
parents: 0
diff changeset
31 <xsl:apply-templates mode="tree" select="$roots" />
d1400de5832b improved xsl
cin
parents: 0
diff changeset
32 </xsl:variable>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
33
d1400de5832b improved xsl
cin
parents: 0
diff changeset
34 <xsl:template match="bug" mode="tree">
d1400de5832b improved xsl
cin
parents: 0
diff changeset
35 <xsl:element name="bug">
d1400de5832b improved xsl
cin
parents: 0
diff changeset
36 <xsl:attribute name="id"><xsl:value-of select="bug_id" /></xsl:attribute>
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
37 <xsl:if test="component = 'product' or not(number(estimated_time))">
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
38 <xsl:attribute name="group"><xsl:value-of select="boolean(1)" /></xsl:attribute>
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
39 </xsl:if>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
40 <xsl:for-each select="dependson">
d1400de5832b improved xsl
cin
parents: 0
diff changeset
41 <xsl:apply-templates mode="tree" select="key('bugid', .)" />
d1400de5832b improved xsl
cin
parents: 0
diff changeset
42 </xsl:for-each>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
43 </xsl:element>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
44 </xsl:template>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
45
d1400de5832b improved xsl
cin
parents: 0
diff changeset
46 <!-- CALCULATE RELATIONS -->
d1400de5832b improved xsl
cin
parents: 0
diff changeset
47 <xsl:variable name="relations">
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
48 <xsl:apply-templates select="$bugs" mode="relations" />
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
49 </xsl:variable>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
50
d1400de5832b improved xsl
cin
parents: 0
diff changeset
51 <xsl:template match="bug" mode="relations">
d1400de5832b improved xsl
cin
parents: 0
diff changeset
52 <xsl:variable name="bugid" select="string(bug_id)" />
d1400de5832b improved xsl
cin
parents: 0
diff changeset
53 <bug id="{$bugid}">
d1400de5832b improved xsl
cin
parents: 0
diff changeset
54 <xsl:apply-templates select="exsl:node-set($tree)//bug[@id = $bugid]"
d1400de5832b improved xsl
cin
parents: 0
diff changeset
55 mode="traverse-relations">
d1400de5832b improved xsl
cin
parents: 0
diff changeset
56 </xsl:apply-templates>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
57 </bug>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
58 </xsl:template>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
59
d1400de5832b improved xsl
cin
parents: 0
diff changeset
60 <xsl:template match="bug" mode="traverse-relations">
d1400de5832b improved xsl
cin
parents: 0
diff changeset
61 <xsl:variable name="bugid" select="@id" />
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
62 <xsl:variable name="path" select="ancestor::bug" />
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
63 <xsl:variable name="level" select="count($path)" />
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
64 <xsl:for-each select="$path[@group]">
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
65 <xsl:variable name="pos" select="position()" />
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
66 <xsl:variable name="rank" select="$level - $pos" />
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
67 <rel container="{@id}" rank="{$rank}" level="{$level}">
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
68 <xsl:for-each select="$path[position() >= $pos and @group]">
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
69 <bug id="{@id}" />
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
70 </xsl:for-each>
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
71 </rel>
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
72 </xsl:for-each>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
73 </xsl:template>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
74
d1400de5832b improved xsl
cin
parents: 0
diff changeset
75 <!-- CALCULATE STRUCTURE -->
d1400de5832b improved xsl
cin
parents: 0
diff changeset
76
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
77 <xsl:variable name="parents">
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
78 <xsl:apply-templates select="exsl:node-set($relations)"
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
79 mode="parents" />
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
80 </xsl:variable>
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
81
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
82 <xsl:template match="bug" mode="parents">
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
83 <xsl:variable name="parent"
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
84 select="rel[ not(../rel/@rank &lt; @rank) ][1]" />
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
85 <bug id="{@id}" parent="{$parent/@container}" rank="{$parent/@rank}"
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
86 level="{$parent/@level}" />
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
87 </xsl:template>
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
88
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
89 <xsl:variable name="structure">
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
90 <xsl:choose>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
91 <xsl:when test="$root_task">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
92 <bug id="_root" desc="{$root_task}" group="true">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
93 <xsl:apply-templates select="$roots" mode="structure"/>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
94 </bug>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
95 </xsl:when>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
96 <xsl:otherwise>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
97 <xsl:apply-templates select="$roots" mode="structure"/>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
98 </xsl:otherwise>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
99 </xsl:choose>
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
100 </xsl:variable>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
101
d1400de5832b improved xsl
cin
parents: 0
diff changeset
102 <xsl:template match="bug" mode="structure">
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
103 <xsl:variable name="id" select="string(bug_id)" />
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
104 <xsl:variable name="self" select="." />
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
105 <xsl:variable name="children"
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
106 select="exsl:node-set($parents)/bug[@parent = $id]" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
107 <xsl:element name="bug">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
108 <xsl:attribute name="id"><xsl:value-of select="$id" /></xsl:attribute>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
109 <xsl:attribute name="desc"><xsl:value-of select="short_desc" /></xsl:attribute>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
110
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
111 <xsl:if test="$children">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
112 <xsl:attribute name="group"><xsl:value-of select="boolean($children)" /></xsl:attribute>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
113
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
114 <xsl:for-each select="$children">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
115 <xsl:variable name="child" select="@id" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
116 <xsl:apply-templates select="$bugs[bug_id = $child]"
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
117 mode="structure" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
118 </xsl:for-each>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
119
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
120 </xsl:if>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
121
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
122 <!-- filter out dependencies -->
3
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
123 <xsl:variable name="dependencies"
36ae3ec94442 xslt: prepare taskjuggler tasks structure
cin
parents: 1
diff changeset
124 select="dependson[not(text() = exsl:node-set($parents)/bug[@parent = $id]/@id)]" />
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
125 <xsl:for-each select="$dependencies">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
126 <dependency id="{.}" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
127 </xsl:for-each>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
128 </xsl:element>
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
129 </xsl:template>
d1400de5832b improved xsl
cin
parents: 0
diff changeset
130
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
131 <!-- output -->
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
132 <xsl:template match="/">
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
133 <xsl:apply-templates select="exsl:node-set($structure)/bug">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
134 <xsl:with-param name="indent" select="0" />
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
135 <xsl:with-param name="chargeset" select="$chargeset"/>
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
136 </xsl:apply-templates>
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
137 </xsl:template>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
138
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
139 <xsl:template match="bug">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
140 <xsl:param name="indent" select="0" />
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
141 <xsl:param name="chargeset" />
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
142 <xsl:variable name="id" select="@id" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
143 <xsl:variable name="details" select="$bugs[bug_id = $id]" />
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
144
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
145 <!-- task header -->
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
146 <xsl:call-template name="start-task">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
147 <xsl:with-param name="indent" select="$indent" />
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
148 <xsl:with-param name="id">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
149 <xsl:call-template name="bug-local-name">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
150 <xsl:with-param name="id" select="@id" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
151 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
152 </xsl:with-param>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
153 <xsl:with-param name="desc" select="@desc" />
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
154 </xsl:call-template>
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
155
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
156 <xsl:if test="$chargeset">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
157 <xsl:call-template name="println">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
158 <xsl:with-param name="indent" select="$indent + 1"/>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
159 <xsl:with-param name="text" select="concat('chargeset ', $chargeset)"/>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
160 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
161 </xsl:if>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
162
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
163 <!-- task details -->
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
164 <xsl:choose>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
165 <xsl:when test="@group">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
166 <!-- DEBUG -->
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
167 <xsl:call-template name="comment">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
168 <xsl:with-param name="indent" select="$indent + 1" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
169 <xsl:with-param name="comment" select="'group'" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
170 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
171
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
172
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
173 <xsl:apply-templates select="$details/node()"
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
174 mode="group-details">
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
175 <xsl:with-param name="indent" select="$indent + 1" />
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
176 </xsl:apply-templates>
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
177
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
178 <xsl:if
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
179 test="number($details/estimated_time) or number($details/actual_time) or number($details/remaining_time)">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
180 <xsl:call-template name="start-task">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
181 <xsl:with-param name="indent" select="$indent + 1" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
182 <xsl:with-param name="id" select="'manage'" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
183 <xsl:with-param name="desc" select="@desc" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
184 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
185 <xsl:apply-templates
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
186 select="$details/estimated_time | $details/actual_time | $details/remaining_time | $details/assigned_to"
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
187 mode="task-details">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
188 <xsl:with-param name="indent" select="$indent + 2" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
189 </xsl:apply-templates>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
190 <xsl:call-template name="end-task">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
191 <xsl:with-param name="indent" select="$indent + 1" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
192 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
193 </xsl:if>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
194 </xsl:when>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
195 <xsl:otherwise>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
196 <xsl:apply-templates select="$details/node()"
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
197 mode="task-details">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
198 <xsl:with-param name="indent" select="$indent + 1" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
199 </xsl:apply-templates>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
200 </xsl:otherwise>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
201 </xsl:choose>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
202
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
203 <!-- subtasks and dependencies -->
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
204 <xsl:apply-templates>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
205 <xsl:with-param name="indent" select="$indent + 1" />
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
206 <xsl:with-param name="referer" select="." />
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
207 </xsl:apply-templates>
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
208
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
209 <xsl:call-template name="end-task">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
210 <xsl:with-param name="indent" select="$indent" />
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
211 </xsl:call-template>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
212 </xsl:template>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
213
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
214 <xsl:template match="dependency">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
215 <xsl:param name="indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
216 <xsl:param name="referer" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
217 <xsl:call-template name="println">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
218 <xsl:with-param name="indent" select="$indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
219 <xsl:with-param name="text">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
220 <xsl:text>depends </xsl:text>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
221 <xsl:call-template name="bug-reference">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
222 <xsl:with-param name="id" select="@id" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
223 <xsl:with-param name="referer" select="$referer" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
224 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
225 </xsl:with-param>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
226 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
227 </xsl:template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
228
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
229
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
230 <xsl:template match="text()" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
231
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
232 <!-- TASK ATTRIBUTES -->
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
233
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
234 <xsl:template match="estimated_time" mode="task-details">
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
235 <xsl:param name="indent" />
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
236 <xsl:if test="number(.)">
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
237 <xsl:call-template name="println">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
238 <xsl:with-param name="indent" select="$indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
239 <xsl:with-param name="text" select="concat('effort ', .,'h')" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
240 </xsl:call-template>
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
241 </xsl:if>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
242 </xsl:template>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
243
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
244 <xsl:template match="assigned_to" mode="task-details">
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
245 <xsl:param name="indent" />
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
246 <xsl:variable name="email" select="string(.)" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
247 <xsl:variable name="resource" select="$resources[@email = $email]/@id" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
248 <xsl:if test="$resource">
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
249 <xsl:call-template name="println">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
250 <xsl:with-param name="indent" select="$indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
251 <xsl:with-param name="text" select="concat('allocate ', $resource)" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
252 </xsl:call-template>
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
253 </xsl:if>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
254 </xsl:template>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
255 <xsl:template match="text()" mode="task-details">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
256 </xsl:template>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
257
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
258 <xsl:template match="assigned_to" mode="group-details">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
259 <xsl:param name="indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
260 <xsl:variable name="email" select="string(.)" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
261 <xsl:variable name="resource" select="$resources[@email = $email]/@id" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
262 <xsl:if test="$resource">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
263 <xsl:call-template name="println">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
264 <xsl:with-param name="indent" select="$indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
265 <xsl:with-param name="text"
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
266 select="concat('responsible ', $resource)" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
267 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
268 </xsl:if>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
269 </xsl:template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
270 <xsl:template match="text()" mode="group-details">
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
271 </xsl:template>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
272
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
273 <!-- PRIMITIVES -->
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
274
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
275
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
276
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
277 <xsl:template name="bug-local-name">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
278 <xsl:param name="id" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
279 <xsl:value-of select="concat('bug',$id)" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
280 </xsl:template>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
281
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
282
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
283 <xsl:template name="bug-reference">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
284 <xsl:param name="id" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
285 <xsl:param name="referer" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
286
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
287 <xsl:variable name="refererPathFragment">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
288 <bug id="#root" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
289 <xsl:for-each select="$referer/ancestor-or-self::bug">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
290 <bug id="{@id}" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
291 </xsl:for-each>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
292 </xsl:variable>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
293 <xsl:variable name="targetPathFragment">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
294 <bug id="#root" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
295 <xsl:for-each
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
296 select="exsl:node-set($structure)//bug[@id = $id]/ancestor-or-self::bug">
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
297 <bug id="{@id}" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
298 </xsl:for-each>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
299 </xsl:variable>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
300 <xsl:variable name="path"
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
301 select="exsl:node-set($refererPathFragment)/bug" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
302 <xsl:variable name="targetPath"
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
303 select="exsl:node-set($targetPathFragment)/bug" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
304
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
305 <!-- find closest shared container id -->
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
306 <xsl:variable name="join"
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
307 select="($path[@id = $targetPath/@id])[position() = last() ]/@id" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
308
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
309 <!-- how many levels we need to up -->
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
310 <xsl:variable name="depth"
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
311 select="count($path[@id = $join]/following-sibling::node())" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
312
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
313 <!-- DEBUG -->
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
314 <!-- <xsl:value-of select="concat('id=', $id, ',referer=', $referer/@id)"
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
315 /> <xsl:text>, path=</xsl:text> <xsl:for-each select="$targetPath"> <xsl:value-of
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
316 select="concat(name(),@id)" /> <xsl:if test="position() != last()"> <xsl:text>-</xsl:text>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
317 </xsl:if> </xsl:for-each> -->
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
318 <!-- DEBUG -->
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
319 <!-- <xsl:value-of select="concat(', join=', $join,', depth=', $depth,'
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
320 ')" /> -->
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
321
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
322 <!-- PRINT REFERENCE -->
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
323 <xsl:call-template name="repeat">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
324 <xsl:with-param name="value" select="'!'" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
325 <xsl:with-param name="count" select="$depth" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
326 </xsl:call-template>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
327 <xsl:for-each select="$targetPath[@id = $join]/following-sibling::node()">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
328 <xsl:call-template name="bug-local-name">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
329 <xsl:with-param name="id" select="@id" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
330 </xsl:call-template>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
331 <xsl:if test="position() != last()">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
332 <xsl:text>.</xsl:text>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
333 </xsl:if>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
334 </xsl:for-each>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
335
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
336 </xsl:template>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
337
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
338 <xsl:template name="start-task">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
339 <xsl:param name="indent" />
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
340 <xsl:param name="id" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
341 <xsl:param name="desc" />
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
342 <xsl:call-template name="begin-line">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
343 <xsl:with-param name="indent" select="$indent" />
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
344 </xsl:call-template>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
345 <xsl:text>task </xsl:text>
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
346 <xsl:value-of select="$id" />
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
347 <xsl:value-of select="concat(' &quot;',$desc,'&quot; {')" />
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
348 <xsl:call-template name="end-line" />
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
349 </xsl:template>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
350
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
351 <xsl:template name="end-task">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
352 <xsl:param name="indent" />
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
353 <xsl:call-template name="begin-line">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
354 <xsl:with-param name="indent" select="$indent" />
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
355 </xsl:call-template>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
356 <xsl:text>}</xsl:text>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
357 <xsl:call-template name="end-line" />
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
358 </xsl:template>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
359
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
360 <xsl:template name="begin-line">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
361 <xsl:param name="indent" />
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
362 <xsl:if test="number($indent) > 0">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
363 <xsl:text> </xsl:text>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
364 <xsl:call-template name="begin-line">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
365 <xsl:with-param name="indent" select="$indent - 1" />
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
366 </xsl:call-template>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
367 </xsl:if>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
368 </xsl:template>
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
369
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
370 <xsl:template name="end-line">
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
371 <xsl:text>&#xa;</xsl:text>
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
372 </xsl:template>
4
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
373
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
374 <xsl:template name="repeat">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
375 <xsl:param name="value" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
376 <xsl:param name="count" select="0" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
377
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
378 <xsl:if test="number($count)">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
379 <xsl:copy-of select="$value" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
380 <xsl:call-template name="repeat">
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
381 <xsl:with-param name="value" select="$value" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
382 <xsl:with-param name="count" select="$count - 1" />
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
383 </xsl:call-template>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
384 </xsl:if>
f8f966388b68 xslt: bugzilla -> taskjuggler
cin
parents: 3
diff changeset
385 </xsl:template>
5
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
386
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
387 <xsl:template name="comment">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
388 <xsl:param name="indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
389 <xsl:param name="comment" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
390 <xsl:call-template name="println">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
391 <xsl:with-param name="indent" select="$indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
392 <xsl:with-param name="text">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
393 <xsl:text># </xsl:text>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
394 <xsl:value-of select="$comment" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
395 </xsl:with-param>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
396 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
397 </xsl:template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
398
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
399 <xsl:template name="println">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
400 <xsl:param name="indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
401 <xsl:param name="text" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
402 <xsl:call-template name="begin-line">
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
403 <xsl:with-param name="indent" select="$indent" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
404 </xsl:call-template>
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
405 <xsl:value-of select="$text" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
406 <xsl:call-template name="end-line" />
d2efec56373f working buglist transform and bugs fetching
cin
parents: 4
diff changeset
407 </xsl:template>
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
408 </xsl:stylesheet>