Using ChangeAttributeOperation in oxy_combobox onChange
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 14
- Joined: Fri Jan 22, 2021 5:01 pm
Using ChangeAttributeOperation in oxy_combobox onChange
Post by Johannab_31 »
Hello,
I hope you can help. I'm using XML Editor 20.1 and XML Author 20.1. I'm working on a custom CSS style-sheet that will be used online in the Web Author.
I want to update the outputclass attribute value based on the value that the user enters for the title element. The title element will be a combobox.
DITA xml
I got it to work using the 'XQueryUpdateOperation' but I believe that isn't supported in the web author so I switched to using the 'ChangeAttributeOperation' operation i.e.
CSS
The problem is that @outclass is updated with the title value before the dropdown change e.g if the title is 'TEST 1' and I change it to "TEST 2" the value of @outputclass is changed to 'TEST 1' - not the new value.
Can you figure out a way to achieve this?
Many Thanks for your help
I hope you can help. I'm using XML Editor 20.1 and XML Author 20.1. I'm working on a custom CSS style-sheet that will be used online in the Web Author.
I want to update the outputclass attribute value based on the value that the user enters for the title element. The title element will be a combobox.
DITA xml
Code: Select all
<concept deliverymethod="E-Learning" id="concept-cpr_zxf_2op" outputclass="need_to_know">
<title>Need To Know</title>
I got it to work using the 'XQueryUpdateOperation' but I believe that isn't supported in the web author so I switched to using the 'ChangeAttributeOperation' operation i.e.
CSS
Code: Select all
learningContent[outputclass~="stay_current"] *[class~="concept/concept"] > *[class~="topic/title"]:first-child:before {
content: oxy_label(text, "Title*: ", styles, "width:5%; color:black;")
oxy_combobox(
edit, "#text",
editable, false,
values, "Highlights, Need To Know, Assessment",
/*onChange, oxy_action(
name, 'Insert',
operation, 'XQueryUpdateOperation',
arg-script, 'replace value of node ../@outputclass with replace(lower-case(.), " ", "_")')
);*/
onChange, oxy_action(
name, 'ChangeOutputClass',
operation, 'ChangeAttributeOperation',
arg-name, 'outputclass',
arg-elementLocation, '..',
arg-value, oxy_xpath("replace(lower-case(text()), ' ', '_')")
)
);
}
Can you figure out a way to achieve this?
Many Thanks for your help
-
- Posts: 513
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Using ChangeAttributeOperation in oxy_combobox onChange
Post by cristi_talau »
Hello,
The support for onChange property was added in version 21.1 of Web Author. Are you able to upgrade Web Author to a newer version to solve this issue?
Best,
Cristian
The support for onChange property was added in version 21.1 of Web Author. Are you able to upgrade Web Author to a newer version to solve this issue?
Best,
Cristian
Return to “General XML Questions”
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