Quote:
|
quote:I don't know how to check this as columns for difrernt table are going to be diffrerent . Kindly help me on this. Thanks
|
the following XSL will produce the result required by you:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates select="*" mode="all"/>
</xsl:template>
<xsl:template match="*" mode="all">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*"/>
<xsl:value-of select="text()"/>
<xsl:apply-templates select="*" mode="all"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
</xsl:template>
<xsl:template match="tbody/row" mode="all">
<xsl:variable name="pos" select="position()"/>
<row>
<xsl:for-each select="../../colspec">
<entry colname="{@colname}">
<xsl:variable name="att" select="@colname"/>
<xsl:value-of select="../tbody/row[position()=$pos]/entry[@colname=$att]"/>
</entry>
</xsl:for-each>
</row>
</xsl:template>
</xsl:stylesheet>
PS
But I think this can be simplified, and I hope gurus will show a way for this.