Copy atrribute

Hi,
I need to copy the value of an attribute to another attribute. Should be easy, but no success so far. This here won't work:

<p:add-attribute match="*[@data-custom-style]" attribute-name="class">
            <p:with-option name="attribute-value" select="'@data-custom-style'"></p:with-option>
        </p:add-attribute>

This doesn't work neither:

<p:add-attribute match="*[@data-custom-style]" attribute-name="class">
            <p:with-option name="attribute-value" select="@data-custom-style"></p:with-option>
        </p:add-attribute>

How should I go about this?

Best,
Denis

Received on Thursday, 20 March 2025 13:46:24 UTC