XPath contexts in MultipleActionsOperation
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 81
- Joined: Mon Mar 05, 2012 5:23 pm
XPath contexts in MultipleActionsOperation
Hi,
we encoutered a problem with the ExecuteMultipleActionsOperation for Author. Our use-case:
One Action with ExecuteMultipleActionsOperation which execute the following two actions:
Action 1 sourrounds the current selection with an element, an attribute value is set by the user (via ${ask} dialog)
Action 2 should add an second attribut (via ChangeAttributeOperation) depending of the attribute set by the first action
This is why we want to use mulitple operations in the action 2 by differentiating them with the help of the XPath contexts. But (after some tests) it seems that the second action always evaluate only the context of the selection before the first action. Is there a possibility to evaluate the context after the first action?
Thx & kind regards,
Stefan
we encoutered a problem with the ExecuteMultipleActionsOperation for Author. Our use-case:
One Action with ExecuteMultipleActionsOperation which execute the following two actions:
Action 1 sourrounds the current selection with an element, an attribute value is set by the user (via ${ask} dialog)
Action 2 should add an second attribut (via ChangeAttributeOperation) depending of the attribute set by the first action
This is why we want to use mulitple operations in the action 2 by differentiating them with the help of the XPath contexts. But (after some tests) it seems that the second action always evaluate only the context of the selection before the first action. Is there a possibility to evaluate the context after the first action?
Thx & kind regards,
Stefan
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: XPath contexts in MultipleActionsOperation
Post by alex_jitianu »
Hi Stefan,
I've tested a similar scenario similar. In my situation the second action evaluates the activation XPaths after the first action completes. I've sent you a sample framework in which I've created some actions according with your scenario. Please give it a try and tell me if there is something I've missed. Perhaps you can create a sample framework too.
Best regards,
Alex
I've tested a similar scenario similar. In my situation the second action evaluates the activation XPaths after the first action completes. I've sent you a sample framework in which I've created some actions according with your scenario. Please give it a try and tell me if there is something I've missed. Perhaps you can create a sample framework too.
Best regards,
Alex
-
- Posts: 81
- Joined: Mon Mar 05, 2012 5:23 pm
Re: XPath contexts in MultipleActionsOperation
Hi Alex,
thank you very much for the test framework - it works also in my installation. But my action still doesn't work and I dont know why. It is nearly the same configuration as yours in the framework?! I'll see that I create a test framework, too ...
Best regards,
Stefan
thank you very much for the test framework - it works also in my installation. But my action still doesn't work and I dont know why. It is nearly the same configuration as yours in the framework?! I'll see that I create a test framework, too ...
Best regards,
Stefan
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: XPath contexts in MultipleActionsOperation
Post by alex_jitianu »
Hi Stefan,
The sample chains two actions together:
1. The first action will insert a 'b' element and will ask for the value of an attribute (uninspired called @attr).
2. The second action looks at the value of the attribute (.[@attr='A']) and if its value is 'A' it will set another attribute @other=A_value.
I tested it again and it worked as expected. What happens in your case?
Best regards,
Alex
The sample chains two actions together:
1. The first action will insert a 'b' element and will ask for the value of an attribute (uninspired called @attr).
2. The second action looks at the value of the attribute (.[@attr='A']) and if its value is 'A' it will set another attribute @other=A_value.
I tested it again and it worked as expected. What happens in your case?
Best regards,
Alex
-
- Posts: 81
- Joined: Mon Mar 05, 2012 5:23 pm
Re: XPath contexts in MultipleActionsOperation
Hi Alex,
thanks for testing it! In my case it produces always "@other=B_value" - also when I set @attr='A'. Weird, isn't it?
Perhaps I should try it in a plain oXygen XML Author without any new installations?
Best regards,
Stefan
thanks for testing it! In my case it produces always "@other=B_value" - also when I set @attr='A'. Weird, isn't it?
Perhaps I should try it in a plain oXygen XML Author without any new installations?
Best regards,
Stefan
-
- Posts: 517
- Joined: Wed May 20, 2009 2:40 pm
Re: XPath contexts in MultipleActionsOperation
Hi Stefan,
If you want you can send us a sample framework that reproduces your problem on our support email address (support@oxygenxml.com).
Best Regards,
Mihaela
If you want you can send us a sample framework that reproduces your problem on our support email address (support@oxygenxml.com).
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 81
- Joined: Mon Mar 05, 2012 5:23 pm
Re: XPath contexts in MultipleActionsOperation
Hio Alex, hi Mihaela,
after a couple of tests I found the problem:
The second action will not be executed when there is no "fall-back" operation, i.e. an operation without an XPath condition and which therefore could be executed if none of the XPath conditions of the higher prioritised operations is matched. Attention: this is indepent from wether these XPath conditions will be really fit or not!
You should be able to reproduce this behaviour in the test framework mentioned above: In the action "change" just delete the second operation (the one without an XPath condition). The action will not be executed, even if the XPath condition is matched!
A workaround is to define an operation which do nothing (for example "remove" an attribute, which isn't there).
Kind regards,
Stefan
after a couple of tests I found the problem:
The second action will not be executed when there is no "fall-back" operation, i.e. an operation without an XPath condition and which therefore could be executed if none of the XPath conditions of the higher prioritised operations is matched. Attention: this is indepent from wether these XPath conditions will be really fit or not!
You should be able to reproduce this behaviour in the test framework mentioned above: In the action "change" just delete the second operation (the one without an XPath condition). The action will not be executed, even if the XPath condition is matched!
A workaround is to define an operation which do nothing (for example "remove" an attribute, which isn't there).
Kind regards,
Stefan
-
- Posts: 517
- Joined: Wed May 20, 2009 2:40 pm
Re: XPath contexts in MultipleActionsOperation
Hi Stefan,
Thank you for your explanation. I managed to reproduce the problem and I have added an issue in our internal issue tracker.
We will let you know when it will be fixed.
Best regards,
Mihaela
Thank you for your explanation. I managed to reproduce the problem and I have added an issue in our internal issue tracker.
We will let you know when it will be fixed.
Best regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 419
- Joined: Mon May 09, 2016 9:37 am
Re: XPath contexts in MultipleActionsOperation
Post by sorin_carbunaru »
Hello,
Just wanted to let you know that oXygen 19.0 has just been released yesterday and the issue you reported has been fixed.
All the best wishes,
Sorin Carbunaru
oXygen XML
Just wanted to let you know that oXygen 19.0 has just been released yesterday and the issue you reported has been fixed.
All the best wishes,
Sorin Carbunaru
oXygen XML
Return to “SDK-API, Frameworks - Document Types”
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