Invalid elements suggested (DocBook / Relax NG)

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
fsteimke
Posts: 46
Joined: Tue Jan 01, 2013 3:19 pm

Invalid elements suggested (DocBook / Relax NG)

Post by fsteimke » Tue Aug 20, 2019 4:10 pm

Hi,
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.

Thanks,
Frank Steimke

Radu
Posts: 6507
Joined: Fri Jul 09, 2004 5:18 pm

Re: Invalid elements suggested (DocBook / Relax NG)

Post by Radu » Wed Aug 21, 2019 9:57 am

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="http://docbook.org/ns/docbook" version="5.0"
    xmlns:xlink="http://www.w3.org/1999/xlink">
    <info>
        <title></title>
    </info>
    <sect1>
        <title></title>
        <para>P1 <example>
                <title>Titlu</title>
                <caption/>
            </example>documents in conformity with the
        </para>
    </sect1>
</article>
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.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply