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

createSettings (schemaLocation : string, content : nodeset, [instance : string]) : string

The method “createSettings” produces a document in the user profile for the user currently logged in.

The first two parameters are mandatory indications. An XML is submitted for “content”.

The parameter “instance” is optional. Each instance for a user profile is clear. If the instance is not specified, then the default value is “default”.

If successful, the ReferenceIdentifier for the document is returned as the return value.

<xsl:stylesheet xmlns:onion="http://onionworks.net/2004/schema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:user="http://onionworks.net/2006/data/personalization" version="1.0">
<xsl:template match="/">
<xsl:variable name="setting">
<usersetting onion:schema="Onion:http://www.getit.de/2007/guestbook/usersetting">
<firstName>Max</firstName>
<lastName>Mustermann</lastName>
<email>max.mustermann@example.com</email>
</usersetting>
</xsl:variable>
<xsl:if test="user:login('testuser', 'test')">
<xsl:variable name="settingRefId" select="user:createSettings('http://www.getit.de/2007/guestbook/usersetting', $setting, 'default', 'testuser2')" />
<xsl:if test="string-length($settingRefId) > 0">The userprofile was created successfuly.</xsl:if>
<xsl:value-of select="user:logout()" />
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Creating user profile