Page 1 of 1

Define framework usage context (desktop or web author)

Posted: Mon Jan 30, 2023 3:23 pm
by NicoAMP
Hello,

Initially, I developed an Oxygen framework for the Desktop version.
I would now like to develop a framework for Oxygen Web Author, which would be a slightly different version of the Desktop framework (share some icons, use of some actions only, implementation of some functionality in javascript, etc.).
So I have in the same directory a .framework file (Desktop framework) and an .exf file (Web Author framework). But the 2 frameworks have the same priority and are triggered on the same elements.

Is there a way to use the .exf only in the WebAuthor framework context and the .framework only in the Desktop framework context?

Thanks for your help.

Re: Define framework usage context (desktop or web author)

Posted: Mon Jan 30, 2023 3:36 pm
by Bogdan Dumitru
Hello,
You might need to specify "<priority>High</priority>" in your script, see the "priority" element from the Extending the Built-in DITA Framework example.

Re: Define framework usage context (desktop or web author)

Posted: Mon Jan 30, 2023 3:49 pm
by NicoAMP
Hello Bogdan,
If I define <priority>High</priority> in both frameworks, which one will be launched in OWA context ?
Thanks.

Re: Define framework usage context (desktop or web author)

Posted: Wed Feb 01, 2023 10:05 am
by mihai_coanda
Hello,
The result if both frameworks match a document and have the same priority is not predictable on all platforms as it depends on the file system.
A document should be matched by the framework based on its matching configuration and priority, these two levels should suffice when developing a framework.
If you have strict requirements to have two frameworks you will have to package them separately and deploy only the desired one for the specific platform.
As frameworks are portable between XML Editor and Web Author we do not offer a mechanism for one to load only on one of the two platforms so both XML Editor and Web Author will load both frameworks in your case.
The recommended way is to use the same framework for both platforms if you do not have too many differences.
If you could elaborate on the differences we can recommend you a strategy to merge the two frameworks into one usable on both platforms.
Best Regards,
Michael

Re: Define framework usage context (desktop or web author)

Posted: Wed Feb 01, 2023 10:46 am
by NicoAMP
Hello Michael,
Thanks for your answer.
I need to have two frameworks, because one of them is a "light" version of the other : only some buttons of the toolbar are displayed for example.
So I will package them them separately and deploy only the desired one for the specific platform.
Regards.