xsl-list
[Top] [All Lists]

Re: [xsl] concatenate multiple attribute values and assign it to another attribute

2007-03-29 14:42:39
Shaikh, Parvez wrote:
based on michael kay response or abels response if I do, the problem is
I get 4 outputs of testnode
i.e

<testnode att1="1,2,3,4" att2="a,b,c,d" />
<testnode att1="1,2,3,4" att2="a,b,c,d" />
<testnode att1="1,2,3,4" att2="a,b,c,d" />
<testnode att1="1,2,3,4" att2="a,b,c,d" />



I want it to output only once.
This is what I have done based on michaels response. The following is a
portion of the xslt file I have.

 <xsl:template match="//testnode">
   <testnode>
 ....

This is not how (we / I) suggested it. You are matching for each and every testnode here (it is never needed to have a match="//xyz", use match="xyz" instead, which acts equally), of course you will create a new node each time a 'testnode' is encountered. This is the reverse of our solutions.

Please try our examples, they work 'out of the box' with the input you gave us, and go from there.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--