http://onionworks.net/2006/data/editing
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="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:stylesheet><xsl:if test="edit:login('testuser', 'test')">
</xsl:template><xsl:if test="edit:shiftObjectPosition(c.id(), 3)">
The element was moved downwards for three steps.
</xsl:if>
<xsl:value-of select="edit:logout()" />
</xsl:if>Positioning a document