shiftObjectPosition (target : xlink, position : int) : boolean

Elements can be moved within the structure. The method “shiftObjectPosition” makes it possible to move elements by positions within their own hierarchy level.

The parameter “position” indicates the number of positions the element is to be moved up or down by. If -1 is specified for “position”, then the element is moved up one position. In the same way, if the element is to be moved down one position, then 1 must be specified.

The element can only be moved in the current hierarchy level. “moveObject” must be used for moving elements into other levels.
If the element is to be placed in a certain position in its own hierarchy level, “setObjectPosition” can also be used.

<xsl:stylesheet xmlns:xsl="" xmlns:edit="" xmlns:onion="" version="1.0">
<xsl:template match="/">
<xsl:if test="edit:login('testuser', 'test')">
<xsl:if test="edit:shiftObjectPosition(, 3)"> The element was moved downwards for three steps. </xsl:if>
<xsl:value-of select="edit:logout()" />
Positioning a document