Script-Based Data Generator - SYNTAX


General Syntax


Instructions are surrounded by {{ and }}. The substitution for the generated value will happen inline where the instruction is declared. Everything outside of the curly brackets will be ignored and kept as is. Some instructions require a terminal {{/}}. Consult the instructions section for a full list of instructions. Options/attributes are comma separated. Values for options/attributes are specified after a colon such as {{first-name,option:value-of-option}}.

Examples
An inline field
{{first-name,escape:xml}}

A for-loop
{{for:1-10}}
	Body will be executed 10 times
{{/}}

Data Types


In its simplest form, data can be generated by using the syntax {{data-type}}. Some data-types require a terminal {{/}} as they can contain a body.

Examples
This will be substituted with a first name
{{first-name}}

Some data-types have a body and require a {{/}}. Regular expressions is one of those
{{regex}}[abcd]{5,10}{{/}}

Scopes


To obtain quality data, implicit scopes are created whenever you use block-type instructions, i.e. those that have an ending {{/}}. Within a scope, values of similar types are related to one another. Scopes are cascaded automatically to their children. An implicit scope is created at the beginning of any template.

Examples
Because an implicit scope is created at the beginning of the template, these address fields will be contain values that are related to one another:
{{city}}
{{state-name}}
{{zip-code}}

Output:
las vegas
nevada
89206

Within a block-type insturction credit card numbers will match the relevant issuer:
{{repeat:3}}
	{{cc-number}}
	{{cc-issuer}}
{{/}}

Output:
345685176280644
amex

3575563818692879
jcb

6706223008814370
laser

User data is also related to one another within the same scope. Notice how the email and username are a variation of the first and last name:
{{first-name}}
{{last-name}}
{{username}}
{{email}}

Output:
jimena
donovan
jimenadonova1883
jimen.donov6190@live.com

Back References


Data-types can be given an id that makes them referenceable in the same scope or in children scopes. You would typically use this when you want to re-output the same value at a later step in the template. Declaring an id is done using the format {{data-type:id-of-type}}. The id must only contain characters, digits or hyphens. Identifiers must be unique across the entire template.

Examples
The first name data-type is assigned the id 'firstName'
{{first-name:firstName}}

The regular expression data-type is assigned the id 'my-regular-expression'
{{regex:my-regular-expression}}[abcd]{5,10}{{/}}

Data-types can then be referenced by using the format {{@id-of-type}}. This literally takes the generated value at the declaration point and outputs it inline where the {{@...}} directive is used.

Examples
A first name is outputed inline and the value is stored/associated with the id 'firstName'.
{{first-name:firstName}}
{{@firstName}}

Output:
john
john

Data Types List


Alpha-Numeric - 'alpha-num'

Generates a sequence of alpha-numeric characters based on a format string. The format string is specified as a body and requires and ending {{/}}.

  • a: Replaced by a lower-case character
  • A: Replaced by an upper-case character
  • 9: Replaced by a digit
  • others: Other characters are kept as-is
Examples
{{alpha-num,escape:html}}<aaa-999-AAAAA>{{/}}

Output:
<cua-911-GIWCI>


Boolean - 'bool'

Generates a boolean value. The default true or false is used.

  • true: The value to output when true. Default is 'true'
  • false: The value to output when false. Default is 'false'
Examples
Use the default value of true and false
{{bool}}
Output:
true

{{bool,true:1,false:0}}
Output:
1


Character Sequence - 'char-seq'

Generates a sequence of characters based on a provided list. The list of characters is specified as a body and requires and ending {{/}}.

  • min: The minimum number of characters to generate. Default is 10
  • max: The maximum number of characters to generate. Default is 10
Examples
Generates between 10 and 25 characters from the provided list:
{{char-seq}}abcdef123456-{{/}}

Output:
ecece6d3a1b


City - 'city'

Generates a city name. Cities are pulled from the target country.

Examples
{{city,case:capitalize}}

Output:
New York


Color - 'color'

Generates a color. This can take multiple forms.

  • format: The format of the colors. Possible values are 'hexa', 'hexanohash', 'name', 'rgb', 'rgba', 'hsl', 'hsla'. Default is 'hexa'.
