Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I handle nested bullets with a conversion table?

Explorer ,
Oct 27, 2021 Oct 27, 2021

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.

 

192
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Oct 27, 2021 Oct 27, 2021

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[

...
Translate
Mentor ,
Oct 27, 2021 Oct 27, 2021

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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2021 Oct 27, 2021
LATEST

Here is how I do it. Keep in mind that formatting differences may affect your inclusion in Sections.

 

image.pngexpand image

image.pngexpand image

image.pngexpand image

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines