Project

General

Profile

« Previous | Next » 

Revision 1735

Added by Jing Tao almost 21 years ago

Fixed some bugs in these style sheets.

View differences:

eml-constraint-2.0.0.xsl
93 93
  <xsl:template name="primaryKey">
94 94
    <xsl:param name="constraintfirstColStyle"/>
95 95
    <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
96
          <xsl:text>Type:</xsl:text></td>
97
          <td width="{$secondColWidth}" class="{$secondColStyle}">
98
          Primary Key</td>
96
          Primary Key:</td>
97
          <td width="{$secondColWidth}">
98
            <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
99
                 <xsl:call-template name="constraintBaseGroup">
100
                    <xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/>
101
                 </xsl:call-template> 
102
                 <xsl:for-each select="key/attributeReference">
103
                      <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
104
                            <xsl:text>Key:</xsl:text></td>
105
                          <td width="{$secondColWidth}" class="{$secondColStyle}">
106
                            <xsl:value-of select="."/></td>
107
                      </tr>
108
                 </xsl:for-each>
109
            </table>
110
          </td>
99 111
     </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>
112
   
110 113
  </xsl:template>
111 114
  
112 115
  <xsl:template name="uniqueKey">
113 116
    <xsl:param name="constraintfirstColStyle"/>
114 117
    <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
115
          <xsl:text>Type:</xsl:text></td>
116
          <td width="{$secondColWidth}" class="{$secondColStyle}">
117
          Unique Key</td>
118
          Unique Key:</td>
119
          <td width="{$secondColWidth}">
120
             <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
121
                  <xsl:call-template name="constraintBaseGroup">
122
                     <xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/>
123
                  </xsl:call-template> 
124
                  <xsl:for-each select="key/attributeReference">
125
                     <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
126
                             <xsl:text>Key:</xsl:text></td>
127
                          <td width="{$secondColWidth}" class="{$secondColStyle}">
128
                            <xsl:value-of select="."/></td>
129
                      </tr>
130
                  </xsl:for-each>
131
             </table>
132
          </td>
118 133
     </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 134
  </xsl:template>
130 135
  
131 136
   <xsl:template name="checkConstraint">
132 137
    <xsl:param name="constraintfirstColStyle"/>
133 138
    <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
134
          <xsl:text>Type:</xsl:text></td>
135
          <td width="{$secondColWidth}" class="{$secondColStyle}">
136
          Checking Constraint</td>
139
          Checking Constraint: </td>
140
          <td width="{$secondColWidth}">
141
              <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
142
                    <xsl:call-template name="constraintBaseGroup">
143
                       <xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/>
144
                    </xsl:call-template> 
145
                    <xsl:for-each select="checkCondition">
146
                         <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
147
                                   <xsl:text>Check Condition:</xsl:text></td>
148
                             <td width="{$secondColWidth}" class="{$secondColStyle}">
149
                                   <xsl:value-of select="."/></td>
150
                         </tr>
151
                    </xsl:for-each>
152
              </table>
153
          </td>
137 154
     </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>
155
   </xsl:template>
149 156
  
150 157
  <xsl:template name="foreignKey">
151 158
     <xsl:param name="constraintfirstColStyle"/>
152 159
    <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>Relationship:</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>
160
          Foreign Key:</td>
182 161
          <td width="{$secondColWidth}">
183
          <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
184
              <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
185
                   <xsl:text>Parent:</xsl:text></td>
186
                   <td width="{$secondColWidth}" class="{$secondColStyle}">
187
                    <xsl:value-of select="cardinality/parentOccurences"/></td>
188
               </tr>
189
               <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
190
                   <xsl:text>Children</xsl:text></td>
191
                   <td width="{$secondColWidth}" class="{$secondColStyle}">
192
                    <xsl:value-of select="cardinality/childOccurences"/></td>
193
              </tr>
194
           </table>
162
              <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
163
                  <xsl:call-template name="constraintBaseGroup">
164
                        <xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/>
165
                   </xsl:call-template> 
166
                   <xsl:for-each select="key/attributeReference">
167
                      <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
168
                             <xsl:text>Key:</xsl:text></td>
169
                          <td width="{$secondColWidth}" class="{$secondColStyle}">
170
                             <xsl:value-of select="."/></td>
171
                      </tr>
172
                  </xsl:for-each>
173
                  <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
174
                          <xsl:text>Entity Reference:</xsl:text></td>
175
                       <td width="{$secondColWidth}" class="{$secondColStyle}">
176
                           <xsl:value-of select="entityReference"/></td>
177
                   </tr>
178
                   <xsl:if test="relationshipType and normalize-space(relationshipType)!=''">
179
                        <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
180
                                <xsl:text>Relationship:</xsl:text></td>
