Questions tagged [muenchian-grouping]

Muenchian Grouping is an XSLT technique for optimizing the grouping of data in an XSL Transform.

Muenchian Grouping, named after it's founder, Steve Muench, is an XSLT grouping technique which improves the efficiency of traditional XSLT grouping (which typically uses preceding-sibling or following-sibling to determine the uniqueness of the node and hence its eligibility to form a new group).

Instead, Muenchian Grouping uses xsl:key to classify groups, in much the same way as a database index works.

188 questions
0
votes
0 answers

XSLT 1.0 template Muenchian grouping

I use a tool where a xslt template is pre-defined and it is not desirable to remove it.
Mark
  • 15
  • 1
  • 5
0
votes
1 answer

XSLT: How to do a GROUP_BY?

This is the sample XML that I am working on: ID_001Value_1
ID_001Value_2
Swayam
  • 1
0
votes
1 answer

XSL Muenchian grouping - and filtering

The scenario is this: I have a shop that sells furniture from two producers, CompanyA and CompanyB, and also imported furniture from one importer, CompanyC. My file looks like this Chair
Klas Blomberg
  • 115
  • 1
  • 9
0
votes
1 answer

XSLT 1.0 Change output of record based on sibling record parameter

I have an incoming XML file that has a list of participants and dependents that I need to transform slightly so the dependent information is attached as child records to the participant information and the participant record's EN_PLAN_TYPE node gets…
Ritley572
  • 299
  • 4
  • 15
0
votes
1 answer

XSLT: output into multiple xml files based on grouping

Let's assume, you have the xml below. The goal is to group by FirstName and export the Person into different xml files. Each output xml files should only contain up to X different FirstName. Below is an example of the desired transformation with X =…
Daniel
  • 165
  • 3
  • 12
0
votes
1 answer

XSL stylesheet ignores node

Given the following XML: 5 DK 27754 product…
Herbert
  • 15
  • 4
0
votes
0 answers

XSLT Muenchian Grouping

I'm trying to group with XSL 1.0 and whilst it is kinda working in the current configuration, I'm struggling to understand how / why duplicate dates are being ignored. I've put a sample of the XML file below and the grouping sections of the…
Ian C
  • 71
  • 2
  • 7
0
votes
1 answer

Xpath differentiate two attributes with the same name

select="$BCRs/BCR[count(. | $BCRs/BCR[@bss = @bss][1]) = 1]" I need the two @bss to refer to each $BCRs/BCR. I'm using the Muenchian technique to get the first element with each value of the attribute. However, I can't use keys so I have to check…
Wolfeur
  • 142
  • 1
  • 8
0
votes
1 answer

Filtering, Grouping, Counting and Selecting specific nodes in XML using XSLT 1.0

I've got some XML that looks a little like this. KA Type A 1000.00 KA Type C 1400.00
Strontium_99
  • 1,771
  • 6
  • 31
  • 52
0
votes
2 answers

Sort XML elements from several documents via Muenchian approach

I have several XML documents. Each one of these documents has some elements with the same name (let's say ). An example of two of these XML documents would be (simplifying): input1.xml A1 A2
Josu Gomez
  • 13
  • 3
0
votes
1 answer

Grouping substrings with XSLT

I'm new to xsl transforms and having trouble with grouping substrings. I have some xml like the following: CATSryverty CATSt6vvy
Oleg
  • 303
  • 2
  • 14
0
votes
1 answer

XSL Muenchian grouping works, but how can I count content of all child nodes of the key?

Scenario is this: a library has five books. Author A has written one title, and the library owns two copies that has been ckecked out 30+14=44 times Author B has written two book, and the library owns two copies of Title B that has been checked out…
Klas Blomberg
  • 115
  • 1
  • 9
0
votes
1 answer

How to remove duplicates when using xslt

I am able to remove duplicates from either city1 or city2 or city 3 using Muenchian grouping which is key and generate id as shown below. but am not able to remove duplicates by looping into all city1, city2 and city3 Below is the xml…
user3067170
  • 193
  • 4
  • 14
0
votes
0 answers

XSLT 1.0 how to do Muenchian grouping?

I am trying to count the number of roles in a list. There are 3 stages, open, offer and filled. There are 2 departments; infrastructure and business. So i want to display a table with the following headings; DEPARTMENT | OPEN | OFFER | FILLED. I…
Aaron C
  • 135
  • 3
  • 12
0
votes
2 answers

XSLT: Group different element types

My source XML looks as follows: 10 20 Foo 10 20 Bar 11 20
csoltenborn
  • 1,127
  • 1
  • 12
  • 22