Project

General

Profile

« Previous | Next » 

Revision 10174

Added by Bryce Mecum about 7 years ago

- Clean up isoroot selectors and comments. Use relative xpaths when possible
- Clean up the output of the ex module
- Misc whitespace/formatting fixes

View differences:

isoroot.xsl
19 19
                doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
20 20
                indent="yes" />
21 21

  
22
    <!-- TODO: Figure out how to set the output method to get what I want -->
23
    <!-- TODO: ^ Figure out what I want to output -->
24
    <!-- TODO: Figuer out what this match statement should have in it -->
22
    <!-- TODO: Figure out what this match statement should have in it -->
25 23
    <!-- TODO: Cover gmd:identificationInfo/SV_ServiceIdentification -->
26 24

  
27 25
    <xsl:template match="*[local-name()='MD_Metadata'] | *[local-name()='MI_Metadata']">
......
33 31
                    <label class="control-label">Identifier</label>
34 32
                    <div class="controls">
35 33
                        <div class="controls-well">
36
                            <xsl:value-of select="//gmd:fileIdentifier/gco:CharacterString/text()" />
34
                            <xsl:apply-templates select="./gmd:fileIdentifier" />
37 35
                        </div>
38 36
                    </div>
39 37
                </div>
......
42 40
                <!-- TODO: characterSet 1:1 -->
43 41

  
44 42
                <!-- Parent Identifier 1:1 conditional -->
45
                <xsl:if test="//gmd:parentIdentifier">
43
                <xsl:if test="./gmd:parentIdentifier">
46 44
                    <div class="control-group">
47 45
                        <label class="control-label">Parent Identifier</label>
48 46
                        <div class="controls">
49 47
                            <div class="controls-well">
50
                                <xsl:value-of select="//gmd:parentIdentifier/gco:CharacterString/text()" />
48
                                <xsl:apply-templates select="./gmd:parentIdentifier" />
51 49
                            </div>
52 50
                        </div>
53 51
                    </div>
......
58 56

  
59 57
                <!-- Alternate identifier(s) 0:inf-->
60 58
                <!-- gmd:identifier is an optional part of the CI_Citation element -->
61
                <xsl:for-each select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier">
59
                <xsl:for-each select=".//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier">
62 60
                    <div class="control-group">
63
                        <label class="control-label">Cited Identifier</label>
61
                        <label class="control-label">Identifier</label>
64 62
                        <div class="controls">
65 63
                            <div class="controls-well">
66 64
                                <xsl:apply-templates />
......
70 68
                </xsl:for-each>
71 69

  
72 70
                <!-- Abstract 1:inf-->
73
                <xsl:for-each select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract">
71
                <xsl:for-each select=".//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract">
74 72
                    <div class="control-group">
75 73
                        <label class="control-label">Abstract</label>
76 74
                        <div class="controls">
......
81 79
                    </div>
82 80
                </xsl:for-each>
83 81

  
84
                <!-- Publication (dateStamp) date 1:1 -->
85
                <div class="control-group">
86
                    <label class="control-label">Publication Date</label>
87
                    <div class="controls">
88
                        <div class="controls-well">
89
                            <xsl:apply-templates select="//gmd:dateStamp" />
90
                        </div>
91
                    </div>
92
                </div>
82
                <!-- Publication 1:1 -->
83
                <!-- TODO: Find out where this is in the metadata. -->
84
                <!--<div class="control-group">-->
85
                    <!--<label class="control-label">Publication Date</label>-->
86
                    <!--<div class="controls">-->
87
                        <!--<div class="controls-well">-->
88
                            <!--<xsl:apply-templates select="./gmd:dateStamp" />-->
89
                        <!--</div>-->
90
                    <!--</div>-->
91
                <!--</div>-->
93 92

  
94
                <!-- Topic Categories -->
95
                <xsl:if test="//gmd:topicCategory">
93
                <!-- Topic Categories
94

  
95
                These span multiple MD_DataIdentification Sections so all are
96
                grabbed and rendered in the same place.
97
                -->
98
                <xsl:if test=".//gmd:topicCategory">