Examples
Default outputs the expiry date in format MMYY:
{{color,format:name}}

Output:
white

A random hexa decimal color:
{{color,format:hexa}}

Output:
#F3A594

Company Name - 'company'

Generates a company name. The names are from real company obtained on the web.

Examples
{{company,case:capitalize}}

Output:
Kellogg Company


Credit Card Number - 'cc-number'

Generates a valid credit card number conforming to the luhn checksum algorithm.

  • separator: True or false. Will display the card number with hyphens. Default is false.
  • issuers: Comma seperated list of issuers. Possible values are 'visa', 'mastercard', 'amex', 'discover', 'jcb', 'dinersclubnorthamerica', 'dinersclubcarteblanche', 'dinersclubinternational', 'maestro', 'laser', 'visaelectron', 'instapayment'. Default is all issuers.
Examples
Default outputs the card number without any separators and number can be from any issuers:
{{cc-number}}

Output:
4142501520264746

Generate a card number for visa or mastercard with hyphens as separators:
{{cc-number,separator:true,issuers:visa,mastercard}}

Output:
5138-1895-1284-1219


Credit Card Expiry - 'cc-expiry'

Generates an expiry date for a credit card.

  • format: The format of the expiry date. Possible values are 'YYYYMM','MMYYYY','YYMM','MMYY','YYYY-MM','MM-YYYY','YY-MM','MM-YY','YYYY/MM','MM/YYYY','YY/MM','MM/YY','YYYY.MM','MM.YYYY','YY.MM','MM.YY'. Default is MMYY.
Examples
Default outputs the expiry date in format MMYY:
{{cc-expiry}}

Output:
0517

Specify a different format:
{{cc-expiry,format:yy-mm}}

Output:
17-05

Credit Card Issuer - 'cc-issuer'

Generates a card issuer name. The names are the same as the issuers list.

  • issuers: Comma seperated list of issuers. Possible values are 'visa', 'mastercard', 'amex', 'discover', 'jcb', 'dinersclubnorthamerica', 'dinersclubcarteblanche', 'dinersclubinternational', 'maestro', 'laser', 'visaelectron', 'instapayment'. Default is all issuers.
Examples
Default outputs the expiry date in format MMYY:
{{cc-issuer}}

Output:
visa

Using a specific list of issuers:
{{cc-issuer,issuers:visa,mastercard}}

Output:
mastercard


Date - 'date'

Generates a date with the specified format. Can include a time value if format contains one.

  • min: The minimum date value. Format of min is yyyy-MM-dd. Default is 2000-01-01
  • max: The maximum date value. Format of max is yyyy-MM-dd. Default is now + 1 year
  • format: The format of the date. Default is yyyy-MM-dd
    Component Examples
    y Year yyyy: 1996
    yy: 96
    M Month in year MMMM: July
    MMM: Jul
    MM: 07
    dd Day in month dd: 10
    E Day in week EEEE: Tuesday
    EEE: Tue
    'T' 'T' ISO date-time separator yyyy-MM-dd'T'hh:mm:ss.SSSZ: 2000-10-31T01:30:00.000-05:00
    a AM/PM marker a: PM
    H Hour in day (0-23) HH: 17;
    h Hour in day (1-12) hh: 07
    h: 7
    m Minute in hour mm: 32;
    s Second in minute ss: 45;
    S Millisecond SSS: 514;
    z Time zone zzzz: Pacific Standard Time
    zzz: PST
    z: GMT-08:00
    Z Time zone (RFC 822) Z: -0800
Examples
Generates a date between 2011-01-01 and 2011-12-31:
{{date,min:2011-01-01,max:2011-12-31}}

Output:
2011-07-19

Generates a time part using only hours fields:
{{date,format:HH:mm:ss.SSS}}

Output:
15:24:21.665

Generates a date with the ISO format including time, milliseconds and a time zone:
{{date,format:yyyy-MM-dd'T'hh:mm:ss.SSSZ}}

Output:
2002-08-27T07:07:44.991-0400


Domain - 'domain'

Generates a domain name. Domain names are valid public site.

Examples
{{domain}}

Output:
samsung.com


