28. wrap-element

wrap-element(container, transfer_attributes?, element?)

Move element element at the end of element container then replace element by container. Parameter element defaults to the context node.

If parameter transfer_attributes, which defaults to false(), is passed true(), then the attributes of element element are transferred to element container. This attribute transfer removes each attribute of element element in turn and if the removed attribute is not already set in element container, it adds this attribute to container.

Example:

wrap-element($listItem);

wrap-element($listItem, false(), .);

wrap-element(<blockquote/>, (:transfer attributes:) true());