Skip to content

Commit

Permalink
Deploying to gh-pages from @ 5b274cc 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Mar 28, 2024
1 parent 61280a3 commit fcaf7a8
Show file tree
Hide file tree
Showing 20 changed files with 601 additions and 8 deletions.
2 changes: 1 addition & 1 deletion alphabetical.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion date.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion element.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion errors.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion expected.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion implementation.html

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions test-suite/tests/nw-compare-001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="pass">
<t:info>
<t:title>p:compare 001 (NW)</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-03-26</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Created test for p:compare.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Check if p:compare succeeds when the documents are identical.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://test" version="3.0">
<p:output port="result">
<p:pipe step="compare" port="result"/>
</p:output>

<p:identity name="doc-a">
<p:with-input>
<doc>
<element name="first"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:identity name="doc-b">
<p:with-input>
<doc>
<element name="first"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:compare name="compare">
<p:with-input port="source" pipe="@doc-a"/>
<p:with-input port="alternate" pipe="@doc-b"/>
</p:compare>

</p:declare-step>
</t:pipeline>
<t:schematron>
<s:schema queryBinding="xslt2"
xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns="http://www.w3.org/1999/xhtml">
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/">
<s:assert test="c:result">Root element is not 'c:result'.</s:assert>
<s:assert test="string(c:result)='true'">Result is not ‘true’.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
66 changes: 66 additions & 0 deletions test-suite/tests/nw-compare-002.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="pass">
<t:info>
<t:title>p:compare 002 (NW)</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-03-26</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Created test for p:compare.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Check if p:compare fails when the documents are different.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://test" version="3.0">
<p:output port="result">
<p:pipe step="compare" port="result"/>
</p:output>

<p:identity name="doc-a">
<p:with-input>
<doc>
<element name="first"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:identity name="doc-b">
<p:with-input>
<doc>
<element name="second"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:compare name="compare">
<p:with-input port="source" pipe="@doc-a"/>
<p:with-input port="alternate" pipe="@doc-b"/>
</p:compare>

</p:declare-step>
</t:pipeline>
<t:schematron>
<s:schema queryBinding="xslt2"
xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns="http://www.w3.org/1999/xhtml">
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/">
<s:assert test="c:result">Root element is not 'c:result'.</s:assert>
<s:assert test="string(c:result)='false'">Result is not ‘false’.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
66 changes: 66 additions & 0 deletions test-suite/tests/nw-compare-003.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="pass">
<t:info>
<t:title>p:compare 003 (NW)</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-03-26</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Created test for p:compare.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Check if p:compare succeeds when the documents are identical if fail-if-not-equal is true.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://test" version="3.0">
<p:output port="result">
<p:pipe step="compare" port="result"/>
</p:output>

<p:identity name="doc-a">
<p:with-input>
<doc>
<element name="first"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:identity name="doc-b">
<p:with-input>
<doc>
<element name="first"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:compare name="compare" fail-if-not-equal="true">
<p:with-input port="source" pipe="@doc-a"/>
<p:with-input port="alternate" pipe="@doc-b"/>
</p:compare>

</p:declare-step>
</t:pipeline>
<t:schematron>
<s:schema queryBinding="xslt2"
xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns="http://www.w3.org/1999/xhtml">
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/">
<s:assert test="c:result">Root element is not 'c:result'.</s:assert>
<s:assert test="string(c:result)='true'">Result is not ‘true’.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
54 changes: 54 additions & 0 deletions test-suite/tests/nw-compare-004.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XC0019">
<t:info>
<t:title>p:compare 004 (NW)</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-03-26</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Created test for p:compare.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Check if p:compare raises an error when the documents are different and
fail-if-not-equal is true.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://test" version="3.0">
<p:output port="result">
<p:pipe step="compare" port="result"/>
</p:output>

<p:identity name="doc-a">
<p:with-input>
<doc>
<element name="first"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:identity name="doc-b">
<p:with-input>
<doc>
<element name="second"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:compare name="compare" fail-if-not-equal="true">
<p:with-input port="source" pipe="@doc-a"/>
<p:with-input port="alternate" pipe="@doc-b"/>
</p:compare>

