@fdl version="1.0" schema="http://fdl.org.uk/fds/fds.fds"

# Person schema

# Schema for document root

element:root:{
 contains=(labelled person)
}

# Schemata for other elements

element:person:{
 element:age:{
  type=integer
  ensure=(value ">" -1)
 }

 element:sex:{
  type=identifier
  ensure=(value in (male female))
 }

 type=list
 contains=(1 labelled element:name:(type=string))
 contains=(1 labelled sex)
 contains=(1 labelled age)
 contains=(2 labelled element:parent:(type=string))
 contains=(labelled element:offspring:(type=string))
 contains=(labelled element:friend:(type=string))
}