Subject: Re: [xsl] recursive addition From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 15 Jan 2004 13:59:35 -0500 |
<xsl:stylesheet version="1.0" xmlns:exslt="http://exslt.org/common" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="collected"> <xsl:apply-templates select="key('folder-by-id',$start)" mode="collect"/> </xsl:variable>
<xsl:template match="folder" mode="collect"> <files> <xsl:value-of select="@files"/> </files> <xsl:apply-templates select="key('folder-by-id',file/@id)" mode="collect"/> </xsl:template>
<xsl:template match="/"> <xsl:value-of select="sum(exslt:node-set($collected)/files)"/> </xsl:template>
Cheers, Wendell
Perhaps the way to go is to write an xslt to convert from the flat file format to a nested one.
====================================================================== 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 -> |
---|---|---|
Re: [xsl] recursive addition, annirack | Thread | RE: [xsl] recursive addition, Josh Canfield |
Re: [xsl] Sort column in table, J.Pietschmann | Date | RE: [xsl] Re: Useful open-source XM, Joshua Allen |
Month |