[Home] [By Thread] [By Date] [Recent Entries]
On 15.05.2018 15:18, Geert Bormans geert@xxxxxxxxxxxxxxxxxxx wrote:
still trying to get my head around this and facing obstacles, most likely by lack of understanding... however That seems like a job for xsl:fork <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:math="http://www.w3.org/2005/xpath-functions/math" exclude-result-prefixes="xs math" version="3.0"> <xsl:mode streamable="yes" on-no-match="shallow-copy"/> <xsl:mode name="header" streamable="yes"/> <xsl:output indent="yes"/>
<xsl:template match="table">
<document>
<xsl:fork>
<xsl:sequence>
<header>
<xsl:apply-templates select="row[1]/@*" mode="header"/>
</header>
</xsl:sequence>
<xsl:sequence>
<content>
<xsl:apply-templates select="row"/>
</content>
</xsl:sequence>
</xsl:fork>
</document>
</xsl:template>
<xsl:template match="row/@*" mode="header" expand-text="yes">
<xsl:element name="{name()}">{.}</xsl:element>
</xsl:template>
</xsl:stylesheet>
|

Cart



