get key value from keyref
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 2
- Joined: Thu Mar 19, 2015 5:37 pm
get key value from keyref
Post by xavier_declercq »
Hello,
We are building our own DITA Map extensions bundle to customize oXygen.
I am struggling trying to retrieve the value of the keyword refered by a keyref when the user saves the document. The keyword is located in an external subject scheme
I am capturing the save action inside the WSEditorListener#editorAboutToBeSavedVeto method. This is apparently working.
I can even list the key URL with the DITAAccess.resolveKeyRef method but I don't know how to get the value it refers.
Can you please help ?
Thanks in advance.
Xavier
We are building our own DITA Map extensions bundle to customize oXygen.
I am struggling trying to retrieve the value of the keyword refered by a keyref when the user saves the document. The keyword is located in an external subject scheme
I am capturing the save action inside the WSEditorListener#editorAboutToBeSavedVeto method. This is apparently working.
I can even list the key URL with the DITAAccess.resolveKeyRef method but I don't know how to get the value it refers.
Can you please help ?
Thanks in advance.
Xavier
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: get key value from keyref
Post by alex_jitianu »
Hello Xavier,
I believe you can get what you want like this:
Best regards,
Alex
I believe you can get what you want like this:
Code: Select all
LinkedHashMap<String, KeyInfo> keys = DITAAccess.getKeys(originatorURL);
MetaContentProvider metaContentProvider = keys.get("myKey").getMetaContentProvider();
if (metaContentProvider != null) {
String content = metaContentProvider.getContent(" topic/keyword ");
}
Alex
-
- Posts: 2
- Joined: Thu Mar 19, 2015 5:37 pm
Re: get key value from keyref
Post by xavier_declercq »
Hello Alex,
Thanks for the reply.
I tried your described solution but the problem is that the MetaContentProvider retrieved is null. And I don't understand why...
Thanks for the reply.
I tried your described solution but the problem is that the MetaContentProvider retrieved is null. And I don't understand why...
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: get key value from keyref
Post by alex_jitianu »
Hello Xavier,
Can you send me some small DITA samples on support@oxygenxml.com so I can test it myself and draw a conclusion?
Best regards,
Alex
Can you send me some small DITA samples on support@oxygenxml.com so I can test it myself and draw a conclusion?
Best regards,
Alex
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: get key value from keyref
Hi Xavier,
Thanks for the samples.
You seem to define keyword metadata directly on subjectdefs like:
and right now Oxygen does not gather the metadata from subjectdef keys.
We will try to rectify this.
Could you tell me more about why you want to get the keyref value in the first place?
Regards,
Radu
Thanks for the samples.
You seem to define keyword metadata directly on subjectdefs like:
Code: Select all
<subjectdef keys="Technicalengineer"><topicmeta><keywords><keyword>Technical engineer</keyword></keywords></topicmeta></subjectdef>
We will try to rectify this.
Could you tell me more about why you want to get the keyref value in the first place?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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