Hi
I am new to XSLT and i have a problem with grouping. What im trying to do is group using two elements as a unique identifier.
This is output from another program which outputs the same element but if there are mulitple drawings it will repeat it several times each time with the next drawing number.
e.g.
child parent DrawingNo
x y z
x y z1
x1 y1 z2
to
x y z,z1
x1 y1 z2
merging the two
here is some of the XML to help
- <row idx="1">
<Child>105394 </Child>
<Description>El ement 1</Description>
<Parent>10538 8</Parent>
<Drawing>102553 </Drawing>
</row>
- <row idx="2">
<Child>105394 </Child>
<Description>El ement 1</Description>
<Parent>10538 8</Parent>
<Drawing>102554 </Drawing>
</row>
- <row idx="3">
<Child>105379 </Child>
<Description>El ement 2</Description>
<Parent>10538 1</Parent>
<Drawing>102554 </Drawing>
</row>
I have another xsl file that uses the parent child relationship to create a tree structure (indenture level e.g. 0 is highest level parent, 1 is next child, 2 is 1's child etc) This is why combining the same elements into one is so important otherwise i will have the same element having duplicate records of the same children.
I am new to XSLT and i have a problem with grouping. What im trying to do is group using two elements as a unique identifier.
This is output from another program which outputs the same element but if there are mulitple drawings it will repeat it several times each time with the next drawing number.
e.g.
child parent DrawingNo
x y z
x y z1
x1 y1 z2
to
x y z,z1
x1 y1 z2
merging the two
here is some of the XML to help
- <row idx="1">
<Child>105394 </Child>
<Description>El ement 1</Description>
<Parent>10538 8</Parent>
<Drawing>102553 </Drawing>
</row>
- <row idx="2">
<Child>105394 </Child>
<Description>El ement 1</Description>
<Parent>10538 8</Parent>
<Drawing>102554 </Drawing>
</row>
- <row idx="3">
<Child>105379 </Child>
<Description>El ement 2</Description>
<Parent>10538 1</Parent>
<Drawing>102554 </Drawing>
</row>
I have another xsl file that uses the parent child relationship to create a tree structure (indenture level e.g. 0 is highest level parent, 1 is next child, 2 is 1's child etc) This is why combining the same elements into one is so important otherwise i will have the same element having duplicate records of the same children.
Comment