epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

Possible false error with EPUB 2 check on ordered lists with value attribute

Open Changilainen opened this issue 11 months ago • 2 comments

I receive the following error on my EPUB 2 ebook: Col: 73: ERROR(RSC-005): Error while parsing file: attribute "value" not allowed here; expected attribute "dir", "id", "style", "title" or "xml:lang" I'm using value attribute in ordered list and for some reason it's an error in EPUB 2 but not in EPUB 3. That's why I'm suspecting this is a false error.

Here's the example code:

<ol>
  <li class="DecimalListStart">List example</li>
</ol>
<p class="Paragraph">Just some text.</p>
<ol>
  <li class="DecimalList" value="2">List example continues</li>
</ol>
<p class="Paragraph">Just some text.</p>
<ol>
  <li class="DecimalList" value="3">List example continues</li>
</ol>
<p class="Paragraph">Just some text.</p>

Aren't paragraphs allowed between ordered lists for some reason in EPUB 2 standard or what is causing the error?

Changilainen avatar Mar 06 '24 10:03 Changilainen

EPUB 2, or more specifically XHTML 1.1, doesn't support the value attribute on list items.

There's a long discussion of this problem here: https://github.com/w3c/epubcheck/issues/1285

mattgarrish avatar Mar 06 '24 14:03 mattgarrish

Got it, thank you!

Changilainen avatar Mar 07 '24 01:03 Changilainen