[Home] [By Thread] [By Date] [Recent Entries]
Good morning,
It seems that xsl:for-each-group may not be the correct way to go about what I'm trying to do. All I need to do is nest adjacent paras styled with "Feature..." in a new element. Would it be easier to test the following-sibling's value to determine when to end the nesting element? Or is grouping the correct logic? Given (simplified): <w:p><w:pPr><w:pStyle @w:val="Para"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="Para"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="FeatureType"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="FeatureTitle"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="FeaturePara"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="FeaturePara"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="FeatureSlug"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="FeatureList"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="FeatureList"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="FeatureList"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="FeaturePara"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="Para"></w:pPr></w:p> <w:p><w:pPr><w:pStyle @w:val="H1"></w:pPr></w:p> I would like to end up with (simplified): <Para>...</Para> <Para>...</Para> <AnchoredFeature> <FeatureTitle>...</FeatureTitle> <FeaturePara>...</FeaturePara> <FeaturePara>...</FeaturePara> <img src="..."> <FeatureList>...</FeatureList> <FeatureList>...</FeatureList> <FeatureList>...</FeatureList> <FeaturePara>...</FeaturePara> </AnchoredFeature> <Para>...</Para> <H1>...</H1> I've tried many permutations of the select and group-by, group- adjacent, group-starting-with and group-ending-with to varying degrees of success. But it seems to me after much trial and error, that I might just be barking up the wrong tree. Thanks to all who've responded, you're kindness is deeply appreciated. Jeff On Aug 15, 2011, at 12:51 PM, Jeff Wilson wrote: Good afternoon,
|

Cart



