Page 1 of 1

Invalid elements suggested (DocBook / Relax NG)

Posted: Tue Aug 20, 2019 4:10 pm
by fsteimke
writing a docbook 5 file, i found a strange behaviour with the Content Completion Assistent.

I wanted to insert a new element within an empty caption element. The Content Completion Assistent suggested inline Elements like abbrev or emphasis, which is wrong. Following this suggestion immediatly leads to an error, because neither abbrev nor emphasis is allowed as a direct child of caption.

I checked this with a a brand new DocBook 5 File (empty caption Element as root) in a new Oxygen Projekt and got the same wrong behaviour . As far as i can see the content model which is used by the Content Completion Assistent seems to be wrong, while validating is correct.

Both files have the usual xml-model PIs for DocBook 5 from the Oxygen Template for DocBook book or article documents.

I did not post in the DocBook Part of this Forum, because i suspect a bug with Relax NG based Content Completion. However, looking carefully at the Properties Window for the new file, i found the following value for the Content Completion entry:

Code: Select all

file:/C:/Program Files/Oxygen XML Editor 21//frameworks/docbook/5.0/rng/docbook.rng
Please note the double slashes between frameworks and docbook.

Environment is Oxygen 21.2 Build 2019071807 on Windows 10 64 bit.

Frank Steimke

Re: Invalid elements suggested (DocBook / Relax NG)

Posted: Wed Aug 21, 2019 9:57 am
by Radu
Hi Frank,

Are you working with the Docbook 5 document in the Text or in the Author visual editing mode?
I tested on my side with Oxygen 21.1 and a Docbook 5 example element:

Code: Select all

<article xmlns="" version="5.0"
        <para>P1 <example>
            </example>documents in conformity with the
In the Author visual editing mode if you press ENTER inside the <caption> element the list of proposed elements indeed contains elements like "abbrev" but they are marked as disabled (light gray foreground). And if you choose them Oxygen will try to insert them in a valid context.
In the Oxygen Preferences->"Editor / Edit Modes / Author / Schema-Aware" page there is a "Show all possible elements in the content completion list". If you uncheck that, you should no longer get the list with all elements when editing in the Author visual editing mode.