-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 2b723d5 🚀
- Loading branch information
1 parent
25566ba
commit 5b442a7
Showing
34 changed files
with
746 additions
and
18 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<t:test expected="pass" | ||
xmlns:t="http://xproc.org/ns/testsuite/3.0"> | ||
<t:info> | ||
<t:title>AB choose-073</t:title> | ||
<t:revision-history> | ||
<t:revision> | ||
<t:date>2023-12-10</t:date> | ||
<t:author> | ||
<t:name>Achim Berndzen</t:name> | ||
</t:author> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>Additional tests for p:choose</p> | ||
</t:description> | ||
</t:revision> | ||
</t:revision-history> | ||
</t:info> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>Tests p:choose inside p:if with test="false()"</p> | ||
</t:description> | ||
<t:pipeline> | ||
<p:declare-step name="pipeline" | ||
version="3.0" | ||
xmlns:p="http://www.w3.org/ns/xproc"> | ||
<p:output port="result"/> | ||
<p:identity> | ||
<p:with-input> | ||
<doc /> | ||
</p:with-input> | ||
</p:identity> | ||
|
||
<p:if test="false()"> | ||
<p:choose> | ||
<p:when test="/doc"> | ||
<p:identity> | ||
<p:with-input><correct /></p:with-input> | ||
</p:identity> | ||
</p:when> | ||
<p:otherwise> | ||
<p:identity> | ||
<p:with-input><wrong /></p:with-input> | ||
</p:identity> | ||
</p:otherwise> | ||
</p:choose> | ||
</p:if> | ||
</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="doc">The root element is not 'doc'.</s:assert> | ||
</s:rule> | ||
</s:pattern> | ||
</s:schema> | ||
</t:schematron> | ||
</t:test> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
xmlns:t="http://xproc.org/ns/testsuite/3.0"> | ||
<t:info> | ||
<t:title>p:choose-074 (AB)</t:title> | ||
<t:revision-history> | ||
<t:revision> | ||
<t:date>2023-12-10</t:date> | ||
<t:author> | ||
<t:name>Achim Berndzen</t:name> | ||
</t:author> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>New tests</p> | ||
</t:description> | ||
</t:revision> | ||
</t:revision-history> | ||
</t:info> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>Test p:choose with a p:try child and test="false()" and no p:otherwise.</p> | ||
</t:description> | ||
<t:pipeline> | ||
<p:declare-step version="3.0" | ||
xmlns:p="http://www.w3.org/ns/xproc"> | ||
<p:output port="result"/> | ||
<p:identity> | ||
<p:with-input> | ||
<doc/> | ||
</p:with-input> | ||
</p:identity> | ||
<p:choose> | ||
<p:when test="false()"> | ||
<p:try> | ||
<p:add-attribute match="/doc" | ||
attribute-name="a" | ||
attribute-value="42"/> | ||
<p:catch> | ||
<p:identity> | ||
<p:with-input><error /></p:with-input> | ||
</p:identity> | ||
</p:catch> | ||
</p:try> | ||
</p:when> | ||
</p:choose> | ||
</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="/doc">Root element is not 'doc'.</s:assert> | ||
<s:assert test="count(/result/@*)=0">Root should not have an attribute.</s:assert> | ||
</s:rule> | ||
</s:pattern> | ||
</s:schema> | ||
</t:schematron> | ||
</t:test> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?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:choose-075 (AB)</t:title> | ||
<t:revision-history> | ||
<t:revision> | ||
<t:date>2023-12-10</t:date> | ||
<t:author> | ||
<t:name>Achim Berndzen</t:name> | ||
</t:author> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>New tests</p> | ||
</t:description> | ||
</t:revision> | ||
</t:revision-history> | ||
</t:info> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>Test p:choose with a p:group child and test="false()" and no p:otherwise.</p> | ||
</t:description> | ||
<t:pipeline> | ||
<p:declare-step version="3.0" | ||
xmlns:p="http://www.w3.org/ns/xproc"> | ||
<p:output port="result"/> | ||
<p:identity> | ||
<p:with-input> | ||
<doc/> | ||
</p:with-input> | ||
</p:identity> | ||
<p:choose> | ||
<p:when test="false()"> | ||
<p:group> | ||
<p:add-attribute match="/doc" | ||
attribute-name="a" | ||
attribute-value="42"/> | ||
</p:group> | ||
</p:when> | ||
</p:choose> | ||
</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="/doc">Root element is not 'doc'.</s:assert> | ||
<s:assert test="count(/result/@*)=0">Root should not have an attribute.</s:assert> | ||
</s:rule> | ||
</s:pattern> | ||
</s:schema> | ||
</t:schematron> | ||
</t:test> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?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:choose-076 (AB)</t:title> | ||
<t:revision-history> | ||
<t:revision> | ||
<t:date>2023-12-10</t:date> | ||
<t:author> | ||
<t:name>Achim Berndzen</t:name> | ||
</t:author> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>New tests</p> | ||
</t:description> | ||
</t:revision> | ||
</t:revision-history> | ||
</t:info> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>Test p:choose with a p:for-each child and test="false()" and no p:otherwise.</p> | ||
</t:description> | ||
<t:pipeline> | ||
<p:declare-step version="3.0" | ||
xmlns:p="http://www.w3.org/ns/xproc"> | ||
<p:output port="result"/> | ||
<p:identity> | ||
<p:with-input> | ||
<doc/> | ||
</p:with-input> | ||
</p:identity> | ||
<p:choose> | ||
<p:when test="false()"> | ||
<p:for-each> | ||
<p:add-attribute match="/doc" | ||
attribute-name="a" | ||
attribute-value="42"/> | ||
</p:for-each> | ||
</p:when> | ||
</p:choose> | ||
</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="/doc">Root element is not 'doc'.</s:assert> | ||
<s:assert test="count(/result/@*)=0">Root should not have an attribute.</s:assert> | ||
</s:rule> | ||
</s:pattern> | ||
</s:schema> | ||
</t:schematron> | ||
</t:test> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?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:if-034 (AB)</t:title> | ||
<t:revision-history> | ||
<t:revision> | ||
<t:date>2023-12-10</t:date> | ||
<t:author> | ||
<t:name>Achim Berndzen</t:name> | ||
</t:author> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>New tests</p> | ||
</t:description> | ||
</t:revision> | ||
</t:revision-history> | ||
</t:info> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>Test p:if with a sequence as DRP and test="false()".</p> | ||
</t:description> | ||
<t:pipeline> | ||
<p:declare-step version="3.0" | ||
xmlns:p="http://www.w3.org/ns/xproc"> | ||
<p:output port="result"/> | ||
<p:identity> | ||
<p:with-input> | ||
<doc/> | ||
<doc/> | ||
</p:with-input> | ||
</p:identity> | ||
<p:if test="false()" name="if"> | ||
<p:for-each> | ||
<p:add-attribute match="/doc" | ||
attribute-name="a" | ||
attribute-value="{p:iteration-position()}"/> | ||
</p:for-each> | ||
</p:if> | ||
<p:wrap-sequence wrapper="result"/> | ||
</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">Root element is not 'result'.</s:assert> | ||
<s:assert test="count(/result/*)=2">Root should only have one child.</s:assert> | ||
<s:assert test="/result/*[1]/name()='doc'">First child of 'result' is not 'doc'.</s:assert> | ||
<s:assert test="/result/*[2]/name()='doc'">Second child of 'result' is not 'doc'.</s:assert> | ||
</s:rule> | ||
</s:pattern> | ||
</s:schema> | ||
</t:schematron> | ||
</t:test> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:if-035 (AB)</t:title> | ||
<t:revision-history> | ||
<t:revision> | ||
<t:date>2023-12-10</t:date> | ||
<t:author> | ||
<t:name>Achim Berndzen</t:name> | ||
</t:author> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>New tests</p> | ||
</t:description> | ||
</t:revision> | ||
</t:revision-history> | ||
</t:info> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>Test p:if with a p:try child and test="false()".</p> | ||
</t:description> | ||
<t:pipeline> | ||
<p:declare-step version="3.0" | ||
xmlns:p="http://www.w3.org/ns/xproc"> | ||
<p:output port="result"/> | ||
<p:identity> | ||
<p:with-input> | ||
<doc/> | ||
</p:with-input> | ||
</p:identity> | ||
<p:if test="false()"> | ||
<p:try> | ||
<p:add-attribute match="/doc" | ||
attribute-name="a" | ||
attribute-value="42"/> | ||
<p:catch> | ||
<p:identity> | ||
<p:with-input><error /></p:with-input> | ||
</p:identity> | ||
</p:catch> | ||
</p:try> | ||
</p:if> | ||
</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="/doc">Root element is not 'doc'.</s:assert> | ||
<s:assert test="count(/result/@*)=0">Root should not have an attribute.</s:assert> | ||
</s:rule> | ||
</s:pattern> | ||
</s:schema> | ||
</t:schematron> | ||
</t:test> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
xmlns:t="http://xproc.org/ns/testsuite/3.0"> | ||
<t:info> | ||
<t:title>p:if-036 (AB)</t:title> | ||
<t:revision-history> | ||
<t:revision> | ||
<t:date>2023-12-10</t:date> | ||
<t:author> | ||
<t:name>Achim Berndzen</t:name> | ||
</t:author> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>New tests</p> | ||
</t:description> | ||
</t:revision> | ||
</t:revision-history> | ||
</t:info> | ||
<t:description xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>Test p:if with a p:group child and test="false()".</p> | ||
</t:description> | ||
<t:pipeline> | ||
<p:declare-step version="3.0" | ||
xmlns:p="http://www.w3.org/ns/xproc"> | ||
<p:output port="result"/> | ||
<p:identity> | ||
<p:with-input> | ||
<doc/> | ||
</p:with-input> | ||
</p:identity> | ||
<p:if test="false()"> | ||
<p:group> | ||
<p:add-attribute match="/doc" | ||
attribute-name="a" | ||
attribute-value="42"/> | ||
</p:group> | ||
</p:if> | ||
</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="/doc">Root element is not 'doc'.</s:assert> | ||
<s:assert test="count(/result/@*)=0">Root should not have an attribute.</s:assert> | ||
</s:rule> | ||
</s:pattern> | ||
</s:schema> | ||
</t:schematron> | ||
</t:test> |
Oops, something went wrong.