XAODocs · v1.0.0-dev

Examples & Design · 1 min read

Reference Applications

Comparing Xao's built-in SQLite PDO catalog reference app with XaoDocs, the flat-file Markdown multi-theme CMS.

  • examples
  • reference-app
  • xaodocs
  • sqlite

Xao demonstrates two complementary applications of the XML Conglomeration + XSLT 3.0 pattern.

1. Built-In SQLite Catalog App (Xao/public/index.php)

Located directly inside the Xao repository (src/App/, stylesheets/, public/index.php), this app exercises:

  • CatalogRepository (PDO SQLite + DbToXml) with initializeSchema() and seedIfEmpty().

  • ReferenceApp stateless routing (GET /, GET /catalog, GET /catalog/{slug}, POST /catalog/{slug}/notes, GET /catalog.xml, GET /health).

  • SessionManager + CsrfGuard for authenticated note creation.

  • scripts/smoke-serve.sh testing isolate and worker modes with zero sidecar and allow_network = false.

2. XaoDocs (xao-example-apps/XaoDocs/)

Located in the companion ndx-au/xao-example-apps repository, XaoDocs is a flat-file Markdown CMS inspired by Sentinel's fcms plane — and serves the very documentation you are reading:

  • Reads content/*.md via ContentRepository and FrontMatterParser.

  • Converts Markdown to CommonMark XML 1.0 in-process via MarkdownBridge (phc_markdown_to_dom()).

  • Merges site metadata, theme registry, grouped navigation, prev/next neighbors, and the CommonMark document into one <xao-docs> DomDoc.

  • Renders five structurally distinct XSLT 3.0 themes (atlas, folio, console, reader, handbook) and exposes /xml/{slug} to inspect the shared XML tree.

cd ../xao-example-apps/XaoDocs
../PHC/target/release/phc serve phc.toml