Revision 1660
Added by Jing Tao over 21 years ago
lib/style/eml2/eml-attribute-enumeratedDomain-2.0.0.xsl | ||
---|---|---|
31 | 31 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
32 | 32 |
<xsl:import href="eml-settings-2.0.0beta6-@name@.xsl" /> |
33 | 33 |
<xsl:output method="html" encoding="iso-8859-1"/> |
34 |
<xsl:template match="/"> |
|
35 |
<html> |
|
36 |
<head> |
|
37 |
<link rel="stylesheet" type="text/css" href="{$stylePath}/@name@.css"/> |
|
38 |
</head> |
|
39 |
|
|
40 |
<body> |
|
41 |
<table width="100%" cellspacing="0" cellpadding="0" border="1"> |
|
42 |
<tr> |
|
43 |
<table cellspacing="0" width="100%" border="0"> |
|
44 |
<tr> |
|
45 |
<td class="header-title"> |
|
46 |
<div class="header-title"> |
|
47 |
@header-title@ |
|
48 |
</div> |
|
49 |
<div class="header-subtitle"> |
|
50 |
@header-subtitle@ |
|
51 |
</div> |
|
52 |
</td> |
|
53 |
<td class="header-image" rowspan="1"> |
|
54 |
<div class="header-image"> |
|
55 |
<img class="header" src="@html-path@/@header-image@" |
|
56 |
alt="@header-image-alt@" border="0" /> |
|
57 |
</div> |
|
58 |
</td> |
|
59 |
</tr> |
|
60 |
<tr> |
|
61 |
<td class="header-menu" colspan="2"> |
|
62 |
<div class="header-menu"> |
|
63 |
@header-menu@ |
|
64 |
</div> |
|
65 |
</td> |
|
66 |
</tr> |
|
67 |
<tr> |
|
68 |
<td class="header-submenu" colspan="2"> |
|
69 |
<div class="header-submenu"> |
|
70 |
  <!-- that is XML compliant --> |
