Skip to content

10. Examples

Contents of DID 0.2

10.1 A timeline

This definition was written with the timeline specification of DISL 17.2 (timeline.dis). It is a DID 0.1 definition, kept as written: it names the 0.1 schema and "did": "0.1", and it is read as a DID 0.2 definition with the same meaning. Several things to notice:

  • Elements are a flat list; relations are separate.
  • All placement of tasks and milestones lives in the model (start, end, assignee). The view stores only a moved label and the viewport.
  • References (assignee, relation ends) are plain ids.
  • Unset attributes and defaults are omitted (status of Build pages, lag of most dependencies).

File timeline.did:

{
  "$schema": "https://etalii.net/adp/did/schema/0.1/did.schema.json#/$defs/Definition",
  "did": "0.1",
  "language": { "id": "org.example.timeline", "version": "0.4.0" },
  "meta": { "createdAt": "2026-09-21T08:12:00Z", "modifiedAt": "2026-09-25T16:40:00Z", "generator": "Reference runtime 0.1" },
  "diagram": {
    "attributes": {
      "title": "Website relaunch",
      "projectStart": "2026-10-01",
      "projectEnd": "2026-12-18",
      "holidays": ["2026-10-03", "2026-12-24", "2026-12-25"]
    }
  },
  "elements": [
    { "id": "ms_01K5YZT2", "type": "Milestone",
      "attributes": { "title": "Go live", "start": "2026-12-01", "assignee": "res_01K5YX10" } },
    { "id": "res_01K5YX10", "type": "Resource", "attributes": { "name": "Design team" } },
    { "id": "res_01K5YX11", "type": "Resource", "attributes": { "name": "Frontend", "position": 1, "capacity": 2 } },
    { "id": "task_01K5YY01", "type": "Task",
      "attributes": { "title": "Wireframes", "start": "2026-10-01", "end": "2026-10-09",
                      "assignee": "res_01K5YX10", "status": "done", "progress": 1 } },
    { "id": "task_01K5YY02", "type": "Task",
      "attributes": { "title": "Visual design", "start": "2026-10-12", "end": "2026-10-30",
                      "assignee": "res_01K5YX10", "status": "active", "progress": 0.4 } },
    { "id": "task_01K5YY03", "type": "Task",
      "attributes": { "title": "Build pages", "start": "2026-11-03", "end": "2026-11-27",
                      "assignee": "res_01K5YX11" } }
  ],
  "relations": [
    { "id": "dep_01K5Z1A8", "type": "Dependency", "source": "task_01K5YY01", "target": "task_01K5YY02" },
    { "id": "dep_01K5Z1A9", "type": "Dependency", "source": "task_01K5YY02", "target": "task_01K5YY03",
      "attributes": { "lag": 1 } },
    { "id": "dep_01K5Z1B0", "type": "Dependency", "source": "task_01K5YY03", "target": "ms_01K5YZT2" }
  ],
  "views": [
    {
      "id": "v_schedule",
      "viewpoint": "main",
      "name": "Schedule",
      "viewport": { "x": 0, "y": 0, "zoom": 1 },
      "nodes": {
        "task_01K5YY02": { "labels": { "dates": { "dx": 4, "dy": 0 } } }
      },
      "edges": {}
    }
  ]
}

10.2 Time values and the other 0.2 forms

This DID 0.2 definition was written with a small history specification, org.example.history, whose node type Era has start and stop of type yearMonth and an enum kind whose members declare stored forms, whose node type Event has at of type datetime with writtenPrecision: "preserve" and timezone: "floating", and whose relation type Influence declares its target end optional. Several things to notice:

  • yearMonth values are signed astronomical years with at least four digits: "-3200-01" is January 3201 BCE, "0000-01" is January 1 BCE.
  • at keeps the form each value was written in: full dates ("1450-01-01"), a date-time with an offset ("2026-09-30T09:00:00Z") and a local date-time ("2026-10-02T14:30"). A move of Review of this diagram writes the new value as a local date-time to the minute.
  • kind holds the enum's stored forms ("script", "book", "network"), not its member keys.
  • The relation inf_web_open has no target yet.
  • The second suppression names a subject, for a finding about something that is not drawn, instead of an element.

File time-values.did:

{
  "$schema": "https://etalii.net/adp/did/schema/0.2/did.schema.json#/$defs/Definition",
  "did": "0.2",
  "language": { "id": "org.example.history", "version": "0.2.0" },
  "meta": { "createdAt": "2026-09-30T09:00:00Z", "modifiedAt": "2026-09-30T11:25:00Z", "generator": "Reference runtime 0.2" },
  "diagram": {
    "attributes": {
      "title": "Writing and the web",
      "from": "-3200-01",
      "to": "2026-12"
    }
  },
  "elements": [
    { "id": "era_cuneiform", "type": "Era",
      "attributes": { "name": "Cuneiform", "start": "-3200-01", "stop": "-0100-12", "kind": "script" } },
    { "id": "era_codex", "type": "Era",
      "attributes": { "name": "Codex", "start": "0000-01", "stop": "1450-12", "kind": "book" } },
    { "id": "era_web", "type": "Era",
      "attributes": { "name": "World Wide Web", "start": "1989-03", "stop": "2026-09", "kind": "network" } },
    { "id": "ev_moveable_type", "type": "Event",
      "attributes": { "name": "Moveable type in Mainz", "at": "1450-01-01" } },
    { "id": "ev_proposal", "type": "Event",
      "attributes": { "name": "Information management: a proposal", "at": "1989-03-12" } },
    { "id": "ev_first_site", "type": "Event",
      "attributes": { "name": "First website online", "at": "1991-08-06" } },
    { "id": "ev_draft", "type": "Event",
      "attributes": { "name": "Draft of this diagram started", "at": "2026-09-30T09:00:00Z" } },
    { "id": "ev_review", "type": "Event",
      "attributes": { "name": "Review of this diagram", "at": "2026-10-02T14:30" } }
  ],
  "relations": [
    { "id": "inf_codex_web", "type": "Influence", "source": "era_codex", "target": "era_web" },
    { "id": "inf_web_open", "type": "Influence", "source": "era_web",
      "attributes": { "note": "Not yet connected" } }
  ],
  "views": [
    {
      "id": "v_eras",
      "viewpoint": "main",
      "name": "Eras",
      "viewport": { "x": 0, "y": 0, "zoom": 1 },
      "nodes": {
        "ev_review": { "labels": { "name": { "dx": 0, "dy": -8 } } }
      },
      "edges": {}
    }
  ],
  "suppressions": [
    { "constraint": "eraOverlap", "element": "era_web",
      "reason": "The web era is still open.", "by": "editor@example.org", "at": "2026-09-30T11:20:00Z" },
    { "constraint": "sourcesCited", "subject": "bibliography",
      "reason": "The bibliography is kept outside this diagram.", "by": "editor@example.org", "at": "2026-09-30T11:22:00Z" }
  ]
}

Examples explained here