generated from usnistgov/opensource-repo
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now XSpec for XQuery, plus a format-neutral XProc step to run any XSp…
…ec (dispatching to the correct type)
- Loading branch information
1 parent
ed57a95
commit efb73f6
Showing
18 changed files
with
169 additions
and
99 deletions.
There are no files selected for viewing
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
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,6 @@ | ||
module namespace ox = "http://csrc.nist.gov/ns/oscal-xproc3"; | ||
|
||
(: Simple function providing string manipulation :) | ||
declare function ox:SHOUT ($s as xs:string?) as xs:string? { upper-case($s) || '!!!' }; | ||
|
||
(: ox:SHOUT('Hey world') :) |
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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" | ||
xmlns:ox="http://csrc.nist.gov/ns/oscal-xproc3" | ||
query="http://csrc.nist.gov/ns/oscal-xproc3" query-at="shout-function.xqm"> | ||
|
||
<!-- Inspired by https://github.com/xspec/xspec/blob/master/tutorial/xquery-tutorial.xspec --> | ||
|
||
<x:scenario label="Calling function capitalize-first"> | ||
<x:call function="ox:SHOUT"> | ||
<x:param select="'hello'"/> | ||
</x:call> | ||
<x:expect label="Appears in UPPER CASE!!!, with GRATUITOUS EXCLAMATION POINTS!!!" select="'HELLO!!!'"/> | ||
<x:expect label="Exclaims quite loudly (whatever it says)" test="ends-with($x:result,'!!!')"/> | ||
</x:scenario> | ||
|
||
</x:description> |
This file was deleted.
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
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
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
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
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
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
Oops, something went wrong.