How to toggle attribute values?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
How to toggle attribute values?
Post by Frank Ralf »
I want to create an Author Action for toggling the alignment of selected table cells.
Among the Author Default Operations there is a ChangeAttributeOperation and a ToggleSurroundWithElementOperation.
Is there a way to combine these to create something like a "ToggleAttributeOperation"?
TIA
Frank
Among the Author Default Operations there is a ChangeAttributeOperation and a ToggleSurroundWithElementOperation.
Is there a way to combine these to create something like a "ToggleAttributeOperation"?
TIA
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: How to toggle attribute values?
Post by alex_jitianu »
Hello,
ChangeAttributeOperation should be enough. Just create an author action with two action modes, one for each possible state of the attribute:
1. First operation mode. Activation XPath: @currency (the attribute exists) and ChangeAttributeOperation will set @currency to an empty value to remove it.
2. Second operation mode. No activation XPath because it's the default and so it will be activated only when the attribute is not present. ChangeAttributeOperation will set @currency to its value.
The operation modes are configurable in the Action Dialog.
Best regards,
Alex
ChangeAttributeOperation should be enough. Just create an author action with two action modes, one for each possible state of the attribute:
1. First operation mode. Activation XPath: @currency (the attribute exists) and ChangeAttributeOperation will set @currency to an empty value to remove it.
2. Second operation mode. No activation XPath because it's the default and so it will be activated only when the attribute is not present. ChangeAttributeOperation will set @currency to its value.
The operation modes are configurable in the Action Dialog.
Best regards,
Alex
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: How to toggle attribute values?
Post by Frank Ralf »
Thanks for these pointers. I had a look at some similar actions but couldn't figure out what to change.
Cheers,
Frank
Cheers,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
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