181
                             <td width="{$secondColWidth}" class="{$secondColStyle}">
182
                                 <xsl:value-of select="relationshipType"/></td>
183
                         </tr>
184
                    </xsl:if>
185
                    <xsl:if test="cardinality and normalize-space(cardinality)!=''">
186
                          <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
187
                                 <xsl:text>Cardinality:</xsl:text></td>
188
                              <td width="{$secondColWidth}">
189
                                  <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
190
                                        <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
191
                                                <xsl:text>Parent:</xsl:text></td>
192
                                             <td width="{$secondColWidth}" class="{$secondColStyle}">
193
                                                 <xsl:value-of select="cardinality/parentOccurences"/></td>
194
                                        </tr>
195
                                        <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
196
                                                <xsl:text>Children</xsl:text></td>
197
                                            <td width="{$secondColWidth}" class="{$secondColStyle}">
198
                                                 <xsl:value-of select="cardinality/childOccurences"/></td>
199
                                         </tr>
200
                                   </table>
201
                               </td>
202
                          </tr>
203
                   </xsl:if>
204
             </table>
195 205
          </td>
196
      </tr>
197
    </xsl:if>
206
     </tr>
207
    
198 208
  </xsl:template>
199 209
  
200 210
  <xsl:template name="joinCondition">
201 211
    <xsl:param name="constraintfirstColStyle"/>
202 212
    <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
203
          <xsl:text>Type:</xsl:text></td>
204
          <td width="{$secondColWidth}" class="{$secondColStyle}">
205
          Join Condition</td>
213
          Join Condition:</td>
214
          <td width="{$secondColWidth}">
215
              <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
216
                   <xsl:call-template name="foreignKey">
217
                        <xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/>
218
                   </xsl:call-template> 
219
                   <xsl:for-each select="referencedKey/attributeReference">
220
                      <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
221
                             <xsl:text>Referenced Key:</xsl:text></td>
222
                          <td width="{$secondColWidth}" class="{$secondColStyle}">
223
                              <xsl:value-of select="."/></td>
224
                       </tr>
225
                   </xsl:for-each>
226
             </table>
227
          </td>
206 228
    </tr>
207
    <xsl:call-template name="foreignKey">
208
       <xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/>
209
    </xsl:call-template> 
210
    <xsl:for-each select="referencedKey/attributeReference">
211
       <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
212
          <xsl:text>Referenced Key:</xsl:text></td>
213
          <td width="{$secondColWidth}" class="{$secondColStyle}">
214
          <xsl:value-of select="."/></td>
215
     </tr>
216
    </xsl:for-each>
217 229
  </xsl:template>
218 230
  
219 231
  <xsl:template name="notNullConstraint">
220 232
    <xsl:param name="constraintfirstColStyle"/>
221 233
    <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
222
          <xsl:text>Type:</xsl:text></td>
223
          <td width="{$secondColWidth}" class="{$secondColStyle}">
224
          Not Null Constraint</td>
234
          Not Null Constraint:</td>
235
          <td width="{$secondColWidth}">
236
              <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
237
                   <xsl:call-template name="constraintBaseGroup">
238
                       <xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/>
239
                   </xsl:call-template> 
240
                   <xsl:for-each select="key/attributeReference">
241
                        <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
242
                                 <xsl:text>Key:</xsl:text></td>
243
                            <td width="{$secondColWidth}" class="{$secondColStyle}">
244
                                 <xsl:value-of select="."/></td>
245
                        </tr>
246
                   </xsl:for-each>
247
              </table>
248
          </td>
225 249
     </tr>
226
    <xsl:call-template name="constraintBaseGroup">
227
       <xsl:with-param name="constraintfirstColStyle" select="$constraintfirstColStyle"/>
228
    </xsl:call-template> 
229
    <xsl:for-each select="key/attributeReference">
230
       <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
231
          <xsl:text>Key:</xsl:text></td>
232
          <td width="{$secondColWidth}" class="{$secondColStyle}">
233
          <xsl:value-of select="."/></td>
234
     </tr>
235
    </xsl:for-each>
236
  </xsl:template>
250
   </xsl:template>
237 251
  
238 252
  <xsl:template name="constraintBaseGroup">
239 253
    <xsl:param name="constraintfirstColStyle"/>
240 254
     <tr><td width="{$firstColWidth}" class="{$constraintfirstColStyle}">
241
          <xsl:text>Constraint Name:</xsl:text></td>
255
          <xsl:text>Name:</xsl:text></td>
242 256
          <td width="{$secondColWidth}" class="{$secondColStyle}">
243 257
         <xsl:value-of select="constraintName"/></td>
244 258
     </tr>

Also available in: Unified diff