// SPDX-License-Identifier: CC-BY-SA-4.0
= Directive Mapping (Prototype)

This note documents how directive attributes map to HTML and the typed core in
the prototype implementation.

== HTML Mapping (Prototype)

Directives render as:

[source,html]
----
<div data-a2ml="<name>" key="value" ...>...</div>
----

* `data-a2ml` is always set to the directive name.
* Attributes are serialized as HTML attributes in the same element.

== Typed Core Mapping (Prototype)

Translator behavior (v0.2):

* `@abstract` -> `Section` with id `sec:abstract`
* `@fig(id=?, ref=?)` -> `Figure` with id/ref
* `@table(id=?)` -> `Table`
* `@refs` -> `Refs` with entries from paragraph lines
* Unknown directives -> `Section` named after the directive

== Notes

These rules are provisional and will be formalized in v0.3+.
