Skip to the content.

Asterix specifications

This project uses .xml files for asterix definitions. The .xml files can be created and maintained by editing the files directly, however a prefered approach is to convert existing definition files instead.

Basic conversion flow:

(unstructured).pdf.ast.json.xml

This directory contains a script to convert asterix definitions from .json to .xml format.

Asterix specification formats

In case of problems in asterix definitions, users of this project are encouraged to report problems upstream.

Running asterixjson2xml.py script

NOTE: asterixjson2xml.py script requires python36 or higher.

Basic conversion example:

# check python version
python3 --version

# download definition in .json format
curl https://zoranbosnjak.github.io/asterix-specs/specs/cat062/cats/cat1.18/definition.json > input.json

# convert json to xml
python3 asterixjson2xml.py < input.json > output.xml

# or directly
curl https://zoranbosnjak.github.io/asterix-specs/specs/cat062/cats/cat1.18/definition.json | python3 asterixjson2xml.py

Combine CAT+REF definition to a single xml:

python3 asterixjson2xml.py --cat category.json --ref ref.json --outfile out.xml

Running update-specs.py script

This scripts autimatically reads latest Asterix specifications from asterix-specs-out and creates all XML definitions in specs folder.

python3 update-specs.py

Conversion workflow when .json file is available

NOTE: If the resulting .xml file in not as expected, check/modify the asterixjson2xml.py script.

NOTE: Do not manually edit converted .xml files if possible.

Updating asterix specifications

Asterix specifications shall be extended/modified in the upstream asterix-specs project.

Procedure: