<?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="adr-0001-phc-xee-xslt" theme="atlas" path="/xml/adr-0001-phc-xee-xslt" xml-url="/xml/adr-0001-phc-xee-xslt"/>
  <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="false"/>
      <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="true"/>
    </section>
  </navigation>
  <page 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)." section="Examples &amp; Design" audience="Contributors and maintainers" status="stable" words="249" reading-minutes="2" source-file="content/adr-0001-phc-xee-xslt.md">
    <tags>
      <tag>adr</tag>
      <tag>roadmap</tag>
      <tag>xee-xslt</tag>
      <tag>milestones</tag>
    </tags>
    <neighbors>
      <prev slug="reference-apps" title="Reference Applications"/>
    </neighbors>
    <body>
      <document xmlns="http://commonmark.org/xml/1.0">
        <heading level="1">
          <text xml:space="preserve">ADR 0001 &amp; Roadmap</text>
        </heading>
        <heading level="2">
          <text xml:space="preserve">ADR 0001: Pure-Rust </text>
          <code xml:space="preserve">xee-xslt</code>
          <text xml:space="preserve"> Extension for PHC (</text>
          <code xml:space="preserve">Implemented</code>
          <text xml:space="preserve">)</text>
        </heading>
        <list type="bullet" tight="true">
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">Decision:</text>
              </strong>
              <text xml:space="preserve"> Incorporate safe, pure-Rust </text>
              <code xml:space="preserve">xee-xslt</code>
              <text xml:space="preserve"> (</text>
              <code xml:space="preserve">#![forbid(unsafe_code)]</code>
              <text xml:space="preserve">) into PHC's </text>
              <code xml:space="preserve">phc-ext</code>
              <text xml:space="preserve"> crate as </text>
              <code xml:space="preserve">XSLTProcessor</code>
              <text xml:space="preserve"> (now enabled in PHC's default build alongside </text>
              <code xml:space="preserve">markdown-xml</code>
              <text xml:space="preserve"> and </text>
              <code xml:space="preserve">xee-xpath</code>
              <text xml:space="preserve">/</text>
              <code xml:space="preserve">xot</code>
              <text xml:space="preserve">) and wrap it in </text>
              <code xml:space="preserve">Xao\Xslt\PhcNativeXsltDriver</code>
              <text xml:space="preserve">.</text>
            </paragraph>
          </item>
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">Why not C </text>
                <code xml:space="preserve">libxslt</code>
                <text xml:space="preserve">?</text>
              </strong>
              <text xml:space="preserve"> </text>
              <code xml:space="preserve">libxslt</code>
              <text xml:space="preserve"> only supports XSLT 1.0 and violates PHC's </text>
              <code xml:space="preserve">#![forbid(unsafe_code)]</code>
              <text xml:space="preserve"> safety guarantee.</text>
            </paragraph>
          </item>
          <item>
            <paragraph>
              <strong>
                <text xml:space="preserve">Result:</text>
              </strong>
              <text xml:space="preserve"> Xao executes XSLT 3.0 stylesheets in-process with zero external sidecar, zero C dependencies, and </text>
              <code xml:space="preserve">allow_network = false</code>
              <text xml:space="preserve"> by default, while preserving </text>
              <code xml:space="preserve">SaxonHttpDriver</code>
              <text xml:space="preserve"> for distributed/HTTP XSLT strategies.</text>
            </paragraph>
          </item>
        </list>
        <heading level="2">
          <text xml:space="preserve">Milestone Roadmap (</text>
          <code xml:space="preserve">M0</code>
          <text xml:space="preserve">–</text>
          <code xml:space="preserve">M3</code>
          <text xml:space="preserve">, Targeting </text>
          <code xml:space="preserve">v1.0.0</code>
          <text xml:space="preserve">)</text>
        </heading>
        <table>
          <table_header>
            <table_cell>
              <text xml:space="preserve">Milestone</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Phases</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Scope</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Status</text>
            </table_cell>
          </table_header>
          <table_row>
            <table_cell>
              <strong>
                <text xml:space="preserve">M0 — PHC-Native Core Foundation</text>
              </strong>
            </table_cell>
            <table_cell>
              <code xml:space="preserve">P00</code>
              <text xml:space="preserve">–</text>
              <code xml:space="preserve">P01</code>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Purge PHP 4 </text>
              <code xml:space="preserve">domxml</code>
              <text xml:space="preserve">/PEAR </text>
              <code xml:space="preserve">DB</code>
              <text xml:space="preserve"> dead code, PSR-4 autoloader, </text>
              <code xml:space="preserve">phc.toml</code>
              <text xml:space="preserve">, </text>
              <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">PDO</code>
              <text xml:space="preserve"> </text>
              <code xml:space="preserve">DbToXml</code>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Completed</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <strong>
                <text xml:space="preserve">M1 — XSLT 3.0 &amp; App Framework</text>
              </strong>
            </table_cell>
            <table_cell>
              <code xml:space="preserve">P02</code>
              <text xml:space="preserve">–</text>
              <code xml:space="preserve">P03</code>
            </table_cell>
            <table_cell>
              <code xml:space="preserve">XsltDriverInterface</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">SaxonHttpDriver</code>
              <text xml:space="preserve"> + sidecar, </text>
              <code xml:space="preserve">ClientSideXslDriver</code>
              <text xml:space="preserve">, </text>
              <code xml:space="preserve">AppDoc</code>
              <text xml:space="preserve">, SQLite </text>
              <code xml:space="preserve">ReferenceApp</code>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Completed</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <strong>
                <text xml:space="preserve">M2 — PHC Co-Evolution &amp; CI</text>
              </strong>
            </table_cell>
            <table_cell>
              <code xml:space="preserve">P04</code>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Compatibility report, ADR 0001 proposal, GitHub Actions CI (</text>
              <code xml:space="preserve">ubuntu-latest</code>
              <text xml:space="preserve">)</text>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">Completed</text>
            </table_cell>
          </table_row>
          <table_row>
            <table_cell>
              <strong>
                <text xml:space="preserve">M3 — Native XSLT 3.0 &amp; Markdown</text>
              </strong>
            </table_cell>
            <table_cell>
              <code xml:space="preserve">P05</code>
              <text xml:space="preserve">–</text>
              <code xml:space="preserve">P06</code>
            </table_cell>
            <table_cell>
              <code xml:space="preserve">P05</code>
              <text xml:space="preserve">: </text>
              <code xml:space="preserve">PhcNativeXsltDriver</code>
              <text xml:space="preserve"> + </text>
              <code xml:space="preserve">xee-xpath</code>
              <text xml:space="preserve">/</text>
              <code xml:space="preserve">xot</code>
              <text xml:space="preserve"> DOM upgrade </text>
              <emph>
                <text xml:space="preserve">(Completed)</text>
              </emph>
              <text xml:space="preserve">; </text>
              <code xml:space="preserve">P06</code>
              <text xml:space="preserve">: </text>
              <code xml:space="preserve">Xao\MarkdownToXml</code>
              <text xml:space="preserve"> + reference app integration toward </text>
              <code xml:space="preserve">v1.0.0</code>
              <text xml:space="preserve"> </text>
              <emph>
                <text xml:space="preserve">(Planned)</text>
              </emph>
            </table_cell>
            <table_cell>
              <text xml:space="preserve">In progress</text>
            </table_cell>
          </table_row>
        </table>
        <heading level="2">
          <text xml:space="preserve">Audit Traceability</text>
        </heading>
        <paragraph>
          <text xml:space="preserve">The overhaul direction originated in the technical viability audit recorded at </text>
          <code xml:space="preserve">Xao</code>
          <text xml:space="preserve"> commit </text>
          <code xml:space="preserve">7e6daa7</code>
          <text xml:space="preserve"> (verdict: </text>
          <emph>
            <text xml:space="preserve">Pivot / Narrow Scope</text>
          </emph>
          <text xml:space="preserve">), narrowing Xao into a lean, zero-dependency XML/XSLT 3.0 reference framework for PHC.</text>
        </paragraph>
      </document>
    </body>
  </page>
</xao-docs>
