XMLmind 7.1 claims the below document to be invalid - complaining that
the figure element breaks " [cvc-complex-type.2.4]". What XMLmind (seems
to) think to be incorrect is the lack of any other element but the
figcaption element. To put it differently, XMLmind expects figure to
contain at least one non-figcaption element.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>This document is valid</title>
</head>
<body><figure id="contents"><figcaption>Innhald</figcaption></figure>
</body>
</html>
However, note that HTML5.1 says that the content model of figure is
“flow content”. And that “text” is part of “flow content”.
And further, that “Text, in the context of content models, means
either nothing, or Text nodes”. (Text defition:
https://www.w3.org/TR/html51/dom.html#text )
Thus, a figure element can be totally empty (since empty/nothing is
considered to be "text") - and still be valid. And hence, the above
document is valid.
Leif
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support