Skip to content

Commit

Permalink
Deploying to gh-pages from @ xproc/3.0-steps@b7552ef 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Aug 15, 2024
1 parent a79d353 commit 6722bcc
Show file tree
Hide file tree
Showing 24 changed files with 261 additions and 288 deletions.
5 changes: 4 additions & 1 deletion master/head/etc/step-validation/library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@
<p:option name="report-format" select="'xvrl'" as="xs:string"/>
</p:declare-step>
<p:declare-step type="p:validate-with-dtd" xml:id="validate-with-dtd">
<p:input port="source" primary="true" content-types="xml html"/>
<p:input port="source" primary="true" content-types="xml html text"/>
<p:input port="doctype" content-types="text" sequence="true">
<p:empty/>
</p:input>
<p:output port="result" primary="true" content-types="xml"/>
<p:output port="report" sequence="true" content-types="xml json"/>
<p:option name="report-format" select="'xvrl'" as="xs:string"/>
Expand Down
139 changes: 66 additions & 73 deletions master/head/etc/step-validation/source.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ step for

<para>This specification describes the <code>p:validate-with-relax-ng</code>,
<code>p:validate-with-schematron</code>, <code>p:validate-with-xml-schema</code>,
<code>p:validate-with-nvdl</code>, <code>p:validate-with-json-schema</code>,
and <code>p:validate-with-dtd</code>
<code>p:validate-with-nvdl</code>, and <code>p:validate-with-json-schema</code>
steps. Each is independently optional. A machine-readable description of
these steps may be found in
<link xlink:href="steps.xpl">steps.xpl</link>.
Expand Down Expand Up @@ -130,9 +129,6 @@ validation steps and their semantics are
<literal>xvrl:map-to-severity</literal>, and <literal>xvrl:xpath-notation</literal>.</para>
</section>

<section xml:id="library">
<title>Step library</title>

<section xml:id="c.validate-with-nvdl">
<title>Validate with NVDL</title>

Expand Down Expand Up @@ -165,15 +161,20 @@ validation steps and their semantics are
<tag>p:validate-with-nvdl</tag> is
<literal>true</literal> and the input document is not valid.</error></para>

<para>The output from this step is a copy of the input. The output of this
step <rfc2119>may</rfc2119> include PSVI annotations.</para>
<para>The output from this step is a copy of the input. The output of this step <rfc2119>may</rfc2119> include PSVI
annotations.</para>

<note role="editorial" xml:id="ednote-nvdl">
<para>Should the step also provide the <option>dtd-attribute-values</option> and <option>dtd-id-idref-warnings</option>
options for Relax NG validations? Is there a way to instruct <link xlink:href="https://github.com/relaxng/jing-trang">Jing</link>
to use these options, maybe in NVDL extension attributes? Probably not in the foreseeable future.</para>
</note>

<simplesect>
<title>Document properties</title>
<para feature="validate-with-nvdl-preserves-all">All document properties
on the <port>source</port> port are preserved on the <port>result</port>
port. No document properties are
preserved on the <port>report</port> port.</para>
<para feature="validate-with-nvdl-preserves-all">All document properties on the <port>source</port> port are preserved
on the <port>result</port> port. No document properties on the <port>schemas</port> and <port>nvdl</port> ports
are preserved. No document properties are preserved on the <port>report</port> port.</para>
</simplesect>
</section>

Expand Down Expand Up @@ -235,7 +236,7 @@ augmented by application of the
<title>Document properties</title>
<para feature="validate-with-relax-ng-preserves-all">All document properties on
the <port>source</port> port are preserved on the <port>result</port> port.
No document
No document properties on the <port>schema</port> port are preserved. No document
properties are preserved on the <port>report</port> port.</para>
</simplesect>
</section>
Expand Down Expand Up @@ -313,7 +314,7 @@ input.</para>
<title>Document properties</title>
<para feature="validate-with-schematron-preserves-all">All document properties
on the <port>source</port> port are preserved on the <port>result</port> port.
No document
No document properties on the <port>schema</port> port are preserved. No document
properties are preserved on the <port>report</port> port.</para>
</simplesect>
</section>
Expand Down Expand Up @@ -438,8 +439,7 @@ by the XML Schema recommendation.</para>
<title>Document properties</title>
<para feature="validate-with-xml-schema-preserves-all">All document properties
on the <port>source</port> port are preserved on the <port>result</port> port.
No document
properties are preserved on the <port>report</port> port.</para>
No document properties on the <port>schemas</port> port are preserved.</para>
</simplesect>
</section>

