deleteObject (target : xlink, [recursive : boolean]) : boolean

The method “deleteObject()” deletes elements from the structure. For the parameter “xlink”, the XLink of the element to be deleted is specified. If the element to be deleted has child elements, then “recursive” must be specified.

The parameter “recursive” implicitly holds the value “false()”. If “recursive” is therefore not specified or is specified with the value “false()”, it is assumed that the element to be deleted does not have any child elements. If there are child elements however, then the element cannot be deleted. The method then returns “false”.

<xsl:stylesheet xmlns:app="" xmlns:xsl="" xmlns:onion="" version="1.0">
<xsl:template match="/">
<xsl:if test="app:deleteObject(, true())">
<xsl:value-of select="'The element and his children were deleted successfuly.'" />
Deleting document

In the example, the object is deleted on which the method is called. If it cannot be said for sure that the object has no children, the parameter “recursive” should be specified with “true()” as in the example.