On 2013-12-06 12:14, Erik Leunissen wrote:
...
- equation must not occur in the descendants of example
- figure must not occur in the descendants of example
...
2. (Maybe this question is essentially not an issue regarding
XMLEditor, so please ignore if not targeted correctly)
...raises the question: what's the logic/idea that figures
and equations can't occur as descendants of examples?

The claim that figures and equation shouldn't be descendants of examples is of course something the DocBook standard calls for, and thus in the end is a question to be directed to the DocBook standard committee. A few years ago, I raised a similar question to them about why <indexterm>s were not allowed as descendants of footnotes under DocBook v5. The committee considered it, and decided it was indeed ok for <indexterm>s to occur inside footnotes, and this change was made in DocBook v5.1 (see http://sourceforge.net/p/docbook/rfes/261/).

It's conceivable that equations and/or figures should be allowed in footnotes (although figures could be hard to format there). You could submit an RFE; if so, you might want to first initiate a discussion on the DocBook mailing list, as I did; see e.g. https://lists.oasis-open.org/archives/docbook/200907/msg00003.html and the subsequent discussion in that thread.

Clearly there are some things that should not occur inside footnotes which can otherwise occur in paragraphs, other footnotes being one of them. As Hussein mentioned in his reply, this is not something that can be specified in an XML schema, at least not in RelaxNG, and therefore has to be captured in something like Schematron; hence the impossibility of easily preventing XXE from inserting equations in footnotes. The difficulty is not something that could be trivially fixed--it has to do with the Chomsky hierarchy of formal grammars, and what sorts of grammars can be written in RelaxNG.

   Mike Maxwell

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

Reply via email to