nlbdev / nordic-epub3-dtbook-migrator

Tools for converting between a strict subset of DTBook and EPUB3.
http://nlbdev.github.io/nordic-epub3-dtbook-migrator/
GNU Lesser General Public License v2.1
8 stars 7 forks source link

inline image in figcaption does not validate #543

Open oscarlcarlsson opened 1 year ago

oscarlcarlsson commented 1 year ago

Inline images needs to be allowed in figcaption. currently the rule seems to counts all img children on any level. see error [nordic253b]. here is a link to what we suspect causes the error: https://github.com/nlbdev/nordic-epub3-dtbook-migrator/blob/master/src/main/resources/xml/schema/2020-1/nordic2020-1.sch#L627

should (.//html:img) be (./html:img)?

example file and error report will be added in the trello.

josteinaj commented 1 year ago

I suppose the count(.//html:img) = 1 test could be removed. And only keep the count(html:img) = 1 test. The description should then probably be changed to [nordic253b] There must be exactly one img as a direct child of the figure element..