1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
---|
3 | |
---|
4 | <xsl:template match="text()"/> |
---|
5 | |
---|
6 | <xsl:template match="cr"> |
---|
7 | <div> |
---|
8 | <xsl:choose> |
---|
9 | <xsl:when test="@check='valid'"> |
---|
10 | <p>This is a <b>valid</b> submission.</p> |
---|
11 | </xsl:when> |
---|
12 | <xsl:when test="@check='invalid'"> |
---|
13 | <p>This submission is <b>invalid</b>. The following problems were found:</p> |
---|
14 | <ol> |
---|
15 | <xsl:apply-templates/> |
---|
16 | </ol> |
---|
17 | </xsl:when> |
---|
18 | </xsl:choose> |
---|
19 | </div> |
---|
20 | </xsl:template> |
---|
21 | |
---|
22 | <xsl:template match="log[@check='invalid']"> |
---|
23 | <li>There is no description.</li> |
---|
24 | </xsl:template> |
---|
25 | |
---|
26 | <xsl:template match="td[count(tdg[@check='valid'])=0]"> |
---|
27 | <li>There is no TDG which can (or is allowed to) manage all the selected data categories.</li> |
---|
28 | <xsl:if test="tdg[@check='invalid']"> |
---|
29 | <ol> |
---|
30 | <xsl:apply-templates/> |
---|
31 | </ol> |
---|
32 | </xsl:if> |
---|
33 | </xsl:template> |
---|
34 | |
---|
35 | <xsl:template match="group[@check='invalid']"> |
---|
36 | <xsl:for-each select="error|warning"> |
---|
37 | <li> |
---|
38 | <xsl:value-of select="."/> |
---|
39 | </li> |
---|
40 | </xsl:for-each> |
---|
41 | </xsl:template> |
---|
42 | |
---|
43 | <xsl:template match="tdg[@check='invalid']/profile"> |
---|
44 | <li> |
---|
45 | <xsl:text>The following data categories aren't a member of the profile </xsl:text> |
---|
46 | <xsl:value-of select="@name"/> |
---|
47 | <xsl:text> managed by the </xsl:text> |
---|
48 | <xsl:value-of select="parent::tdg/@name"/> |
---|
49 | <xsl:text> TDG:</xsl:text> |
---|
50 | <ol> |
---|
51 | <xsl:for-each select="dc"> |
---|
52 | <xsl:variable name="dc" select="current()"/> |
---|
53 | <li> |
---|
54 | <xsl:text>/</xsl:text> |
---|
55 | <i> |
---|
56 | <xsl:value-of select="/cr/dcs/dc[@ref=$dc/@ref]/identifier"/> |
---|
57 | </i> |
---|
58 | <xsl:text>/</xsl:text> |
---|
59 | </li> |
---|
60 | </xsl:for-each> |
---|
61 | </ol> |
---|
62 | </li> |
---|
63 | </xsl:template> |
---|
64 | |
---|
65 | <xsl:template match="dcs/dc[.//error]"> |
---|
66 | <li> |
---|
67 | <xsl:text>The data category </xsl:text> |
---|
68 | <xsl:text>/</xsl:text> |
---|
69 | <i> |
---|
70 | <xsl:value-of select="identifier"/> |
---|
71 | </i> |
---|
72 | <xsl:text>/</xsl:text> |
---|
73 | <xsl:text> has the following issues:</xsl:text> |
---|
74 | <ol> |
---|
75 | <xsl:for-each select=".//error"> |
---|
76 | <li> |
---|
77 | <xsl:value-of select="current()"/> |
---|
78 | </li> |
---|
79 | </xsl:for-each> |
---|
80 | </ol> |
---|
81 | </li> |
---|
82 | </xsl:template> |
---|
83 | </xsl:stylesheet> |
---|