Project

General

Profile

« Previous | Next » 

Revision 1641

Added by Jing Tao over 21 years ago

Add new templates.

View differences:

lib/style/eml2/eml-dataset-2.0.0.xsl
50 50
      <xsl:call-template name="datasetpublisher"/>
51 51
      <xsl:call-template name="datasetpubplace"/>
52 52
      <xsl:call-template name="datasetproject"/>
53
      <xsl:call-template name="datasetentity"/>
53 54
    </table>
54 55
    
55 56
  </xsl:template>
......
234 235
    </xsl:for-each>
235 236
  </xsl:template>
236 237
  
238
  
239
  
240
  <xsl:template name="datasetentity" > 
241
   <xsl:if test="dataTable or spatialRaster or spatialVector or storedProcedures or view or otherEntity">
242
      <tr><td class="{$subHeaderStyle}" colspan="2">
243
        <xsl:text>Entity Information:</xsl:text>
244
     </td></tr>
245
   </xsl:if>
246
    <xsl:for-each select="dataTable">
247
      <xsl:call-template name="entityurl">
248
        <xsl:with-param name="type">dataTable</xsl:with-param>
249
        <xsl:with-param name="showtype">Data Table</xsl:with-param>
250
        <xsl:with-param name="index" select="position()"/>
251
      </xsl:call-template>
252
   </xsl:for-each>
253
   <xsl:for-each select="spatialRaster">
254
     <xsl:call-template name="entityurl">
255
        <xsl:with-param name="type">spatialRaster</xsl:with-param>
256
        <xsl:with-param name="showtype">Spatial Raster</xsl:with-param>
257
        <xsl:with-param name="index" select="position()"/>
258
      </xsl:call-template>
259
   </xsl:for-each>
260
   <xsl:for-each select="spatialVector">
261
      <xsl:call-template name="entityurl">
262
        <xsl:with-param name="type">spatialVector</xsl:with-param>
263
        <xsl:with-param name="showtype">Spatial Vector</xsl:with-param>
264
        <xsl:with-param name="index" select="position()"/>
265
      </xsl:call-template>
266
   </xsl:for-each>
267
   <xsl:for-each select="storedProcedure">
268
     <xsl:call-template name="entityurl">
269
        <xsl:with-param name="type">storedProcedure</xsl:with-param>
270
        <xsl:with-param name="showtype">Stored Procedure</xsl:with-param>
271
        <xsl:with-param name="index" select="position()"/>
272
      </xsl:call-template>
273
   </xsl:for-each>
274
   <xsl:for-each select="view">
275
      <xsl:call-template name="entityurl">
276
        <xsl:with-param name="type">view</xsl:with-param>
277
        <xsl:with-param name="showtype">View</xsl:with-param>
278
        <xsl:with-param name="index" select="position()"/>
279
      </xsl:call-template>
280
   </xsl:for-each>
281
   <xsl:for-each select="otherEntity">
282
      <xsl:call-template name="entityurl">
283
        <xsl:with-param name="type">otherEntity</xsl:with-param>
284
        <xsl:with-param name="showtype">Other Entity</xsl:with-param>
285
        <xsl:with-param name="index" select="position()"/>
286
      </xsl:call-template>
287
   </xsl:for-each>
288
  </xsl:template>
289
  
290
  <xsl:template name="entityurl">
291
     <xsl:param name="showtype"/>
292
     <xsl:param name="type"/>
293
     <xsl:param name="index"/>
294
      <xsl:choose>
295
         <xsl:when test="references!=''">
296
          <xsl:variable name="ref_id" select="references"/>
297
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
298
          <xsl:for-each select="$references">
299
            <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
300
             &#160;</td>
301
            <td width="{$secondColWidth}" class="{$firstColStyle}">
302
             <a><xsl:attribute name="href">
303
              <xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&amp;displaymodule=entity&amp;entitytype=<xsl:value-of select="$type"/>&amp;index=<xsl:value-of select="$index"/></xsl:attribute>
304
             <br><xsl:value-of select="./entityName"/> (<xsl:value-of select="$showtype"/>)</br></a>
305
            </td>
306
         </tr> 
307
          </xsl:for-each>
308
        </xsl:when>
309
        <xsl:otherwise>
310
         <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
311
             &#160;</td>
312
            <td width="{$secondColWidth}" class="{$firstColStyle}">
313
             <a><xsl:attribute name="href">
314
              <xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&amp;displaymodule=entity&amp;entitytype=<xsl:value-of select="$type"/>&amp;index=<xsl:value-of select="$index"/></xsl:attribute>
315
             <br><xsl:value-of select="./entityName"/> (<xsl:value-of select="$showtype"/>)</br></a>
316
            </td>
317
         </tr>
318
       </xsl:otherwise>
319
     </xsl:choose>
320
  </xsl:template>
321
  
237 322
  <xsl:template match="text()" mode="dataset" />
238 323
  <xsl:template match="text()" mode="resource" />
239 324

  

Also available in: Unified diff