on 03-04-2010 12:25 PM
Hi.
We have an old XSLT mapping that I need to make changes in.
In the XSLT code I pick a value from one field that gets repeated many times.
The problem I have now is that the target field should have the total string from all the fields in the source.
Rigth now I get one segment for each segment from the source.
The part of the code lokks as follow.
<xsl:template match="E1EDKT1">
<xsl:apply-templates select="E1EDKT2"/>
</xsl:template>
<xsl:template match="E1EDKT2">
<xsl:apply-templates select="TDLINE" mode="E1EDKT2"/>
</xsl:template>
<xsl:template match="TDLINE" mode="E1EDKT2">
<requestorOrderComment>
<xsl:value-of select="."/>
</requestorOrderComment>
</xsl:template>
The source looks as follow:
<E1EDKT1 SEGMENT="1">
<TDID>1000</TDID>
<TSSPRAS>E</TSSPRAS>
<TSSPRAS_ISO>EN</TSSPRAS_ISO>
<TDOBJECT>CRM_ORDERH</TDOBJECT>
<TDOBNAME>4B8DF962B3590415E10080008361901F</TDOBNAME>
<E1EDKT2 SEGMENT="1">
<TDLINE>A man serving eight years for vehicular homicide because of a</TDLINE>
<TDFORMAT>*</TDFORMAT>
</E1EDKT2>
</E1EDKT1>
<E1EDKT1 SEGMENT="1">
<TDID>1000</TDID>
<TSSPRAS>E</TSSPRAS>
<TSSPRAS_ISO>EN</TSSPRAS_ISO>
<TDOBJECT>CRM_ORDERH</TDOBJECT>
<TDOBNAME>4B8DF962B3590415E10080008361901F</TDOBNAME>
<E1EDKT2 SEGMENT="1">
<TDLINE> fatal crash involving his Toyota Camry is hoping for exonera</TDLINE>
<TDFORMAT>=</TDFORMAT>
</E1EDKT2>
</E1EDKT1>
<E1EDKT1 SEGMENT="1">
<TDID>1000</TDID>
<TSSPRAS>E</TSSPRAS>
<TSSPRAS_ISO>EN</TSSPRAS_ISO>
<TDOBJECT>CRM_ORDERH</TDOBJECT>
<TDOBNAME>4B8DF962B3590415E10080008361901F</TDOBNAME>
<E1EDKT2 SEGMENT="1">
<TDLINE>tion amid concerns over unintended acceleration in some of To</TDLINE>
<TDFORMAT>=</TDFORMAT>
</E1EDKT2>
</E1EDKT1>
The result of the segment is:
<requestorOrderComment>A man serving eight years for vehicular homicide because of a</requestorOrderComment>
<requestorOrderComment> fatal crash involving his Toyota Camry is hoping for exonera</requestorOrderComment>
<requestorOrderComment>tion amid concerns over unintended acceleration in some of To</requestorOrderComment>
<requestorOrderComment>yota's vehicles.</requestorOrderComment>
<requestorOrderComment>Koua Fong Lee has always maintained his inn</requestorOrderComment>
<requestorOrderComment>ocence in the 2006 crash. Then 29 years old, he was driving h</requestorOrderComment>
<requestorOrderComment>ome from Sunday services with his pregnant wife, father, daug</requestorOrderComment>
<requestorOrderComment>hter, brother and niece in his 1996 Toyota Camry.</requestorOrderComment>
<requestorOrderComment>Lee told i</requestorOrderComment>
<requestorOrderComment>nvestigators that he pumped the brakes as he exited I-94 in S</requestorOrderComment>
<requestorOrderComment>t. Paul, Minnesota, and approached an intersection, his lawye</requestorOrderComment>
<requestorOrderComment>r, Brent Schaefer, said. But Ramsey County prosecutors claime</requestorOrderComment>
<requestorOrderComment>d Lee had his foot on the gas as he approached cars waiting a</requestorOrderComment>
<requestorOrderComment>t a red light.</requestorOrderComment>
<requestorOrderComment>The car was moving at between 70 and 90 mph w</requestorOrderComment>
<requestorOrderComment>hen it struck two other vehicles. Javis Adams, 33, and his 10</requestorOrderComment>
<requestorOrderComment>-year-old son, Javis Adams Jr., were killed instantly. Anothe</requestorOrderComment>
<requestorOrderComment>r passenger, 6-year-old Devyn Bolton, was left paraplegic. Sh</requestorOrderComment>
<requestorOrderComment>e testified in a wheelchair at Lee's trial and later died for</requestorOrderComment>
<requestorOrderComment>m her injuries.</requestorOrderComment>
<requestorOrderComment>Two mechanical engineers examined the car be</requestorOrderComment>
<requestorOrderComment>fore trial on behalf of the state and the defense, Ramsey Cou</requestorOrderComment>
<requestorOrderComment>nty Attorney Susan Gaertner said. Both concluded the brakes w</requestorOrderComment>
<requestorOrderComment>ere operating and there were no problems with the acceleratio</requestorOrderComment>
<requestorOrderComment>n, she said.</requestorOrderComment>
<requestorOrderComment>Although the throttle was found set open at 15</requestorOrderComment>
<requestorOrderComment> percent, which is unusual, the abnormality was attributed at</requestorOrderComment>
<requestorOrderComment> the time to damage from the crash, she said.</requestorOrderComment>
<requestorOrderComment>"Bottom line,</requestorOrderComment>
<requestorOrderComment> two experts -- one for each side -- said there was nothing w</requestorOrderComment>
<requestorOrderComment>rong with the car," she said.</requestorOrderComment>
<requestorOrderComment>A jury convicted Lee of crimin</requestorOrderComment>
<requestorOrderComment>al vehicular homicide and he was sentenced to eight years in</requestorOrderComment>
<requestorOrderComment> prison. But he continues to maintain his innocence.</requestorOrderComment>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would like tha have the following result.
<requestorOrderComment>A man serving eight years for vehicular homicide because of a fatal crash involving his Toyota Camry is hoping for exoneration amid concerns over unintended acceleration in some of Toyota's vehicles. Koua Fong Lee has always maintained his innocence in the 2006 crash. Then 29 years old, he was driving home from Sunday services with his pregnant wife, father, daughter, brother and niece in his 1996 Toyota Camry. Lee told investigators that he pumped the brakes as he exited I-94 in St. Paul, Minnesota, and approached an intersection, his lawyer, Brent Schaefer, said. But Ramsey County prosecutors claimed Lee had his foot on the gas as he approached cars waiting at a red light. The car was moving at between 70 and 90 mph when it struck two other vehicles. Javis Adams, 33, and his 10-year-old son, Javis Adams Jr., were killed instantly. Another passenger, 6-year-old Devyn Bolton, was left paraplegic. She testified in a wheelchair at Lee's trial and later died form her injuries. Two mechanical engineers examined the car before trial on behalf of the state and the defense, Ramsey County Attorney Susan Gaertner said. Both concluded the brakes were operating and there were no problems with the acceleration, she said. Although the throttle was found set open at 15percent, which is unusual, the abnormality was attributed at the time to damage from the crash, she said. "Bottom line, two experts -- one for each side -- said there was nothing wrong with the car," she said. A jury convicted Lee of criminal vehicular homicide and he was sentenced to eight years in prison. But he continues to maintain his innocence.</requestorOrderComment>
How would I do this?
BR
Kalle
Not correct in the second message.
This is the result I have now.
<requestorOrderComment>A man serving eight years for vehicular homicide because of a</requestorOrderComment>
<requestorOrderComment> fatal crash involving his Toyota Camry is hoping for exonera</requestorOrderComment>
<requestorOrderComment>tion amid concerns over unintended acceleration in some of To</requestorOrderComment>
.
.
.
.
.
.
.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.