[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Flat to Structured: Handling List Items with Subordina

Subject: Flat to Structured: Handling List Items with Subordinate Paragraphs
From: Eliot Kimber <ekimber@xxxxxxxxxxxx>
Date: Tue, 26 May 2009 14:47:06 -0500
 Flat to Structured: Handling List Items with Subordina
I'm back in WordML-to-XML land and I've run up against the problem of how to
map sequences of paragraphs that represent, for example, a sequence of list
items with logically subordinate list items, for example, I might have a
sequence of input elements like this:

<p type="para" level="1">Para 1</p>
<p container="ol" type="li" level="1">ol item 1</p>
<p container="li" type="para" level="2">Para w/in li</para>
<p container="ol" type="li" level="1">ol item 2</p>
<p container="li" type="para" level="2">Para w/in li</para>
<p type="para" level="1">Para 2</p>

Where the desired result is:

<para>Para 1</para>
  <li>ol item 1
    <para>Para w/in li</para>
  <li>ol item 2
    <para>Para w/in li</para>
<para>Para 2</para>

I've reviewed various discussions of sibling recursion, which I'm pretty
sure is what I need to apply to this problem.

But I'm having a very hard time wrapping my head around it--I suspect
procedural brain damage.

What I'm not seeing is how, through sibling recursion, I can start a result
wrapper and then end it. Likewise, doing something like for-each-group on
all the level-1 elements would provide no way to group the list items under
a common container.

I suspect there's some simple thing I'm missing here or some clever
recursion/grouping technique that escapes me.

Can anyone point me in the right direction?


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> 

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.