</p:declare-step>
</t:pipeline>
</t:test>
53 changes: 53 additions & 0 deletions test-suite/tests/nw-compare-005.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XC0076">
<t:info>
<t:title>p:compare 005 (NW)</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-03-26</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Created test for p:compare.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Check if p:compare raises an error when the method is unsupported.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://test" version="3.0">
<p:output port="result">
<p:pipe step="compare" port="result"/>
</p:output>

<p:identity name="doc-a">
<p:with-input>
<doc>
<element name="first"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:identity name="doc-b">
<p:with-input>
<doc>
<element name="second"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:compare name="compare" method="an-unsupported-value">
<p:with-input port="source" pipe="@doc-a"/>
<p:with-input port="alternate" pipe="@doc-b"/>
</p:compare>

</p:declare-step>
</t:pipeline>
</t:test>
50 changes: 50 additions & 0 deletions test-suite/tests/nw-compare-006.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XC0077">
<t:info>
<t:title>p:compare 006 (NW)</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-03-26</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Created test for p:compare.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Check if p:compare raises an error when the documents cannot be compared.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://test" version="3.0">
<p:output port="result">
<p:pipe step="compare" port="result"/>
</p:output>

<p:identity name="doc-a">
<p:with-input>
<p:inline content-type="text/plain">Not XML.</p:inline>
</p:with-input>
</p:identity>

<p:identity name="doc-b">
<p:with-input>
<doc>
<element name="second"/>
<element/>
</doc>
</p:with-input>
</p:identity>

<p:compare name="compare">
<p:with-input port="source" pipe="@doc-a"/>
<p:with-input port="alternate" pipe="@doc-b"/>
</p:compare>

</p:declare-step>
</t:pipeline>
</t:test>
2 changes: 1 addition & 1 deletion tests/nw-collection-003.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE HTML><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><title>Collection 003</title><link href="../css/prism.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/base.css"><link href="../css/all.css" rel="stylesheet" type="text/css"><link href="../css/testsuite.css" rel="stylesheet" type="text/css"><script type="text/javascript" src="../js/dbmodnizr.js"></script></head><body><nav><a href="nw-collection-002.html"><i class="fas fa-chevron-circle-left"></i></a>&nbsp;<a href="nw-dup-input-port-001.html"><i class="fas fa-chevron-circle-right"></i></a>&nbsp;<a href="../"><i class="fa fa-chevron-circle-up"></i></a></nav><h1>Collection 003</h1><div class="description">
<!DOCTYPE HTML><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><title>Collection 003</title><link href="../css/prism.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/base.css"><link href="../css/all.css" rel="stylesheet" type="text/css"><link href="../css/testsuite.css" rel="stylesheet" type="text/css"><script type="text/javascript" src="../js/dbmodnizr.js"></script></head><body><nav><a href="nw-collection-002.html"><i class="fas fa-chevron-circle-left"></i></a>&nbsp;<a href="nw-compare-001.html"><i class="fas fa-chevron-circle-right"></i></a>&nbsp;<a href="../"><i class="fa fa-chevron-circle-up"></i></a></nav><h1>Collection 003</h1><div class="description">
<p>Tests that <code><a href="http://spec.xproc.org/master/head/xproc/#err.D0001">err:XD0001</a></code> is raised if a sequence of documents is the context
for an XPath expression on a <tag>p:with-option</tag>.</p>
</div><p class="expected">Test <a class="testuri" href="../test-suite/tests/nw-collection-003.xml">nw-collection-003.xml</a> is expected to fail with error code <code><a href="http://spec.xproc.org/master/head/xproc/#err.D0001">err:XD0001</a></code>.</p><div class="pipeline"><h2>The pipeline</h2><pre class="programlisting line-numbers language-markup" data-language="Markup"><code>
Expand Down
Loading

0 comments on commit fcaf7a8

Please sign in to comment.