The formatpostcodelong() function

Smartsite 7.8 - ...

The formatpostcodelong() extension function formats an Dutch zip code to 9999 AA.

XML CopyCode image Copy Code
string exf:formatpostcodelong(arg1)

Parameters:

  • arg1: a node reference or string literal.

Example

XML CopyCode image Copy Code
<html xmlns="http://www.w3.org/1999/xhtml" 
  xmlns:xf="http://www.w3.org/2002/xforms"  
  xmlns:exf="http://smartsite.nl/namespaces/xforms/1.0">
 <head>
  <title>Example</title>
  <xf:model>
   <xf:instance>
    <data xmlns="">     
    </data>
   </xf:instance>
  </xf:model>
 </head>
 <body>
  <xf:group ref="/data" appearance="full">
   <xf:label />
   <xf:output value="exf:formatpostcodelong('2628xg')" />
  </xf:group>
 </body>
</html>

The result will be:

2628 XG

Namespace

This function is available within the Smartsite XForms namespace (http://smartsite.nl/namespaces/xforms/1.0).