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.
More touchups; providing missing file for CI/CD
- Loading branch information
1 parent
3ab7d80
commit 6baa5dd
Showing
4 changed files
with
90 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" | ||
xmlns:c="http://www.w3.org/ns/xproc-step" version="3.0" | ||
xmlns:ox="http://csrc.nist.gov/ns/oscal-xproc3" | ||
type="ox:GRAB-RESOURCES" | ||
name="GRAB-RESOURCES"> | ||
|
||
|
||
<!-- Purpose: update local copies of some OSCAL resources from its release repository --> | ||
|
||
<p:variable name="download-path" select="'https://github.com/usnistgov/OSCAL/releases/download/v1.1.2'"/> | ||
|
||
<!-- A $prefix is used to tag messages, expected to match the process type --> | ||
<p:variable name="prefix" select="'[' || 'GRAB-RESOURCES' || ']'"/> | ||
|
||
<p:for-each message="{$prefix} Saving resources in ./lib ..."> | ||
<!-- iterating over each 'resource' as a discrete document node --> | ||
<p:with-input> | ||
<p:document href="{$download-path}/oscal_catalog_schema.xsd"/> | ||
</p:with-input> | ||
<p:variable name="filename" select="p:document-property(.,'base-uri') ! replace(.,'.*/','')"/> | ||
|
||
<!-- No exception handling since a failed load often produces a result | ||
making it difficult to anticipate what a failure looks like - --> | ||
<!-- NB - A Schematron error comes back as soon as this is out of line with /*/@type i.e. the file name | ||
- starting the @message with { $prefix } silences the error, but please reset $prefix --> | ||
|
||
<p:store message="{$prefix} ... saving { $filename }" href="lib/{ $filename }"/> | ||
</p:for-each> | ||
|
||
</p:declare-step> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
default namespace = "" | ||
|
||
# Schema represents an ad hoc semantic reduction describing ../archive/playbook_02_rendered.xml | ||
# RNC generated using Trang, no mods | ||
|
||
start = | ||
element catalog { | ||
element control { | ||
attribute id { xsd:NCName }, | ||
title, | ||
element part { | ||
attribute name { xsd:NCName }?, | ||
title?, | ||
(element ol { li+ } | ||
| element ul { li+ } | ||
| element p { (text | a)+ }+) | ||
}+ | ||
}+ | ||
} | ||
title = element title { text } | ||
a = | ||
element a { | ||
attribute href { xsd:anyURI }, | ||
text | ||
} | ||
li = element li { (text | a)+ } |