Claus wrote:
> Hello,
> 
> when editing a Docbook 5.0 document (of type "book"), I get the
> following validation-error in XMLMind after inserting a figure into an
> example element:
> 
> "figure must not occur in the descendants of example"
> 
> (the following snippet is copied from inside XMLMind to show an example)
> 
> <?xml version="1.0"?>
> <db:example
> xmlns:xlink="http://www.w3.org/1999/xlink";
> xmlns:xi="http://www.w3.org/2001/XInclude";
> xmlns:svg="http://www.w3.org/2000/svg";
> xmlns:mml="http://www.w3.org/1998/Math/MathML";
> xmlns:html="http://www.w3.org/1999/xhtml";
> xmlns:db="http://docbook.org/ns/docbook";
>> <db:title
>> Some title text</db:title
>> <db:para
>> Some paragraph text</db:para
>> <db:figure
>> <db:title
>> Some figure-title text</db:title
>> <db:mediaobject
>> <db:imageobject
>> <db:imagedata
> fileref="images/SD-HOT-Workflow-Scenario-1.png"
>> </db:imagedata
>> </db:imageobject
>> </db:mediaobject
>> </db:figure
>> </db:example
>>
> 
> However, according to the Docbook documentation, figure elements are
> valid inside examples - see
> http://www.docbook.org/tdg5/en/html/example.html
> 
> What am I missing?
> 

The official DocBook 5 grammar (a RELAX NG schema) allows a example
element to contain a figure element. That's why, using XMLmind XML
Editor, you can insert a figure inside an example.

The official DocBook 5 schematron (not a grammar, but more or less
common sense rules) is checked by XMLmind XML Editor each time a
document is validated (that is, unlike the grammar, not in real time).

It is this schematron which tells you that both figure and example being
formal displayed material, it does not make sense to insert one in the
other. I would suggest to insert a mediaobject element in the example
element.


Reply via email to