protoml-parser
Version:
ProtoML is a lightweight, declarative markup language designed for writing and structuring meeting protocols, notes and task lists in a human-readable and machine-parseable format.
49 lines (48 loc) • 3.4 kB
HTML
<html>
<head>
<meta charset="UTF-8">
<title>Validate - ProtoML 1.4.2+build67</title>
<link rel="stylesheet" href="help.css">
</head>
<body>
<nav class="topnav">
<a href="../toc.html">Contents</a>
<span class="version">ProtoML 1.4.2+build67</span>
</nav>
<main class="page">
<h1>Validate</h1>
<div class="topic-meta">Topic: <code>validate</code></div>
<h2>Explanation</h2>
<p><code>protoparser validate <pml_file></code> validates a ProtoML document without rendering it.</p>
<p>The command checks for missing files, unresolved references in strict mode, duplicate IDs in common blocks, invalid imports or macro files, and trust issues for used macros or imported ProtoML files. With <code>-v</code>, it also prints a compact overview of detected metadata, blocks, imports, tag imports, and registered macros. <code>-vv</code> adds deeper detail lists, and <code>-vvv</code> shows the most verbose diagnostic output for the command.</p>
<p>Trust behavior:</p>
<ul>
<li><code>-trust=warn</code> keeps rendering-style behavior and reports untrusted macros as warnings</li>
<li><code>-trust=strict</code> upgrades trust violations to errors</li>
<li><code>-trustRegistry=...</code> adds extra author trust lookup sources for validation</li>
<li><code>-trustRegistry=...</code> is repeatable, so you can combine multiple author or mixed registries</li>
<li>package-only registries are allowed during validation; they simply contribute no author trust entries if <code>authors</code> is missing</li>
<li>author-only registries are allowed during validation even when they publish no macro packages</li>
<li>in <code>validate</code>, local registry directories and registry JSON files are used directly</li>
<li>remote registry URLs are not fetched during synchronous validation and are reported only by the dedicated trust/verify workflow</li>
<li>if the target file sits inside a project with <code>protoml.macros.json</code>, validation auto-discovers the nearest configured project registries even without <code>-trustRegistry=...</code></li>
</ul>
<p>Practical registry split:</p>
<ul>
<li>if macro packages come from one registry and trusted authors from another, pass both with separate <code>-trustRegistry=...</code> flags when they are not already listed in the nearest project config</li>
<li>project registries stored in the nearest <code>protoml.macros.json</code> are included automatically by the trust analyzer unless that behavior is explicitly disabled in code</li>
<li>validation merges all configured trust sources for author lookup and then checks used macros plus imported <code>.pml</code> files against that combined view</li>
</ul>
<p>Unsigned but otherwise harmless macros are treated as <code>unknown</code>, not as immediate failures.</p>
<p>It is recommended to wrap the file path in double quotes.</p>
<h2>Examples</h2>
<pre><code>protoparser validate "Meeting.pml"
protoparser -v validate "Meeting.pml"
protoparser validate "./project/Meeting.pml" -trust=strict
protoparser validate "Meeting.pml" -trust=strict -trustRegistry="./my-registry"
protoparser validate "Meeting.pml" -trust=strict -trustRegistry="./authors-registry" -trustRegistry="./macro-registry"
protoparser tags "_tags.pml" validate</code></pre>
</main>
</body>
</html>