on 09-01-2008 1:03 PM
Source
><body>
> <mes>
> <ta>A</ta>
> <detail>
> <val>0030</val>
> <val>0033</val>
> <val>0030</val>
> <val>0030</val>
> </detail>
> </mes>
> <mes>
> <ta>B</ta>
> <detail>
> <val>0040</val>
> <val>0043</val>
> <val>0044</val>
> </detail>
> </mes>
></body>
target should be - repeat MAIN per unique val and GR = ta(source) (and of course, each main node must contain "its" TA value
><whole>
> <main>
> <gr>A</gr>
> </main>
> <main>
> <gr>A</gr>
> </main>
> <main>
> <gr>A</gr>
> </main>
> <main>
> <gr>B</gr>
> </main>
> <main>
> <gr>B</gr>
> </main>
></whole>
Nay idea, how to do this one?
Thnaks,
Olian
Edited by: Olian Saludew on Sep 1, 2008 2:04 PM
Hi Olian,
For the target main:
<val> --> <removeContext> --> <sort> --> <splitByValue: ValueChanged> --> <collapseContext> --> <main>
For the target gr:
I'm assuming that the context for ta is: A, contextChange, B
I'm assuming that the context for val is: 0030, 0033, 0030, 0030, contextChange, 0040, 0043, 0044
1. <val> CONCAT with [ <ta> UseOneAsMany <val> <val> ] , the output should be 0030A, 0033A, 0030A, 0030A, 0040B, 0043B and 0044B
2. output of step 1 --> <removeContext> --> <sort: lexicographical> --> <splitByValue: Value Changed> --> <collapseContext> --> <subString: 4, 1>...so the output should only be letters A or B (assuming my substring numbers are correct) with the duplicates removed
As for the value, the same step like main is followed.. hope this helps
Edited by: dspboys on Sep 2, 2008 7:26 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do it with User Defined function take one parameter and cache entire queue option ticked in the mapping editor and calculate the length for array having unique strings.
then simply using for loop you can assign the value to target.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
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.