<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="sqlitecrosstab.xsl"?>
GUID: sqlite-manager@sqlite-manager.googlecode.com
Homepage: http://sqlite-manager.googlecode.com

Generation Time: Tue, 22 Feb 2011 04:01:50 GMT
SQLite version: 3.7.1

<!-- Database: demonstration.db -->
<corp_name type="3">Mad Method Inc</corp_name>
<stock_symbol type="3">mmod</stock_symbol>
<share_volume type="1">120039</share_volume>
<share_price type="2">1.20</share_price>
<corp_name type="3">Monster Widget Inc.</corp_name>
<stock_symbol type="3">widg</stock_symbol>
<share_volume type="1">24550</share_volume>
<share_price type="2">0.56</share_price>
<corp_name type="3">Fictional Product Inc.</corp_name>
<stock_symbol type="3">ficp</stock_symbol>
<share_volume type="1">585241</share_volume>
<share_price type="2">0.27</share_price>

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
Generic XSL Transform file for SQLite Manager generated XML file.
Author : Colin Riley February 2011

<xsl:template match="/"> <!--Match XML document root -->

<xsl:template match="/*">

<!--First row of table Column headings -->
<!-- Loop for column headings. -->
<xsl:for-each select="*[position() = 1]/*"> <!-- Match each record element tag. -->
<TH> <xsl:value-of select="local-name()"/> <!-- Take element name as column heading -->
</xsl:for-each> <!--End column heading loop -->
<xsl:apply-templates/> <!--Insert remaining rows of table -->


<xsl:template match="/*/*" >

<!--Loop for each field after the first field within the record or row -->
<xsl:for-each select="*[position()=1]">
<!--Display first field as row heading -->
<TH> <xsl:value-of select="text()[position()]" /> </TH>

<!--Loop for each field after the first field within the record or row -->

<xsl:for-each select="following-sibling::*" > <!--Select next field element -->
<TD> <xsl:value-of select="text()" /> </TD>
</xsl:for-each> <!-- End of for each field loop -->

</xsl:for-each> <!--End of for each record loop -->
</xsl:template> <!--End of table rows template -->


Colin Riley --Updated February 2011--

Home     SQLite Site Index