module Campaign is
; <- keyword
;      ^ module.definition
;               ^ keyword

  import foo as bar
  ; <- keyword
  ;      ^ module
  ;          ^ keyword
  ;             ^ module

  import versioned <https://example.org> as bar
  ; <- keyword
  ;      ^ module
  ;                                      ^ keyword
  ;                                         ^ module

  import skos:prefLabel as label
  ; <- keyword
  ;      ^ type
  ;                     ^ keyword
  ;                        ^ type

  import [xsd skos xml:base dc]
  ; <- keyword
  ;      ^ punctuation.bracket
  ;       ^ module
  ;           ^ module
  ;                ^ type
  ;                         ^ module
  ;                           ^ punctuation.bracket

  @xml:base = <https::advertising.amazon.com/api-model>
  ; <- property
  ;^ property
  ;         ^ operator
  ;           ^ string.special

  @skos:version = xsd:decimal(2)
  ; <- property
  ;^ property
  ;             ^ operator
  ;               ^ function.call
  ;                          ^ punctuation.bracket
  ;                           ^ number
  ;                            ^ punctuation.bracket

  datatype name <- xsd:string is
  ; <- keyword
  ;        ^ type.definition
  ;             ^ operator
  ;                ^ type
  ;                           ^ keyword

    @xsd:minLength = 5
    ; <- property
    ;^ property
    ;              ^ operator
    ;                ^ number

    @xsd:maxLength = 25
    ; <- property
    ;^ property
    ;              ^ operator
    ;                ^ number

  end
  ; <- keyword

  datatype CampaignId <- xsd:string is
  ; <- keyword
  ;        ^ type.definition
  ;                   ^ operator
  ;                      ^ type
  ;                                 ^ keyword

    @skos:prefLabel = [
    ; <- property
    ;^ property
    ;               ^ operator
    ;                 ^ punctuation.bracket

      "Campaign Identifier"@en
      ; <- string
      ;                    ^ property

      "Identifiant de campagne"@fr
      ; <- string
      ;                        ^ property

    ]
    ; <- punctuation.bracket

  end
  ; <- keyword

  structure Tag is
  ; <- keyword
  ;         ^ type.definition
  ;             ^ keyword

    key -> xsd:NMTOKEN
    ; <- variable.field
    ;   ^ operator
    ;      ^ type

    value -> {0..} rdfs:langString
    ; <- variable.field
    ;     ^ operator
    ;        ^ punctuation.bracket
    ;         ^ number
    ;          ^ operator
    ;            ^ punctuation.bracket
    ;              ^ type

  end
  ; <- keyword

  entity Campaign is
  ; <- keyword
  ;      ^ type.definition
  ;               ^ keyword

    identity campaignId -> CampaignId
    ; <- keyword
    ;        ^ variable.field
    ;                   ^ operator
    ;                      ^ type

    name -> Name is
    ; <- variable.field
    ;    ^ operator
    ;       ^ type
    ;            ^ keyword

      @skos:definition = ""
      ; <- property
      ;^ property
      ;                ^ operator
      ;                  ^ string

    end
    ; <- keyword

    something -> unknown
    ; <- variable.field
    ;         ^ operator
    ;            ^ type.builtin

    target -> {1..} Target
    ; <- variable.field
    ;      ^ operator
    ;         ^ punctuation.bracket
    ;          ^ number
    ;           ^ operator
    ;             ^ punctuation.bracket
    ;               ^ type

  end
  ; <- keyword

  entity Target
  ; <- keyword
  ;      ^ type.definition

  event CampaignNameChanged is
  ; <- keyword
  ;     ^ type.definition
  ;                         ^ keyword
    source Campaign
    ; <- keyword
    ;      ^ type
  end

end
; <- keyword
