Hi,

There is an oxy_xpath() [1] function available that can execute XPath, but I'm not sure how it would help in this scenario. What comes to mind is the onChange property on the combo box form control because it's value can be another action invoke when the combo commits a value. For example, you can invoke an XQuery update script [3] which can inspect the document to see what value was committed and can afterwards alter the document accordingly.

comboBox:before {
    content: "A combo box that edits an attribute value. 
               The possible values are provided from CSS:"
        oxy_combobox(           
            edit, "@attribute",
            editable, false,
            values, "value1, value2, value3",
            labels, "Value no1, Value no2, Value no3",
            onChange, oxy_action(
                name, 'Insert',
                operation, 'XQueryUpdateOperation',
                arg-script, 'insert node <product>{xs:string(@attribute)}</product>
                          as last into .'));


[1] https://www.oxygenxml.com/doc/versions/25.0/ug-editor/topics/dg-xpath-function.html

[2] https://www.oxygenxml.com/doc/versions/25.0/ug-editor/topics/combo-box-editor.html#combo-box-editor__li_rrd_dgk_54b

[3] https://www.oxygenxml.com/doc/versions/25.0/ug-editor/topics/dg-default-author-operations.html#dg-default-author-operations__xqueryupdateoperation

Best regards,
Alex
-- 
Alex Jitianu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
On 11/8/2022 2:06 AM, Scott Prentice wrote:

Just wondering if there's an "eval" custom CSS function .. ?

I've got an oxy_combobox that lists a number of attributes, and would like to be able to test the selected value. If a certain attribute was selected, I want to set another attribute on the same element.

I know I can do this by writing some Java code, but wanted to make sure I wasn't missing something obvious with the custom CSS functions.

Thanks!
...scott



_______________________________________________
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user