RE: [xsl] generate unknow table

Subject: RE: [xsl] generate unknow table
From: "John Wang" <jwang@xxxxxxxxxxx>
Date: Mon, 11 Jun 2001 15:26:27 -0500
Hi, All

I have posted this question few days ago. It seems no body
even give a try to answer this question. Could someone tell
me this is impossible in XSLT? Or my question is not clear?

Thanks a lot in advance.

Here is my xml:

<?xml version="1.0"?>
		<field id="sflbr">Br</field>
		<field id="sflcyc">Cycle</field>
		<field id="sfsts">P/I Status Description</field>
		<field id="pidate">P/I Date</field>
			<sfsts>This is a description</sfsts>
			<sfsts>This is a description too</sfsts>

Here is my xsl:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
	<xsl:output method="html"/>
	<xsl:template match="/">
				<table border="1">
					<xsl:apply-templates select="display/title"/>
					<xsl:apply-templates select="display/data"/>
	<xsl:template match="title">
			<xsl:for-each select="field">
					<xsl:value-of select="."/>
	<xsl:template match="data">
		<xsl:for-each select="record">
					<xsl:value-of select="sflbr"/>
					<xsl:value-of select="sflcyc"/>
					<xsl:value-of select="sfsts"/>
					<xsl:value-of select="pidate"/>

If you do the XSL transform, you will get the result I want to get.
The problem is, when I write the XSL, I don't know the columns I want to
display, until I read the coming XML. How can I get the field name
such as sflbr, sflcyc, sfsts, pidata from the display/title/field@id?

Thanks a lot.


 XSL-List info and archive:

 XSL-List info and archive:

Current Thread