-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
xprocspec/src/it/it-xprocspec/src/test/xprocspec/steps/temp-dir-option.xpl
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,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<p:declare-step name="main" xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:ex="http://example.net/ns" type="ex:temp-dir-option" version="1.0"> | ||
|
||
<p:output port="result" primary="true"/> | ||
|
||
<p:option name="temp-dir" select="'default temp-dir value'"/> | ||
<p:option name="output-dir" select="'default output-dir value'"/> | ||
|
||
<p:add-attribute match="/*" attribute-name="temp-dir"> | ||
<p:input port="source"> | ||
<p:inline exclude-inline-prefixes="#all"> | ||
<c:result/> | ||
</p:inline> | ||
</p:input> | ||
<p:with-option name="attribute-value" select="$temp-dir"/> | ||
</p:add-attribute> | ||
|
||
<p:add-attribute match="/*" attribute-name="output-dir"> | ||
<p:with-option name="attribute-value" select="$output-dir"/> | ||
</p:add-attribute> | ||
|
||
</p:declare-step> |
18 changes: 18 additions & 0 deletions
18
.../it-xprocspec/src/test/xprocspec/tests/regression-tests/issue-4_temp-dir-option.xprocspec
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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="http://www.daisy.org/ns/xprocspec/xprocspec.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> | ||
<x:description xmlns:x="http://www.daisy.org/ns/xprocspec" xmlns:ex="http://example.net/ns" script="../../steps/temp-dir-option.xpl"> | ||
|
||
<x:scenario label="temp-dir"> | ||
<x:call step="ex:temp-dir-option"> | ||
<x:option name="temp-dir" select="'xprocspec temp-dir value'"/> | ||
<x:option name="output-dir" select="'xprocspec output-dir value'"/> | ||
</x:call> | ||
<x:context label="the result"> | ||
<x:document type="port" port="result"/> | ||
</x:context> | ||
<x:expect type="count" label="there should be one document on the result port" min="1" max="1"/> | ||
<x:expect type="xpath" label="the value of the temp-dir attribute should be 'xprocspec temp-dir value'" test="/*/@temp-dir" equals="'xprocspec temp-dir value'"/> | ||
<x:expect type="xpath" label="the value of the output-dir attribute should be 'xprocspec output-dir value'" test="/*/@output-dir" equals="'xprocspec output-dir value'"/> | ||
</x:scenario> | ||
|
||
</x:description> |