|
71 |
</div> |
|
72 |
</td> |
|
73 |
</tr> |
|
74 |
</table> |
|
75 |
</tr> |
|
76 |
<tr> |
|
77 |
<td colspan="7" valign="top" align="left"> |
|
78 |
<table width="85%" border="0"> |
|
79 |
<tr> |
|
80 |
<td class="tablehead">Code Definitions for Allowed Values</td> |
|
81 |
</tr> |
|
82 |
<tr> |
|
83 |
<td> |
|
84 |
<table border="0" width="95%" cellspacing="0" |
|
85 |
align="center"> |
|
86 |
<tr> |
|
87 |
<th colspan="3" valign="center" align="center" class="bordered"> |
|
88 |
List of Acceptable Values |
|
89 |
</th> |
|
90 |
</tr> |
|
91 |
<tr> |
|
92 |
<th class="bordered">Code</th> |
|
93 |
<th class="bordered">Definition</th> |
|
94 |
<th class="bordered">Source</th> |
|
95 |
</tr> |
|
96 |
<tr> |
|
97 |
<xsl:for-each select="eml-attribute/attribute"> |
|
98 |
<xsl:for-each select="attributeDomain"> |
|
99 |
<xsl:for-each select="enumeratedDomain"> |
|
100 |
<xsl:variable name="stripes"> |
|
101 |
<xsl:choose> |
|
102 |
<xsl:when test="position() mod 2 = 1">colodd</xsl:when> |
|
103 |
<xsl:when test="position() mod 2 = 0">coleven</xsl:when> |
|
104 |
</xsl:choose> |
|
105 |
</xsl:variable> |
|
106 |
<tr> |
|
107 |
<td class="{$stripes}" align="center"><xsl:value-of select="code"/></td> |
|
108 |
<td class="{$stripes}" align="center"><xsl:value-of select="definition"/></td> |
|
109 |
<td class="{$stripes}" align="center"><xsl:value-of select="source"/></td>   |
|
110 |
</tr> |
|
111 |
</xsl:for-each> |
|
112 |
</xsl:for-each> |
|
113 |
</xsl:for-each> |
|
114 |
</tr> |
|
115 |
<tr> |
|
116 |
<td> </td> |
|
117 |
</tr> |
|
118 |
<tr> |
|
119 |
<td> </td> |
|
120 |
</tr> |
|
121 |
<tr> |
|
122 |
<th colspan="3" valign="center" align="center" class="bordered">Acceptable Text Values</th> |
|
123 |
</tr> |
|
124 |
<tr> |
|
125 |
<th class="bordered">Definition</th> |
|
126 |
<th class="bordered">Pattern</th> |
|
127 |
<th class="bordered">Source</th> |
|
128 |
</tr> |
|
129 |
<tr> |
|
130 |
<xsl:for-each select="eml-attribute/attribute"> |
|
131 |
<xsl:for-each select="attributeDomain"> |
|
132 |
<xsl:for-each select="textDomain"> |
|
133 |
<xsl:variable name="stripes"> |
|
134 |
<xsl:choose> |
|
135 |
<xsl:when test="position() mod 2 = 1">colodd</xsl:when> |
|
136 |
<xsl:when test="position() mod 2 = 0">coleven</xsl:when> |
|
137 |
</xsl:choose> |
|
138 |
</xsl:variable> |
|
139 |
<tr> |
|
140 |
<td class="$stripes" align="center"><xsl:value-of select="code"/></td> |
|
141 |
<td class="$stripes" align="center"><xsl:value-of select="definition"/></td> |
|
142 |
<td class="$stripes" align="center"><xsl:value-of select="source"/></td>   |
|
143 |
</tr> |
|
144 |
</xsl:for-each> |
|
145 |
</xsl:for-each> |
|
146 |
</xsl:for-each> |
|
147 |
</tr> |
|
148 |
</table> |
|
149 |
</td> |
|
150 |
</tr> |
|
151 |
</table> |
|
152 |
</td> |
|
153 |
</tr> |
|
154 |
</table> |
|
155 |
</body> |
|
156 |
</html> |
|
34 |
|
|
35 |
<xsl:template name="nonNumericDomain"> |
|
36 |
<xsl:param name="nondomainfirstColStyle"/> |
|
37 |
<table class="tabledefault" width="100%"> |
|
38 |
<xsl:choose> |
|
39 |
<xsl:when test="references!=''"> |
|
40 |
<xsl:variable name="ref_id" select="references"/> |
|
41 |
<xsl:variable name="references" select="$ids[@id=$ref_id]" /> |
|
42 |
<xsl:for-each select="$references"> |
|
43 |
<xsl:call-template name="nonNumericDomainCommon"> |
|
44 |
<xsl:with-param name="nondomainfirstColStyle" select="$nondomainfirstColStyle"/> |
|
45 |
</xsl:call-template> |
|
46 |
</xsl:for-each> |
|
47 |
</xsl:when> |
|
48 |
<xsl:otherwise> |
|
49 |
<xsl:call-template name="nonNumericDomainCommon"> |
|
50 |
<xsl:with-param name="nondomainfirstColStyle" select="$nondomainfirstColStyle"/> |
|
51 |
</xsl:call-template> |
|
52 |
</xsl:otherwise> |
|
53 |
</xsl:choose> |
|
54 |
</table> |
|
157 | 55 |
</xsl:template> |
158 | 56 |
|
159 |
|
|
160 |
<xsl:template match="enumeratedDomain"> |
|
161 |
<tr> |
|
162 |
<td><xsl:value-of select="code"/></td> |
|
163 |
<td><xsl:value-of select="definition"/></td> |
|
164 |
<td><xsl:value-of select="source"/> </td> |
|
165 |
</tr> |
|
57 |
|
|
58 |
<xsl:template name="nonNumericDomainCommon"> |
|
59 |
<xsl:param name="nondomainfirstColStyle"/> |
|
60 |
<xsl:for-each select="enumeratedDomain"> |
|
61 |
<xsl:call-template name="enumeratedDomain"> |
|
62 |
<xsl:with-param name="nondomainfirstColStyle" select="$nondomainfirstColStyle"/> |
|
63 |
</xsl:call-template> |
|
64 |
</xsl:for-each> |
|
65 |
<xsl:for-each select="textDomain"> |
|
66 |
<xsl:call-template name="enumeratedDomain"> |
|
67 |
<xsl:with-param name="nondomainfirstColStyle" select="$nondomainfirstColStyle"/> |
|
68 |
</xsl:call-template> |
|
69 |
</xsl:for-each> |
|
166 | 70 |
</xsl:template> |
167 |
|
|
168 |
<xsl:template match="textDomain"> |
|
169 |
<tr> |
|
170 |
<td><xsl:value-of select="definition"/></td> |
|
171 |
<td><xsl:value-of select="pattern"/></td> |
|
172 |
<td><xsl:value-of select="source"/> </td> |
|
173 |
</tr> |
|
71 |
|
|
72 |
<xsl:template name="textDomain"> |
|
73 |
<xsl:param name="nondomainfirstColStyle"/> |
|
74 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}"><b>Text Domain</b></td> |
|
75 |
<td width="{$secondColWidth}">  |
|
76 |
</td> |
|
77 |
</tr> |
|
78 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}">Definition</td> |
|
79 |
<td width="{$secondColWidth}"><xsl:value-of select="definition"/> |
|
80 |
</td> |
|
81 |
</tr> |
|
82 |
<xsl:for-each select="parttern"> |
|
83 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}">Pattern</td> |
|
84 |
<td width="{$secondColWidth}"><xsl:value-of select="."/> |
|
85 |
</td> |
|
86 |
</tr> |
|
87 |
</xsl:for-each> |
|
88 |
<xsl:if test="source"> |
|
89 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}">Source</td> |
|
90 |
<td width="{$secondColWidth}"><xsl:value-of select="source"/> |
|
91 |
</td> |
|
92 |
</tr> |
|
93 |
</xsl:if> |
|
174 | 94 |
</xsl:template> |
175 | 95 |
|
176 |
<xsl:template match="numericDomain"> |
|
177 |
<tr> |
|
178 |
<td><xsl:value-of select="minimum"/></td> |
|
179 |
<td><xsl:value-of select="maximum"/></td> |
|
180 |
</tr> |
|
96 |
<xsl:template name="enumeratedDomain"> |
|
97 |
<xsl:param name="nondomainfirstColStyle"/> |
|
98 |
<xsl:if test="codeDefinition"> |
|
99 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}"><b>Enumerated Domain</b></td> |
|
100 |
<td width="{$secondColWidth}">  |
|
101 |
</td> |
|
102 |
</tr> |
|
103 |
<xsl:for-each select="codeDefinition"> |
|
104 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}"> </td> |
|
105 |
<td width="{$secondColWidth}"> |
|
106 |
<table width="100%"> |
|
107 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}"> |
|
108 |
Code |
|
109 |
</td> |
|
110 |
<td width="{$secondColWidth}"><td><xsl:value-of select="code"/></td> |
|
111 |
</td> |
|
112 |
</tr> |
|
113 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}"> |
|
114 |
Definition |
|
115 |
</td> |
|
116 |
<td width="{$secondColWidth}"><td><xsl:value-of select="definition"/></td> |
|
117 |
</td> |
|
118 |
</tr> |
|
119 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}"> |
|
120 |
Source |
|
121 |
</td> |
|
122 |
<td width="{$secondColWidth}"><td><xsl:value-of select="source"/></td> |
|
123 |
</td> |
|
124 |
</tr> |
|
125 |
</table> |
|
126 |
</td> |
|
127 |
</tr> |
|
128 |
</xsl:for-each> |
|
129 |
</xsl:if> |
|
130 |
<xsl:if test="externalCodeSet"> |
|
131 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}"><b>Enumerated Domain(External Set)</b></td> |
|
132 |
<td width="{$secondColWidth}">  |
|
133 |
</td> |
|
134 |
</tr> |
|
135 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}">Set Name</td> |
|
136 |
<td width="{$secondColWidth}"><xsl:value-of select="externalCodeSet/codesetName"/> |
|
137 |
</td> |
|
138 |
</tr> |
|
139 |
<xsl:for-each select="externalCodeSet/citation"> |
|
140 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}">Citation</td> |
|
141 |
<td width="{$secondColWidth}"> </td> |
|
142 |
</tr> |
|
143 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}"> </td> |
|
144 |
<td width="{$secondColWidth}"> |
|
145 |
<xsl:call-template name="citation"> |
|
146 |
<xsl:with-param name="citationfirstColStyle" select="$nondomainfirstColStyle"/> |
|
147 |
</xsl:call-template> |
|
148 |
</td> |
|
149 |
</tr> |
|
150 |
</xsl:for-each> |
|
151 |
<xsl:for-each select="externalCodeSet/codesetURL"> |
|
152 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}">URL</td> |
|
153 |
<td width="{$secondColWidth}"> |
|
154 |
<a><xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></a> |
|
155 |
</td> |
|
156 |
</tr> |
|
157 |
</xsl:for-each> |
|
158 |
</xsl:if> |
|
159 |
<xsl:if test="entityCodeList"> |
|
160 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}"><b>Enumerated Domain(Entity)</b></td> |
|
161 |
<td width="{$secondColWidth}">  |
|
162 |
</td> |
|
163 |
</tr> |
|
164 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}">Entity Reference</td> |
|
165 |
<td width="{$secondColWidth}"><xsl:value-of select="codeDefinition/entityReference"/> |
|
166 |
</td> |
|
167 |
</tr> |
|
168 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}">Attribute Value Reference</td> |
|
169 |
<td width="{$secondColWidth}"><xsl:value-of select="codeDefinition/valueAttributeReference"/> |
|
170 |
</td> |
|
171 |
</tr> |
|
172 |
<tr><td width="{$firstColWidth}" class="{$nondomainfirstColStyle}">Attribute Definition Reference</td> |
|
173 |
<td width="{$secondColWidth}"><xsl:value-of select="codeDefinition/definitionAttributeReference"/> |
|
174 |
</td> |
|
175 |
</tr> |
|
176 |
</xsl:if> |
|
177 |
|
|
181 | 178 |
</xsl:template> |
182 | 179 |
|
180 |
|
|
183 | 181 |
</xsl:stylesheet> |
lib/style/eml2/eml-constraint-2.0.0.xsl | ||
---|---|---|
30 | 30 |
* suitable for rendering with modern web browsers. |
31 | 31 |
--> |
32 | 32 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
33 |
<xsl:import href="eml-settings-2.0.0beta6-@name@.xsl" /> |
|
34 |
<xsl:import href="eml-identifier-2.0.0beta6-@name@.xsl" /> |
|
35 |
|
|
36 | 33 |
<xsl:output method="html" encoding="iso-8859-1"/> |
37 |
|
|
38 |
|
|
39 |
<xsl:template match="/"> |
|
40 |
<html> |
|
41 |
<head> |
|
42 |
<link rel="stylesheet" type="text/css" |
|
43 |
href="{$stylePath}/{$qformat}.css" /> |
|
44 |
</head> |
|
45 |
<body> |
|
46 |
<center> |
|
47 |
<h1>Constraints</h1> |
|
48 |
<h3>Ecological Metadata Language</h3> |
|
49 |
</center> |
|
50 |
<table class="tabledefault" width="100%"><!-- width needed for NN4 - doesn't recognize width in css --> |
|
51 |
<xsl:apply-templates select="eml-constraint/identifier" mode="resource"/> |
|
52 |
<xsl:for-each select="eml-constraint/constraint"> |
|
53 |
<tr><td class="{$subHeaderStyle}" colspan="2"> |
|
54 |
<xsl:text>Relational Integrity Constraints:</xsl:text></td></tr> |
|
55 |
<xsl:apply-templates select="."/> |
|
56 |
</xsl:for-each> |
|
57 |
|
|
58 |
</table> |
|
59 |
</body> |
|
60 |
</html> |
|
34 |
|
|
35 |
<!-- This module is for constraint. And it is self contained--> |
|
36 |
<xsl:template name="constraint"> |
|
37 |
<xsl:param name="constraintfirstColStyle"/> |
|
38 |
<table class="tabledefault" width="100%"> |
|
39 |
<xsl:choose> |
|
40 |
<xsl:when test="references!=''"> |
|
41 |
<xsl:variable name="ref_id" select="references"/> |
|
42 |
<xsl:variable name="references" select="$ids[@id=$ref_id]" /> |
|
43 |
<xsl:for-each select="$references"> |
|
44 |
<xsl:call-template name="constraintCommon"> |
|
45 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
46 |
</xsl:call-template> |
|
47 |
</xsl:for-each> |
|
48 |
</xsl:when> |
|
49 |
<xsl:otherwise> |
|
50 |
<xsl:call-template name="constraintCommon"> |
|
51 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
52 |
</xsl:call-template> |
|
53 |
</xsl:otherwise> |
|
54 |
</xsl:choose> |
|
55 |
</table> |
|
61 | 56 |
</xsl:template> |
57 |
|
|
58 |
<xsl:template name="constraintCommon"> |
|
59 |
<xsl:param name="constraintfirstColStyle"/> |
|
60 |
<xsl:for-each select="primaryKey"> |
|
61 |
<xsl:call-template name="primaryKey"> |
|
62 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
63 |
</xsl:call-template> |
|
64 |
</xsl:for-each> |
|
65 |
<xsl:for-each select="uniqueKey"> |
|
66 |
<xsl:call-template name="uniqueKey"> |
|
67 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
68 |
</xsl:call-template> |
|
69 |
</xsl:for-each> |
|
70 |
<xsl:for-each select="checkConstraint"> |
|
71 |
<xsl:call-template name="checkConstraint"> |
|
72 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
73 |
</xsl:call-template> |
|
74 |
</xsl:for-each> |
|
75 |
<xsl:for-each select="foreignKey"> |
|
76 |
<xsl:call-template name="foreignKey"> |
|
77 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
78 |
</xsl:call-template> |
|
79 |
</xsl:for-each> |
|
80 |
<xsl:for-each select="joinCondition"> |
|
81 |
<xsl:call-template name="joinCondition"> |
|
82 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
83 |
</xsl:call-template> |
|
84 |
</xsl:for-each> |
|
85 |
<xsl:for-each select="notNullConstraint"> |
|
86 |
<xsl:call-template name="notNullConstraint"> |
|
87 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
88 |
</xsl:call-template> |
|
89 |
</xsl:for-each> |
|
90 |
</xsl:template> |
|
91 |
|
|
92 |
<!--Keys part--> |
|
93 |
<xsl:template name="primaryKey"> |
|
94 |
<xsl:param name="constraintfirstColStyle"/> |
|
95 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
96 |
<xsl:text>Type</xsl:text></td> |
|
97 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
98 |
Primary Key</td> |
|
99 |
</tr> |
|
100 |
<xsl:call-template name="constraintBaseGroup"> |
|
101 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
102 |
</xsl:call-template> |
|
103 |
<xsl:for-each select="key/attributeReference"> |
|
104 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
105 |
<xsl:text>Key</xsl:text></td> |
|
106 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
107 |
<xsl:value-of select="."/></td> |
|
108 |
</tr> |
|
109 |
</xsl:for-each> |
|
110 |
</xsl:template> |
|
111 |
|
|
112 |
<xsl:template name="uniqueKey"> |
|
113 |
<xsl:param name="constraintfirstColStyle"/> |
|
114 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
115 |
<xsl:text>Type</xsl:text></td> |
|
116 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
117 |
Unique Key</td> |
|
118 |
</tr> |
|
119 |
<xsl:call-template name="constraintBaseGroup"> |
|
120 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
121 |
</xsl:call-template> |
|
122 |
<xsl:for-each select="key/attributeReference"> |
|
123 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
124 |
<xsl:text>Key</xsl:text></td> |
|
125 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
126 |
<xsl:value-of select="."/></td> |
|
127 |
</tr> |
|
128 |
</xsl:for-each> |
|
129 |
</xsl:template> |
|
130 |
|
|
131 |
<xsl:template name="checkConstraint"> |
|
132 |
<xsl:param name="constraintfirstColStyle"/> |
|
133 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
134 |
<xsl:text>Type</xsl:text></td> |
|
135 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
136 |
Checking Constraint</td> |
|
137 |
</tr> |
|
138 |
<xsl:call-template name="constraintBaseGroup"> |
|
139 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
140 |
</xsl:call-template> |
|
141 |
<xsl:for-each select="checkCondition"> |
|
142 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
143 |
<xsl:text>Check Condition</xsl:text></td> |
|
144 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
145 |
<xsl:value-of select="."/></td> |
|
146 |
</tr> |
|
147 |
</xsl:for-each> |
|
148 |
</xsl:template> |
|
149 |
|
|
150 |
<xsl:template name="foreignKey"> |
|
151 |
<xsl:param name="constraintfirstColStyle"/> |
|
152 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
153 |
<xsl:text>Type</xsl:text></td> |
|
154 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
155 |
Foreign Key</td> |
|
156 |
</tr> |
|
157 |
<xsl:call-template name="constraintBaseGroup"> |
|
158 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
159 |
</xsl:call-template> |
|
160 |
<xsl:for-each select="key/attributeReference"> |
|
161 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
162 |
<xsl:text>Key</xsl:text></td> |
|
163 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
164 |
<xsl:value-of select="."/></td> |
|
165 |
</tr> |
|
166 |
</xsl:for-each> |
|
167 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
168 |
<xsl:text>Entity Reference</xsl:text></td> |
|
169 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
170 |
<xsl:value-of select="entityReference"/></td> |
|
171 |
</tr> |
|
172 |
<xsl:if test="relationshipType and normalize-space(relationshipType)!=''"> |
|
173 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
174 |
<xsl:text>Relation Ship</xsl:text></td> |
|
175 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
176 |
<xsl:value-of select="relationshipType"/></td> |
|
177 |
</tr> |
|
178 |
</xsl:if> |
|
179 |
<xsl:if test="cardinality and normalize-space(cardinality)!=''"> |
|
180 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
181 |
<xsl:text>Cardinality</xsl:text></td> |
|
182 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
183 |
 </td> |
