Subject: Re: [xsl] Re: WDDX Recordset generic simplification From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 08 Nov 2006 11:18:51 -0500 |
I have an excerpt of a wddx data being generated from query data in ColdFusion 5 and I need to simplify the structure with an intermediate xsl transform so that I can consume the simplified form in a mail merge
[snipped]
I realize the following code does not work but it is the pull/procedural approach I keep getting stuck heading towards:
<xsl:template match="var/recordset">
<xsl:variable name="rowCount" select="@rowCount"/>
<xsl:variable name="fieldNames" select="@fieldNames"/>
<xsl:for-each from="1" to="$rowCount" index="row">
<xsl:element name="{../@name}">
<xsl:for-each list="$fieldNames" index="col">
<xsl:element name="{$fieldNames[$col]}">
<xsl:value-of select="field[@name=$col]::child[position()=$row]"/>
<xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:for-each>
</xsl:template>
Can anyone point me towards a better approach using a push/functional approach to make simplification of wddx recordsets contextually generic?
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: WDDX Recordset generic si, Eric Pheatt | Thread | [xsl] FW: Trying to translate code , Emily.Garrett |
RE: [xsl] document() function refus, Michael Kay | Date | [xsl] adding namespaces to result [, Fidalgo Sicilia Manu |
Month |