Skip to content

Commit

Permalink
Deploying to gh-pages from @ 195b202 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Dec 24, 2024
1 parent 6234faa commit a098f6c
Show file tree
Hide file tree
Showing 10 changed files with 99 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.

56 changes: 56 additions & 0 deletions test-suite/tests/nw-filter-012.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="pass"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>p:filter 012 (NW)</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-12-24</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Proposed test.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:filter that returns a constant.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<p:output port="result"/>
<p:option name="select" as="xs:string?" select="'chapter'"/>
<p:variable name="eq" select="'='"/>

<p:identity>
<p:with-input>
<book>
<chapter>Hello, world.</chapter>
<appendix>Goodbye, world.</appendix>
</book>
</p:with-input>
</p:identity>

<p:filter select="count(/book/*[local-name(.) {$eq} '{$select}'])"/>

<p:cast-content-type content-type="application/xml"/>
</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="fn" uri="http://www.w3.org/2005/xpath-functions"/>
<s:pattern>
<s:rule context="/">
<s:assert test="fn:number">The result root is not a number.</s:assert>
<s:assert test="string(.) = '1'">The result is not 1.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
2 changes: 1 addition & 1 deletion tests/nw-filter-011.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>p:filter 011 (NW)</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-filter-010.html"><i class="fas fa-chevron-circle-left"></i></a>&nbsp;<a href="nw-http-request-117.html"><i class="fas fa-chevron-circle-right"></i></a>&nbsp;<a href="../"><i class="fa fa-chevron-circle-up"></i></a></nav><h1>p:filter 011 (NW)</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>p:filter 011 (NW)</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-filter-010.html"><i class="fas fa-chevron-circle-left"></i></a>&nbsp;<a href="nw-filter-012.html"><i class="fas fa-chevron-circle-right"></i></a>&nbsp;<a href="../"><i class="fa fa-chevron-circle-up"></i></a></nav><h1>p:filter 011 (NW)</h1><div class="description">
<p>Tests p:filter with dynamic options and a dynamic selection where the in-scope
binding is named ‘select’.</p>
</div><p class="expected">Test <a class="testuri" href="../test-suite/tests/nw-filter-011.xml">nw-filter-011.xml</a> is expected to pass.</p><div class="pipeline"><h2>The pipeline</h2><pre class="programlisting line-numbers language-markup" data-language="Markup"><code>
Expand Down
35 changes: 35 additions & 0 deletions tests/nw-filter-012.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!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>p:filter 012 (NW)</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-filter-011.html"><i class="fas fa-chevron-circle-left"></i></a>&nbsp;<a href="nw-http-request-117.html"><i class="fas fa-chevron-circle-right"></i></a>&nbsp;<a href="../"><i class="fa fa-chevron-circle-up"></i></a></nav><h1>p:filter 012 (NW)</h1><div class="description">
<p>Tests p:filter that returns a constant.</p>
</div><p class="expected">Test <a class="testuri" href="../test-suite/tests/nw-filter-012.xml">nw-filter-012.xml</a> is expected to pass.</p><div class="pipeline"><h2>The pipeline</h2><pre class="programlisting line-numbers language-markup" data-language="Markup"><code>
<span class="stag"><span class="sto">&lt;</span><span class="gi">p:declare-step</span> <span class="attr nsattr"><span class="aname">xmlns:p</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">http://www.w3.org/ns/xproc</span><span class="aq">"</span></span> <span class="attr nsattr"><span class="aname">xmlns:xs</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">http://www.w3.org/2001/XMLSchema</span><span class="aq">"</span></span> <span class="attr"><span class="aname">version</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">3.0</span><span class="aq">"</span></span><span class="eto">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">p:output</span> <span class="attr"><span class="aname">port</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">result</span><span class="aq">"</span></span><span class="eto">/&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">p:option</span> <span class="attr"><span class="aname">name</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">select</span><span class="aq">"</span></span> <span class="attr"><span class="aname">as</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">xs:string?</span><span class="aq">"</span></span> <span class="attr"><span class="aname">select</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">'chapter'</span><span class="aq">"</span></span><span class="eto">/&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">p:variable</span> <span class="attr"><span class="aname">name</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">eq</span><span class="aq">"</span></span> <span class="attr"><span class="aname">select</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">'='</span><span class="aq">"</span></span><span class="eto">/&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">p:identity</span><span class="eto">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">p:with-input</span><span class="eto">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">book</span><span class="eto">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">chapter</span><span class="eto">&gt;</span></span><span class="text">Hello, world.</span><span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">chapter</span><span class="etc">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">appendix</span><span class="eto">&gt;</span></span><span class="text">Goodbye, world.</span><span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">appendix</span><span class="etc">&gt;</span></span>
<span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">book</span><span class="etc">&gt;</span></span>
<span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">p:with-input</span><span class="etc">&gt;</span></span>
<span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">p:identity</span><span class="etc">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">p:filter</span> <span class="attr"><span class="aname">select</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">count(/book/*[local-name(.) {$eq} '{$select}'])</span><span class="aq">"</span></span><span class="eto">/&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">p:cast-content-type</span> <span class="attr"><span class="aname">content-type</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">application/xml</span><span class="aq">"</span></span><span class="eto">/&gt;</span></span>
<span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">p:declare-step</span><span class="etc">&gt;</span></span>
</code></pre></div><div class="schematron"><h2>Schematron validation</h2><pre class="programlisting line-numbers language-markup" data-language="Markup"><code>
<span class="stag"><span class="sto">&lt;</span><span class="gi">s:schema</span> <span class="attr nsattr"><span class="aname">xmlns</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">http://www.w3.org/1999/xhtml</span><span class="aq">"</span></span> <span class="attr nsattr"><span class="aname">xmlns:s</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">http://purl.oclc.org/dsdl/schematron</span><span class="aq">"</span></span> <span class="attr"><span class="aname">queryBinding</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">xslt2</span><span class="aq">"</span></span><span class="eto">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">s:ns</span> <span class="attr"><span class="aname">prefix</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">fn</span><span class="aq">"</span></span> <span class="attr"><span class="aname">uri</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">http://www.w3.org/2005/xpath-functions</span><span class="aq">"</span></span><span class="eto">/&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">s:pattern</span><span class="eto">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">s:rule</span> <span class="attr"><span class="aname">context</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">/</span><span class="aq">"</span></span><span class="eto">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">s:assert</span> <span class="attr"><span class="aname">test</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">fn:number</span><span class="aq">"</span></span><span class="eto">&gt;</span></span><span class="text">The result root is not a number.</span><span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">s:assert</span><span class="etc">&gt;</span></span>
<span class="stag"><span class="sto">&lt;</span><span class="gi">s:assert</span> <span class="attr"><span class="aname">test</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">string(.) = '1'</span><span class="aq">"</span></span><span class="eto">&gt;</span></span><span class="text">The result is not 1.</span><span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">s:assert</span><span class="etc">&gt;</span></span>
<span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">s:rule</span><span class="etc">&gt;</span></span>
<span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">s:pattern</span><span class="etc">&gt;</span></span>
<span class="etag"><span class="eto">&lt;/</span><span class="gi endgi">s:schema</span><span class="etc">&gt;</span></span>
</code></pre></div><dl class="revision-history"><h2>Revision history</h2>
<dt>24 Dec 2024,
<span class="name">Norm Tovey-Walsh</span>
</dt><dd><div class="description">
<p>Proposed test.</p>
</div></dd>
</dl><script src="../js/prism.js"></script></body></html>
2 changes: 1 addition & 1 deletion tests/nw-http-request-117.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>p:http-request 117 (NW)</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-filter-011.html"><i class="fas fa-chevron-circle-left"></i></a>&nbsp;<a href="nw-http-request-118.html"><i class="fas fa-chevron-circle-right"></i></a>&nbsp;<a href="../"><i class="fa fa-chevron-circle-up"></i></a></nav><h1>p:http-request 117 (NW)</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>p:http-request 117 (NW)</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-filter-012.html"><i class="fas fa-chevron-circle-left"></i></a>&nbsp;<a href="nw-http-request-118.html"><i class="fas fa-chevron-circle-right"></i></a>&nbsp;<a href="../"><i class="fa fa-chevron-circle-up"></i></a></nav><h1>p:http-request 117 (NW)</h1><div class="description">
<p>Its a dynamic error, if the boundary is invalid.</p>
</div><p class="expected">Test <a class="testuri" href="../test-suite/tests/nw-http-request-117.xml">nw-http-request-117.xml</a> is expected to fail with error code <code><a href="http://spec.xproc.org/master/head/steps/#err.C0203">err:XC0203</a></code>.</p><p class="features">It requires the following features: p:http-request.</p><div class="pipeline"><h2>The pipeline</h2><pre class="programlisting line-numbers language-markup" data-language="Markup"><code>
<span class="stag"><span class="sto">&lt;</span><span class="gi">p:declare-step</span> <span class="attr nsattr"><span class="aname">xmlns:c</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">http://www.w3.org/ns/xproc-step</span><span class="aq">"</span></span> <span class="attr nsattr"><span class="aname">xmlns:err</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">http://www.w3.org/ns/xproc-error</span><span class="aq">"</span></span> <span class="attr nsattr"><span class="aname">xmlns:p</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">http://www.w3.org/ns/xproc</span><span class="aq">"</span></span> <span class="attr nsattr"><span class="aname">xmlns:xs</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">http://www.w3.org/2001/XMLSchema</span><span class="aq">"</span></span> <span class="attr"><span class="aname">exclude-inline-prefixes</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">c xs</span><span class="aq">"</span></span> <span class="attr"><span class="aname">version</span><span class="aeq">=</span><span class="aq">"</span><span class="avalue">3.0</span><span class="aq">"</span></span><span class="eto">&gt;</span></span>
Expand Down

0 comments on commit a098f6c

Please sign in to comment.