Skip to content

IofEvent

Types

form

The form of an event — individual, team, or relay.

rescript
type form = Individual | Team | Relay

Constructors:

  • Individual
  • Team
  • Relay

discipline

The discipline of an event.

rescript
type discipline =
  | Orienteering
  | MountainBike
  | Ski
  | Trail
  | Other(string)

Constructors:

  • Orienteering
  • MountainBike
  • Ski
  • Trail
  • Other(string)

t

Represents an orienteering event, including name, timing, form and organiser information.

See: Event in the IOF XML 3.0 XSD

rescript
type t = {
  id: option<string>,
  name: string,
  startTime: option<string>,
  endTime: option<string>,
  form: option<form>,
  discipline: option<discipline>,
  organiserNames: array<string>,
}

Fields:

  • id: option&lt;string&gt; — The identifier of the event.
  • name: string — The name of the event.
  • startTime: option&lt;string&gt; — The start time for the first starting competitor of the event, encoded as "yyyy-mm-ddTHH:MM:SS". The XSD represents this as separate <Date> and <Time> child elements inside <StartTime>; the parser joins them with "T" on read, and the serializer splits on "T" to reconstruct them.
  • endTime: option&lt;string&gt; — The expected finish time for the last finishing competitor, encoded as "yyyy-mm-ddTHH:MM:SS". The XSD represents this as separate <Date> and <Time> child elements inside <EndTime>; the parser joins them with "T" on read, and the serializer splits on "T" to reconstruct them.
  • form: option&lt;form&gt; — The form of the event (Individual, Team or Relay).
  • discipline: option&lt;discipline&gt; — The discipline of the event.
  • organiserNames: array&lt;string&gt; — Names of the organising organisations.

Values

parseForm

rescript
let parseForm: string => option<form>

parseDiscipline

rescript
let parseDiscipline: string => discipline

parseDateTime

rescript
let parseDateTime: (IofXml.XmlUtils.xmlElement, string) => option<string>

parse

rescript
let parse: IofXml.XmlUtils.xmlElement => option<t>