ToC issues with ePub3

I created a custom ToC for my ebook version by selecting only Folders in my manuscript (which are two levels deep, Part and Chapter), and doing a Copy As Structured Link List, which I then pasted into the “Table of Contents” document (which is the name I put in the Compile pane for the ToC file).
When I output an ePub3 file, and run it through the validator, it complains about this:

Error while parsing file 'element "li" incomplete; missing required element "ol"'.

These are the only errors that occur. In Sigil, this is what the contents.xhtml page looks like:

I haven’t been an HTML coder in many years, but it certainly looks like the ordered list is not malformed. What am I missing here?

This ePub, with a custom ToC built using “Copy As Structured Link List”, fails validation with the error you describe:

[code]

  1. Table of Contents
  2. Part
    1. 1 – The Start
    2. 2 – It Goes On
  3. Part
    1. 3 – Another Detour
[/code]

This one, based on the same project and the same custom ToC but with different compile settings, passes validation:

[code]

Table of Contents

  1. Table of Contents
  2. Part
    1. 1 – The Start
    2. 2 – It Goes On
  3. Part
    1. 3 – Another Detour
[/code]

The second one passes because the ToC is based on a section type and a section layout that supports a numbered-heading style, as described on page 548 the manual:

So, working blind, I assume there is an issue with the custom ToC section not having a numbered-heading style: you can see that the second compile includes a reference to

Table of Contents

. Your code has no such reference, just as my first batch of errant code (as above) doesn’t either.

Your OL tags are also very different from what I see generated by Scrivener, with just one set of opening / closing tags. Is the code in your image straight out of Scrivener or has it been edited in Sigil?

The example project attached validates when compiled to ePub-3 using the custom project format called DONOVANW. The ToC has a section type called Table of Contents that supports a numbered-heading style. Change the section type to Front Matter, for example, and the compiled ePub fails validation as Front Matter isn’t set up to support a numbered-heading style.

I worked this out by trial and error, so I might well be barking up the wrong tree. Worth checking?

Hope this helps.

Slàinte mhòr.

Scrivener Test Novel.zip (376 KB)

The Sigil stuff is unchanged from Scrivener’s output. All I did was open the ePub in Sigil.
I read the manual, and that is why the list items in are styled with “heading-9.” I am not sure what you mean by “section type that supports a numbered heading style,” since that is not mentioned in the manual. The part I see is “either in the text itself, or generated by the Layout the section uses in compile.” In my case, the ToC page is Front Matter; Front Matter is an “as-is” compiled Layout; and the ToC page uses “Heading 9” as the Style applied to the text.

It’s interesting to me that you keep mentioning the idea about the section type, since that is not mentioned in the custom ToC creation section.

The issue appears to be that by numbered heading, it probably means “predefined numbered heading” (or, at least, one of the preexisting headings in HTML), of which 6 is the last. I redefined the “Heading 1” Style based on my text, deleted my Heading 9 style, and compiled with no other changes. This version passes the EPUB validator.