[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Wrap changing element sequence into container: wit
> Looking at the code, I assume what makes the difference is that without > xsl:for-each-group, all "b" and "c" elements within their parent element > would go into the same container1 instance instead of each "b"/"c" > sequence receiving their own container. Am I right? the usage of for-each-group that you suggested, with a constant grouping key, is exactl_ the same as the version I posted that did not use for-each-group at all. In both cases they will only make a single container1 element and place into that all of the relevant elements even if they occur later in the input sequence. the "two methods" that i posted in the earlier reply were designed to handle this case, they will separately group each contiguous run of b,c and d,e,f groups into possibly multiple container element_s_. > If so, it won't hurt me, as my "b" and "c" elements will always appear > before any "d" element, therefore I think can do without > xsl:for-each-group. so, you don't need for-each groop here. > The lesson I learned: The hardest part with XSLT (2.0) is to find its > easy solution to your complex problem. ;-) sounds about right! David
|
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
|