labels for attribute values in Content Completion Assistant

Post here questions and problems related to oXygen frameworks/document types.
dasch124
Posts: 2
Joined: Thu Dec 13, 2018 5:08 pm

labels for attribute values in Content Completion Assistant

Post by dasch124 » Fri Dec 14, 2018 1:28 am

Dear board,
I’m working on integrating an external bibliography into our TEI editing workflow by adapting the content completion assistant. I have successfully configured a XSLT stylesheet to gather the allowed attribute values (i.e. alphanumeric identifiers of the bibliograph’s entries), however the identifiers themselves do not contain any semantics so the editors can’t easily find the relevant entry easily. I added annotations rendering a preview of the bibliographic entry – which is very handy, but doesn’t solve the initial problem since waiting for the annotation to pop up is not feasible either. So my questions are:

1) Is there a way of providing a „label“ for the items in the content completion assistent’s list of attribute values? Just like there are titles of code templates? I hope that is not a stupid question since it seems such an obvious pattern that I fear that I might be missing something crucial in the first place.
2) It appears to me that the order of the attributes in the content completion assistant is independent from the document order returned by the XSLT – is this true and can it be changed by setting some preference? It would be already of great help if I could fix the order of the returned bibliographic entries to something an encoder would expect (e.g. title or author’s names)

Thanks in advance for any hints!
Best
Daniel

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

Re: labels for attribute values in Content Completion Assistant

Post by Radu » Fri Dec 14, 2018 10:25 am

Hello Daniel,

Please see some answers below:
1) Is there a way of providing a „label“ for the items in the content completion assistent’s list of attribute values? Just like there are titles of code templates? I hope that is not a stupid question since it seems such an obvious pattern that I fear that I might be missing something crucial in the first place.
Unfortunately we do not have a way to specify a label for inserted attribute values. We do have plans for this as this has been requested before and it makes sense. I will add a link to this forum thread on the opened internal issue and when we add this support in a future Oxygen version I will update this forum post.
2) It appears to me that the order of the attributes in the content completion assistant is independent from the document order returned by the XSLT – is this true and can it be changed by setting some preference? It would be already of great help if I could fix the order of the returned bibliographic entries to something an encoder would expect (e.g. title or author’s names)
Indeed the attribute values are shown from what I remember in alphabetical order. Again, we have an internal issue registered for this, to somehow allow you to remove the sorting (maybe using a global setting for example).

For now, we do have Java-based API which would allow you to create a plugin based on the Oxygen SDK which contributes a toolbar action in the Text editing mode, action which could maybe show a custom dialog you implement, then use our API to insert the value at the caret position, in a way creating a mechanism which bypasses the content completion window. If you are interested in creating a plugin for Oxygen we could try to give you more details about how this could work.

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

dasch124
Posts: 2
Joined: Thu Dec 13, 2018 5:08 pm

Re: labels for attribute values in Content Completion Assistant

Post by dasch124 » Fri Dec 14, 2018 7:44 pm

Hi Radu,
thank you for your reply – Indeed both the labels and the ordering would be very useful improvements. For long lists (like in my case bibliographies) it would be great if the attribute suggestions came as a combobox to allow for filtering by labels or values. How is the status of your plans? Is there a concrete timeline for the implementation?
In the meantime some more details on how you would implement this functionality as a plugin would be great. Is there also a JavaScript API that we could use for this?
Thank you again!
Best,
Daniel

Cosmin Duna
Posts: 19
Joined: Wed Dec 12, 2018 5:33 pm

Re: labels for attribute values in Content Completion Assistant

Post by Cosmin Duna » Tue Dec 18, 2018 6:04 pm

Hi Daniel,

We created a plugin that can help you:
https://github.com/oxygenxml/wsaccess-j ... Completion
You have the information in the 'README.md' section for customize this.

Regards,
Cosmin
Cosmin Duna
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply