angushirose
Programmer
Hi ,
I'm an XSL newbie and I need help big style.
Below is a copy of an XML file that I need to process :
<ace_samples source="dispatch" toutput="2007-02-01T13:10:28">
<tube>
<pid>100034797</pid>
<barcode>0010000581614</barcode>
<tswipe>2006-09-29T16:08:45</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>100034797</pid>
<barcode>0040000017080</barcode>
<tswipe>2006-09-29T16:08:59</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>100034797</pid>
<barcode>0050000008354</barcode>
<tswipe>2006-09-29T16:08:40</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>100034797</pid>
<barcode>0070000013256</barcode>
<tswipe>2006-09-29T16:09:01</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>100034797</pid>
<barcode>0030000054677</barcode>
<tswipe>2006-09-29T16:08:51</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0010000583212</barcode>
<tswipe>2007-01-30T12:11:45</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0040000017486</barcode>
<tswipe>2007-01-30T12:11:52</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0050000008394</barcode>
<tswipe>2007-01-30T12:11:36</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0070000012464</barcode>
<tswipe>2007-01-30T12:12:15</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0030000098011</barcode>
<tswipe>2007-01-30T12:12:08</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0061231231230</barcode>
<tswipe>2007-01-30T16:17:01</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T16:17:41</tsig>
<cid>743510</cid>
<trid>912</trid>
</tube>
</ace_samples>
What I need to do is to group the elements together based on <pid> value and containing all the associated <barcode> values e.g.
<ace_samples source="dispatch" toutput="2007-02-01T13:10:28">
<tube>
<pid>100034797</pid>
<barcode>0030000054677</barcode>
<barcode>0070000013256</barcode>
<barcode>0050000008354</barcode>
<barcode>0040000017080</barcode>
<barcode>0010000581614</barcode>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0061231231230</barcode>
<barcode>0030000098011</barcode>
<barcode>0070000012464</barcode>
<barcode>0050000008394</barcode>
<barcode>0040000017486</barcode>
<barcode>0010000583212</barcode>
</tube>
</ace_samples>
Can anyone point me in the right direction ?
Thanks in advance
Angus
I'm an XSL newbie and I need help big style.
Below is a copy of an XML file that I need to process :
<ace_samples source="dispatch" toutput="2007-02-01T13:10:28">
<tube>
<pid>100034797</pid>
<barcode>0010000581614</barcode>
<tswipe>2006-09-29T16:08:45</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>100034797</pid>
<barcode>0040000017080</barcode>
<tswipe>2006-09-29T16:08:59</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>100034797</pid>
<barcode>0050000008354</barcode>
<tswipe>2006-09-29T16:08:40</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>100034797</pid>
<barcode>0070000013256</barcode>
<tswipe>2006-09-29T16:09:01</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>100034797</pid>
<barcode>0030000054677</barcode>
<tswipe>2006-09-29T16:08:51</tswipe>
<acid>1</acid>
<author>AYOUNG</author>
<tsig>2006-09-29T16:09:25</tsig>
<cid>667</cid>
<trid>852</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0010000583212</barcode>
<tswipe>2007-01-30T12:11:45</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0040000017486</barcode>
<tswipe>2007-01-30T12:11:52</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0050000008394</barcode>
<tswipe>2007-01-30T12:11:36</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0070000012464</barcode>
<tswipe>2007-01-30T12:12:15</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0030000098011</barcode>
<tswipe>2007-01-30T12:12:08</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T12:12:49</tsig>
<cid>743510</cid>
<trid>896</trid>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0061231231230</barcode>
<tswipe>2007-01-30T16:17:01</tswipe>
<acid>90003</acid>
<author>AYOUNG</author>
<tsig>2007-01-30T16:17:41</tsig>
<cid>743510</cid>
<trid>912</trid>
</tube>
</ace_samples>
What I need to do is to group the elements together based on <pid> value and containing all the associated <barcode> values e.g.
<ace_samples source="dispatch" toutput="2007-02-01T13:10:28">
<tube>
<pid>100034797</pid>
<barcode>0030000054677</barcode>
<barcode>0070000013256</barcode>
<barcode>0050000008354</barcode>
<barcode>0040000017080</barcode>
<barcode>0010000581614</barcode>
</tube>
<tube>
<pid>122061111</pid>
<barcode>0061231231230</barcode>
<barcode>0030000098011</barcode>
<barcode>0070000012464</barcode>
<barcode>0050000008394</barcode>
<barcode>0040000017486</barcode>
<barcode>0010000583212</barcode>
</tube>
</ace_samples>
Can anyone point me in the right direction ?
Thanks in advance
Angus