Skip to content

Commit

Permalink
Deploying to gh-pages from @ e862929 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Dec 6, 2024
1 parent 6832cc1 commit e78e6ac
Show file tree
Hide file tree
Showing 48 changed files with 1,388 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.

19 changes: 19 additions & 0 deletions test-suite/documents/xquery-library.xq
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
xquery version "3.1";
module namespace test="http://xproc.org/ns/testsuite/3.0/function-test";

declare function test:function() as item(){
element{"function-result"}{}
};

declare function test:function1() as item(){
element{"function-result"}{}
};
declare function test:function2($par as xs:string) as item(){
element{"function-result"}{$par}
};
declare %private function test:private-function() as item(){
element{"function-result"}{}
};
declare function test:function3() as item(){
element{"namespaced-function"}{}
};
4 changes: 4 additions & 0 deletions test-suite/documents/xquery-library1.xq
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
xquery version "3.1";
module namespace test="http://xproc.org/ns/testsuite/3.0/function-test"
(:intentionally invalid; missing semicolon:)
declare namespace test1="http://xproc.org/ns/testsuite/3.0/function-test1";
10 changes: 10 additions & 0 deletions test-suite/documents/xquery-library2.xq
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
xquery version "3.1";
module namespace test="http://xproc.org/ns/testsuite/3.0/function-test";

declare function test:function() as item(){
element{"function-result"}{}
};

declare function test:function1() as item(){
element{"function-result1"}{}
};
6 changes: 6 additions & 0 deletions test-suite/documents/xquery-library3.xq
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
xquery version "3.1";
module namespace test="http://xproc.org/ns/testsuite/3.0/function-test";

declare function test:function1($par as xs:string) as item(){
element{"function-result"}{$par}
};
48 changes: 48 additions & 0 deletions test-suite/tests/nw-import-functions-001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="pass" features="xquery-function-import"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>nw-import-functions-001</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-12-06</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests for p:import-functions.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:import-functions: tests importing the same library twice.</p>
</t:description>
<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://xproc.org/ns/testsuite/3.0/function-test">
<p:import-functions href="../documents/xquery-library.xq" content-type="application/xquery" />
<p:import-functions href="../documents/xquery-library.xq" content-type="application/xquery" />
<p:output port="result" />

<p:identity>
<p:with-input>
<result>{test:function1()}</result>
</p:with-input>
</p:identity>
</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:pattern>
<s:rule context="/">
<s:assert test="result">The document root is not result.</s:assert>
<s:assert test="result/function-result">Result does not have a child "function-result".</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
58 changes: 58 additions & 0 deletions test-suite/tests/nw-import-functions-002.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="pass" features="xquery-function-import"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>nw-import-functions-002</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-12-06</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests for p:import-functions.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:import-functions: tests limiting XQuery imports by namespace.</p>
</t:description>
<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://xproc.org/ns/testsuite/3.0/function-test">
<p:import-functions href="../documents/xquery-library.xq"
namespace="http://example.com/1 http://example.com/1"
content-type="application/xquery" />
<p:output port="result" />

<p:try>
<p:identity>
<p:with-input>
<result>{test:function1()}</result>
</p:with-input>
</p:identity>
<p:catch xmlns:err="http://www.w3.org/ns/xproc-error"
code="err:XS0107">
<p:identity>
<p:with-input>
<correct/>
</p:with-input>
</p:identity>
</p:catch>
</p:try>
</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:pattern>
<s:rule context="/">
<s:assert test="correct">The document root is not correct.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
66 changes: 66 additions & 0 deletions test-suite/tests/nw-import-functions-003.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="pass" features="xquery-function-import"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>nw-import-functions-003</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-12-06</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests for p:import-functions.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:import-functions: tests limiting XSLT imports by namespace.</p>
</t:description>
<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://xproc.org/ns/testsuite/3.0/function-test"
xmlns:test1="http://xproc.org/ns/testsuite/3.0/function-test1">
<p:import-functions href="../documents/xslt-functions.xsl"
namespace="http://xproc.org/ns/testsuite/3.0/function-test1"
content-type="application/xslt" />
<p:output port="result" />

<p:try>
<p:identity>
<p:with-input>
<result>{test:function1()}</result>
</p:with-input>
</p:identity>
<p:catch xmlns:err="http://www.w3.org/ns/xproc-error"
code="err:XS0107">
<p:identity>
<p:with-input>
<correct/>
</p:with-input>
</p:identity>
</p:catch>
</p:try>

<p:insert position="last-child">
<p:with-input port="insertion">
<result>{test1:function1()}</result>
</p:with-input>
</p:insert>
</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:pattern>
<s:rule context="/">
<s:assert test="correct">The document root is not correct.</s:assert>
<s:assert test="correct/result/namespaced-function">Result doesn’t include test1:function1 output</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
47 changes: 47 additions & 0 deletions test-suite/tests/nw-import-functions-015.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="pass" features="xquery-function-import"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>nw-import-functions-015</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-12-05</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests for p:import-function; adapted from ab-import-functions-015 but
uses an XQuery library module.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:import-functions from an XQuery library module.</p>
</t:description>
<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://xproc.org/ns/testsuite/3.0/function-test">
<p:import-functions href="../documents/xquery-library.xq" content-type="application/xquery" />
<p:output port="result"/>
<p:identity>
<p:with-input>
<result>{test:function1()}</result>
</p:with-input>
</p:identity>
</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:pattern>
<s:rule context="/">
<s:assert test="result">The document root is not result.</s:assert>
<s:assert test="result/function-result">Result does not have a child "function-result".</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
48 changes: 48 additions & 0 deletions test-suite/tests/nw-import-functions-016.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="pass" features="xquery-function-import"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>nw-import-functions-016</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-12-05</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests for p:import-function; adapted from ab-import-functions-016 but
uses an XQuery library module.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:import-functions: function with par</p>
</t:description>
<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://xproc.org/ns/testsuite/3.0/function-test">
<p:import-functions href="../documents/xquery-library.xq" content-type="application/xquery"/>
<p:output port="result"/>
<p:identity>
<p:with-input>
<result>{test:function2("test")}</result>
</p:with-input>
</p:identity>
</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:pattern>
<s:rule context="/">
<s:assert test="result">The document root is not result.</s:assert>
<s:assert test="result/function-result">Result does not have a child "function-result".</s:assert>
<s:assert test="result/function-result/text()='test'">There is not text child 'test' in "function-result".</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
51 changes: 51 additions & 0 deletions test-suite/tests/nw-import-functions-017.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="pass" features="xquery-function-import"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>nw-import-functions-017</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-12-05</t:date>
<t:author>
<t:name>Norm Tovey-Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests for p:import-function; adapted from ab-import-functions-017 but
uses an XQuery library module.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:import-functions: Test function is visible in inner steps.</p>
</t:description>
<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://xproc.org/ns/testsuite/3.0/function-test">
<p:import-functions href="../documents/xquery-library.xq" content-type="application/xquery" />
<p:output port="result" />
<p:declare-step type="test:step">
<p:output port="result"/>
<p:identity>
<p:with-input>
<result>{test:function1()}</result>
</p:with-input>
</p:identity>
</p:declare-step>
<test:step />
</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:pattern>
<s:rule context="/">
<s:assert test="result">The document root is not result.</s:assert>
<s:assert test="result/function-result">Result does not have a child "function-result".</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
Loading

0 comments on commit e78e6ac

Please sign in to comment.