Class extending from DITASchemaManagerFilter does not work properly

Post here questions and problems related to oXygen frameworks/document types.
oliverv
Posts: 2
Joined: Thu Jul 08, 2021 9:20 pm

Class extending from DITASchemaManagerFilter does not work properly

Post by oliverv »

Hi oXygen xml team.

I have an issue when I try to customize the standard auto-completion of oXygen in author mode. I have a class extending from DITASchemaManagerFilter and I am modifying the method filterElements(). In this method there is a new condition when the element is a note, then, I automatically add a child <p>

Unfortunately, it seems I am in the wrong method, my code does work in Text mode, but does not in Author mode. I notice that if I add the first note, the code does not add the paragraph but if I add a new note next to the first one, it works.

Does not work:
image.png
image.png (29.5 KiB) Viewed 905 times
Works:
image.png
image.png (22.09 KiB) Viewed 905 times
I suppose there is a different context so my changes must be made in another place but a I do not have a clue where those should be
Attachments
image.png
image.png (29.5 KiB) Viewed 905 times
Radu
Posts: 9246
Joined: Fri Jul 09, 2004 5:18 pm

Re: Class extending from DITASchemaManagerFilter does not work properly

Post by Radu »

Hi,
That <note> entry in the content completion window is "special", it does not come from the schema content completion, it is an Author action which is inserted in the content completion window and replaces the regular "note" entry.
If in the Oxygen Preferences->"Document Type Association" page you edit your DITA framework extension, in the "Author->Content completion" tab there is a "Current actions" list containing the "note" action. So this replacement of the initial <note> content completion item with the "insert.note" action is at a higher level and that's why your code no longer has effect.
As possible workarounds either:
- Remove the "note" action from the "Current actions" list.
or:
- Edit the "insert.note" action in the "Author->Actions" list and change its definition to include the paragraph inside the <note> element.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
oliverv
Posts: 2
Joined: Thu Jul 08, 2021 9:20 pm

Re: Class extending from DITASchemaManagerFilter does not work properly

Post by oliverv »

Thank you, It works :D
Post Reply