|
@@ -1,23 +1,25 @@
|
|
|
-<xsl:stylesheet version="1.0"
|
|
|
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
|
- xmlns="http://www.w3.org/1999/xhtml"
|
|
|
+<xsl:stylesheet version="1.1"
|
|
|
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
|
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
|
|
>
|
|
|
|
|
|
<xsl:output method="xml"
|
|
|
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
|
|
- doctype-public="-//W3C/DTD XHTML 1.0 Strict//EN"
|
|
|
- indent="yes"/>
|
|
|
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
|
|
+ doctype-public="-//W3C/DTD XHTML 1.0 Strict//EN"
|
|
|
+ indent="yes"/>
|
|
|
|
|
|
|
|
|
that doesn't match another template -->
|
|
|
<xsl:template match="@* | node()">
|
|
|
- <xsl:copy>
|
|
|
- <xsl:apply-templates select="@* | node()"/>
|
|
|
- </xsl:copy>
|
|
|
+ <xsl:copy>
|
|
|
+ <xsl:apply-templates select="@* | node()"/>
|
|
|
+ </xsl:copy>
|
|
|
+ </xsl:template>
|
|
|
+ <xsl:template match="processing-instruction()">
|
|
|
</xsl:template>
|
|
|
|
|
|
- <xsl:template match="/html/body/*/div[@id='xmldata']/*">
|
|
|
+ <xsl:template match="//xhtml:div[@id='xmldata']/*">
|
|
|
<xsl:variable name="schema" select="//xsd:schema"/>
|
|
|
<xsl:variable name="tabletypename"
|
|
|
select="$schema/xsd:element[@name=name(current())]/@type"/>
|
|
@@ -25,7 +27,8 @@
|
|
|
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" style="text-align: left; width: 100%;">
|
|
|
+ <table xmlns="http://www.w3.org/1999/xhtml"
|
|
|
+ class="pure-table pure-table-bordered pure-table-striped" style="text-align: left; width: 100%;">
|
|
|
|
|
|
<thead style="text-align: center">
|
|
|
<tr>
|
|
@@ -35,29 +38,35 @@
|
|
|
</tr>
|
|
|
</thead>
|
|
|
|
|
|
- <xsl:for-each select="row">
|
|
|
+ <tbody>
|
|
|
+ <xsl:for-each select="xhtml:row">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="position() != last()">
|
|
|
+ <tr>
|
|
|
+ <xsl:for-each select="*">
|
|
|
+ <td><xsl:value-of select="."/></td>
|
|
|
+ </xsl:for-each>
|
|
|
+ </tr>
|
|
|
+ </xsl:when>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+ </tbody>
|
|
|
+ <tfoot>
|
|
|
+ <xsl:for-each select="xhtml: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>
|
|
|
+ </tfoot>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
-</xsl:stylesheet>
|
|
|
+</xsl:stylesheet>
|