[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How do I change a XSL style sheet to group data together under one heading


Subject: Re: [xsl] How do I change a XSL style sheet to group data together under one heading
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 17 May 2007 16:23:07 +0200

kieters c wrote:

Good day,


Thank you for reply. I do appreciate your time and knowlegde.

Attached is the DTD (I think thats whats it is called) and three recoeds of the flat file. I do hope it is what you require to give me more information.


The DTD you supplied does not match the XML you supplied.
In a previous post, I requested you to send a minimal example of the input data. With "minimal" I anticipated about 10-15 lines of indented XML that is enough to explain your problem.


You show a lot of cluttered data, unindented, cut n pasted from some application that also adds minus-signs that should not be in there. We would like to help, but we are all on limited time and volunteers here. If you remove the noise from your data and explain clearly what you want with a minimal example of input and output, preferably nicely indented, people can quickly understand what your inquiry is about and you are far more likely to receive useful responses.

Also, please read the links about grouping in XSLT 1.0 that were send to you, which happen to be quite good tutorials.

It is not needed to have a DTD in order to work with your sample data.

Cheers,
Abel Braaksma


Format as supplied


<?xml version="1.0"?>
<!DOCTYPE submission [<!ELEMENT submission (sample*)>
<!ATTLIST submission
imis_company_code CDATA #REQUIRED
ws_name CDATA #IMPLIED>

<!ELEMENT sample (result*)>
<!ATTLIST sample
sample_date_time CDATA #REQUIRED
imis_cp_ext CDATA #REQUIRED
cp_name CDATA #IMPLIED
dischg_sample_cd CDATA #REQUIRED
sample_comment CDATA #REQUIRED>

<!ELEMENT result EMPTY>
<!ATTLIST result
rpttime_name CDATA #REQUIRED
sis_imis_code CDATA #REQUIRED
parm_name CDATA #IMPLIED
unit_abbrev CDATA #REQUIRED
rptas_abbrev CDATA #REQUIRED
result_structure CDATA #REQUIRED
component_type CDATA #REQUIRED
result_value CDATA #REQUIRED remark_code_1 CDATA #IMPLIED
remark_code_2 CDATA #IMPLIED
remark_code_3 CDATA #IMPLIED
result_comment CDATA #IMPLIED
imis_regulation_code_1 CDATA #REQUIRED
imis_regulation_code_2 CDATA #IMPLIED



<?xml version="1.0" encoding="UTF-8" ?>
-<dataroot>
-<sample>
<imis_company_code>0001843309</imis_company_code>
<ws_name>LENNOX</ws_name>
<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_comment/>
<rpttime_name>DAILY</rpttime_name>
<sis_imis_code>FTFLOW</sis_imis_code>
<parm_name>FLOW</parm_name>
<Unit_abbrev>M3/D</Unit_abbrev>
<rptas_abbrev>NOT APPL</rptas_abbrev>
<result_structure>SI</result_structure>
<component_type>SM</component_type>
<result_value>168.2</result_value>
<remark_code_1/>
<remark_code_2/>
<remark_code_3/>
<result_comment/>
<imis_regulation_code_1>MC</imis_regulation_code_1>
<imis_regulation_code_2>CA</imis_regulation_code_2>
</sample>
-<sample>
<imis_company_code>0001843309</imis_company_code>
<ws_name>LENNOX</ws_name>
<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_comment/>
<rpttime_name>DAILY</rpttime_name>
<sis_imis_code>ph</sis_imis_code>
<parm_name>PH (-LOG H+ CONCN)</parm_name>
<Unit_abbrev>NO DIM</Unit_abbrev>
<rptas_abbrev>NOT APPL</rptas_abbrev>
<result_structure>P3</result_structure>
<component_type>V1</component_type>
<result_value>8.2</result_value>
<remark_code_1/>
<remark_code_2/>
<remark_code_3/>
<result_comment/>
<imis_regulation_code_1>MC</imis_regulation_code_1>
<imis_regulation_code_2/>
</sample>
-<sample>
<imis_company_code>0001843309 </imis_company_code>
<ws_name>LENNOX</ws_name>
<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_comment/>
<rpttime_name>DAILY</rpttime_name>
<sis_imis_code>pH</sis_imis_code>
<parm_name>PH (-LOG H+ CONCN)</parm_name>
<Unit_abbrev>NO DIM</Unit_abbrev>
<rptas_abbrev>NOT APPL</rptas_abbrev>
<result_structure>P3</result_structure>
<component_type>T1</component_type>
<result_value>08:00</result_value>
<remark_code_1/>
<remark_code_2/>
<remark_code_3/>
<result_comment/>
<imis_regulation_code_1>MC</imis_regulation_code_1>
<imis_regulation_code_2/>
</sample>
-</dataroot>


Current Thread
Keywords