IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Group by in XSLT1.0 Options · View
tuanvoooooo1
Posted: Wednesday, July 11, 2018 11:46:14 AM
Rank: Member

Joined: 6/29/2018
Posts: 11
Hi.
I want to simulate a groupby-operation in XSLT1.0 (it has to be in XSLT1.0). The goal i want is shown in the image attached
How do i group the different attributes in different tables as shown? I want the attributes to be grouped by the <PROJECTNAME>

Suppose i have a XML that looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<DOCUMENT>
<ROWSET>
<ROW>
<ID>13815</ID>
<FULLNAME>Andrea Natloh</FULLNAME>
<DATE>04.10.2016</DATE>
<UNITS>1.00</UNITS>
<DESCRIPTION>Some Placeholderteext </DESCRIPTION>
<ISSUE>11322</ISSUE>
<PROJECTNAME>Modul1<PROJECTNAME>
<PROJECT_SUM>56.00</PROJECT_SUM>
<TOTAL_SUM>269.00</TOTAL_SUM>
</ROW>
<ROW>
<ID>13815</ID>
<FULLNAME>Andrea Natloh</FULLNAME>
<DATE>04.10.2016</DATE>
<UNITS>1.00</UNITS>
<DESCRIPTION>Some Placeholderteext </DESCRIPTION>
<ISSUE>14427</ISSUE>
<PROJECTNAME>Modul2<PROJECTNAME>
<PROJECT_SUM>45.50</PROJECT_SUM>
<TOTAL_SUM>269.00</TOTAL_SUM>
</ROW>
<ROW>
<ID>13815</ID>
<FULLNAME>Daniela Minelota</FULLNAME>
<DATE>04.10.2016</DATE>
<UNITS>0.50</UNITS>
<DESCRIPTION>Some Placeholderteext </DESCRIPTION>
<ISSUE>11322</ISSUE>
<PROJECTNAME>Modul1<PROJECTNAME>
<PROJECT_SUM>56.00</PROJECT_SUM>
<TOTAL_SUM>269.00</TOTAL_SUM>
</ROW>
<ROW>
<ID>13815</ID>
<FULLNAME>Eugenia Kazakova</_FULLNAME>
<DATE>05.11.2016</DATE>
<UNITS>1.00</UNITS>
<DESCRIPTION>Some Placeholderteext </DESCRIPTION>
<ISSUE>20427</ISSUE>
<PROJECTNAME>Modul3<PROJECTNAME>
<PROJECT_SUM>4.50</PROJECT_SUM>
<TOTAL_SUM>269.00</TOTAL_SUM>
</ROW>


tuanvoooooo1 attached the following image(s):
showcase.png

K101
Posted: Thursday, July 12, 2018 8:56:52 AM
Rank: Advanced Member

Joined: 2/27/2009
Posts: 558
Generally, grouping in XSLT 1.0 requires something like the Muenchian method.

The best thing for you to do is first create the design using regular grouping using XSLT 2.0. Then, try to create a version of it which uses that Muenchian method for XSLT 1.0.
tuanvoooooo1
Posted: Friday, July 13, 2018 11:34:09 AM
Rank: Member

Joined: 6/29/2018
Posts: 11
thanks for the reply!
I found a way for it using XSLT1.0 tho.
You had to group the attributes in a different rowset in the XML scheme, and then use variables and xpathfilters to categorize them
arecki
Posted: Tuesday, February 12, 2019 11:29:38 AM
Rank: Newbie

Joined: 2/12/2019
Posts: 2
Location: Bydgoszcz
Hi tuanvoooooo1,
Can you explain your solution step by step or share example file?

Thx in advance
Arek
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.