10. insert-into

insert-into(inserted, first?, into?)

Insert inserted, one or more nodes, into node into, as its first children if first is true() and as its last children if first is false(). Parameter first defaults to false(). Parameter into defaults to the context node.

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



insert-into(copy($captionPara/node(), true());

insert-into(<b>Note: </b>, true(), $p);