1. Only a single XPATH can be chosen as the repetitive element.
2. The example below results in only "first" values for each combination of ColA, ColB, ColC. In other words, ColA OR ColB OR ColC must be chosen as the repetitive element, not all three. In reality, it IS the three together that creates uniqueness. I had thought uniqueness didn't matter but it looks like it does. I think any sub-elements of the repetition element are being overlaid by the very first repetition element value being encountered.
There is no single lowest level element <i>value</i> that isn't repeated at least once in another repetition.
How can this be handled so that ALL combinatory values of ColA,ColB and ColC are output as unique rows?
Example;
<Root>
<x><colA>1</colA><colB>1</colB><colC>First</colC></x>
<x><colA>1</colA><colB>1</colB><colC>second</colC></x>
<x><colA>2</colA><colB>1</colB><colC>First</colC></x>
<x><colA>2</colA><colB>1</colB><colC>second</colC></x>
<x><colA>2</colA><colB>2</colB><colC>First</colC></x>
<x><colA>2</colA><colB>2</colB><colC>second</colC></x>
</Root>
XML Input Repetition Element not repeating
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
are you reading this? or writing it? I haven't seen a single case where the "values" came into play on reading....you should get six rows from this structure..... I'd have to try it, and "maybe" there could be an issue in the fact that these are directly off the root and not some sub-element (such as "<rowsOfelementX>"), but it would be strange to not get six rows no matter which column in 'x' that you choose as the repetitive element.
Tell us more about the use case.
Ernie
Tell us more about the use case.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
I am reading XML using the XML Input Stage.
I get six rows but I do not get six unique rows. Only the first unique row gets the values. When the repetition element repeats, the values output reflect the first occurrence of the repeating element values.
I have a solution that appears to work. I ended up marking the XML chunk as the repeating element and sending that to another XMLInput stage and parsing that for the lowest level elements. I chose one of the lowest elements as the repetition element of the second XML Input stage, essentially at random, and I then got the six unique rows output.
I get six rows but I do not get six unique rows. Only the first unique row gets the values. When the repetition element repeats, the values output reflect the first occurrence of the repeating element values.
I have a solution that appears to work. I ended up marking the XML chunk as the repeating element and sending that to another XMLInput stage and parsing that for the lowest level elements. I chose one of the lowest elements as the repetition element of the second XML Input stage, essentially at random, and I then got the six unique rows output.
Interesting. Thanks. I wonder if it has something to do that these are right after the root and not grouped as noted above. Your solution certainly is an indicator that that might be the case.
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA