view emldown_templates/datatable2.xsl @ 0:cfe884e53600 draft default tip

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/main/tools-ecology/tools/make_data_paper_sketches commit 34f4e0604adc2a2ba4902ce6b8e6df2460eda292
author ecology
date Tue, 15 Oct 2024 20:33:48 +0000
parents
children
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template name="datatable2" match="/">
<xsl:choose>
  <xsl:when test=".//dataTable">
   <h3>Data tables</h3>
    <xsl:for-each select=".//dataTable">
    <br/>
<h4><xsl:value-of select="entityName"/></h4>
    <br/>
    <tr>
    Physical:<xsl:text>&#xA0;</xsl:text><xsl:value-of select="physical/objectName"/>
    </tr>
    <div class="table-responsive">
<table class="table table-striped">
      <tr>
        <th>attribute name</th>
        <th>definition</th>
        <th>format, unit or codes</th>
      </tr>
      <xsl:for-each select="attributeList/attribute">
        <tr>
          <td><xsl:value-of select="attributeName"/></td>
          <td><xsl:value-of select="attributeDefinition"/></td>
          <td><xsl:value-of select="measurementScale/dateTime"/><xsl:value-of select="measurementScale/ratio/unit"/><xsl:value-of select="measurementScale/interval/unit"/><xsl:for-each select="measurementScale/nominal/nonNumericDomain/enumeratedDomain/codeDefinition"><xsl:value-of select="code"/><xsl:text>&#xA0;=&#xA0;</xsl:text><xsl:value-of select="definition"/> <xsl:text>&#xA0;</xsl:text></xsl:for-each></td>
        </tr>
      </xsl:for-each>
    </table>
    </div>
    </xsl:for-each>
 </xsl:when>
 </xsl:choose>
</xsl:template>
</xsl:stylesheet>