EAN 8 - 'ean8'

Generates a valid EAN 8 with a valid checksum.

Examples
{{ean8}}

Output:
13174651


EAN 13 - 'ean13'

Generates a valid EAN 13 with a valid checksum.

Examples
{{ean13}}

Output:
6435502186893


Email - 'email'

Generates an email.

  • disposable: Generates emails using disposable services, i.e. temporary mailboxes with no subscription. Possible values are 'true' or 'false'. Default is 'false'
Examples
Generates an email using a disposable service all in lowercase
{{email,disposable:true,case:lower}}

Output:
bob.mctaggert78@mailinator.com


Epoch - 'epoch'

Generates an epoch value, i.e. the number of seconds or milliseconds since '1970-01-01 00:00:00 GMT'.

  • min: The minimum date value. Format of min is yyyy-MM-dd. Default is 2000-01-01
  • max: The maximum date value. Format of max is yyyy-MM-dd. Default is now + 1 year
  • precision: Outputs the epoch value in milliseconds or seconds. Possible values are 'millis' or 'seconds'. Default is 'seconds'
Examples
Generates an epoch value between 2011-01-01 and 2011-12-31 in seconds:
{{epoch,min:2011-01-01,max:2011-12-31}}

Output:
1305870002
	 
Generates an epoch value between 2011-01-01 and 2011-12-31 in millis:
{{epoch,min:2011-01-01,max:2011-12-31,precision:millis}}

Output:
1316063941523



File - 'file'

Generates a file name or path or both.

  • os: The target operating system. Possible values are 'linux' or 'windows'. Default is 'windows'
  • format: The format of the output. Possible values are 'file', 'path', 'fullpath'. Default is 'fullpath'
Examples
Generates a file name:
{{file,format:file}}

Output:
nvwksESN.chm

Generates a file path:
{{file,format:path}}

Output:
C:\Windows\Help\nvcpl

Generates a full file path:
{{file,format:fullpath}}

Output:
C:\Windows\Help\nvcpl\nvwksESN.chm


First Name - 'first-name'

Generates a first name.

Examples
Generates a first name where the first letter is a capital (uppercase) and escapes the value for HTML:
{{first-name,case:capitalize,escape:html}}

Output:
Caitlin


Full Address - 'full-address'

Generates a full address. Address format is 'XXXX Street, City, State/Province, Country, Zip-Code/Postal Code'

Examples
{{full-address,case:capitalize}}

Output:
1355 Academy, San Bernardino, California, United States, 92318


Gender - 'gender'

Generates a gender value.

  • male: The value to output when male. Default is 'm'
  • female: The value to output when female. Default is 'f'
Examples
Use the default value of true and false
{{gender}}
Output:
f

{{gender,male:male,female:female}}
Output:
female


Hexadecimal - 'hexa'

Generates a sequence of hexadecimal characters.

  • min: The minimum number of characters to generate. Default is 10
  • max: The maximum number of characters to generate. Default is 10
Examples
Generates between 10 and 50 hexadecimal characters:
{{hexa,min:10,max:50}}

Output:
b417e41cda74c82b4ed8a589d9114890f6e8f50a5c


Image URL - 'image-url'

Generates an image URL using an external on-the-fly image generator. The URLs are valid.

  • min-width: Minimum number of pixels for the width of the image
  • max-width: Maximum number of pixels for the width of the image
  • min-height: Minimum number of pixels for the height of the image
  • max-height: Maximum number of pixels for the height of the image
Examples
Generates a url to an image of exactly 300x250 pixels
{{image-url,min-width:300,max-width:300,min-height:250,max-height:250}}

Output:
http://placehold.it/300x250


IPV4 Address - 'ipv4'

Generates an IPV4 address.

Examples
{{ipv4}}

Output:
165.252.11.7


IPV6 Address - 'ipv6'

Generates an IPV6 address.

Examples
{{ipv6}}

Output:
2001:26b3:c993:53a4:f621:8698:c42e:b2d8


ISBN 10 - 'isbn10'

Generates a valid ISBN 10 with a valid checksum.

Examples
{{isbn10}}

Output:
0-940618-65-6


