9. insert-before

insert-before(inserted, before?)

Insert inserted, one or more nodes, before node before. Parameter before defaults to the context node.

Important note: Always pass detached nodes as the first argument of insert or replace.

Examples:

insert-before(copy(.));

insert-before(<meta charset="UTF-8"/>, $title);