# `Statifier.Document.Datamodel`
[🔗](https://github.com/riddler/statifier-ex/blob/v2.0.0/lib/statifier/document/datamodel.ex#L1)

A `<datamodel>` element: an ordered list of `<data>` children.

`<datamodel>` has no attributes of its own (spec 5.2.1), but carries its
own `location` so `Statifier.Validator.Checks.Data`'s placement rule
(`{:datamodel_bad_parent, kind}`) has something of its own to point at,
distinct from the `<data>` children's own spans.

Spec 3.2.2/3.3.2/3.4.2 allow `<datamodel>` under `<scxml>`, `<state>`, and
`<parallel>` only - never under `<final>` or `<history>`. Lowering does not
enforce that placement: `Statifier.Document.State` is one struct for all
four state kinds, so `Statifier.Lowering.Builders.place/3` has no way to
distinguish them by kind. A `<datamodel>` under a `:final` or `:history`
state is representable here and left for `Statifier.Validator.Checks.Data`
to catch.

# `t`

```elixir
@type t() :: %Statifier.Document.Datamodel{
  data: [Statifier.Document.Data.t()],
  location: Statifier.Parser.Location.t()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
