http://onionworks.net/2006/data/editing

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

The method “deleteObject” deletes documents. For the parameter “xlink”, the XLink of the document to be deleted is specified. If the document to be deleted has child elements, then “recursive” must be specified.

If “recursive” is set to “false” or is not specified, it is assumed that the document to be deleted does not have any child elements. If there are child elements however, then the document cannot be deleted.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:edit="http://onionworks.net/2006/data/editing" xmlns:onion="http://onionworks.net/2004/data" version="1.0">
<xsl:template match="/">
<xsl:if test="edit:login('testuser', 'test')">
<xsl:choose>
<xsl:when test="edit:deleteObject(c.id(), true)">The document was successfuly deleted.</xsl:when>
<xsl:otherwise>The document could not be deleted.</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="edit:logout()" />
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Deleting document