Expand Down Expand Up @@ -476,24 +476,30 @@ properties are preserved on the <port>report</port> port.</para>
if the <option>assert-valid</option> option on <tag>p:validate-with-json-schema</tag>
is <literal>true</literal>
and the input document is not valid.</error></para>

<para>The output from this step is a copy of the input.</para>

<simplesect>
<title>Document properties</title>
<para feature="validate-with-json-preserves-all">All document properties on
the <port>source</port> port are preserved on the <port>result</port> port.
No document properties are preserved on the <port>report</port> port.</para>
<para feature="validate-with-json-preserves-all">All document properties on the <port>source</port> port are preserved
on the <port>result</port> port. No document properties on the <port>schemas</port> are preserved.
No document properties are preserved on the <port>report</port> port.</para>
</simplesect>

<simplesect>
<title>Errata, April 2024</title>
<para>Corrected an error in the sequence type for the <code>default-version</code> option
to allow it to be optional.</para>
</simplesect>
</section>

<section xml:id="c.validate-with-dtd">
<title>Validate with DTD</title>
<title>Validate with a DTD</title>
<para>The <tag>p:validate-with-dtd</tag> step validates XML with a DTD.</para>

<p:declare-step type="p:validate-with-dtd">
<p:input port="source" primary="true" content-types="xml html"/>
<p:input port="source" primary="true" content-types="xml html text"/>
<p:input port="doctype" content-types="text" sequence="true">
<p:empty/>
</p:input>
<p:output port="result" primary="true" content-types="xml"/>
<p:output port="report" sequence="true" content-types="xml json"/>
<p:option name="report-format" select="'xvrl'" as="xs:string"/>
Expand All @@ -503,51 +509,46 @@ properties are preserved on the <port>report</port> port.</para>

<para>DTD validation differs from the other XML validation technologies in that
it is applied during parsing. It isn’t possible to validate an XML data model with
a DTD. This step necessarily serializes and reparses.</para>

<para>The <tag>p:validate-with-dtd</tag> step serializes the document on the <port>source</port>
port and parses the serialization with a
validating XML parser. Any warning or error messages produced by the parser will
appear on the <port>report</port> port.</para>

<note>
<para>The serialization options must include at least the
<literal>doctype-system</literal> property (without a system identifier, the
document cannot be successfully parsed with a validating parser).</para>
</note>
a DTD. This step necessarily serializes the source document and then parses it
back into a new data model.
</para>

<para><error code="C0210">It is a <glossterm>dynamic error</glossterm>
if the <option>assert-valid</option> option on <tag>p:validate-with-dtd</tag>
is <literal>true</literal>
and the input document is not valid.</error></para>
<para>There are several possible approaches, with varying degrees of complexity.
The general model is that the contents of the <port>doctype</port> port and
the result of serializing the <port>source</port> are concatenated together.
</para>

<para>The output from this step is a copy of the input. If validation was
successful, the output may have been augmented by the DTD. (For example, default
attributes may have been added.)</para>
<itemizedlist>
<listitem>
<para>In the simple case, the <port>doctype</port> is empty and <port>source</port>
document is simply serialized. In order to have any chance of being DTD-valid,
the serialization properties must include at least a <code>doctype-system</code>
property.</para>
</listitem>
<listitem>
<para>If an internal subset is required, it is provided on the <port>doctype</port> port.
In this case, the <code>source</code> document must be serialized <emphasis>without</emphasis>
a <code>doctype-system</code> property; both the internal and external declarations must appear
on the <port>doctype</port> port.</para>
</listitem>
<listitem>
<para>Finally, if a text document is provided on the <port>source</port> port,
it is simply concatenated with the <port>doctype</port> port.</para>
</listitem>
</itemizedlist>

