How to get display name of AuthorElement
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 67
- Joined: Thu Oct 29, 2020 12:01 am
How to get display name of AuthorElement
Post by manojdcoder »
I would like to find all possible attributes of selected element along with its display name.
I was able to use createWhatAttributesCanGoHereContext to find all possible attributes, but not sure how to get the display name. It always returns the xml name.
i.e if a topicref is selected I would like to get the editor displayed name Topic Reference.
I was able to use createWhatAttributesCanGoHereContext to find all possible attributes, but not sure how to get the display name. It always returns the xml name.
i.e if a topicref is selected I would like to get the editor displayed name Topic Reference.
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: How to get display name of AuthorElement
Post by cristi_talau »
Hello,
As of Web Author version 23.1, there are two methods to retrieve the display name of an author element none of which is public API:
If you want to avoid depending on non-documented APIs, you can parse the i18n/translation-cc.xml file in the built-in DITA framework to get the display names of elements according to the user language.
Best,
Cristian
As of Web Author version 23.1, there are two methods to retrieve the display name of an author element none of which is public API:
- In JS code you can use sync.view.NodeRenderer.getRenderedText(node.getHtmlNode()), where node is a Node of the XML document.
- In Java code you can use the following:
Code: Select all
String frameworkId = authorDocumentModel.getDocumentTypeId();
CCConfigurationCache.getInstance()
.getConfiguration(frameworkId).getAllRenderingInformation().get("topicref");
Best,
Cristian
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