<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="sqlitetableheader.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 -->
<demonstration.db>
<market_list>
<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>
</market_list>
<market_list>
<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>
</market_list>
<market_list>
<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>
</market_list>
</demonstration.db>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--sqlitetableheader.xsl
Generic XSL Transform file for SQLite Manager generated XML file.
February 2011
http://sqlite.awardspace.info/

Derived from xsl stylesheet created by M.V. 'Anil' Radhakrishna which can be found at
http://www.eggheadcafe.com/tutorials/aspnet/58b72f32-8da6-44e3-8c9a-61aebdf6be6b/xsl-transformation-to-htm.aspx
-->


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

<HTML>
<BODY>
<!--Table template insert -->
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>

<xsl:template match="/*">
<TABLE BORDER="1" CELLPADDING="3" >
<TR>
<!--Match each field level element -->
<xsl:for-each select="*[position() = 1]/*"> <!--Loop for headings - Match first record and for each field in
record -->
<TH>
<!--Use name from field element tag as heading for table -->
<xsl:value-of select="local-name()"/>
</TH>
</xsl:for-each> <!-- End headings loop -->
</TR>
<xsl:apply-templates/>
</TABLE>
</xsl:template>

<xsl:template match="/*/*"> <!--Match each record -->
<TR>
<xsl:apply-templates/>
</TR>
</xsl:template>

<xsl:template match="/*/*/*"> <!--Match each field in a record -->
<TD>
<xsl:value-of select="."/> <!-- Display field value of record -->
</TD>

</xsl:template>

</xsl:stylesheet>


Colin Riley --Updated March 2011--

Learn PHP in 17 easy video lessons with Simple PHP

Home     SQLite Site Index