ISBN 13 - 'isbn13'

Generates a valid ISBN 13 with a valid checksum.

Examples
{{isbn13}}

Output:
978-0-980646-23-8


Last Name - 'last-name'

Generates a last name.

Examples
Generates a last name where the first letter is a capital (uppercase) and escapes the value for HTML:
{{last-name,case:capitalize,escape:html}}

Output:
Smith


Latitude - 'latitude'

Generates a latitude.

  • precision: The number of digits after the decimal. Default is 0
Examples
{{latitude,precision:6}}

Output:
37.098796


List Of Values - 'list'

Picks a value from a list. There is one value per line. It is a good practice to declare them in a definition block. The list of values is specified as a body and requires and ending {{/}}.

Examples
Picks a random value from the list. One value per line. Usually a good practice to define them in a {{def}} block:
{{list,case:upper}}
paris
new york
amsterdam
montreal
{{/}}

Output:
MONTREAL


Longitude - 'longitude'

Generates a longitude.

  • precision: The number of digits after the decimal. Default is 0
Examples
{{longitude,precision:6}}

Output:
-83.187659


MAC Address - 'mac-address'

Generates a MAC address.

Examples
{{mac-address}}

Output:
bb:24:1f:c5:22:ee


Middle Name - 'middle-name'

Generates a middle name.

Examples
Generates a middle name where the first letter is a capital (uppercase) and escapes the value for HTML:
{{middle-name,case:capitalize,escape:html}}

Output:
Kinsey


Number - 'number'

Generates a number.

  • min: Mandatory. The minimum value for the number. Default is 10
  • max: Mandatory. The maximum number of characters to generate. Default is 10
  • precision: The number of digits after the decimal
  • format: Representation of the number. Possible values are 'scientific', 'binary', 'octal', 'hexa'. Default is no formatting
Examples
Generates a number between 1000 and 9999 with 5 digits after the decimal:
{{number,min:1000,max:9999,precision:5}}

Output:
1030.68862

Generates a number between 1000 and 9999 with no decimals:
{{number,min:1000,max:9999}}

Output:
4563

Generates a number between 1000 and 9999 expressed as a binary string:
{{number,min:1000,max:9999,format:binary}}

Output:
10001101100110


Numeric Id - 'numeric-id'

Generates a sequential numeric value. This is similar to a database sequence. Each 'numeric-id' data-type gets its own sequence.

  • start: The starting number at which the sequence starts. Default is 1
Examples
Generate 10 sequential numeric identifiers
{{repeat:10}}
	{{numeric-id,start:100}}
{{/}}

Output:
100
101
102
103
104
105
106
107
108
109


Product Name - 'product'

Generates a product name. Products come from a catalog of tools.

Examples
{{product,case:capitalize}}

Output:
Campbell Hausfeld Air Compressor Oil - 16 Ounce


Regular Expression - 'regex'

Generates a value by reversing a regular expression. The regular expression is specified as a body and requires and ending {{/}}. The regular expression is limited to the following instructions:

  • [:alphanum:] or \w: alpha-numeric character
  • [:digit:] or \d: digits
  • [:alpha:] or [A-Za-z]: alpha character
  • [:lower:] or [a-z]: lowercase alpha character
  • [:upper:] or [A-Z]: uppercase alpha character
  • [:word:]: random word
  • [abc]: any of the enclosed characters. Use dash for range
  • [^abc]: anything NOT enclosed within brackets. Use dash for range
  • \t: tab character
  • (): group terms for repetitions
  • {5}: generate exactly 5 times
  • {5,10}: generate between 5 and 10 times
  • |: 'or' operator when used with groups
Examples
Any of the following characters between 5 and 10 times:
{{regex}}[abcdef]{5,10}{{/}}
Output:
fbdefca

Either 'dog' or 'cat' or 'bird' followed by a space exactly 3 times:
{{regex}}((dog)|(cat)|(bird) ){3}{{/}}
Output:
cat cat bird

Any character but 'xyz' followed by 5 uppercase or lowercase characters:
{{regex}}[^xyz]([:upper:]|[:lower:]){5}{{/}}
Output:
vuhJKp

Social Security Number - 'ssn'

