Re: Nested lists in SPDX XML files.


Philippe Ombredanne
 

On Mon, May 9, 2016 at 9:25 AM, Sam Ellis <Sam.Ellis@...> wrote:
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.
I have a lot of respect for what you are embarking in:
I would not dare editing by hand 100 of such XML files: I find this
rather confusing and error prone.
And I am a programmer...

But I think I lost track of the value and purpose of this editing in
the first place... can someone refresh me?

Now, if there is a purpose, you raise a good point in this post (and
your previous post about XML entities escaping).
Why is this format mixing structure and formatting together, in a
pseudo-HTML format?
Is this meant to become the reference text for SPDX licenses?

I am questioning the use of XML in first place, which may be a format
that is barely OK for saving data files, but is quite terrible for
editing IMHO.

At least why not use plain HTML if you need to mix format and structure?
You could then use some of the decent HTML WYSIWYG editing tools
available and not have to spend more time on the form than the
substance?
--
Cordially
Philippe Ombredanne

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