<simplesect>
<title>Using an internal subset</title>
<para>The resulting text is parsed using a validating XML parser.</para>

<para>To validate a document with an internal subset, construct a text document
that is a syntactically valid XML document with the internal
subset, use <tag>p:cast-content-type</tag> to create an XML document,
and then validate the resulting document with this step.</para>
</simplesect>
<para>Any warning or error messages produced by the parser will appear on the
<port>report</port> port. If validation succeeds, the validated document will appear on the
result port.</para>

<simplesect>
<title>Document properties</title>
<para feature="validate-with-dtd-preserves-all">All document properties
on the <port>source</port> port are preserved on the <port>result</port>
port. No document properties are
preserved on the <port>report</port> port.</para>
</simplesect>
</section>
</section>

<section xml:id="errors">
<title>Step Errors</title>

<para>These steps can raise
<para>This step can raise
<glossterm baseform="dynamic-error">dynamic errors</glossterm>.
</para>

Expand Down Expand Up @@ -603,6 +604,14 @@ how <glossterm role="unwrapped">implementation-defined</glossterm> features are

<?implementation-defined-features?>
</section>

<section xml:id="implementation-dependent">
<title>Implementation-dependent features</title>

<para>The following features are implementation-dependent:</para>

<?implementation-dependent-features?>
</section>
</appendix>

<appendix xml:id="references">
Expand Down Expand Up @@ -685,22 +694,6 @@ implementation has discretion in how it is performed.
Implementations are not required to document or explain
how <glossterm role="unwrapped">implementation-dependent</glossterm> features are performed.</para></glossdef></glossentry></glosslist></appendix>

<appendix xml:id="changelog">
<title>Change log</title>

<para>This appendix catalogs recent non-editorial changes.</para>

<orderedlist>
<listitem>
<para>Corrected an error in the sequence type for the <code>default-version</code> option
on <tag>p:validate-with-json-schema</tag> to allow it to be optional.</para>
</listitem>
<listitem>
<para>Added the <tag>p:validate-with-dtd</tag> step.</para>
</listitem>
</orderedlist>
</appendix>

<appendix version="5.0-extension w3c-xproc" xml:id="ancillary-files">
<title>Ancillary files</title>