Generates a social security number in the format XXX-XX-XXX

Examples
{{ssn}}

Output:
280-73-048


State Code - 'state-code'

Generates a state code.

Examples
{{state-code,case:upper}}

Output:
NY


State Name - 'state-name'

Generates a state name.

Examples
{{state-name,case:capitalize}}

Output:
New York


Street Address - 'street-address'

Generates a street address, i.e. a combination of a civic number and a street name. Note that the street names could include offensive characters such as & and should therefore be escaped when necessary.

Examples
{{street-address,case:capitalize}}

Output:
2942 Stratford


Street Name - 'street-name'

Generates a street name. This does not include a civic number. Note that the street names could include offensive characters such as & and should therefore be escaped when necessary.

Examples
{{street-name,case:capitalize}}

Output:
5th Avenue


Telephone - 'telephone'

Generates a telephone number. Format is flexible. Area code are country specific.

  • format: Format of the phone number. 'x' letters will be substituted with digits, rest is kept as is.
Examples
{{telephone,format:(XXX) XXX-XXXX}}

Output:
(512) 354-9585

{{telephone,format:+XXX (XXX) XXX-XXXX}}

Output:
+011 (512) 354-9585


UPC - 'upc'

Generates a valid UPC with a valid checksum.

Examples
{{upc}}

Output:
413817282550


URL - 'url'

Generates an absolute URL.

Examples
{{url}}

Output:
http://www.archive.org/docs/url/2012/12/proposal.html


Username - 'username'

Generates a username.

Examples
{{username}}

Output:
javiero3288


Universally Unique Identifier - 'uuid'

Generates universally unique identifier.

Examples
{{uuid}}

Output:
9245e50c-8c45-458f-9bcd-dbea112c396e


Words - 'words'

Generates a series of word using lorem ipsum. Words will be punctuated to obtain sentences.

  • length: The number of words to generate.
Examples
{{words,length:30}}

Output:
Viverra rutrum facilisis erat congue elementum orci maecenas maecenas sagittis. In euismod, dapibus lobortis. Neque curabitur montes eu vulputate semper nunc aptent cum augue cursus. Vestibulum malesuada varius mollis imperdiet?


Zip Code - 'zip-code'

Generates a zip code.

Examples
{{zip-code}}

Output:
10016


Functions

Data-types have functions that can be used inline.

  • case: The case of the generated value. Possible options are 'upper', 'lower', 'capitalize'. Default is 'lower'
  • escape: Escapes the generated value. Possible options are 'csv', 'xml', 'html', 'javascript', 'java', 'sql'. Default is no escaping
Examples
The first-name will be in lowercase by default:
{{first-name}}
Output:
john

The first-name will be in uppercase:
{{first-name,case:upper}}
Output:
JOHN

The first-name will start with a capital letter:
{{first-name,case:capitalize}}
Output:
John

Escapes the value so it can be used in HTML:
{{street-name,escape:html}}
Output:
Brighton & Hove

Escapes the value so it can be used in SQL:
{{last-name,escape:sql}}
Output:
o''neil


Definitions

You can add a {{def}}...{{/}} section at the top of the template to declare data-types that you can then reuse anywhere in the template. You can use a pre-defined data-type by using the syntax {{:id-of-declared-data-type}} The def block must be the very first instruction in your template.

Examples
The def block needs to be the very first block in your template!!!
{{def}}
	We are declaring a first-name data-type with an id firstName that can now be used anywhere in the template:
	{{first-name:firstName,escape:html,case:upper}}

	We are declaring a date data-type with an id of myDate, a specific format, a minimum and maximum date value:
	{{date:myDate,min:1900-01-01,max:2014-01-01,format:yyyy-MM-dd HH:mm:ss}}
{{/}}

We can now freely use the data-types declared above anywhere
{{repeat:3}}
	{{:firstName}}
	{{:myDate}}
	Notice how back-reference is not the same as using a definition! This will output the value of the preceding data-type.
	{{@myDate}}
{{/}}

Output would be:
JOHN
1945-01-01
1945-01-01
MICHAEL
1965-03-21
1965-03-21
PETER
1903-10-27
1903-10-27

