Error retrieving keys for insertion in contextualized topic
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 64
- Joined: Wed Dec 03, 2014 11:25 am
Error retrieving keys for insertion in contextualized topic
Hello,
We define a custom view in oXygen Web Author. This custom view allow user to drag and drop reusable keyref phrase.
To do this, we try to load all keys available for insertion.
The context map is :
Why this error ?
Same operation with same topic and map in the oXygen desktop version is a successfull.
Thanks a lot
Vincent
We define a custom view in oXygen Web Author. This custom view allow user to drag and drop reusable keyref phrase.
To do this, we try to load all keys available for insertion.
The context map is :
Code: Select all
<bookmap>
<frontmatter>
<keydef format="ditamap"
href="VARIABLES.ditamap"
keys="variables"
processing-role="resource-only"/>
</frontmatter>
<chapter>
<topicref href="EDITING_TOPIC.dita">
</chapter>
</bookmap>
Code: Select all
2023-04-04 15:12:47,317 WARN [ http-nio-8081-exec-5 ] ro.sync.ecss.dita.e - DITA keys will not be resolved for this request.
java.lang.IllegalStateException: null
at ro.sync.ecss.dita.e.b(Unknown Source)
at ro.sync.ecss.dita.DITAAccess.getKeysForInsertion(Unknown Source)
...
Thanks a lot
Vincent
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Error retrieving keys for insertion in contextualized topic
Post by cristi_talau »
Hello,
You are using the DITAAccess.getKeysForInsertion API. However, this API works correctly only in Oxygen XML Editor / Author and it returns the keys from the "Context" DITA Map (opened in the DITA Maps Manager side-view. In Web Author this API does not work correctly as it does not know for which map you want to get the keys.
If you want to get a list with all the keys in the DITA Map, you can use the following code:
Best,
Cristian
You are using the DITAAccess.getKeysForInsertion API. However, this API works correctly only in Oxygen XML Editor / Author and it returns the keys from the "Context" DITA Map (opened in the DITA Maps Manager side-view. In Web Author this API does not work correctly as it does not know for which map you want to get the keys.
If you want to get a list with all the keys in the DITA Map, you can use the following code:
Code: Select all
AuthorEditorAccess editorAccess = authorAccess.getEditorAccess();
ContextKeyManager keyManager = editorAccess.getEditingContext().getContextKeyManager();
if (keyManager != null) {
LinkedHashMap<String, KeyInfo> keys = keyManager.getKeys(editorAccess.getEditorLocation());
}
Cristian
-
- Posts: 64
- Joined: Wed Dec 03, 2014 11:25 am
Re: Error retrieving keys for insertion in contextualized topic
Hello,
Thanks for reply. Your suggestion works well.
As I took DITAAccess.getKeysForInsertion API call from the ro.sync.ecss.extensions.dita.DITAExternalObjectInsertionHandler#ro.sync.ecss.extensions.dita.DITAExternalObjectInsertionHandler#detectKeyInfo, it means your handler does not work in Web Author.
Do you plan to make it works ?
Regards,
Vincent
Thanks for reply. Your suggestion works well.
As I took DITAAccess.getKeysForInsertion API call from the ro.sync.ecss.extensions.dita.DITAExternalObjectInsertionHandler#ro.sync.ecss.extensions.dita.DITAExternalObjectInsertionHandler#detectKeyInfo, it means your handler does not work in Web Author.
Do you plan to make it works ?
Regards,
Vincent
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Error retrieving keys for insertion in contextualized topic
Post by cristi_talau »
Hello,
DITAAccess.getKeysForInsertion cannot be made to work in Web Author unless we create a new override which has an extra parameter that is the ContextKeyManager.
Regarding, the handler DITAExternalObjectInsertionHandler we will start from a user-facing feature: support for drag&drop with keys from a side-view, and if we decide to use the DITAExternalObjectInsertionHandler, then we will make it compatible with Web Author. However this feature is not on our short-term roadmap.
Best,
Cristian
DITAAccess.getKeysForInsertion cannot be made to work in Web Author unless we create a new override which has an extra parameter that is the ContextKeyManager.
Regarding, the handler DITAExternalObjectInsertionHandler we will start from a user-facing feature: support for drag&drop with keys from a side-view, and if we decide to use the DITAExternalObjectInsertionHandler, then we will make it compatible with Web Author. However this feature is not on our short-term roadmap.
Best,
Cristian
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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