Nested lists in SPDX XML files.


Sam Ellis
 

Hi,

 

When reviewing the SPDX XML files, I see many licenses that contain nested lists such as:

 

1) some text…

   a) some text…

 

And these are converted to XML like this:

<list>

  <li>

  <b>1)</b><p>some text…</p>

  </li>

</list>

<list>

  <li>

  <b>a)</b><p>some text…</p>

  </li>

</list>

 

Note that the XML above places the bullets sequentially rather than being nested. I would like to check, does the XML syntax support nesting, and if so, should we be using it to represent cases such as this?

 

To make it clearer, this is how the nested equivalent of the above might look, with the a) list inside the 1) list:

 

<list>

  <li>

  <b>1)</b><p>some text…</p>

  </li>

  <list>

    <li>

    <b>a)</b><p>some text…</p>

   </li>

  </list>

</list>

 

My view is that by representing nested lists sequentially then we are losing some of the structure of the original text. On the other hand, if the main purpose of the lists is to allow for identification of bullets then the sequential representation is just fine for this.

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Join {Spdx-legal@lists.spdx.org to automatically receive all group messages.