On 12/06/2013 06:14 PM, Erik Leunissen wrote:

Using XMLEditor, I've constructed a docbook xml document which doesn't
validate, according to the following messages:

- equation must not occur in the descendants of example
- figure must not occur in the descendants of example

My questions:

1. Shouldn't XMLEditor prevent me from inserting equations or figures in
an example?

In an ideal world, XMLmind XML Editor should indeed prevent you from inserting equations or figures in an example.

In practice, the following rules:

- equation must not occur in the descendants of example
- figure must not occur in the descendants of example

are specified in DocBook 5 *Schematron* (may be seen as DocBook 5 ``best practices''), not in DocBook 5 RELAX NG schema (may be seen as the grammar of the DocBook 5 vocabulary).

Reference: Schematron, http://www.schematron.com/spec.html

Editing in XMLmind XML Editor is directed by the grammar, but the editor currently cannot enforce the best practices in real time. It can just report *semantic* errors when you'll save the document.

Notice that in XMLmind XML Editor, the semantic error icon differs from the severe structural validity error icon. Both icons are red but they are different.

Reference: Status bar, Validity state, http://www.xmlmind.com/xmleditor/_distrib/doc/help/checkValidityTool.html







2. (Maybe this question is essentially not an issue regarding XMLEditor,
so please ignore if not targeted correctly)
Post-processing this document to PDF isn't a problem at all. I get a
nice PDF with equations and figures as descendants of an example. That
seems to make it (to me at least) a moot point that the document is
invalid, and raises the question: what's the logic/idea that figures and
equations can't occur as descendants of examples?


XMLmind did not participate in the design of DocBook 5, therefore we cannot answer this question.

(My idea is that equations, figures, tables and examples are all ``displayed material'' possibly having a title and possibly numbered. Hence it probably does not make sense for such displayed material to contain another displayed material.)





3. What "punishment" can I expect if I ignore the invalidity?

None. Simply consider that your document is valid according to the grammar of DocBook 5, but that you didn't follow DocBook 5 best practices.






--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to