[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: For-each-group group-starting-with drops text betw
Am 03.09.2020 um 17:20 schrieb Terry Ofner tdofner@xxxxxxxxx:
I have a document with the following structure: <div> <pclass="passage"> <spanclass="itemNum">(1)</span>First <b>sentence</b> of the passage. <spanclass="itemNum">(2)</span> Second sentence of the passage. <spanclass="itemNum">(3)</span> Third sentence of the passage. </p> </div> <xsl:for-each-groupselect="div/p[@class='passage']/*"group-starting-with="spa n"> To include text nodes or any nodes in the grouping population you need to use /node() instead of /* in the path for the select. The only issue might be the text node before the first span, perhaps using /node()[normalize-space()] is better or inside of the for-each-group you need to check whether you have a "real" group starting with a "span" or just collected leading text.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|