Subject: Re: Variable number of attributes From: "John E. Simpson" <simpson@xxxxxxxxxxx> Date: Sat, 30 Sep 2000 12:53:49 -0400 |
[Not 100% correct stylesheet]
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/REC-html40" >
<xsl:template match="/doc"> <html> <head><title>Attributes to Elements</title></head> <body> <table> <tr> <xsl:for-each select="ele[1]/@*"> <th><xsl:value-of select="name()"/></th> </xsl:for-each> </tr> <xsl:apply-templates /> </table> </body> </html> </xsl:template>
<xsl:template match="ele"> <tr> <xsl:for-each select="@*"> <td><xsl:value-of select="."/></td> </xsl:for-each> </tr> </xsl:template>
<html xmlns="http://www.w3.org/TR/REC-html40"> <head> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Attributes to Elements</title> </head> <body> <table> <tr> <th>name1</th> <th>name2</th> <th>name3</th> </tr> <tr> <td>A1</td> <td>A2</td> <td>A3</td> </tr> <tr> <td>B1</td> <td>B2</td> <td>B3</td> </tr> </table> </body> </html>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Variable number of attributes, John E. Simpson | Thread | XSL Formatting Objects Chapter Upda, Elliotte Rusty Harol |
XSL Formatting Objects Chapter Upda, Elliotte Rusty Harol | Date | Microsoft MSXML September Release, AndrewWatt2000 |
Month |