Skip to content

CompetitorList

Types

competitor

Represents information about a person in a competition context, including their organisations, control cards, and default classes.

See: Competitor in the IOF XML 3.0 XSD

rescript
type competitor = {
  person: IofXml.IofPerson.t,
  organisations: array<IofXml.IofOrganisation.t>,
  controlCards: array<IofXml.IofControlCard.t>,
  classes: array<IofXml.IofClass.t>,
}

Fields:

  • person: IofXml.IofPerson.t
  • organisations: array&lt;IofXml.IofOrganisation.t&gt; — The organisations (clubs) the person is a member of, in order of preference.
  • controlCards: array&lt;IofXml.IofControlCard.t&gt; — The control cards owned by the person.
  • classes: array&lt;IofXml.IofClass.t&gt; — The default classes for the competitor, in priority order.

t

A "brutto" list of possible competitors used to exchange competitor databases. Not intended for event entries — use EntryList for that.

See: CompetitorList in the IOF XML 3.0 XSD

rescript
type t = {
  competitors: array<competitor>,
  createTime: option<string>,
  creator: option<string>,
}

Fields:

  • competitors: array&lt;competitor&gt;
  • createTime: option&lt;string&gt; — The time when the file was created, as an ISO 8601 datetime.
  • creator: option&lt;string&gt; — The name of the software that created the file.

Values

parseCompetitor

rescript
let parseCompetitor: IofXml.XmlUtils.xmlElement => option<competitor>

parse

Parse an IOF XML 3.0 CompetitorList document string into a typed structure.

rescript
let parse: string => result<t, string>

serializePerson

rescript
let serializePerson: IofXml.IofPerson.t => string

serializeOrg

rescript
let serializeOrg: IofXml.IofOrganisation.t => string

serializeControlCard

rescript
let serializeControlCard: IofXml.IofControlCard.t => string

serializeClass

rescript
let serializeClass: IofXml.IofClass.t => string

serializeCompetitor

rescript
let serializeCompetitor: competitor => string

serialize

Serialize a CompetitorList structure to an IOF XML 3.0 document string.

rescript
let serialize: t => string