Oxygen Author: How to limit the number of tags proposed by "

Oxygen general issues.
elaine_blath
Posts: 9
Joined: Thu Oct 30, 2014 1:58 pm

Oxygen Author: How to limit the number of tags proposed by "

Post by elaine_blath »

When working in Author mode of the Oxygen XML Author, I use CSS and XSD files together with my XML file. When I click on the word and then press "Enter" to annotate it, in the drop-down menu "Surround with" there is a list of all possible tags as defined in the schema, which could be placed at this position. But I only need two kind of tags for annotation, the rest of them should just be defined in the schema to get the xml-file validated.
For example in the "Surround with" menu I have [p, a, span, cdata, comment, signal, time]. How to limit this menu just to [signal, time]?
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen Author: How to limit the number of tags proposed

Post by Radu »

Hi Elaine,

In the Oxygen Preferences->Document Type Association page there is a list of specific configurations, one for each supported XML vocabulary. Did you create such a document type configuration for your type of XML documents? If so, the Document Type edit dialog has an Author->Content completion tab which allows you to remove specific items from the content completion window when editing your particular type of XML documents.
If you do not want the approach above, there is a repeat last surround operation action which might help you a little. For example you can surround the text in <time> and then select another text and use the shortcut Ctrl-SLASH to repeat the last surround operation.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
elaine_blath
Posts: 9
Joined: Thu Oct 30, 2014 1:58 pm

Re: Oxygen Author: How to limit the number of tags proposed

Post by elaine_blath »

Thank you for your prompt reply.
I didn't have a specific configuration in the Document Type association preferences. I have just tried to create one for my document, disabled some tags in the Author tab as you told, but I couldn't make this work, I still got the full set of tags in "Surround with" menu.
But I came out with a partial solution in preferences-> Editor->Author->Schema aware. I switched to Schema aware editing Custom, and checked off the "Show all possible elements in the content completion list". It allowed me to get a smaller set of options in the "Surround with" menu. "p", "span" are not there any more, but "a" still persists..
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen Author: How to limit the number of tags proposed

Post by Radu »

Hi Elaine,

What Oxygen version are you using?
I remember there was one older Oxygen version which presented a larger set of elements in the surround with operation window, but this was fixed, I'm testing with Oxygen 16.1 and I cannot reproduce the problem.
It's possible that the a element still persists in the list because it is a valid entry in that location and can be inserted to surround the content.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
elaine_blath
Posts: 9
Joined: Thu Oct 30, 2014 1:58 pm

Re: Oxygen Author: How to limit the number of tags proposed

Post by elaine_blath »

I am using XML Author 15.2.
The element a is indeed a valid entry at this position. I would still like to get rid of it in the "Surround with" menu, in order not to confuse the annotators...
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen Author: How to limit the number of tags proposed

Post by Radu »

Hi,
The element a is indeed a valid entry at this position. I would still like to get rid of it in the "Surround with" menu, in order not to confuse the annotators...
Removing extra sets of element names could be done with the first approach I suggested, defining a document type association. A document type association has a set of association rules which when fulfilled match the document type to an opened XML document. For example the simplest rule is to leave all fields to * and to match the root local name to the root name (without prefix) of your XML documents.
To check that a document type association matches an XML document, yf you use the Oxygen Window menu->Show view->Properties, the Properties view will show you what document type association is matched by the opened XML document.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
elaine_blath
Posts: 9
Joined: Thu Oct 30, 2014 1:58 pm

Re: Oxygen Author: How to limit the number of tags proposed

Post by elaine_blath »

Dear Radu,
Thank you very much for your help! I did what you wrote in your last message and it works like a charm! Now I have precisely 2 tags proposed in the drop-down menu.
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen Author: How to limit the number of tags proposed

Post by Radu »

Hi Elaine,

Thanks for updating the thread, I'm glad this works for you.

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