xsl-list
[Top] [All Lists]

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

2007-03-29 14:53:49
 

The reason I did that change was when I change it to testnode instead of
//testnode it does not output anything of testnode. Please note that
this is a part of a big xsl stylesheet that I am using.
It begins as 
<xsl:template match="/">
    <erpayload>
      <xsl:apply-templates select="//erpayload/* |
//erpayload/purchasing/*"/>
    </erpayload>
  </xsl:template>

testnode is at erpayload/purchasing/testnode

I cannot change this as it affects many other xml forms



-----Original Message-----
From: Abel Braaksma [mailto:abel(_dot_)online(_at_)xs4all(_dot_)nl] 
Sent: Thursday, March 29, 2007 5:41 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] concatenate multiple attribute values and assign it
to another attribute

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>
--~--



-----------------------------------------
The info
y 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
for carrying out such orders and/or instructions.  If you, as the intended 
recipient
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.


--~------------------------------------------------------------------
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>
--~--