|
@@ -8,6 +8,7 @@
|
|
|
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
|
|
doctype-public="-//W3C/DTD XHTML 1.0 Strict//EN"
|
|
|
indent="yes"/>
|
|
|
+
|
|
|
<!-- This is an identity template - it copies everything
|
|
|
that doesn't match another template -->
|
|
|
<xsl:template match="@* | node()">
|
|
@@ -15,7 +16,8 @@
|
|
|
<xsl:apply-templates select="@* | node()"/>
|
|
|
</xsl:copy>
|
|
|
</xsl:template>
|
|
|
- <xsl:template match="/html/body/xml/*">
|
|
|
+
|
|
|
+ <xsl:template match="/html/body/*/div[@id='xmldata']/*">
|
|
|
<xsl:variable name="schema" select="//xsd:schema"/>
|
|
|
<xsl:variable name="tabletypename"
|
|
|
select="$schema/xsd:element[@name=name(current())]/@type"/>
|
|
@@ -23,36 +25,39 @@
|
|
|
select="$schema/xsd:complexType[@name=$tabletypename]/xsd:sequence/xsd:element[@name='row']/@type"/>
|
|
|
<xsl:variable name="tablename" select="$schema/xsd:complexType[@name=$rowtypename]/xsd:sequence/xsd:element[1]/@name"/>
|
|
|
|
|
|
- <table class="pure-table pure-table-bordered pure-table-striped">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <xsl:for-each select="$schema/xsd:complexType[@name=$rowtypename]/xsd:sequence/xsd:element/@name">
|
|
|
- <th><xsl:value-of select="."/></th>
|
|
|
- </xsl:for-each>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
+ <table class="pure-table pure-table-bordered pure-table-striped" style="text-align: left; width: 100%;">
|
|
|
+
|
|
|
+ <thead style="text-align: center">
|
|
|
+ <tr>
|
|
|
+ <xsl:for-each select="$schema/xsd:complexType[@name=$rowtypename]/xsd:sequence/xsd:element/@name">
|
|
|
+ <th><xsl:value-of select="."/></th>
|
|
|
+ </xsl:for-each>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <xsl:for-each select="row">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="position() = last()">
|
|
|
+ <tfoot>
|
|
|
+ <tr>
|
|
|
+ <xsl:for-each select="*">
|
|
|
+ <th style="text-align: center"><xsl:value-of select="."/></th>
|
|
|
+ </xsl:for-each>
|
|
|
+ </tr>
|
|
|
+ </tfoot>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <tr>
|
|
|
+ <xsl:for-each select="*">
|
|
|
+ <td><xsl:value-of select="."/></td>
|
|
|
+ </xsl:for-each>
|
|
|
+ </tr>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+
|
|
|
+ </table>
|
|
|
|
|
|
- <xsl:for-each select="row">
|
|
|
- <xsl:choose>
|
|
|
- <xsl:when test="position() = last()">
|
|
|
- <tfoot>
|
|
|
- <tr>
|
|
|
- <xsl:for-each select="*">
|
|
|
- <th><xsl:value-of select="."/></th>
|
|
|
- </xsl:for-each>
|
|
|
- </tr>
|
|
|
- </tfoot>
|
|
|
- </xsl:when>
|
|
|
- <xsl:otherwise>
|
|
|
- <tr>
|
|
|
- <xsl:for-each select="*">
|
|
|
- <td><xsl:value-of select="."/></td>
|
|
|
- </xsl:for-each>
|
|
|
- </tr>
|
|
|
- </xsl:otherwise>
|
|
|
- </xsl:choose>
|
|
|
- </xsl:for-each>
|
|
|
- </table>
|
|
|
</xsl:template>
|
|
|
|
|
|
</xsl:stylesheet>
|