10. split-element

split-element(descendant, element?)

Split element before descendant, a descendant node of element. Parameter element defaults to the context node.

All the attributes of element except attribute id, if any, are copied to the element created by this command. Properties of element (get-class(), get-style(), etc) element are not copied to the element created by this command.

Example:

split(.//i);

applied to the following context node:

<p id="p1" title="p1">This p contains <b>bold <i>italic</i></b> text.</p>

gives:

<p id="p1" title="p1">This p contains <b>bold </b></p>

<p title="p1"><b><i>italic</i></b> text.</p>