Copy link to clipboard
Copied
How do I preserve the hierarchy of nested bullets in the unstructured file in the converted structured file?
I set it up this way
P: Bulleted Level 1 li L1
P: Bulleted Level 2 li L2
which yields li[L1] and li[L2]
I then wrap the entire list with this top level element:
E:li[b]+&E:li[b2]+ ul
which yields this:
<ul>
<li>blah</li>
<li>blab</li>
<li>blab</li>
</ul>
but I can't figure out how to get this, i.e, how do I demote the "blab" list items?
<ul>
<li>blah<ul>
<li>blab</li>
<li>blab</li>
</ul>
</li>
</ul>
Any help would be greatly appreciated.
Hi, I think you need one more rule, and then reference the results from that rule in the last rule you showed. Your first set looks fine:
P: Bulleted Level 1 li L1
P: Bulleted Level 2 li L2
...then you need a new rule to wrap the level-2 sublists, which I think should look something like this:
E:li[L2]+, (E:li[L2])* ul UL2
...then you can wrap up the first-level list items along with sublists with a rule like this, which is a modification to the last rule you showed:
E:li[
...Copy link to clipboard
Copied
Hi, I think you need one more rule, and then reference the results from that rule in the last rule you showed. Your first set looks fine:
P: Bulleted Level 1 li L1
P: Bulleted Level 2 li L2
...then you need a new rule to wrap the level-2 sublists, which I think should look something like this:
E:li[L2]+, (E:li[L2])* ul UL2
...then you can wrap up the first-level list items along with sublists with a rule like this, which is a modification to the last rule you showed:
E:li[L1]+, (E:li[L1] | E:ul[UL2])* ul UL1
...and then I presume you would continue wrapping up the E:ul[UL1] and other body-content elements in some section-type elements, using the same concept.
I hope this helps.
Russ
Copy link to clipboard
Copied
Here is how I do it. Keep in mind that formatting differences may affect your inclusion in Sections.