1 |
553
|
tao
|
<?xml version="1.0"?>
|
2 |
|
|
<!--
|
3 |
|
|
* '$RCSfile$'
|
4 |
|
|
* Authors: Matthew Brooke
|
5 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
6 |
|
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
8 |
|
|
*
|
9 |
|
|
* '$Author$'
|
10 |
|
|
* '$Date$'
|
11 |
|
|
* '$Revision$'
|
12 |
|
|
*
|
13 |
|
|
* This program is free software; you can redistribute it and/or modify
|
14 |
|
|
* it under the terms of the GNU General Public License as published by
|
15 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
16 |
|
|
* (at your option) any later version.
|
17 |
|
|
*
|
18 |
|
|
* This program is distributed in the hope that it will be useful,
|
19 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
|
|
* GNU General Public License for more details.
|
22 |
|
|
*
|
23 |
|
|
* You should have received a copy of the GNU General Public License
|
24 |
|
|
* along with this program; if not, write to the Free Software
|
25 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
26 |
|
|
*
|
27 |
|
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
28 |
|
|
* convert an XML file that is valid with respect to the eml-dataset.dtd
|
29 |
|
|
* module of the Ecological Metadata Language (EML) into an HTML format
|
30 |
|
|
* suitable for rendering with modern web browsers.
|
31 |
|
|
-->
|
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 |
|
|
<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>
|
61 |
|
|
</xsl:template>
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
<xsl:template match="constraint">
|
65 |
|
|
<xsl:if test="normalize-space(constraintType)!=''">
|
66 |
|
|
<tr><td width="{$firstColWidth}" class="{$firstColStyle}">
|
67 |
|
|
<xsl:text>Type</xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
68 |
|
|
<xsl:value-of select="constraintType"/></td></tr>
|
69 |
|
|
</xsl:if>
|
70 |
|
|
<xsl:if test="normalize-space(constraintName)!=''">
|
71 |
|
|
<tr><td width="{$firstColWidth}" class="{$firstColStyle}">
|
72 |
|
|
<xsl:text>Name</xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
73 |
|
|
<xsl:value-of select="constraintName"/></td></tr>
|
74 |
|
|
</xsl:if>
|
75 |
|
|
<xsl:if test="normalize-space(constraintDescription)!=''">
|
76 |
|
|
<tr><td width="{$firstColWidth}" class="{$firstColStyle}">
|
77 |
|
|
<xsl:text>Description</xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
78 |
|
|
<xsl:value-of select="constraintDescription"/></td></tr>
|
79 |
|
|
</xsl:if>
|
80 |
|
|
<xsl:if test="normalize-space(entityId)!=''">
|
81 |
|
|
<tr><td width="{$firstColWidth}" class="{$firstColStyle}">
|
82 |
|
|
<xsl:text>Entity Id</xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
83 |
|
|
<xsl:value-of select="entityId"/></td></tr>
|
84 |
|
|
</xsl:if>
|
85 |
|
|
<xsl:if test="normalize-space(referencedEntityId)!=''">
|
86 |
|
|
<tr><td width="{$firstColWidth}" class="{$firstColStyle}">
|
87 |
|
|
<xsl:text>Referenced Entity Id</xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
88 |
|
|
<xsl:value-of select="referencedEntityId"/></td></tr>
|
89 |
|
|
</xsl:if>
|
90 |
|
|
<xsl:if test="normalize-space(referencedKey)!=''">
|
91 |
|
|
<xsl:for-each select="referencedKey/attributeName">
|
92 |
|
|
<tr><td width="{$firstColWidth}" class="{$firstColStyle}">
|
93 |
|
|
<xsl:text>Referenced Key</xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
94 |
|
|
<xsl:apply-templates select="."/></td></tr>
|
95 |
|
|
</xsl:for-each>
|
96 |
|
|
</xsl:if>
|
97 |
|
|
<xsl:if test="normalize-space(key)!=''">
|
98 |
|
|
<xsl:for-each select="key/attributeName">
|
99 |
|
|
<tr><td width="{$firstColWidth}" class="{$firstColStyle}">
|
100 |
|
|
<xsl:text>Key</xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
101 |
|
|
<xsl:apply-templates select="."/></td></tr>
|
102 |
|
|
</xsl:for-each>
|
103 |
|
|
</xsl:if>
|
104 |
|
|
<xsl:if test="normalize-space(cardinality)!=''">
|
105 |
|
|
<tr><td width="{$firstColWidth}" class="{$firstColStyle}">
|
106 |
|
|
<xsl:text>Cardinality</xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
107 |
|
|
<xsl:value-of select="cardinality"/></td></tr>
|
108 |
|
|
</xsl:if>
|
109 |
|
|
<xsl:if test="normalize-space(checkCondition)!=''">
|
110 |
|
|
<tr><td width="{$firstColWidth}" class="{$firstColStyle}">
|
111 |
|
|
<xsl:text>Check Condition</xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
112 |
|
|
<xsl:value-of select="checkCondition"/></td></tr>
|
113 |
|
|
</xsl:if>
|
114 |
|
|
</xsl:template>
|
115 |
|
|
|
116 |
|
|
<xsl:template match="attributeName">
|
117 |
|
|
<xsl:value-of select="."/>
|
118 |
|
|
</xsl:template>
|
119 |
|
|
|
120 |
|
|
|
121 |
|
|
</xsl:stylesheet>
|