- </html:tr>
- </html:thead>
- <html:tbody>
- <for-each select="$body">
- <variable name="cols">
- <call-template name="书社:split">
- <with-param name="source" select="string(.)"/>
- <with-param name="separator" select="'	'"/>
- </call-template>
- </variable>
- <html:tr>
- <for-each select="exsl:node-set($cols)/*[count(exsl:node-set($headcols)/*)>=position()]">
- <html:td>
- <attribute name="data-tsv-header">
- <value-of select="exsl:node-set($headcols)/*[count(current()/preceding-sibling::*)+1]"/>
- </attribute>
- <value-of select="."/>
- <if test="position()=count(exsl:node-set($headcols)/*)">
- <for-each select="following-sibling::*">
- <text>	</text>
+ </element>
+ </element>
+ <element name="tbody" namespace="&xhtml;">
+ <for-each select="$head/following-sibling::*[normalize-space(.)!='']">
+ <choose>
+ <when test="starts-with(., '#')">
+ <comment>
+ <value-of select="substring-after(., '#')"/>
+ </comment>
+ </when>
+ <otherwise>
+ <variable name="cols">
+ <call-template name="书社:split">
+ <with-param name="source" select="string(.)"/>
+ <with-param name="separator" select="'	'"/>
+ </call-template>
+ </variable>
+ <element name="tr" namespace="&xhtml;">
+ <for-each select="exsl:node-set($cols)/*[count(exsl:node-set($headcols)/*)>=position()]">
+ <element name="td" namespace="&xhtml;">
+ <attribute name="data-tsv-header">
+ <value-of select="exsl:node-set($headcols)/*[count(current()/preceding-sibling::*)+1]"/>
+ </attribute>