Modifying DitaLinkTextResolver
Post here questions and problems related to editing and publishing DITA content.
Modifying DitaLinkTextResolver
Hi,
I'd like to adapt the text being generated for some special cases of referenced elements. Is there any way to adapt the existing code (probably of DitaLinkTextResolver.resolveElement() and/or DITAAccess.computeLinkText) to deal only with my special cases? Or will I have to re-implement the complete LinkTextResolver?
Thanks and regards,
Patrik
I'd like to adapt the text being generated for some special cases of referenced elements. Is there any way to adapt the existing code (probably of DitaLinkTextResolver.resolveElement() and/or DITAAccess.computeLinkText) to deal only with my special cases? Or will I have to re-implement the complete LinkTextResolver?
Thanks and regards,
Patrik
Re: Modifying DitaLinkTextResolver
Hi Patrik,
If you want to update the existing functionality offered by a built-in framework (DITA in your case) is best to create a framework extension rather than change the existing framework. In this way, you will benefit from the new functionality added to the base framework by each Oxygen versions and still use your customization.
So, to extend the DITA framework go to Oxygen -> Preferences -> "Document Type Association" page, select the "DITA" framework and press the "Extend" button placed underneath the list of document types. Save the new extension to an external location like OXYGEN_INSTALL_DIR/frameworks/dita_extended/dita_custom.framework.
In this extension you will be able to set your own implementation of DitaLinkTextResolver. You can start from the default DitaLinkTextResolver implementation and change the resolveReference(AuthorNode) method according to your needs.
The new implementation must be returned by the ro.sync.ecss.extensions.dita.DITAExtensionsBundle.createLinkTextResolver() method.
If you want to update the existing functionality offered by a built-in framework (DITA in your case) is best to create a framework extension rather than change the existing framework. In this way, you will benefit from the new functionality added to the base framework by each Oxygen versions and still use your customization.
So, to extend the DITA framework go to Oxygen -> Preferences -> "Document Type Association" page, select the "DITA" framework and press the "Extend" button placed underneath the list of document types. Save the new extension to an external location like OXYGEN_INSTALL_DIR/frameworks/dita_extended/dita_custom.framework.
In this extension you will be able to set your own implementation of DitaLinkTextResolver. You can start from the default DitaLinkTextResolver implementation and change the resolveReference(AuthorNode) method according to your needs.
The new implementation must be returned by the ro.sync.ecss.extensions.dita.DITAExtensionsBundle.createLinkTextResolver() method.
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
Re: Modifying DitaLinkTextResolver
Hi Mihaela,
my question was not about modifying part of a framework but about modifying part of the DitaLinkTextResolver.
I only want to modify the link text when the rerefenced element is of some special kind. Overriding the method resolveReference would mean that I have to implement all the functionality including identifying the referenced node, generating the link text for all other cases and caching the results.
So basically I'm wondering if there is some kind of extension point where I can override a method that takes the referenced node as input (instead of the referencing element).
Regards,
Patrik
my question was not about modifying part of a framework but about modifying part of the DitaLinkTextResolver.
I only want to modify the link text when the rerefenced element is of some special kind. Overriding the method resolveReference would mean that I have to implement all the functionality including identifying the referenced node, generating the link text for all other cases and caching the results.
So basically I'm wondering if there is some kind of extension point where I can override a method that takes the referenced node as input (instead of the referencing element).
Regards,
Patrik
Re: Modifying DitaLinkTextResolver
Hi Patrik,
For the moment there is no other way than modifying a part of the DitaLinkTextResolver (you can extend the DitaLinkTextResolver and change only the resolveReference(AuthorNode) implementation).
For the moment there is no other way than modifying a part of the DitaLinkTextResolver (you can extend the DitaLinkTextResolver and change only the resolveReference(AuthorNode) implementation).
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
Re: Modifying DitaLinkTextResolver
Hi Patrik,
Maybe you could overwrite the method ro.sync.ecss.extensions.dita.link.DitaLinkTextResolver.resolveReference(AuthorNode) and delegate to the super implementation of the method whenever you are not doing anything special with the node.
Regards,
Radu
Maybe you could overwrite the method ro.sync.ecss.extensions.dita.link.DitaLinkTextResolver.resolveReference(AuthorNode) and delegate to the super implementation of the method whenever you are not doing anything special with the node.
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)
- ↳ 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