Yes - broken down like that it makes a lot more sense. Thanks.
-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of
David
Carlisle
Sent: 15 November 2002 11:53
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Problem generating default attribute values.
If I understand correctly...
<xsl:template match="transaction-list">
<dest-transaction-list total="total">
<xsl:for-each select="transaction/breakdown/@account">
<xsl:attribute name="{.}"><xsl:value="."/></xsl:attribute>
</xsl:for-each>
<xsl:for-each select="transaction">
<dest-transaction total="@total">
<xsl:for-each select="../transaction/breakdown/@account">
<xsl:attribute name="{.}">0</xsl:attribute>
</xsl:for-each>
<xsl:for-each select="breakdown">
<xsl:attribute
name="{(_at_)account}"><xsl:value="@ammount"/></xsl:attribute>
</xsl:for-each>
</dest-transaction>
</xsl:for-each>
</dest-transaction-list>
untested..
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list