RE: [xsl] Output multiple occurence into one and concatenate values

Subject: RE: [xsl] Output multiple occurence into one and concatenate values
From: "Shaikh, Parvez" <Parvez.Shaikh@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Mar 2007 14:58:05 -0400
Thanks for all the responses.
I am using at the top
<xsl:template match="/">
      <xsl:apply-templates select="//erpayload/* |

so All I did based
on what you said was:
 <xsl:template match="cost_allocation_product">
<xsl:value-of select="@project" />

It did get all the project attributes together. But what I
want to do is
add a node called cost_allocation_product followed by the data
attribute value format as given below. In this I am looking at all
concatenated Project attribute
value and concatenated percent value.
<dbfield name ="project" value= "1725 -
Project1,1774 - Project2,1755 -
Project3" />
<dbfield name="percent"
value="12,1,87" />

How do I get this.
-----Original Message-----
From: Abel Braaksma []
Sent: Thursday, March 29, 2007 2:40 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Output multiple occurence into one and concatenate
Shaikh, Parvez wrote:
> I am an XSL newbie. Can someone please respond?

It won't help you sending the whole message twice within the hour. We
are all volunteers here and they will help and/or respond when they have
some free time and when they find your query clear and concise enough.

I have given my XML and XSL below. The rest all is taken care of. All
want to do is Combine all cost_allocation_product into one and append
> all
values for the attributes when doing thiss. 
Thanks for the XML and
XSL, however, next time, please send only the 
relevant parts in a minimal
working sample that explains your problem. 
Usually, doing so, will help you
in understanding your own problem

if you have somewhere:
<xsl:apply-templates select="//cost_allocation_product" />

than you can
place somewhere a matching template:

    <xsl:value-of select="@your-attr-here"

That should do it. You
may wrap the apply-templates in a <xsl:attribute 
..> if you want the result
inside an attribute's value.

-- Abel
XSL-List info and archive:
unsubscribe, go to:
or e-mail:
The information contained in this
transmission may be privileged and
confidential and is intended only for the
use of the person(s) named
above. If you are not the intended recipient, or
an employee or agent responsible
for delivering this message to the intended
recipient, any review, dissemination,
distribution or duplication of this
communication is strictly prohibited. If you are
not the intended recipient,
please contact the sender immediately by reply e-mail
and destroy all copies
of the original message. Please note that we do not accept
account orders
and/or instructions by e-mail, and therefore will not be responsible
carrying out such orders and/or instructions.  If you, as the intended
of this message, the purpose of which is to inform and update our
clients, prospects
and consultants of developments relating to our services
and products, would not
like to receive further e-mail correspondence from
the sender, please "reply" to the
sender indicating your wishes.  In the
U.S.: 1345 Avenue of the Americas, New York,
NY 10105.

Current Thread