Expand Down
17 changes: 7 additions & 10 deletions master/head/etc/step-validation/toc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@
xmlns:xlink="http://www.w3.org/1999/xlink">XProc 3.0: validation steps</title>
<tocentry role="section" xml:id="introduction">Introduction</tocentry>
<tocentry role="section" xml:id="validation-common">Common Options and Outputs</tocentry>
<tocdiv role="section" xml:id="library">
<title>Step library</title>
<tocentry role="section" xml:id="c.validate-with-nvdl">Validate with NVDL</tocentry>
<tocentry role="section" xml:id="c.validate-with-relax-ng">Validate with RELAX NG</tocentry>
<tocentry role="section" xml:id="c.validate-with-schematron">Validate with Schematron</tocentry>
<tocentry role="section" xml:id="c.validate-with-xml-schema">Validate with XML Schema</tocentry>
<tocentry role="section" xml:id="c.validate-with-json-schema">Validate with JSON schema</tocentry>
<tocentry role="section" xml:id="c.validate-with-dtd">Validate with DTD</tocentry>
</tocdiv>
<tocentry role="section" xml:id="c.validate-with-nvdl">Validate with NVDL</tocentry>
<tocentry role="section" xml:id="c.validate-with-relax-ng">Validate with RELAX NG</tocentry>
<tocentry role="section" xml:id="c.validate-with-schematron">Validate with Schematron</tocentry>
<tocentry role="section" xml:id="c.validate-with-xml-schema">Validate with XML Schema</tocentry>
<tocentry role="section" xml:id="c.validate-with-json-schema">Validate with JSON schema</tocentry>
<tocentry role="section" xml:id="c.validate-with-dtd">Validate with a DTD</tocentry>
<tocentry role="section" xml:id="errors">Step Errors</tocentry>
<tocdiv role="appendix" xml:id="conformance">
<title>Conformance</title>
<tocentry role="section" xml:id="implementation-defined">Implementation-defined features</tocentry>
<tocentry role="section" xml:id="implementation-dependent">Implementation-dependent features</tocentry>
</tocdiv>
<tocentry role="appendix" xml:id="references">References</tocentry>
<tocentry role="appendix" xml:id="glossary">Glossary</tocentry>
<tocentry role="appendix" xml:id="changelog">Change log</tocentry>
<tocentry role="appendix" xml:id="ancillary-files">Ancillary files</tocentry>
</toc>
2 changes: 1 addition & 1 deletion master/head/file/diff.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion master/head/file/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>XProc 3.0: file steps</title><meta charset="utf-8" /><meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" /><link class="removeOnSave" crossorigin="anonymous" href="https://www.w3.org" rel="preconnect" /><link as="script" class="removeOnSave" href="js/fixup.js" rel="preload" /><link as="style" class="removeOnSave" href="css/base.css" rel="preload" /><link as="image" class="removeOnSave" href="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" rel="preload" /><link rel="stylesheet" href="css/cg-draft.css" /><link rel="stylesheet" href="css/respec.css" /><link rel="alternate" title="XML" href="specification.xml" /><meta name="generator" content="DocBook XSL 2.0 Stylesheets V2.5.0" /><meta name="description" content="Abstract This specification describes the file related steps&#xA;for&#xA;XProc 3.0: An XML Pipeline Language." /><link href="css/default.css" rel="stylesheet" type="text/css" /><link href="css/db-prism.css" rel="stylesheet" type="text/css" /><link rel="stylesheet" type="text/css" href="css/base.css" /><link rel="stylesheet" type="text/css" href="css/xproc.css" /><link rel="stylesheet" type="text/css" href="css/print.css" media="print" /><script type="text/javascript" src="js/dbmodnizr.js"></script></head><body class="h-entry informative toc-sidebar"><div class="head" id="spec.head"><a class="logo" href="https://www.w3.org/"><img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72" /></a><h1 id="title" class="title p-name">XProc 3.0: file steps</h1><h2>Draft Community Group Report <time class="dt-published" datetime="2024-08-15">15 August 2024</time></h2><div class="editors-draft">Editor's Draft at <time class="dt-timestamp" datetime="20240815T16:04:40Z">16:04 UTC</time> (<a href="https://github.com/xproc//commit/806bec009e824c948fdca2a6adb3078361892f00">build 47</a>)</div><dl><dt>Latest editor’s draft:</dt><dd><a href="https://spec.xproc.org/master/head/file/">https://spec.xproc.org/master/head/file/</a></dd><dt>Editors:</dt><dd><span class="personname">Norman Walsh</span></dd><dd><span class="personname">Achim Berndzen</span></dd><dd><span class="personname">Gerrit Imsieke</span></dd><dd><span class="personname">Erik Siegel</span></dd><dt>Participate:</dt><dd><a href="http://github.com/xproc/3.0-steps">GitHub xproc/3.0-steps</a></dd><dd><a href="http://github.com/xproc/3.0-steps/issues">Report an issue</a></dd><dt>Changes:</dt><dd><a href="diff.html">Diff against current “status quo” draft</a></dd><dd><a href="http://github.com/xproc//commits/">Commits for this specification</a></dd></dl><p>This document is also available in these non-normative formats: <a href="specification.xml">XML</a> and HTML with automatic change markup courtesy of <a href="http://www.deltaxml.com/">DeltaXML</a>.</p><p class="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © <span class="years">2018, 2019, 2020</span> the Contributors to the <cite>XProc 3.0: file steps</cite> specification, published by the <a href="https://www.w3.org/community/xproc-next/">XProc Next Community Group</a> under the <a href="https://www.w3.org/community/about/agreements/cla/">W3C
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>XProc 3.0: file steps</title><meta charset="utf-8" /><meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" /><link class="removeOnSave" crossorigin="anonymous" href="https://www.w3.org" rel="preconnect" /><link as="script" class="removeOnSave" href="js/fixup.js" rel="preload" /><link as="style" class="removeOnSave" href="css/base.css" rel="preload" /><link as="image" class="removeOnSave" href="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" rel="preload" /><link rel="stylesheet" href="css/cg-draft.css" /><link rel="stylesheet" href="css/respec.css" /><link rel="alternate" title="XML" href="specification.xml" /><meta name="generator" content="DocBook XSL 2.0 Stylesheets V2.5.0" /><meta name="description" content="Abstract This specification describes the file related steps&#xA;for&#xA;XProc 3.0: An XML Pipeline Language." /><link href="css/default.css" rel="stylesheet" type="text/css" /><link href="css/db-prism.css" rel="stylesheet" type="text/css" /><link rel="stylesheet" type="text/css" href="css/base.css" /><link rel="stylesheet" type="text/css" href="css/xproc.css" /><link rel="stylesheet" type="text/css" href="css/print.css" media="print" /><script type="text/javascript" src="js/dbmodnizr.js"></script></head><body class="h-entry informative toc-sidebar"><div class="head" id="spec.head"><a class="logo" href="https://www.w3.org/"><img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72" /></a><h1 id="title" class="title p-name">XProc 3.0: file steps</h1><h2>Draft Community Group Report <time class="dt-published" datetime="2024-08-15">15 August 2024</time></h2><div class="editors-draft">Editor's Draft at <time class="dt-timestamp" datetime="20240815T16:04:59Z">16:04 UTC</time> (<a href="https://github.com/xproc//commit/b7552ef08d3390d0a8adf890b8c5b68d684ca76b">build 46</a>)</div><dl><dt>Latest editor’s draft:</dt><dd><a href="https://spec.xproc.org/master/head/file/">https://spec.xproc.org/master/head/file/</a></dd><dt>Editors:</dt><dd><span class="personname">Norman Walsh</span></dd><dd><span class="personname">Achim Berndzen</span></dd><dd><span class="personname">Gerrit Imsieke</span></dd><dd><span class="personname">Erik Siegel</span></dd><dt>Participate:</dt><dd><a href="http://github.com/xproc/3.0-steps">GitHub xproc/3.0-steps</a></dd><dd><a href="http://github.com/xproc/3.0-steps/issues">Report an issue</a></dd><dt>Changes:</dt><dd><a href="diff.html">Diff against current “status quo” draft</a></dd><dd><a href="http://github.com/xproc//commits/">Commits for this specification</a></dd></dl><p>This document is also available in these non-normative formats: <a href="specification.xml">XML</a> and HTML with automatic change markup courtesy of <a href="http://www.deltaxml.com/">DeltaXML</a>.</p><p class="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © <span class="years">2018, 2019, 2020</span> the Contributors to the <cite>XProc 3.0: file steps</cite> specification, published by the <a href="https://www.w3.org/community/xproc-next/">XProc Next Community Group</a> under the <a href="https://www.w3.org/community/about/agreements/cla/">W3C
Community Contributor License Agreement (CLA)</a>. A human-readable <a href="https://www.w3.org/community/about/agreements/cla-deed/">summary</a> is available.</p><hr title="Separator for header" /><section id="abstract" class="introductory"><h2>Abstract</h2>
<p>This specification describes the file related steps
for
Expand Down
2 changes: 1 addition & 1 deletion master/head/ixml/diff.html

Large diffs are not rendered by default.

Loading

0 comments on commit 6722bcc

Please sign in to comment.