Context Sensitive Annotations for Content Completion Assistant
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 1
- Joined: Wed Jan 23, 2019 1:47 am
Context Sensitive Annotations for Content Completion Assistant
Hi there,
I've been using the 'Customizing Annotations in the Content Completion Assistant' page to map each of my elements to new annotations and it's working well so far.
I'm just wondering if it's possible within the contentCompletionElementsMap.xml file to make this more context sensitive? I'd like to be able to specify multiple annotations for the same element name, depending on where it is being suggested for insertion.
This is currently working:
When element1 is suggested for insertion anywhere in my XML file I am seeing the contents of element1.html as expected.
I'm looking to have something like the following (which obviously doesn't work):
I'd just like to know if this kind of thing possible or are we limited to one generic annotation per element using this method? Is there another way I would be able to do this?
I've been using the 'Customizing Annotations in the Content Completion Assistant' page to map each of my elements to new annotations and it's working well so far.
I'm just wondering if it's possible within the contentCompletionElementsMap.xml file to make this more context sensitive? I'd like to be able to specify multiple annotations for the same element name, depending on where it is being suggested for insertion.
This is currently working:
Code: Select all
<mappingGroup xml:base="descriptions/">
<mapping elementName="element1" path="element1.html" type="content"/>
</mappingGroup>
I'm looking to have something like the following (which obviously doesn't work):
Code: Select all
<mappingGroup xml:base="descriptions/">
<mapping elementName="element2/element1" path="element2-element1.html" type="content"/>
<mapping elementName="element3/element1" path="element3-element1.html" type="content"/>
</mappingGroup>
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Context Sensitive Annotations for Content Completion Assistant
Hi,
Indeed the XML configuration file can only map the element name to documentation, so it cannot express this idea that if the element is placed in a certain parent element its documentation should be something else. I added an internal issue on our side to see if we can improve the configuration file.
As workarounds:
1) Have the element refer to an HTML documentation which explains the element can be used in two contexts and which has links to other documentation HTML documents, one for each context.
2) We do have some Java API which might allow you to take control over the documentation for certain elements:
https://www.oxygenxml.com/InstData/Edit ... rBase.html
an implementation for such API could be added to the framework configuration for your specific XML vocabulary in the "Extensions" tab.
So if you are comfortable with using Java extensions I could try to give you more details about this.
Regards,
Radu
Indeed the XML configuration file can only map the element name to documentation, so it cannot express this idea that if the element is placed in a certain parent element its documentation should be something else. I added an internal issue on our side to see if we can improve the configuration file.
As workarounds:
1) Have the element refer to an HTML documentation which explains the element can be used in two contexts and which has links to other documentation HTML documents, one for each context.
2) We do have some Java API which might allow you to take control over the documentation for certain elements:
https://www.oxygenxml.com/InstData/Edit ... rBase.html
an implementation for such API could be added to the framework configuration for your specific XML vocabulary in the "Extensions" tab.
So if you are comfortable with using Java extensions I could try to give you more details about this.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service