Page MenuHomePhabricator

data-* span classes in WSexport ePub produce errors
Open, MediumPublic

Description

@Tpt and @Aubrey, while testing the WS Export ePub for
https://it.wikisource.org/wiki/Meditazioni_sulla_economia_politica_con_annotazioni
, Danilo Deana of BEIC found that it's well-formed, but doesn't
validate, i.e. it doesn't pass the XML scheme it provides.

The problem seems to lie in a number of classes contained in span
elements at the beginning of the file, which are either not allowed or
not correctly specified (I don't know exactly).

I don't remember the (proprietary) XML editor he used, but flightcrew
finds the same errors.

$ flightcrew-cli --version
flightcrew-cli version: 0.7.2
$ flightcrew-cli --input-file
Meditazioni_sulla_economia_politica_con_annotazioni.epub
Meditazioni_sulla_economia_politica_con_annotazioni.epub/OPS/content.opf(8):
error 904: The "xsi:type" attribute is not an allowed attribute of the
<date> element.
Meditazioni_sulla_economia_politica_con_annotazioni.epub/OPS/images/c13_ni_sulla_economia_politica1771_5.jpg_450px_Verri_Meditazioni_sulla_economia_politica__1771_5.jpg:
warning 2200: This resource is present in the OPF <manifest>, but it's
not reachable (it's unused).
Meditazioni_sulla_economia_politica_con_annotazioni.epub/OPS/c0_Meditazioni_sulla_economia_politica_con_annotazioni.xhtml(6):
error 301: value '25%' does not match regular expression facet '\c+'
Meditazioni_sulla_economia_politica_con_annotazioni.epub/OPS/c0_Meditazioni_sulla_economia_politica_con_annotazioni.xhtml(6):
error 301: attribute 'data-annodipubblicazione' is not declared for
element 'span'
....

Event Timeline

Nemo_bis updated the task description. (Show Details)
Nemo_bis subscribed.
Nemo_bis triaged this task as Medium priority.
Nemo_bis added a project: Toolforge.
Nemo_bis set Security to None.

@Tpt: As you are set as assignee here, do you plan to work on this?

Yes, I should work on it. But issues for this tool are currently tracked on GitHub. I have just opened an issue there: https://github.com/wsexport/tool/issues/48

Samwilson removed Tpt as the assignee of this task.
Samwilson edited projects, added: WS Export; removed: Tools.
Samwilson subscribed.

We've decided to track wsexport issues in Phabricator now (T255512) so I'm reopening this (it was never resolved on Github, and epubcheck is still complaining, although possibly about different validation problems).

The above book now produces the following errors with epubcheck:

  1. T272819: WS Export: epubcheck failure: element "link" missing required attribute "property" (existing issue)
  2. Line 19 column 109 of OPS/c0_Meditazioni_sulla_economia_politica_con_annotazioni.xhtml: Error while parsing file: element "meta" missing required attribute "content": </tbody></table></div><meta property="mw:PageProp/notoc" about="#mwt25" typeof="mw:Transclusion" id="mwHA"/><span about="#mwt2

The same file produces a great many errors with flightcrew-cli (now that we're using Parsoid HTML, I imagine). This task could probably be repurposed to a general flightcrew-validation improvement (lots of these look like easy fixes).