|
184 |
</tr> |
|
185 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
186 |
 </td> |
|
187 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
188 |
<table width="100%"> |
|
189 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
190 |
<xsl:text>Parent</xsl:text></td> |
|
191 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
192 |
<xsl:value-of select="cardinality/parentOccurences"/></td> |
|
193 |
</tr> |
|
194 |
</table> |
|
195 |
</td> |
|
196 |
</tr> |
|
197 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
198 |
 </td> |
|
199 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
200 |
<table width="100%"> |
|
201 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
202 |
<xsl:text>Children</xsl:text></td> |
|
203 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
204 |
<xsl:value-of select="cardinality/childOccurences"/></td> |
|
205 |
</tr> |
|
206 |
</table> |
|
207 |
</td> |
|
208 |
</tr> |
|
209 |
</xsl:if> |
|
210 |
</xsl:template> |
|
211 |
|
|
212 |
<xsl:template name="joinCondition"> |
|
213 |
<xsl:param name="constraintfirstColStyle"/> |
|
214 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
215 |
<xsl:text>Type</xsl:text></td> |
|
216 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
217 |
Join Condition</td> |
|
218 |
</tr> |
|
219 |
<xsl:call-template name="foreignKey"> |
|
220 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
221 |
</xsl:call-template> |
|
222 |
<xsl:for-each select="referencedKey/attributeReference"> |
|
223 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
224 |
<xsl:text>Referenced Key</xsl:text></td> |
|
225 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
226 |
<xsl:value-of select="."/></td> |
|
227 |
</tr> |
|
228 |
</xsl:for-each> |
|
229 |
</xsl:template> |
|
230 |
|
|
231 |
<xsl:template name="notNullConstraint"> |
|
232 |
<xsl:param name="constraintfirstColStyle"/> |
|
233 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
234 |
<xsl:text>Type</xsl:text></td> |
|
235 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
236 |
Not Null Constraint</td> |
|
237 |
</tr> |
|
238 |
<xsl:call-template name="constraintBaseGroup"> |
|
239 |
<xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/> |
|
240 |
</xsl:call-template> |
|
241 |
<xsl:for-each select="key/attributeReference"> |
|
242 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
243 |
<xsl:text>Key</xsl:text></td> |
|
244 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
245 |
<xsl:value-of select="."/></td> |
|
246 |
</tr> |
|
247 |
</xsl:for-each> |
|
248 |
</xsl:template> |
|
249 |
|
|
250 |
<xsl:template name="constraintBaseGroup"> |
|
251 |
<xsl:param name="constraintfirstColStyle"/> |
|
252 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
253 |
<xsl:text>Constraint Name</xsl:text></td> |
|
254 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
255 |
<xsl:value-of select="constraintName"/></td> |
|
256 |
</tr> |
|
257 |
<xsl:if test="constraintDescription and normalize-space(constraintDescription)!=''"> |
|
258 |
<tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}"> |
|
259 |
<xsl:text>Description</xsl:text></td> |
|
260 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
261 |
<xsl:value-of select="constraintDescription"/></td> |
|
262 |
</tr> |
|
263 |
</xsl:if> |
|
264 |
</xsl:template> |
|
265 |
|
|
62 | 266 |
|
63 |
|
|
64 | 267 |
<xsl:template match="constraint"> |
65 | 268 |
<xsl:if test="normalize-space(constraintType)!=''"> |
66 | 269 |
<tr><td width="{$firstColWidth}" class="{$firstColStyle}"> |
Also available in: Unified diff
Finished the module.