


XSL | Display It as an HTML Table.

Listing 1 This XSL code enables any ADO-produced XML file to display as an HTML table. By referencing each z:row element attribute generically with the "@*" wildcard, XSL avoids referring to specific field names and can be reused with a variety of ASP pages.

<?xml version="1.0"?>
<xsl:stylesheet 
xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<HTML><HEAD><TITLE>XSL-Formatted ADO 
Recordset</TITLE></HEAD>
	<BODY><FONT FACE="Tahoma" size="2">
		<TABLE border="1" COLOR="BLUE">
			<TR>
				<xsl:for-each 
select="*/s:Schema/s:ElementType/s:AttributeType">
					<TD><STRONG><FONT COLOR="RED" 
size="2"><xsl:value-of 
select="@name"/></FONT></STRONG></TD>
					</xsl:for-each>
			</TR>
			<xsl:for-each select="*/rs:data/z:row">
		        <TR>
					<xsl:for-each select="@*">
						<TD><FONT COLOR="BLUE" 
size="2"><xsl:value-of/></FONT></TD>
					</xsl:for-each>
				</TR>
			</xsl:for-each>
		</TABLE>
	</FONT></BODY></HTML>
	</xsl:template>
</xsl:stylesheet>




