[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
current-grouping-key() will not yield "nothing"
it will yield the empty string (if a sequence of empty strings, duplicates are removed)
All the element that have a grouping key = empty string, will be in the group with current-grouping-key() = ''
and you will have access to their attributes without a problem.
You will have to expand on this to explain what exactly your problem is, so we can help you get around this
I think for both 2. and 3. the answer in 1. will help you understand the mechanism
cheers
Geert
Re: [xsl] things about grouping
Subject: Re: [xsl] things about grouping From: Geert Bormans <geert@xxxxxxxxxxxxxxxxxxx> Date: Sat, 24 Nov 2012 10:31:35 +0100 |
2. If your group by patttern evaluates to an empty element current-grouping-key() will yield nothing. However one may (as I did) want to get at the attributes of such an element but this is not possible.
current-grouping-key() will not yield "nothing"
it will yield the empty string (if a sequence of empty strings, duplicates are removed)
All the element that have a grouping key = empty string, will be in the group with current-grouping-key() = ''
and you will have access to their attributes without a problem.
You will have to expand on this to explain what exactly your problem is, so we can help you get around this
3. If you group-starting-with it's weird to then see things not encompassed by the starting-with expression appear as a group because they precede the first occurrence of the starting-with expression. While this works as specified because for-each-group is a total function over the population it does result in a mismatch between the grammatical semantic and the exhibited behaviour, or to put it another way it does what it says in the spec but doesn't do what it says on the tin.
Thank God a programming language does as per specification ;-) If you don't want that preceding group simply get rid of it using some test For me the semantics is right... all nodes selected are grouped without throwing away selected nodes
I think for both 2. and 3. the answer in 1. will help you understand the mechanism
cheers
Geert
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] things about grouping, Geert Bormans | Thread | Re: [xsl] things about grouping, Ihe Onwuka |
Re: [xsl] things about grouping, Geert Bormans | Date | Re: [xsl] things about grouping, Geert Bormans |
Month |