[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Flat to Structured: Handling List Items with Subo
On 5/26/09 4:20 PM, "Michael Kay" <mike@xxxxxxxxxxxx> wrote: > > I haven't followed the thread closely, but I would tackle the above by first > using group-starting with to build the levels I have now a solution that appears to be working using grouping. I simplified things (I think) by putting the group of adjacent things into a temporary container element so I could then do preceding and following sibling checks that would be scoped to my group. Given that, I then have a recursive template that takes a sequence of paragraphs, the current container, and the level. Given that information, I can know whether or not to start a new container and how to select the groups within the input sequence. For recursive calls I construct the context like so: following-sibling::*[(@level = $level + 1) and preceding-sibling::*[@level = $level][1][. is $me]] Where $me is the current node that "contains" the following nodes. There's probably a more elegant way to do this, but it seems to work for my real input data. Thanks to all for helping me work this out. Cheers, Eliot ---- Eliot Kimber | Senior Solutions Architect | Really Strategies, Inc. email: ekimber@xxxxxxxxxxxx <mailto:ekimber@xxxxxxxxxxxx> office: 610.631.6770 | cell: 512.554.9368 2570 Boulevard of the Generals | Suite 213 | Audubon, PA 19403 www.reallysi.com <http://www.reallysi.com> | http://blog.reallysi.com <http://blog.reallysi.com> | www.rsuitecms.com <http://www.rsuitecms.com>
|
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
|