Skip to content

Commit

Permalink
Merge pull request #711 from xml-project/fix-710
Browse files Browse the repository at this point in the history
Attempt to fix issue 710
  • Loading branch information
xml-project committed May 28, 2024
2 parents 85c9f36 + 5b58ad5 commit 5c98b96
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 5 deletions.
14 changes: 11 additions & 3 deletions test-suite/tests/ab-p-run-035.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
<t:info>
<t:title>p:run-035</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-05-28</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Fixed test by removing attribute "exclude-inline-prefixes".</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2022-09-30</t:date>
<t:author>
Expand All @@ -15,12 +24,11 @@
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:run: Tests exclude-inline-prefixes.</p>
<p>Tests p:run: Tests prefix "xs" is correctly passed to dynamic pipeline.</p>
</t:description>
<t:pipeline>
<p:declare-step version="3.0" xmlns:p="http://www.w3.org/ns/xproc"
xmlns:xs = "http://www.w3.org/2001/XMLSchema"
exclude-inline-prefixes="xs">
xmlns:xs = "http://www.w3.org/2001/XMLSchema">
<p:output port="result" />
<p:run>
<p:with-input>
Expand Down
43 changes: 43 additions & 0 deletions test-suite/tests/ab-p-run-035a.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
code="err:XC0200" expected="fail" features="p-run">
<t:info>
<t:title>p:run-035a</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-05-28</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Created new test to check "exclude-inline-prefix" is correctly handled.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:run: Tests exclude-inline-prefixes.</p>
</t:description>
<t:pipeline>
<p:declare-step version="3.0" xmlns:p="http://www.w3.org/ns/xproc"
xmlns:xs = "http://www.w3.org/2001/XMLSchema"
exclude-inline-prefixes="xs">
<p:output port="result" />
<p:run>
<p:with-input>
<p:inline>
<p:declare-step version="3.0">
<p:output port="result" />
<p:option name="opt" as="xs:boolean" required="true" />
<p:identity>
<p:with-input><result>{$opt}</result></p:with-input>
</p:identity>
</p:declare-step>
</p:inline>
</p:with-input>
<p:run-option name="opt" select="true()" />
<p:output port="result" />
</p:run>
</p:declare-step>
</t:pipeline>
</t:test>
12 changes: 10 additions & 2 deletions test-suite/tests/ab-p-run-036.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
<t:info>
<t:title>p:run-036</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-05-28</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Fixed test by removing attribute "exclude-inline-prefixes".</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2022-10-01</t:date>
<t:author>
Expand All @@ -21,8 +30,7 @@
<p:declare-step version="3.0" xmlns:p="http://www.w3.org/ns/xproc"
xmlns:xs = "http://www.w3.org/2001/XMLSchema"
xmlns:map ="http://www.w3.org/2005/xpath-functions/map"
xmlns:test="http://test"
exclude-inline-prefixes="#all">
xmlns:test="http://test">
<p:output port="result" />
<p:run>
<p:with-input>
Expand Down
45 changes: 45 additions & 0 deletions test-suite/tests/ab-p-run-036a.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
code="err:XC0200" expected="fail" features="p-run">
<t:info>
<t:title>p:run-036a</t:title>
<t:revision-history>
<t:revision>
<t:date>2024-05-28</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Created new test to check "exclude-inline-prefix" is correctly handled.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests p:run: Tests exclude-inline-prefixes.</p>
</t:description>
<t:pipeline>
<p:declare-step version="3.0" xmlns:p="http://www.w3.org/ns/xproc"
xmlns:xs = "http://www.w3.org/2001/XMLSchema"
xmlns:map ="http://www.w3.org/2005/xpath-functions/map"
xmlns:test="http://test"
exclude-inline-prefixes="#all">
<p:output port="result" />
<p:run>
<p:with-input>
<p:inline>
<p:declare-step version="3.0">
<p:output port="result" />
<p:option name="opt" as="map(xs:QName, xs:string)" required="true" />
<p:identity>
<p:with-input><result>{map:keys($opt)[1] instance of xs:QName}</result></p:with-input>
</p:identity>
</p:declare-step>
</p:inline>
</p:with-input>
<p:run-option name="opt" select="map{'key':'value'}" />
<p:output port="result" />
</p:run>
</p:declare-step>
</t:pipeline>
</t:test>

0 comments on commit 5c98b96

Please sign in to comment.