How to set ditaval file programmically
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 4
- Joined: Thu Dec 10, 2015 6:23 pm
How to set ditaval file programmically
In the Perferences section, there is
"Editor / Edit Modes / Author / Profiling/Conditional Text / Attributes and Condition Sets" where you can use the "Import from DITAVAL..." button to select a ditaval file to set the profiling attributes. After selecting the ditaval file you are given choice to "Merge" or "Replace".
I am interested in knowing what class(es) are evoked once the "Replace" buttom is clicked.
My goal is to programmically set the ditaval file based using an attribute value in the topic when the topic is opened.
"Editor / Edit Modes / Author / Profiling/Conditional Text / Attributes and Condition Sets" where you can use the "Import from DITAVAL..." button to select a ditaval file to set the profiling attributes. After selecting the ditaval file you are given choice to "Merge" or "Replace".
I am interested in knowing what class(es) are evoked once the "Replace" buttom is clicked.
My goal is to programmically set the ditaval file based using an attribute value in the topic when the topic is opened.
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to set ditaval file programmically
Hi,
Those classes are not public API so they cannot be used from plugins.
Also the settings are global, so if you have two opened topics, you cannot have at the same time some settings for one and some settings for the other.
We do have API to import a set of global options from an options XML file in Oxygen:
PluginWorkspaceProvider.getPluginWorkspace().importGlobalOptions(optionsFile);
https://www.oxygenxml.com/InstData/Edit ... orage.html
For example this sample Javascript-based Oxygen plugin imports an options.xml in the Oxygen global options:
https://github.com/oxygenxml/wsaccess-j ... se-options
An XML containing options can be created by using the Oxygen main menu "Options->Export Global Options", or you can go to the Preferences->"Editor / Edit Modes / Author / Profiling/Conditional Text / Attributes and Condition Sets" page, switch it to Project level options, configure the settings there, save and the settings should be saved in the Oxygen project XPR file currently opened in the Project view, you can open the XPR file as an XML and it should have serialized XML options inside it.
Regards,
Radu
Those classes are not public API so they cannot be used from plugins.
Also the settings are global, so if you have two opened topics, you cannot have at the same time some settings for one and some settings for the other.
We do have API to import a set of global options from an options XML file in Oxygen:
PluginWorkspaceProvider.getPluginWorkspace().importGlobalOptions(optionsFile);
https://www.oxygenxml.com/InstData/Edit ... orage.html
For example this sample Javascript-based Oxygen plugin imports an options.xml in the Oxygen global options:
https://github.com/oxygenxml/wsaccess-j ... se-options
An XML containing options can be created by using the Oxygen main menu "Options->Export Global Options", or you can go to the Preferences->"Editor / Edit Modes / Author / Profiling/Conditional Text / Attributes and Condition Sets" page, switch it to Project level options, configure the settings there, save and the settings should be saved in the Oxygen project XPR file currently opened in the Project view, you can open the XPR file as an XML and it should have serialized XML options inside it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Thu Dec 10, 2015 6:23 pm
Re: How to set ditaval file programmically
Thanks, Radu. I will see what I can do using importGlobalOptions.
I do understand the global setting where all open file use the same settings. We usually only have one topic opened at a time for editng. We rely heavily on profiling conditions and the ditaval file used for the topic changes quite frequently for some writers. While setting the ditaval file is easy, it often gets overlooked at crunch time, making it easy to apply the wrong profiling value.
I do understand the global setting where all open file use the same settings. We usually only have one topic opened at a time for editng. We rely heavily on profiling conditions and the ditaval file used for the topic changes quite frequently for some writers. While setting the ditaval file is easy, it often gets overlooked at crunch time, making it easy to apply the wrong profiling value.
Return to “SDK-API, Frameworks - Document Types”
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