[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How do I change a XSL style sheet to group data t
kieters c wrote:
Thank you. I did not see the one although I tried to check on all the brackets. I found another one missing two lines down. I just tried it with the last sample data "flat file" (it is not flat, it is still xml) and changed your sample to contain different groups for the combination sample_date_time and cp_name. It worked perfectly well for me. The sample data I used after I removed some of the noise was this: <dataroot> <sample> <sample_date_time>20070101</sample_date_time> <cp_name>Neutr. Sump WTPE</cp_name> <imis_cp_ext>2300</imis_cp_ext> <dischg_sample_cd/> </sample> <sample> <sample_date_time>20070102</sample_date_time> <cp_name>Neutr. Sump WTPE</cp_name> <imis_cp_ext>2300</imis_cp_ext> <dischg_sample_cd/> </sample> <sample> <sample_date_time>20070101</sample_date_time> <cp_name>Neutr. Sump WTPE</cp_name> <imis_cp_ext>2300</imis_cp_ext> <dischg_sample_cd/> </sample> <sample> <sample_date_time>20070101</sample_date_time> <cp_name>22Neutr. Sump WTPE</cp_name> <imis_cp_ext>2300</imis_cp_ext> <dischg_sample_cd/> </sample> <sample> <sample_date_time>20070101</sample_date_time> <cp_name>33Neutr. Sump WTPE</cp_name> <imis_cp_ext>2300</imis_cp_ext> <dischg_sample_cd/> </sample> <sample> <sample_date_time>20070101</sample_date_time> <cp_name>22Neutr. Sump WTPE</cp_name> <imis_cp_ext>2300</imis_cp_ext> <dischg_sample_cd/> </sample> </dataroot> which returned the following output when run against the stylesheet: (note the added numbers for cp_name attributes to make them distinguishable) <submission imis_company_code="0001843309" ws_name="LENNOX"> <sample sample_date_time="20070101"> <result cp_name="Neutr. Sump WTPE" imis_cp_ext="2300" dischg_sample_cd=""/> <result cp_name="Neutr. Sump WTPE" imis_cp_ext="2300" dischg_sample_cd=""/> </sample> <sample sample_date_time="20070102"> <result cp_name="Neutr. Sump WTPE" imis_cp_ext="2300" dischg_sample_cd=""/> </sample> <sample sample_date_time="20070101"> <result cp_name="22Neutr. Sump WTPE" imis_cp_ext="2300" dischg_sample_cd=""/> <result cp_name="22Neutr. Sump WTPE" imis_cp_ext="2300" dischg_sample_cd=""/> </sample> <sample sample_date_time="20070101"> <result cp_name="33Neutr. Sump WTPE" imis_cp_ext="2300" dischg_sample_cd=""/> </sample> </submission> which, as you can see, is grouped by both sample_date_time and cp_name (i.e., if both are concatenated the same, they are grouped together). Cheers, -- Abel Braaksma
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|