Instructions


Instructions are used to add conditions and repetitions to your template. The create implicit scopes where data-types will be related. Note that instruction blocks must be balanced with ending {{/}}.

Instructions List


Choice - 'choice'

Randomly generates one of the children or block.

Examples
One of the following 3 blocks will be outputted:
{{choice}}
	{{or}}first{{/}}
	{{or}}second{{/}}
	{{or}}third{{/}}
{{/}}

Output:
second


First - 'first'

When used within a repeating block, the block will be outputted on the first iteration.

Examples
The block will be executed on the first iteration:
{{for:1-3}}
	{{first}}
		{{@item}} - Outputted on the first iteration
	{{/}}
{{/}}

Output:
1 - Outputted on the first iteration


First Or Last - 'firstoflast'

When used within a repeating block, the block will be outputted on the first and last iteration.

Examples
The block will be executed on the first and last iteration:
{{for:1-3}}
	{{firstorlast}}
		{{@item}} - Outputted on the first and last iteration
	{{/}}
{{/}}

Output:
1 - Outputted on the first and last iteration
3 - Outputted on the first and last iteration


For - 'for'

Use as a repetition block. The for instruction accepts either a numeric range expressed in the format X-Y or a reference to a pre-defined list datat-types. Within each iteration a implicit @item variable is made available to get the current item.

Examples
The for block will iterate 5 times. The @item variable is assigned the value 1, then 2, and so on:
{{for:1-5}}
	{{@item}}
{{/}}

Output:
1
2
3
4
5

The for block will iterate over each items in the list. The @item variable will be assigned with the current value in the list:
{{def}}
	{{list:mylist}}
		first
		second
		third
	{{/}}
{{/}}
{{for:mylist}}
	{{@item}}
{{/}}

Output:
first
second
third


Last - 'last'

When used within a repeating block, the block will be outputted on the last iteration.

Examples
The block will be executed on the last iteration:
{{for:1-3}}
	{{last}}
		{{@item}} - Outputted on the last iteration
	{{/}}
{{/}}

Output:
3 - Outputted on the first and last iteration


Not First - 'notfirst'

When used within a repeating block, the block will be outputted on every iteration but the first one.

Examples
The block will be executed on the second and third iteration:
{{for:1-3}}
	{{notfirst}}
		{{@item}} - Outputted on the second and third iteration
	{{/}}
{{/}}

Output:
2 - Outputted on the second and third iteration
3 - Outputted on the second and third iteration


Not First Or Last - 'notfirstorlast'

When used within a repeating block, the block will be outputted on every iteration but the first and last one.

Examples
The block will be executed on the second iteration:
{{for:1-3}}
	{{notfirstorlast}}
		{{@item}} - Outputted on the second iteration
	{{/}}
{{/}}

Output:
2 - Outputted on the second iteration


Not Last - 'notlast'

When used within a repeating block, the block will be outputted on every iteration but the last one.

Examples
The block will be executed on the first and second iteration:
{{for:1-3}}
	{{notlast}}
		{{@item}} - Outputted on the first and second iteration
	{{/}}
{{/}}

Output:
1 - Outputted on the first and second iteration
2 - Outputted on the first and second iteration


Optional - 'optional'

Optional blocks can be omitted from the output on a random basis. There is a 25% chance that the optional block will not be executed.

Examples
The optional block will be included roughly 75% of the time:
{{for:1-3}}
	{{optional}}
		Maybe I will be in the output, maybe not!
	{{/}}
{{/}}	
Output:
Maybe I will be in the output, maybe not!
Maybe I will be in the output, maybe not!


Not Last - 'notlast'

When used within a repeating block, the block will be outputted on every iteration but the last one.

Examples
The block will be executed on the first and second iteration:
{{for:1-3}}
	{{notlast}}
		{{@item}} - Outputted on the first and second iteration
	{{/}}
{{/}}

Output:
1 - Outputted on the first and second iteration
2 - Outputted on the first and second iteration


Repeat - 'repeat'

Executes the inner blocks N times. The repeat block can also take a range in which case the number of iterations will fall randomly between the lower and upper limits.

