<?xml version="1.0" encoding="UTF-8"?>
<xao-docs>
  <site name="XaoDocs" product="Xao" version="1.0.0-dev" homepage="https://xao.ndx.au" repo="https://github.com/ndx-au/Xao" examples-repo="https://github.com/ndx-au/xao-example-apps"/>
  <request slug="index" theme="atlas" path="/xml/index" xml-url="/xml/index"/>
  <themes>
    <theme id="atlas" name="Atlas" tagline="Three-column reference desk with persistent sidebar and sticky page outline" audience="API and framework developers browsing across sections" structure="3-column grid: left navigation sidebar, center article, right on-this-page outline" css="/assets/atlas.css" active="true"/>
    <theme id="folio" name="Folio" tagline="Editorial journal spread with XPath-grouped numbered chapters and collapsible library" audience="Architects and evaluators reading long-form conceptual chapters" structure="Editorial cover header, collapsible library drawer, and sibling-grouped numbered chapter sections" css="/assets/folio.css" active="false"/>
    <theme id="console" name="Console" tagline="Operations dashboard with telemetry strip and collapsible H2 module accordions" audience="SREs, operators, and runtime engineers scanning sections quickly" structure="Command header, telemetry bar, compact nav rail, and expandable &lt;details&gt; module accordions" css="/assets/console.css" active="false"/>
    <theme id="reader" name="Reader (A11y)" tagline="WCAG AAA single-column linear reader with upfront summary, numbered TOC, and zero JS" audience="Screen reader users, keyboard-only navigation, and low-vision / cognitive accessibility" structure="Multi-landmark skip links, upfront document summary, inline numbered TOC, figure-wrapped code blocks, directory after article, zero JS" css="/assets/reader.css" active="false"/>
    <theme id="handbook" name="Handbook" tagline="Single-column print-ready technical specification sheet with metadata ledger" audience="Technical reviewers, auditors, and print/PDF export workflows" structure="Single-column specification document with &lt;dl&gt; metadata ledger, numbered outline, and print stylesheet" css="/assets/handbook.css" active="false"/>
  </themes>
  <navigation>
    <section name="Start Here">
      <item slug="index" title="Xao Documentation" description="XML Application Objects for PHP 8 and PHC — zero-dependency XML content aggregation and XSLT 3.0 presentation." order="1" active="true"/>
      <item slug="getting-started" title="Getting Started" description="Set up PHC, autoload Xao with zero Composer packages, transform your first DomDoc with XSLT 3.0, and run phc serve." order="2" active="false"/>
    </section>
    <section name="Core Concepts">
      <item slug="architecture" title="Architecture &amp; XML Aggregation" description="How Xao builds a unified XML conglomeration document from databases, Markdown, and domain objects before delegating presentation to XSLT 3.0." order="3" active="false"/>
      <item slug="xslt-themes" title="XSLT 3.0 Themes vs CSS Skins" description="Why XSLT themes are structurally and semantically richer than CSS-only themes — including accessibility-first DOM transformations." order="4" active="false"/>
    </section>
    <section name="Framework Reference">
      <item slug="core-api" title="Core API Reference" description="Reference for Xao\\Runtime, Xao\\XaoRoot, Xao\\DomDoc, Xao\\DomFactory, Xao\\AppDoc, Xao\\Http\\Response, and Xao\\Exceptions." order="5" active="false"/>
      <item slug="database-aggregation" title="Database Aggregation (DbToXml)" description="Convert PDO queries, PDOStatement results, and PHP iterables directly into structured DomDoc XML fragments under PHC." order="6" active="false"/>
      <item slug="markdown-aggregation" title="Markdown Aggregation" description="Convert CommonMark and GFM into CommonMark XML 1.0 natively in PHC via comrak and graft it into Xao DomDoc trees." order="7" active="false"/>
      <item slug="xslt-drivers" title="XSLT 3.0 Drivers" description="Pluggable XsltDriverInterface strategies: PhcNativeXsltDriver (default in-process), SaxonHttpDriver (HTTP/distributed), and ClientSideXslDriver." order="8" active="false"/>
    </section>
    <section name="Operations &amp; Runtime">
      <item slug="phc-runtime" title="PHC Runtime &amp; Compatibility" description="Running Xao on PHC in isolate and worker modes, sandbox defaults, worker-safe autoloading, and P00–P05 compatibility findings." order="9" active="false"/>
      <item slug="security" title="Security Model" description="XXE rejection, realpath containment, strict slug allowlists, CSRF guards, gated debug output, and PHC sandbox enforcement." order="10" active="false"/>
    </section>
    <section name="Examples &amp; Design">
      <item slug="reference-apps" title="Reference Applications" description="Comparing Xao's built-in SQLite PDO catalog reference app with XaoDocs, the flat-file Markdown multi-theme CMS." order="11" active="false"/>
      <item slug="adr-0001-phc-xee-xslt" title="ADR 0001 &amp; Roadmap" description="Architecture Decision Record for pure-Rust xee-xslt in PHC plus the Xao v1.0.0 milestone and phase roadmap (M0–M3, P00–P06)." order="12" active="false"/>
    </section>
  </navigation>
  <page slug="index" title="Xao Documentation" description="XML Application Objects for PHP 8 and PHC — zero-dependency XML content aggregation and XSLT 3.0 presentation." section="Start Here" audience="All Xao developers and evaluators" status="stable" words="606" reading-minutes="3" source-file="content/index.md">
    <tags>
      <tag>overview</tag>
      <tag>xao</tag>
      <tag>phc</tag>
      <tag>xslt3</tag>
    </tags>
    <neighbors>
      <next slug="getting-started" title="Getting Started"/>
    </neighbors>
    <body>
      <document xmlns="http://commonmark.org/xml/1.0">
        <heading level="1">
          <text xml:space="preserve">Xao Documentation</text>
        </heading>
        <paragraph>
          <strong>
            <text xml:space="preserve">Xao</text>
          </strong>
          <text xml:space="preserve"> (pronounced </text>
          <emph>
            <text xml:space="preserve">"Zow"</text>
          </emph>
          <text xml:space="preserve">) is </text>
          <strong>
            <text xml:space="preserve">XML Application Objects</text>
          </strong>
          <text xml:space="preserve"> for PHP — a zero-dependency, XML/XSLT 3.0 web application framework for content-centric applications, engineered to run natively on the Rust-based </text>
          <strong>
            <text xml:space="preserve">PHC</text>
          </strong>
          <text xml:space="preserve"> application server (</text>
          <code xml:space="preserve">phc serve</code>
          <text xml:space="preserve">, isolate and worker modes).</text>
        </paragraph>
        <list type="bullet" tight="true">
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">Homepage:</text>
              </strong>
              <text xml:space="preserve"> </text>
              <link destination="https://xao.ndx.au" title="">
                <text xml:space="preserve">https://xao.ndx.au</text>
              </link>
            </paragraph>
          </item>
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">Framework Repository:</text>
              </strong>
              <text xml:space="preserve"> </text>
              <link destination="https://github.com/ndx-au/Xao" title="">
                <text xml:space="preserve">ndx-au/Xao</text>
              </link>
              <text xml:space="preserve"> (</text>
              <code xml:space="preserve">v1.0.0-dev</code>
              <text xml:space="preserve"> targeting </text>
              <code xml:space="preserve">v1.0.0</code>
              <text xml:space="preserve">)</text>
            </paragraph>
          </item>
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">Example Applications:</text>
              </strong>
              <text xml:space="preserve"> </text>
              <link destination="https://github.com/ndx-au/xao-example-apps" title="">
                <text xml:space="preserve">ndx-au/xao-example-apps</text>
              </link>
            </paragraph>
          </item>
        </list>
        <heading level="2">
          <text xml:space="preserve">XML Is Not Dead — And Neither Is XSLT</text>
        </heading>
        <paragraph>
          <text xml:space="preserve">Markdown has become the de facto authoring format for raw text on IT systems, while modern web stacks routinely spend megabytes of JavaScript, layers of JSON serializers, and fragile string-concatenation templates just to assemble structured content from a few sources and render HTML.</text>
        </paragraph>
        <paragraph>
          <text xml:space="preserve">Yet Markdown does not have the structural integrity or flexibility of XML in either of its two forms: </text>
          <strong>
            <text xml:space="preserve">Well-Formed</text>
          </strong>
          <text xml:space="preserve"> and </text>
          <strong>
            <text xml:space="preserve">Schema-Validated</text>
          </strong>
          <text xml:space="preserve">. For content-centric web applications — publishing platforms, documentation portals, catalogs, knowledge bases, and multi-channel feeds — </text>
          <strong>
            <text xml:space="preserve">XML conglomeration plus XSLT 3.0 remains one of the cleanest architectures ever designed</text>
          </strong>
          <text xml:space="preserve">.</text>
        </paragraph>
        <paragraph>
          <text xml:space="preserve">Xao embraces both worlds:</text>
        </paragraph>
        <list type="bullet" tight="true">
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">Markdown as a first-class input:</text>
              </strong>
              <text xml:space="preserve"> PHC's default build compiles </text>
              <code xml:space="preserve">markdown-xml</code>
              <text xml:space="preserve"> (</text>
              <code xml:space="preserve">comrak</code>
              <text xml:space="preserve">) natively in safe Rust, turning Markdown + GFM directly into CommonMark XML 1.0 (</text>
              <code xml:space="preserve">http://commonmark.org/xml/1.0</code>
              <text xml:space="preserve">) ready to graft into a Xao XML tree.</text>
            </paragraph>
          </item>
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">Declarative tree transformation:</text>
              </strong>
              <text xml:space="preserve"> XSLT 3.0 matches patterns against a real document tree rather than interleaving control flow and HTML strings.</text>
            </paragraph>
          </item>
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">True separation of concerns:</text>
              </strong>
              <text xml:space="preserve"> PHP queries databases, loads Markdown/XML fragments, enforces access control, and builds one inspectable domain XML document. XSLT 3.0 owns 100% of presentation.</text>
            </paragraph>
          </item>
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">Zero Composer dependencies:</text>
              </strong>
              <text xml:space="preserve"> Core framework classes under </text>
              <code xml:space="preserve">src/</code>
              <text xml:space="preserve"> use only PHP 8 standard library primitives implemented natively in PHC (</text>
              <code xml:space="preserve">DOMDocument</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">DOMXPath</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">PDO</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">curl_exec</code>
              <text xml:space="preserve">, sessions, </text>
              <code xml:space="preserve">XSLTProcessor</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">phc_markdown_to_dom()</code>
              <text xml:space="preserve">).</text>
            </paragraph>
          </item>
        </list>
        <heading level="2">
          <text xml:space="preserve">You Are Reading a Live Xao Demonstration</text>
        </heading>
        <paragraph>
          <text xml:space="preserve">This site (</text>
          <strong>
            <text xml:space="preserve">XaoDocs</text>
          </strong>
          <text xml:space="preserve">) is not a static site generator output. Every page you browse here is assembled on request from plain Markdown files in </text>
          <code xml:space="preserve">content/*.md</code>
          <text xml:space="preserve">, converted into CommonMark XML 1.0 in-process by PHC, merged with site navigation and theme metadata in </text>
          <code xml:space="preserve">Xao\DomDoc</code>
          <text xml:space="preserve">, and transformed in-process by PHC's native XSLT 3.0 engine (</text>
          <code xml:space="preserve">PhcNativeXsltDriver</code>
          <text xml:space="preserve">).</text>
        </paragraph>
        <paragraph>
          <text xml:space="preserve">Use the </text>
          <strong>
            <text xml:space="preserve">XSLT Theme</text>
          </strong>
          <text xml:space="preserve"> switcher at the top of the page to render the exact same XML tree through five structurally distinct XSLT 3.0 stylesheets — from a three-column reference desk (</text>
          <strong>
            <text xml:space="preserve">Atlas</text>
          </strong>
          <text xml:space="preserve">) to a collapsible operations view (</text>
          <strong>
            <text xml:space="preserve">Console</text>
          </strong>
          <text xml:space="preserve">) and a WCAG AAA linear screen-reader edition (</text>
          <strong>
            <text xml:space="preserve">Reader</text>
          </strong>
          <text xml:space="preserve">). Click </text>
          <strong>
            <text xml:space="preserve">Inspect XML</text>
          </strong>
          <text xml:space="preserve"> on any page to view the raw </text>
          <code xml:space="preserve">&lt;xao-docs&gt;</code>
          <text xml:space="preserve"> XML tree feeding all five themes.</text>
        </paragraph>
        <heading level="2">
          <text xml:space="preserve">Documentation Map</text>
        </heading>
        <table>
          <table_header>
            <table_cell>
              <text xml:space="preserve">Guide</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Topic</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Audience</text>
            </table_cell>
          </table_header>
          <table_row>
            <table_cell>
              <link destination="/doc/getting-started" title="">
                <text xml:space="preserve">Getting Started</text>
              </link>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Install, project layout, and first Xao app on PHC</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">New users</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/architecture" title="">
                <text xml:space="preserve">Architecture &amp; XML Aggregation</text>
              </link>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">The XML conglomeration pattern and separation of concerns</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Architects &amp; developers</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/xslt-themes" title="">
                <text xml:space="preserve">XSLT 3.0 Themes vs CSS</text>
              </link>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Structural and accessibility transformations in XaoDocs</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Theme authors &amp; designers</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/core-api" title="">
                <text xml:space="preserve">Core API Reference</text>
              </link>
            </table_cell>
            <table_cell>
              <code xml:space="preserve">DomDoc</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">DomFactory</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">AppDoc</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">Response</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">Exceptions</code>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Framework developers</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/database-aggregation" title="">
                <text xml:space="preserve">Database Aggregation (</text>
                <code xml:space="preserve">DbToXml</code>
                <text xml:space="preserve">)</text>
              </link>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">SQLite / PDO serialization into </text>
              <code xml:space="preserve">DomDoc</code>
              <text xml:space="preserve"> fragments</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Backend developers</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/markdown-aggregation" title="">
                <text xml:space="preserve">Markdown Aggregation</text>
              </link>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">CommonMark XML 1.0 via PHC </text>
              <code xml:space="preserve">markdown-xml</code>
              <text xml:space="preserve"> and </text>
              <code xml:space="preserve">P06</code>
              <text xml:space="preserve"> roadmap</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Content &amp; CMS authors</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/xslt-drivers" title="">
                <text xml:space="preserve">XSLT 3.0 Drivers</text>
              </link>
            </table_cell>
            <table_cell>
              <code xml:space="preserve">PhcNativeXsltDriver</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">SaxonHttpDriver</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">ClientSideXslDriver</code>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Platform engineers</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/phc-runtime" title="">
                <text xml:space="preserve">PHC Runtime &amp; Compatibility</text>
              </link>
            </table_cell>
            <table_cell>
              <code xml:space="preserve">phc.toml</code>
              <text xml:space="preserve">, isolate vs worker modes, </text>
              <code xml:space="preserve">xee-xpath</code>
              <text xml:space="preserve">/</text>
              <code xml:space="preserve">xot</code>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Operators &amp; contributors</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/security" title="">
                <text xml:space="preserve">Security Model</text>
              </link>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">XXE blocking, </text>
              <code xml:space="preserve">realpath()</code>
              <text xml:space="preserve"> containment, slugs, CSRF, sandbox</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Security reviewers</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/reference-apps" title="">
                <text xml:space="preserve">Reference Applications</text>
              </link>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Built-in SQLite catalog app + </text>
              <code xml:space="preserve">XaoDocs</code>
              <text xml:space="preserve"> flat-file CMS</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Evaluators</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <link destination="/doc/adr-0001-phc-xee-xslt" title="">
                <text xml:space="preserve">ADR 0001 &amp; Roadmap</text>
              </link>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Pure-Rust </text>
              <code xml:space="preserve">xee-xslt</code>
              <text xml:space="preserve"> extension design &amp; </text>
              <code xml:space="preserve">v1.0.0</code>
              <text xml:space="preserve"> milestones</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Contributors</text>
            </table_cell>
          </table_row>
        </table>
      </document>
    </body>
  </page>
</xao-docs>
