[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT 4 xsl:with
On Tue, May 19, 2020 at 06:10:56PM -0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx scripsit: > Does anyone else find themselves doing > > <xsl:for-each-group select="some-node" group-by="true()"> > .... inside I have current-group() ... > </xsl:for-each-group> > > -- which has sometimes made me wonder if group-by="true()" might be a > default on for-each-group? > > Or ... would <xsl:with>...</xsl:with> or <xsl:for>...</xsl:for> or > <xsl:at>...</xsl:at> be a serviceable and better way to do this as > well? Wouldn't the equivalent be <xsl:with-context select="some-node"> ... stuff happens... </xsl:with-context> Using for-each-group gives you a sequence in current-group(); I would think that if you expect a sequence, you might-maybe be better to use xsl:for-each rather than xsl:with-context. If I understood the original idea, it was a way to be less confusing by not using xsl:for-each in the singleton case. If we were to allow modes on xsl:with-context, it'd be a way to do mode-based selection. -- Graydon Saunders | graydonish@xxxxxxxxx ^fs oferiode, pisses swa mfg. -- Deor ("That passed, so may this.")
|
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
|