package mlgpx

  1. Overview
  2. Docs

Module Gpx.LinkSource

The Link module handles web links, author information, and copyright data as defined in the GPX specification. This includes:

  • Web links with optional text and MIME type
  • Person records with name, email, and associated links
  • Copyright information with author, year, and license terms

Link and person information types

Sourcetype t = {
  1. href : string;
  2. text : string option;
  3. type_ : string option;
}

Main link type

Sourceand person = {
  1. name : string option;
  2. email : string option;
}

Person information

Copyright information

Sourceval make : href:string -> ?text:string -> ?type_:string -> unit -> t

Create a link.

  • parameter href

    URL reference (required)

  • parameter ?text

    Optional link text

  • parameter ?type_

    Optional MIME type

Sourceval href : t -> string

Get href from link

Sourceval text : t -> string option

Get optional text from link

Sourceval type_ : t -> string option

Get optional type from link

Sourceval with_text : t -> string -> t

Update text

Sourceval with_type : t -> string -> t

Update type

Sourceval compare : t -> t -> int

Compare links

Sourceval equal : t -> t -> bool

Test link equality

Sourceval pp : Format.formatter -> t -> unit

Pretty print link

Person Operations

Sourceval make_person : ?name:string -> ?email:string -> ?link:t -> unit -> person

Create person information

Sourceval person_name : person -> string option

Get person name

Sourceval person_email : person -> string option

Get person email

Get person link

Sourceval compare_person : person -> person -> int

Compare persons

Sourceval equal_person : person -> person -> bool

Test person equality

Sourceval pp_person : Format.formatter -> person -> unit

Pretty print person

Create copyright information

Get copyright author

Get copyright year

Get copyright license

Compare copyrights

Test copyright equality

Pretty print copyright

OCaml

Innovation. Community. Security.