Issue with Actions Using an Individual XML File
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 168
- Joined: Fri Jan 20, 2017 1:11 pm
Issue with Actions Using an Individual XML File
Hello,
With the version 24.1.0.0 of oxygen, we face an issue with actions using an individual XML file for each action.
We have define common framework extension script files and we have custom framework file for specific customers.
Exemple :
- proced.exf (common for all client)
- proced-custom.exf (can be added for specific client)
If a {framework_file_name}-custom.exf file is added in our framework directory, then oxygen generate the {framework_file_name}-custom_externalAuthorActions directory which contains {framework_file_name}_externalAuthorActions directory which contains all actions files.
Exemple :
{framework_directory}/proced-custom_externalAuthorActions/proced_externalAuthorActions/add.template.xml
The issue is in the actions files placed in this directory.
Before, in version 24.0.0.2, when we had this kind of path, it worked fine :
But now, with version 24.1.0.0, we have this :
For information S1000D - DM Procedure seems to be the value of base attribute in the proced-custom.exf file :
This unwanted modification causes issue in our application, because we are not able anymore to build the path correctly.
Are you aware of that behavior ?
How can we fix that ?
Thanks,
Regards,
Isabelle
With the version 24.1.0.0 of oxygen, we face an issue with actions using an individual XML file for each action.
We have define common framework extension script files and we have custom framework file for specific customers.
Exemple :
- proced.exf (common for all client)
- proced-custom.exf (can be added for specific client)
If a {framework_file_name}-custom.exf file is added in our framework directory, then oxygen generate the {framework_file_name}-custom_externalAuthorActions directory which contains {framework_file_name}_externalAuthorActions directory which contains all actions files.
Exemple :
{framework_directory}/proced-custom_externalAuthorActions/proced_externalAuthorActions/add.template.xml
The issue is in the actions files placed in this directory.
Before, in version 24.0.0.2, when we had this kind of path, it worked fine :
Code: Select all
<a:argument name="fragment">${framework}/S1000D/resources/ftlTemplate/template.ftl</a:argument>
Code: Select all
<a:argument name="fragment">${framework(S1000D - DM Procedure)}/S1000D/resources/ftlTemplate/template.ftl</a:argument>
Code: Select all
<script xmlns="http://www.oxygenxml.com/ns/framework/extend"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oxygenxml.com/ns/framework/extend http://www.oxygenxml.com/ns/framework/extend/frameworkExtensionScript.xsd"
base="S1000D - DM Procedure">
Are you aware of that behavior ?
How can we fix that ?
Thanks,
Regards,
Isabelle
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Issue with Actions Using an Individual XML File
Post by alex_jitianu »
Hi Isabelle,
Yes, we are aware of this change. In version 24, the $framework variables from the base framework actions were left untouched when copied, but that was a problem when the base framework and the extension framework were not in the same directory. That's why we decided to rewrite ${framework} from the base with ${framework(BASE_FRAMEWORK_NAME)} which Oxygen will be able to expand no matter the location of the extension.
As an improvement, we could check and see if the base and the extension are in different directories and only perform the rewriting if the answer is yes.
How exactly does this rewriting affects you? Oxygen loads those external actions it will expand without any problem variables like ${framework(BASE_FRAMEWORK_NAME)} to their correct location
Best regards,
Alex
Yes, we are aware of this change. In version 24, the $framework variables from the base framework actions were left untouched when copied, but that was a problem when the base framework and the extension framework were not in the same directory. That's why we decided to rewrite ${framework} from the base with ${framework(BASE_FRAMEWORK_NAME)} which Oxygen will be able to expand no matter the location of the extension.
As an improvement, we could check and see if the base and the extension are in different directories and only perform the rewriting if the answer is yes.
How exactly does this rewriting affects you? Oxygen loads those external actions it will expand without any problem variables like ${framework(BASE_FRAMEWORK_NAME)} to their correct location
Best regards,
Alex
-
- Posts: 168
- Joined: Fri Jan 20, 2017 1:11 pm
Re: Issue with Actions Using an Individual XML File
Hello Alex,
Here is an exemple of an action we use :
As you can see, we use ${framework} to retrieve some resources for our action.
But now, with your changes, ${framework(BASE_FRAMEWORK_NAME)} is not expand anymore and we can not find our resource file.
Regards,
Isabelle
Here is an exemple of an action we use :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<a:authorAction xmlns:a="http://www.oxygenxml.com/ns/author/external-action"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oxygenxml.com/ns/author/external-action http://www.oxygenxml.com/ns/author/external-action/authorAction.xsd"
id="drop.link.template">
<a:name>Drop Link Template</a:name>
<a:description>Drop Link Template</a:description>
<a:operations>
<a:operation id="com.framework.operations.InsertTemplateObject">
<a:arguments>
<a:argument name="fragment">${framework}/resources/ftlTemplate/templates/template.ftl</a:argument>
</a:arguments>
</a:operation>
</a:operations>
<a:enabledInReadOnlyContext>false</a:enabledInReadOnlyContext>
</a:authorAction>
But now, with your changes, ${framework(BASE_FRAMEWORK_NAME)} is not expand anymore and we can not find our resource file.
Regards,
Isabelle
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Issue with Actions Using an Individual XML File
Post by alex_jitianu »
Hi,
Inside the base framework (S1000D - DM Procedure) you have:
In the extension directory you have:
When proced-custom.exf is compiled and action.xml is copied inside proced-custom/proced-custom_externalAuthorActions, it is a good thing that ${framework} is replaced with ${framework(S1000D - DM Procedure)}, because the template file is located inside its directory which is proced in the above example.
So if you open a document that matches the extension you should be able to successfully invoke the action loaded from action.xml.
I imagine that you didn't have any issues in version 24 because both proced.exf and proced-custom.exf were located in the the same directory, together with the resources subfolder.
Perhaps I don't understand your setup and what doesn't work. Can you prepare some samples for me with instructions on how to reproduce the issue?
Best regards,
Alex
Inside the base framework (S1000D - DM Procedure) you have:
Code: Select all
proced/resources/ftlTemplate/templates/template.ftl
proced/proced_externalAuthorActions/action.xml
proced/proced.exf
Code: Select all
proced-custom/proced-custom.exf
So if you open a document that matches the extension you should be able to successfully invoke the action loaded from action.xml.
I imagine that you didn't have any issues in version 24 because both proced.exf and proced-custom.exf were located in the the same directory, together with the resources subfolder.
Perhaps I don't understand your setup and what doesn't work. Can you prepare some samples for me with instructions on how to reproduce the issue?
Best regards,
Alex
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Issue with Actions Using an Individual XML File
Post by alex_jitianu »
Hi,
One more thing I've noticed with delay. You have a custom operation, com.framework.operations.InsertTemplateObject. Before we invoke an operation, the editor variables from its parameters are expanded, so it should receive an absolute URL, not ${framework(BASE_FRAMEWORK_NAME)}. Is this the issue? com.framework.operations.InsertTemplateObject receives the value for fragment with ${framework(BASE_FRAMEWORK_NAME)} still present in it?
Best regards,
Alex
One more thing I've noticed with delay. You have a custom operation, com.framework.operations.InsertTemplateObject. Before we invoke an operation, the editor variables from its parameters are expanded, so it should receive an absolute URL, not ${framework(BASE_FRAMEWORK_NAME)}. Is this the issue? com.framework.operations.InsertTemplateObject receives the value for fragment with ${framework(BASE_FRAMEWORK_NAME)} still present in it?
Best regards,
Alex
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Issue with Actions Using an Individual XML File
Post by alex_jitianu »
Hi,
I will try to reproduce this on some samples. Meanwhile, you should be able to expand it like this from within the operation:
Let me know if it expands the path. If it doesn't, it might be a hint about the cause of the issue.
Best regards,
Alex
I will try to reproduce this on some samples. Meanwhile, you should be able to expand it like this from within the operation:
Code: Select all
@Override
public void doOperation(AuthorAccess authorAccess, ArgumentsMap args) throws AuthorOperationException {
String fragment = (String) args.getArgumentValue(ARGUMENT_FRAGMENT);
fragment = authorAccess.getUtilAccess().expandEditorVariables(fragment, null);
Best regards,
Alex
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Issue with Actions Using an Individual XML File
Post by alex_jitianu »
Hello,
I've created some samples
- unzip and open the xpr file inside Oxygen's Project view
- open sample.xml and switch it to Author mode
- invoke from the toolbar the action Variables test
- some absolute paths are inserted, a sign that the variables were expanded
The action is defined in the base framework, inside frameworks\proced\proced_externalAuthorActions\variables-test.xml
Perhaps you can notice something different between my setup and yours.
Best regards,
Alex
I've created some samples
variables-test.zip
in which ${framework(BASE_FRAMEWORK_NAME)} are resolved correctly. Here is how to test:- unzip and open the xpr file inside Oxygen's Project view
- open sample.xml and switch it to Author mode
- invoke from the toolbar the action Variables test
- some absolute paths are inserted, a sign that the variables were expanded
The action is defined in the base framework, inside frameworks\proced\proced_externalAuthorActions\variables-test.xml
Perhaps you can notice something different between my setup and yours.
Best regards,
Alex
You do not have the required permissions to view the files attached to this post.
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