--- /dev/null
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:template match="/">
+ <zakform>
+ <xsl:for-each select="gtkform/widget">
+ <element>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="@type = 'entry'">zak_form_gtk_form_element_entry</xsl:when>
+ <xsl:when test="@type = 'label'">zak_form_gtk_form_element_label</xsl:when>
+ <xsl:when test="@type = 'textview'">zak_form_gtk_form_element_textview</xsl:when>
+ <xsl:when test="@type = 'radio'">zak_form_gtk_form_element_radio</xsl:when>
+ <xsl:when test="@type = 'checkbox'">zak_form_gtk_form_element_check</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <name><xsl:value-of select="field/@name"/></name>
+ <type>
+ <xsl:choose>
+ <xsl:when test="field/@type = 'text'">string</xsl:when>
+ <xsl:when test="field/@type = 'integer'">integer</xsl:when>
+ <xsl:when test="field/@type = 'datetime'">datetime</xsl:when>
+ <xsl:when test="field/@type = 'boolean'">boolean</xsl:when>
+ <xsl:when test="field/@type = 'float'">float</xsl:when>
+ </xsl:choose>
+ </type>
+ <xsl:if test="@label != ''"><label><xsl:value-of select="@label"/></label></xsl:if>
+ <xsl:if test="field/is-key = 't'"><is-key>TRUE</is-key></xsl:if>
+ <xsl:if test="field/to-load = 'f'"><to-load>FALSE</to-load></xsl:if>
+ <xsl:if test="field/to-save = 'f'"><to-save>FALSE</to-save></xsl:if>
+ <xsl:if test="field/default != ''">
+ <default-value>
+ <xsl:choose>
+ <xsl:when test="field/default = 'now'">@now</xsl:when>
+ <xsl:otherwise><xsl:value-of select="field/default"/></xsl:otherwise>
+ </xsl:choose>
+ </default-value>
+ </xsl:if>
+ <xsl:if test="return-value != ''"><return-value><xsl:value-of select="return-value"/></return-value></xsl:if>
+ <xsl:if test="field/display-format != ''"><format><xsl:value-of select="field/display-format"/></format></xsl:if>
+ <xsl:if test="field/decimals != ''"><format><xsl:attribute name="decimals"><xsl:value-of select="field/decimals"/></xsl:attribute></format></xsl:if>
+ <xsl:if test="field/trim = 't'"><filter type="zak_form_element_filter_trim"></filter></xsl:if>
+ <xsl:if test="field/obligatory = 't'"><validator type="zak_form_element_validator_notempty"></validator></xsl:if>
+ <xsl:if test="field/@type = 'datetime' and field/display-format != ''"><validator type="zak_form_element_validator_date"><xsl:value-of select="field/display-format"/></validator></xsl:if>
+ </element>
+ </xsl:for-each>
+ </zakform>
+</xsl:template>
+
+</xsl:stylesheet>