updateObject (target : xlink, newContent : nodeset) : boolean

After working on elements, the contents should also be saved. The method “updateObject” is provided for this. This method saves changes to an existing object.

For the parameter “newContent”, an XML fragment is transferred which represents the type to be saved.

<xsl:stylesheet xmlns:onion="" xmlns:xsl="" xmlns:edit="" version="1.0">
<xsl:template match="/">
<xsl:variable name="content">
<post onion:schema="Onion:"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit </post>
<xsl:if test="edit:login('testuser', 'test')">
<xsl:when test="edit:updateObject(, $content)"> The changes were saved. </xsl:when>
<xsl:otherwise>The changes could not be saved.</xsl:otherwise>
<xsl:value-of select="edit:logout()" />
Updating a document