96 99
                    <div class="control-group">
97 100
                        <label class="control-label">Topic Categories</label>
98 101
                        <div class="controls">
......
104 107
                                        </tr>
105 108
                                    </thead>
106 109
                                    <tbody>
107
                                        <xsl:for-each select="//gmd:topicCategory">
110
                                        <xsl:for-each select=".//gmd:topicCategory">
108 111
                                            <tr>
109 112
                                                <td>
110 113
                                                    <xsl:apply-templates />
......
120 123

  
121 124
                <!-- Keywords
122 125

  
126
                These span multiple MD_DataIdentification Sections so all are
127
                grabbed and rendered in the same place.
128

  
123 129
                Each <gmd:descriptiveKeywords> block should have one or more keywords in it
124 130
                with one thesaurus. So we render keywords from the same thesaurus together.
125 131
                -->
......
144 150
                    <label class="control-label">Metadata Contact(s)</label>
145 151
                    <div class="controls">
146 152
                        <div class="controls-well">
147
                            <xsl:for-each select="//gmd:contact">
153
                            <xsl:for-each select=".//gmd:contact">
148 154
                                <xsl:apply-templates />
149 155
                            </xsl:for-each>
150 156
                        </div>
......
156 162
                    <label class="control-label">Data Set Contacts</label>
157 163
                    <div class="controls">
158 164
                        <div class="controls-well">
159
                            <xsl:apply-templates select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact" />
165
                            <xsl:apply-templates select=".//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact" />
160 166
                        </div>
161 167
                    </div>
162 168
                </div>
......
166 172
                    <label class="control-label">Associated Parties</label>
167 173
                    <div class="controls">
168 174
                        <div class="controls-well">
169
                            <xsl:apply-templates select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty" />
175
                            <xsl:apply-templates select=".//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty" />
170 176
                        </div>
171 177
                    </div>
172 178
                </div>
......
176 182
                <div class="control-group entity">
177 183
                    <h4>Distribution Information</h4>
178 184

  
179
                    <xsl:apply-templates select="//gmd:distributionInfo" />
185
                    <xsl:apply-templates select=".//gmd:distributionInfo" />
180 186
                </div>
181 187
            </xsl:if>
182 188

  
183 189
            <!-- Extent (geographic, temporal, vertical) -->
184
            <xsl:for-each select="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent">
190
            <xsl:for-each select=".//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent">
185 191
                <xsl:apply-templates />
186 192
            </xsl:for-each>
187 193

  
188 194
            <!-- TODO Methods -->
189 195

  
190
            <div class="control-group entity">
191
                <h4>Other Information</h4>
192
                <!-- Data usage rights (resourceConstraints) -->
193
                <xsl:if test="//gmd:resourceConstraints">
194
                    <xsl:for-each select="//gmd:resourceConstraints">
196
            <xsl:if test=".//gmd:metadataConstraints">
197

  
198
                <div class="control-group entity">
199
                    <h4>Metadata Constraints</h4>
200

  
201
                    <xsl:for-each select=".//gmd:metadataConstraints">
195 202
                        <xsl:apply-templates />
196 203
                    </xsl:for-each>
197
                </xsl:if>
198
            </div>
204
                </div>
205
            </xsl:if>
206

  
207
            <xsl:if test=".//gmd:resourceConstraints">
208
                <div class="control-group entity">
209

  
210
                <h4>Resource Constraints</h4>
211
                    <xsl:for-each select=".//gmd:resourceConstraints">
212
                        <xsl:apply-templates />
213
                    </xsl:for-each>
214
                </div>
215
            </xsl:if>
216

  
217
            <xsl:if test=".//gmd:supplementalInformation">
218
                <div class="control-group entity">
219

  
220
                    <h4>Supplemental Information</h4>
221
                    <xsl:for-each select=".//gmd:supplementalInformation">
222
                        <xsl:apply-templates />
223
                    </xsl:for-each>
224
                </div>
225
            </xsl:if>
226

  
227

  
199 228
        </form>
200 229
    </xsl:template>
201 230

  

Also available in: Unified diff