1 | <?xml version="1.0"?> |
---|
2 | <dbx:transform |
---|
3 | xmlns:dbx="http://www.windhouwer.nl/sloot/dbx" |
---|
4 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
---|
5 | > |
---|
6 | <dbx:param name="group"/> |
---|
7 | |
---|
8 | <dbx:process> |
---|
9 | <dbx:for-each table="core_adhoc_group" min="1" max="1"> |
---|
10 | <dbx:where field="id" select="$group" type="integer"/> |
---|
11 | <group type="group"> |
---|
12 | <dbx:attribute name="key" field="id"/> |
---|
13 | <dbx:attribute name="owner_id" field="owner"/> |
---|
14 | <dbx:for-each table="view_user" min="1" max="1"> |
---|
15 | <dbx:where field="id" select="$current/owner" type="integer"/> |
---|
16 | <dbx:attribute name="owner" field="login"/> |
---|
17 | </dbx:for-each> |
---|
18 | <name dbx:field="name"/> |
---|
19 | <description dbx:field="description"/> |
---|
20 | <dbx:for-each table="link_group_members" min="1" max="*"> |
---|
21 | <dbx:where field="group" select="$current/id" type="integer"/> |
---|
22 | <member> |
---|
23 | <dbx:attribute name="ref" field="member"/> |
---|
24 | <dbx:attribute name="role" field="role"/> |
---|
25 | <dbx:attribute name="status" field="status"/> |
---|
26 | <dbx:for-each table="view_user" min="1" max="1"> |
---|
27 | <dbx:where field="id" select="$current/member" type="integer"/> |
---|
28 | <first_name dbx:field="first_name" dbx:when="normalize-space(.)!=''"/> |
---|
29 | <last_name dbx:field="last_name" dbx:when="normalize-space(.)!=''"/> |
---|
30 | <name dbx:field="name" dbx:when="normalize-space(.)!=''"/> |
---|
31 | <organization dbx:field="organization" dbx:when="normalize-space(.)!=''"/> |
---|
32 | <forum dbx:field="forum" dbx:when="normalize-space(.)!=''"/> |
---|
33 | </dbx:for-each> |
---|
34 | </member> |
---|
35 | </dbx:for-each> |
---|
36 | <dbx:for-each table="core_group" min="1" max="1"> |
---|
37 | <dbx:where field="id" select="$current/id"/> |
---|
38 | <forum> |
---|
39 | <dbx:attribute name="public" field="forum_public" when="normalize-space(@public)!=''"/> |
---|
40 | <dbx:attribute name="private" field="forum_private" when="normalize-space(@private)!=''"/> |
---|
41 | </forum> |
---|
42 | </dbx:for-each> |
---|
43 | </group> |
---|
44 | </dbx:for-each> |
---|
45 | </dbx:process> |
---|
46 | |
---|
47 | <dbx:postprocess> |
---|
48 | <dbx:stylesheet template="identity"> |
---|
49 | <xsl:template match="group"> |
---|
50 | <xsl:copy> |
---|
51 | <xsl:apply-templates select="@*"/> |
---|
52 | <xsl:apply-templates select="* except member"/> |
---|
53 | <xsl:apply-templates select="member"> |
---|
54 | <xsl:sort select="name"/> |
---|
55 | </xsl:apply-templates> |
---|
56 | </xsl:copy> |
---|
57 | </xsl:template> |
---|
58 | </dbx:stylesheet> |
---|
59 | </dbx:postprocess> |
---|
60 | |
---|
61 | </dbx:transform> |
---|
62 | |
---|