xsl-grouping

Grouping nested elements in xslt 1.0

帅比萌擦擦* 提交于 2019-12-24 17:11:30
问题 I've been looking at examples of Muenchian grouping in XSLT 1.0, specifically this example here. However I'm unable to get it working on a more complex XML structure. My XML currently looks like this: <?xml version="1.0" encoding="utf-8"?> <ContestResults> <Contests> <Contest sportId="35"> <Sport>Beach Volleyball</Sport> <Event>Men's</Event> <Ranks> <Rank position="1" eventId="1"> <Athlete>Athlete 1a / Athlete 2a [GER]</Athlete> <Result>2</Result> </Rank> <Rank position="2" eventId="1">

xsl grouping of repetitive nodes by xml element in xslt1

你离开我真会死。 提交于 2019-11-30 09:47:43
问题 I have a complex xml structure that looks like : <Items> <Item> <ItemTexts> <ItemText> <ItemTextsType>type1</ItemTextsType> <ItemTextsTypeDesc>description11</ItemTextsTypeDesc> <ItemTextsLine>1</ItemTextsLine> </ItemText> <ItemText> <ItemTextsType>type1</ItemTextsType> <ItemTextsTypeDesc>description12</ItemTextsTypeDesc> <ItemTextsLine>2</ItemTextsLine> </ItemText> <ItemText> <ItemTextsType>type2</ItemTextsType> <ItemTextsTypeDesc>description21</ItemTextsTypeDesc> <ItemTextsLine>3<

xsl grouping of repetitive nodes by xml element in xslt1

末鹿安然 提交于 2019-11-29 17:18:20
I have a complex xml structure that looks like : <Items> <Item> <ItemTexts> <ItemText> <ItemTextsType>type1</ItemTextsType> <ItemTextsTypeDesc>description11</ItemTextsTypeDesc> <ItemTextsLine>1</ItemTextsLine> </ItemText> <ItemText> <ItemTextsType>type1</ItemTextsType> <ItemTextsTypeDesc>description12</ItemTextsTypeDesc> <ItemTextsLine>2</ItemTextsLine> </ItemText> <ItemText> <ItemTextsType>type2</ItemTextsType> <ItemTextsTypeDesc>description21</ItemTextsTypeDesc> <ItemTextsLine>3</ItemTextsLine> </ItemText> <ItemText> <ItemTextsType>type2</ItemTextsType> <ItemTextsTypeDesc>description22<

Muenchian Grouping - group within a node, not within the entire document

≡放荡痞女 提交于 2019-11-27 06:27:07
问题 I'm trying to use Muenchian grouping in my XSLT to group matching nodes, but I only want to group within a parent node, not across the entire source XML document. Given XSLT and XML as follows (apologies for the length of my sample code): XSLT <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:output method="html" indent="yes"/> <xsl:key name=