Download AODM

Specification, schemas, validation rules, worked examples and conformance tests.

AODM 1.2 complete package

Specification, XML Schema, JSON Schema, validation rules, HTML embedding profile, worked examples, conformance test suite, reference parsers in four languages, graph compiler, inference engine, LLM context builder and XBRL converter.

aodm-1.2.zip · 118 KB

What’s in the package

FilePurpose
AODM-1.2-SPECIFICATION.mdThe authoritative specification
aodm-core-1.2.xsdXML Schema for the 1.2 core
aodm-core-1.2.schema.jsonJSON Schema equivalent
VALIDATION-RULES.mdRules a conformant processor must enforce beyond schema validation
AODM-1.2-HTML-PROFILE.mdThe HTML Embedding Profile — marking up web pages with a data-aodm attribute
example-core-1.2.xml / .jsonWorked examples using every feature
conformance-check.pyTest suite verifying the schemas accept valid and reject invalid documents
parsers/python/, parsers/javascript/,
parsers/java/, parsers/csharp/
Reference parsers — read, validate and write AODM. See Tools
parsers/conformance.pyCross-language suite requiring all four parsers to agree
converters/xbrl_to_aodm.pyXBRL 2.1 instance documents to AODM, with sample and tests
graph/aodm_graph.pyGraph compiler — Cypher, RDF Turtle, GraphML, Graphviz
graph/reasoner.pyInference engine — evaluates rules per the specification’s inference section, with explanation and retraction
llm/context.pyRenders AODM into prompt-ready context for any language model
reference/aodm-validator-1.2.js
reference/aodm-html-extract.js
Browser validator and HTML-profile extractor
LICENSE, NOTICEApache License 2.0

Getting started

1. A standalone document

A file of its own — knowledge.xml. Declare the namespace on the root element.

<?xml version="1.0" encoding="UTF-8"?>
<aodm:knowledge version="1.2" xmlns:aodm="http://nesaraq.com/aodm/1.2">

  <aodm:entity id="engine" type="component" label="Engine"/>

  <aodm:fact id="temp-rise" about="engine" valid-from="2026-01-15">
    Temperature rise under sustained load.
    <aodm:value number="1.2" unit="Cel" tolerance="0.1"/>
    <aodm:source uri="https://example.com/report-24" retrieved="2026-01-15"/>
    <aodm:confidence value="0.9"/>
  </aodm:fact>

</aodm:knowledge>

2. The same document as JSON

A file of its own — knowledge.json. No namespace; aodm_version identifies the format. XML attributes are hyphenated, their JSON counterparts snake_cased.

{
  "aodm_version": "1.2",
  "entities": [
    { "id": "engine", "type": "component", "label": "Engine" }
  ],
  "facts": [
    {
      "id": "temp-rise",
      "about": "engine",
      "statement": "Temperature rise under sustained load.",
      "value": { "number": 1.2, "unit": "Cel", "tolerance": 0.1 },
      "valid_from": "2026-01-15",
      "source": { "uri": "https://example.com/report-24", "retrieved": "2026-01-15" },
      "confidence": 0.9
    }
  ]
}

3. Embedded in a page you already publish

Inside your existing HTML, on the element that already displays the content. Nothing new to render, no script to load.

<p data-aodm='{"fact":"temp-rise","about":"engine","valid_from":"2026-01-15",
   "value":{"number":1.2,"unit":"Cel","tolerance":0.1},
   "source":"https://example.com/report-24","confidence":0.9}'>
  Temperature rise under sustained load: 1.2 °C.
</p>

Keys are the same field names as the JSON document above. The attribute is single-quoted because JSON uses double quotes inside. source accepts a bare URI, confidence a bare number.

One attribute per value is also valid, and both forms may be mixed:

<p data-aodm="fact" data-aodm-id="temp-rise" data-aodm-about="engine"
   data-aodm-valid-from="2026-01-15" data-aodm-number="1.2" data-aodm-unit="Cel"
   data-aodm-tolerance="0.1" data-aodm-confidence="0.9">

Facts written inside an element marked entity inherit its id, so about can be left off entirely.

4. Check it

Before you publish.

  • Validate a standalone document against aodm-core-1.2.xsd or aodm-core-1.2.schema.json, then apply the rules in VALIDATION-RULES.md.
  • Paste either form into the online validator, which also extracts embedded AODM straight from a page.
  • Every element and attribute is defined in the documentation.

AODM 1.1 legacy files — The published v1.1 files with six defects corrected. Only needed if you are migrating markup written against 1.1.

License

AODM is released under the Apache License, Version 2.0. You are free to use, modify and distribute it, including commercially, and to build your own implementations of the specification.

Apache 2.0 includes an express patent grant. The full text ships as LICENSE in the download, alongside NOTICE.

Copyright © 2026 NESARAQ.