Skip to content

ISO-TC211/schemas

Repository files navigation

ISO/TC 211 Schemas

CI status

Overview

This is the official repository of ISO/TC 211 XML (XSD) and JSON schemas, jointly managed by ISO/TC 211/XMG and Ribose.

The schemas are served at https://schemas.isotc211.org/ and published as interactive schema browsers built by two LutaML tools:

  • LutaML XSD (lutaml-xsd) — parses XSD into .lxr packages, validates resolution, and generates standalone HTML documentation.

  • LutaML JSON Schema (lutaml-jsonschema) — validates JSON schemas and generates interactive SPA documentation.

Directory structure

XSD schemas

All XSD files follow the {standard}/{-part}/{module}/{version}/ pattern:

{standard}/{-part}/{module}/{version}/
  {module}.xsd              # Main schema entry point (3-letter lowercase)
  *.xsd                     # Additional type/import schemas
  *.sch                     # Schematron validation rules
  index.adoc                # Per-module documentation
  *.png                     # UML/diagram images
  examples/*.xml            # Example XML instances
Table 1. Naming conventions
Component Pattern Example

Standard

5 digits

19115

Part

-1, -2, -3; use - for standalone

-1

Module

3 lowercase letters matching the main XSD filename

cit, mdb, gml

Version

Semantic version

1.0, 1.3.0, 2.2.0

Resources

{standard}/resources/
  transforms/               # XSLT transform stylesheets
  codelists/                # Codelist dictionary XML files
  schematron/               # Cross-cutting Schematron rules
  bundles/                  # ZIP download packages
  namespace-tools/          # Namespace information and tools
  tools/                    # Helper scripts and utilities
  CHANGES.md                # Per-standard maintenance log

JSON schemas

json/{standard}/{-part}/{module}/{version}/
  *.json                    # JSON Schema definitions
  examples/*.json           # JSON example instances

Package manifests

Packages define which schemas are grouped into a single interactive browser. Two manifest files define all packages:

lxr_packages.yml

XSD (LXR) packages — each groups one or more .xsd files

ljr_packages.yml

JSON (LJR) packages — each groups one or more .json files

Package fields

Field Required Description

name

Yes

Unique package identifier (e.g. 19115-1-1.3.0)

title

Yes

Human-readable title for the browser

standard

Yes

ISO standard number (e.g. 19115)

files

Yes

List of file paths relative to repo root

status

No

One of current, draft, historical

description

No

Short description

part

No

Part identifier (e.g. -1, -2)

Example: XSD package

- name: "19103-gco-1.2.0"
  title: "ISO 19103 — Conceptual Schema Language (gco, gcx)"
  standard: "19103"
  status: "current"
  description: "General conceptual schema language types and XML data types."
  files:
    - "19103/-/gco/1.2.0/gco.xsd"
    - "19103/-/gcx/1.2.0/gcx.xsd"

Example: JSON schema package

- name: "19157-1-dqc-json-1.0.0"
  title: "ISO 19157-1 — Data Quality Measures JSON (v1.0.0)"
  standard: "19157"
  part: "-1"
  status: "current"
  files:
    - "json/19157/-1/dqc/1.0.0/dqc.json"

Adding an XML (XSD) schema

  1. Create the directory and place schema files:

    mkdir -p 19115/-1/new/1.0
    # Place new.xsd (entry point), newType.xsd, etc.
  2. Optionally add Schematron rules, examples, and documentation:

    19115/-1/new/1.0/
      new.xsd           # Main entry point (3-letter lowercase name)
      newType.xsd       # Additional type definitions
      new.sch           # Schematron rules (optional)
      index.adoc        # Documentation (optional)
      examples/*.xml    # Example instances (optional)
  3. Register in lxr_packages.yml:

    - name: "19115-new-1.0"
      title: "ISO 19115-1 — New Module (new v1.0)"
      standard: "19115"
      status: "current"
      files:
        - "19115/-1/new/1.0/new.xsd"
  4. Validate the manifest:

    ruby tools/validate_manifests.rb
  5. Test the package locally (see Local testing below).

  6. Push — CI validates and builds automatically.

Adding a JSON schema

  1. Create the directory and place schema files:

    mkdir -p json/19115/-4/new/1.0
    # Place new.json
  2. Register in ljr_packages.yml:

    - name: "19115-4-json-1.0"
      title: "ISO 19115-4 — New Module JSON (v1.0)"
      standard: "19115"
      status: "current"
      files:
        - "json/19115/-4/new/1.0/new.json"
  3. Validate the manifest:

    ruby tools/validate_manifests.rb
  4. Test the package locally (see Local testing below).

  5. Push — CI validates and builds automatically.

JSON Schema URI conventions

Every JSON schema file in this repository MUST declare a $id that matches the URL where the schema will be served. The site serves schemas at:

https://schemas.isotc211.org/json/{standard}/{-part}/{module}/{version}/{file}.json

$id — set this to the served URL (the repo-relative file path prefixed with https://schemas.isotc211.org/):

+

"$id": "https://schemas.isotc211.org/json/19115/-4/mdj/1.0.0/mdj.json"

$ref to another ISO/TC 211 schema — use the target schema’s $id URL with an anchor:

+

"$ref": "https://schemas.isotc211.org/json/19157/-1/dqc/1.0.0/dqc.json#DataQuality"

$ref to an external schema — use the canonical external URL:

+

"$ref": "https://geojson.org/schema/Feature.json"
Note
The correct URL prefix is https://schemas.isotc211.org/json/…​; — there is no /schemas/ segment between the domain and /json/.

Local testing

Prerequisites

  • Ruby 3.3+ with Bundler

  • Node.js 20+ (for lutaml-jsonschema SPA builds only)

Install gems:

bundle install

Validate manifests

# Validate structure, required keys, file existence, no duplicates
ruby tools/validate_manifests.rb

# List all referenced files (for piping to xmllint, json.tool, etc.)
ruby tools/validate_manifests.rb --list-files

Testing an XSD package

Build the .lxr package from the build template + your manifest entry:

# Generate a build config for your package
ruby -rjson -ryaml -e '
  files = ["19115/-1/new/1.0/new.xsd"]  # your file list
  template = YAML.load_file("tools/lxr_build_template.yml")
  template["metadata"]["name"] = "19115-new-1.0"
  template["metadata"]["title"] = "ISO 19115-1 — New Module (new v1.0)"
  template["files"] = files
  File.write("build_config.yml", YAML.dump(template))
'

# Build the package
bundle exec lutaml-xsd build from-config build_config.yml \
  --name "19115-new-1.0" \
  --validate \
  --output "pkg/19115-new-1.0.lxr"

Validate that all type/element/group references resolve:

bundle exec lutaml-xsd build validate-resolution pkg/19115-new-1.0.lxr
# Use --strict to fail on warnings too

Generate a standalone HTML browser to preview locally:

bundle exec lutaml-xsd spa pkg/19115-new-1.0.lxr \
  --output pkg/19115-new-1.0.html \
  --title "ISO 19115-1 — New Module"
# Open pkg/19115-new-1.0.html in a browser

Testing a JSON schema package

Validate the JSON schema file:

bundle exec lutaml-jsonschema validate json/19115/-4/new/1.0/new.json

Generate an SPA browser to preview:

bundle exec lutaml-jsonschema spa \
  json/19115/-4/new/1.0/new.json \
  --output pkg/19115-4-json-1.0 \
  --title "ISO 19115-4 — New Module JSON"
# Open pkg/19115-4-json-1.0/index.html in a browser

CI pipeline

Every push and pull request runs the full pipeline (.github/workflows/ci.yml) in five stages:

Stage Description

validate

Runs tools/validate_manifests.rb to check YAML structure, required keys, file existence, and no duplicate names. Then validates all .xsd files with xmllint --noout and all .json files with python3 -m json.tool.

setup-matrix

Parses lxr_packages.yml and ljr_packages.yml into JSON arrays for the matrix strategy. Each package becomes one matrix entry.

build-lxr (matrix)

Runs in parallel — one job per LXR package: 1. Checks out lutaml/lutaml-xsd and installs it. 2. Generates a per-package build config by merging the shared tools/lxr_build_template.yml with the package’s file list. 3. Runs lutaml-xsd build from-config with --validate to produce a .lxr data package. 4. Runs lutaml-xsd spa to produce a standalone .html browser.

build-ljr (matrix)

Runs in parallel — one job per LJR package: 1. Checks out lutaml/lutaml-jsonschema and installs it (including Node.js frontend build). 2. Runs lutaml-jsonschema spa to produce an SPA directory. 3. Zips the SPA directory for convenient download.

trigger-deploy

On push to main only — dispatches a rebuild to the site repo.

Artifacts

Each CI run produces downloadable artifacts for every package:

Artifact Format Contents

{name}.lxr

Binary

LXR data package (resolved XSD model, for programmatic use)

{name}.html

Single HTML file

Standalone interactive XSD browser (works with file://)

{name}.zip

ZIP archive

LJR SPA directory (contains index.html + assets)

{name} (directory)

Artifact directory

Same LJR SPA files (unzipped)

Downloading built packages

Built packages are available as GitHub Actions artifacts:

  1. Go to Actions in the repository.

  2. Select the workflow run (green check = success).

  3. Scroll to the Artifacts section at the bottom.

  4. Click any artifact to download it:

    • 19136-gml-1.0.lxr — the data package

    • 19136-gml-1.0.html — standalone HTML browser (open in any browser)

    • 19115-4-json-1.0.0.zip — zipped LJR SPA directory

Note
Artifacts are retained for 90 days. Each push to main produces a fresh set. Artifacts from pull requests are available to collaborators.

Build configuration

The shared build template tools/lxr_build_template.yml provides:

metadata

ISO/TC 211 branding, license, authorship, tags, and links. Applied to all LXR packages.

schema_location_mappings

Rules for resolving schemaLocation URLs to local files. When pattern: true, the from field is a regex and to supports \1 backreferences. First match wins, so order matters. Key mappings:

  • schemas.isotc211.org/schemas/…​ URLs → strip the double /schemas/

  • schemas.isotc211.org/19110/{fcc,gfc}/…​ → insert the missing -/

  • schemas.isotc211.org/…​ → strip the domain prefix

  • schemas.opengis.net/gml/3.2.1/…​ → map to local 19136/-/gml/1.0/

  • Legacy standards.iso.org/…​ ISO GML URLs → same local copy

namespace_mappings

Common namespace prefixes (xs, gml, xlink).

appearance

Color scheme and typography for generated browsers.

Schemas copyright ISO/TC 211. Other files copyright Ribose Inc.

About

Official ISO/TC 211 XML Schemas (input to schemas.isotc211.org)

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages