[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSL transform to HTML when element names are unkno

Subject: RE: XSL transform to HTML when element names are unknown
From: "Tusler, Dylan" <tuslerd@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 5 Jan 2006 10:12:21 +1000
html email xsl transform
That's pretty much it.

A bit of slipping and sliding, and I've got the column headings on too.

Thanks for you assistance.

Dylan.




How about:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:key name="tableData" match="Tables/*" use="local-name()"/>

<xsl:template match="/">
	<body>
		<xsl:apply-templates select="/Tables/*[generate-id() =
generate-id(key('tableData', local-name())[1])]"/>
	</body>
</xsl:template>

<xsl:template match="*">
	<table>
		<xsl:apply-templates select="key('tableData', local-name())"
mode="content"/>
	</table>
</xsl:template>

<xsl:template match="*" mode="content">
	<tr>
		<xsl:for-each select="*">
			<td><xsl:value-of select="."/></td>
		</xsl:for-each>
	</tr>
</xsl:template>

</xsl:stylesheet>


=======================================================
The contents of this message may express views and opinions not necessarily
shared by Maroochy Shire Council. This email and any files transmitted with it
are intended solely for the use of the individual or entity to whom they are
addressed.
Maroochy Shire Council is a government organisation and is subject to Freedom
of Information legislation. You must assume that any material sent to Maroochy
Shire Council may be monitored and may be accessible by persons other than the
intended recipient.
=======================================================
Note: Maroochy Shire Council does not accept multimedia or vulnerable file
types such as executables, html or GIF files via email.
Emails must be in English and under 10MB.
mscmail5.1

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.