Examples
In this case, the repeat block will be executed exactly 5 times:
{{repeat:5}}
	I will be executed five times!
{{/}}

Output:
I will be executed five times!
I will be executed five times!
I will be executed five times!
I will be executed five times!
I will be executed five times!


Step - 'step'

When used within a repeating block, the block is executed every N iterations.

Examples
In this case, the step block is executed every 2 iterations:
{{for:1-6}}
	{{step:2}}
		{{@item}} - I will be there on iteration 2, 4 and 6!
	{{/}}		
{{/}}

Output:
2 - I will be there on iteration 2, 4 and 6!
4 - I will be there on iteration 2, 4 and 6!
6 - I will be there on iteration 2, 4 and 6!


Samples


User With Addresses - XML


{{def}}
	{{char-seq:appartment,min:1,max:1}}abcdef{{/}}
	{{list:address-type}}
		mailing
		billing
	{{/}}
{{/}}
<users>
	{{repeat:10}}	
	<user id="{{uuid:user-id}}">
		<first-name>{{first-name,escape:xml}}</first-name>
		<middle-name>{{middle-name,escape:xml}}</middle-name>
		<last-name>{{last-name,escape:xml}}</last-name>
		<date-of-birth>{{date,min:1900-01-01,max:2014-01-01,format:yyyy-MM-dd HH:mm:ss}}</date-of-birth>
		<addresses>
		{{repeat:1-3}}
			<address id="{{uuid}}" user-id="{{@user-id}}" type="{{:address-type}}" is-default="{{first}}true{{/}}{{notfirst}}false{{/}}">
				{{optional}}
					<appartment>{{:appartment}}</appartment>
				{{/}}
				<civic-number>{{number,min:1,max:9999}}</civic-number>
				<street>{{street-name,escape:xml}}</street>
				<city>{{city,escape:xml}}</city>
				<state>{{state-code}}</state>
				<country>USA</country>
				<zip-code>{{zip-code}}</zip-code>
			</address>
		{{/}}
		</addresses>
	</user>
	{{/}}
</users>				

User With Addresses - SQL


{{def}}
	{{list:address-type}}
mailing
billing
secondary
	{{/}}
{{/}}
{{repeat:10}}
	INSERT INTO USER ('user-id', 'first-name', 'last-name', 'date-of-birth') 
	VALUES ({{uuid:numeric-id}}, '{{first-name,escape:sql}}', '{{last-name,escape:sql}}', '{{date,min:1900-01-01,max:2014-01-01,format:yyyy-MM-dd HH:mm:ss,escape:sql}}');
	{{for:address-type}}
		INSERT INTO ADDRESS ('user-id', 'address-type', 'street-name', 'city', 'state-code', 'zip-code') 
		VALUES ({{@user-id}}, '{{@item}}', '{{street-name,escape:sql}}', '{{city,escape:sql}}', '{{state-code}}', '{{zip-code}}');
	{{/}}
{{/}}

Top 10 City List - HTML


<ul>
	{{for:1-10}}
	<li>
		<h1>{{@item}} - {{city,case:capitalize}}</h1>
		<div style="margin-right:20px;"><img src="{{image-url,min-width:300,max-width:300,min-height:250,max-height:250}}"></div>		
		<div>{{words,length:50}}</div>
		<div><a href="{{url,escape:html}}">Click for more details!</a></div>
	</li>
	{{/}}
</ul>

Transactions With Credit Cards - CSV


"line-number","card-number","expiry-date","issuer","transaction-id"
{{repeat:10}}
"{{numeric-id}}","{{cc-number,issuers:visa,mastercard,separator:true}}","{{cc-expiry,format:MMYY}}","{{cc-issuer}}","{{uuid}}"
{{/}}

Purchase Order


{{repeat:10}}
	{{first}}
		-------------------------------------------------------------------------
		Order: {{regex}}[A-Z]{3}-\d{5,10}{{/}}
		-------------------------------------------------------------------------
	{{/}}
		Product: {{product,case:capitalize}} 									
		Qty: {{number,min:1,max:99}}	
	{{last}}
		=========================================================================
		Total: {{number,min:1000,precision:2}}$		
	{{/}}
{{/}}