|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT 2.0 & Grouping for-each-group - RESEND
* Micheal Kay <snip> But I may have misunderstood the requirement. What do you want to happen if there isn't a DIVISION item in the group? </snip> * Mark Brand Hi Michael Thanks for the response, the incoming data will follow the hierachy below (Figure 1) and for this case the nested for-each-group works well. But the only guarentee about the data is the order. It is not guarenteed that a particular level will be there. For example, a SUB-DIVISION level may be missing as per (Figure 2). The nested for-each-group solution for the SUB-DIVISION level ignores the fact that there is no SUB-DIVISION entry in the group and processes the group entries anyway. I thought I could get around this with a check on the for-each-group to see if (for example) the SUB-DIVISION level was in the current-group(), but that won't work because you still need to process the for-each-group because of the down level stuff. Another issue is that, there are some other elements that are not part of the hierachy but can appear before or after any of the hierachial elements. For example (Figure 3) you may have a <NOTE> after a <DIVISION> <PART> <DIVISION> <NOTE/> <REGULATION> <NOTE/> </REGULATION> </DIVISION> </PART> (Figure 1) PART DIVISION SUBDIVISION REGULATION SUBREGULATION PARAGRAPH SUB-PARAGRAPH SUB-SUB-PARAGRAPH (Figure 2) PART DIVISION REGULATION SUBREGULATION PARAGRAPH SUB-PARAGRAPH SUB-SUB-PARAGRAPH (Figure 3) <PART> <DIVISION> <NOTE/> <REGULATION> <NOTE/> </REGULATION> </DIVISION> </PART> Thanks Mark Brand Michael Kay wrote: * Mark Brand XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








